Hi here is views integration for file type.

Patch contains:
- Field handler: display human readable name or machine name
- Sort handler: sort my machine name
- Filter handler: Exposed Filter with Selectbox/Dropdown
- Argument handler (Contextual filter)

Comments

webflo’s picture

webflo’s picture

Sorry i uploaded the wrong patch.

dave reid’s picture

Status: Needs review » Needs work

The views data for the file_managed table is already managed by the modules/system.views.inc in views itself. You need to alter that rather than provide your own hook_views_data().

dave reid’s picture

Status: Needs work » Needs review

Duh, now I see that's basically what you are doing.

e2thex’s picture

do you think we could change the base class for the argument handler to views_handler_argument_string? this way we could get multiple values as an option.

webflo’s picture

Sure good idea. Use need the lasted version of views to run this patch. See #783514: implement a break_strings method and use it in string argument handler.

Shadlington’s picture

Subbing

e2thex’s picture

This seems to work well I have attached a version that can be used with drush make.

Status: Needs review » Needs work

The last submitted patch, views-integration-file-entity-type-1192326-6-D7-drush.patch, failed testing.

dave reid’s picture

Title: Views intergration for file entity type. » Views field integration for file type/bundle
Status: Needs work » Needs review
StatusFileSize
new5.4 KB

Status: Needs review » Needs work

The last submitted patch, 1192326-file-entity-file-type-views.patch, failed testing.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new5.4 KB

Status: Needs review » Needs work

The last submitted patch, 1192326-file-entity-file-type-views.patch, failed testing.

dave reid’s picture

Component: Code » File entity
dave reid’s picture

Project: D7 Media » File Entity (fieldable files)
Component: File entity » Views integration
dave reid’s picture

Assigned: Unassigned » dave reid
Status: Needs work » Needs review
StatusFileSize
new0 bytes

Revised patch based on current code.

dave reid’s picture

StatusFileSize
new6.41 KB
dave reid’s picture

dave reid’s picture

Status: Needs review » Postponed
webflo’s picture

Status: Postponed » Needs review
StatusFileSize
new6.5 KB

Rerolled. Marked as "needs review" since #1227080: Handle existing files {file_managed}.type fields on install is fixed.

aaron’s picture

Status: Needs review » Reviewed & tested by the community

works as advertised.

dave reid’s picture

Status: Reviewed & tested by the community » Fixed

Gave this one final test and it's still good. Committed to Git.
http://drupalcode.org/project/file_entity.git/commit/dce2363

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ñull’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Closed (fixed) » Patch (to be ported)

Can this be ported to 7.x-2.x?

dave reid’s picture

Status: Patch (to be ported) » Closed (fixed)

It should be already applied because the 7.x-1.x branch was 'renamed' to 7.x-2.x to match the Media version. Please check the code before re-opening an issue.