psy Posted Saturday at 10:21 AM Share Posted Saturday at 10:21 AM AFAIK, a PageFiles field shows all files, including file descriptions, tags, etc. The visibility option is for the entire field. It would be helpful to minimise the file list in admin to filename or custom fields, eg {basename} {modified}, only in the admin area similar to repeaters. A down arrow could expand individual file meta. When a page has lots of attached files, it's cumbersome to scroll through all the files with descriptions & tags when the field visibility is "Open". 2 Link to comment Share on other sites More sharing options...
Robin S Posted Saturday at 10:58 PM Share Posted Saturday at 10:58 PM Sounds good. In the meantime it's easy to do with a little custom CSS and JS. .InputfieldFileData { display:none; } .data-open + .InputfieldFileData { display:block; } $(document).on('click', '.InputfieldFileInfo', function() { $(this).toggleClass('data-open'); }); 3 1 Link to comment Share on other sites More sharing options...
psy Posted 3 hours ago Author Share Posted 3 hours ago And the final piece of the puzzle, again thanks to @Robin S, in site/templates/admin.php, see this post: $wire->addHookAfter('AdminTheme::getExtraMarkup', function(HookEvent $event) { $scripts = wire('files')->render('inc/admin-tpl-hook'); $parts = $event->return; $parts['head'] .= $scripts; $event->return = $parts; }); Link to comment Share on other sites More sharing options...
bernhard Posted 2 hours ago Share Posted 2 hours ago @psy in admin.php you can do this (important!) before the final require() statement: $config->scripts->add($config->urls->templates . 'admin.js'); I think this should be the default: https://github.com/processwire/processwire-requests/issues/552 And if anybody created an admin tweak for it anybody could install it with a single checkbox: https://github.com/baumrock/RockAdminTweaks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now