psy Posted January 18 Posted January 18 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". 3
Robin S Posted January 18 Posted January 18 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'); }); 4 2
psy Posted January 20 Author Posted January 20 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; });
bernhard Posted January 20 Posted January 20 @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 1
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