Advantages of alternative admin theme

I am upgrading from Omeka 2.4 to 2.5 and now paying the price for changes I made to the 2.4 admin default theme. A diff of the 2.4 and 2.5 releases identified 30 changed files in the admin\themes folder. I changed a subset of these files and need to integrate my changes into those newer 2.5 files.

If I were using my own admin theme, I think I would have to integrate the 2.5 changes into my theme which seems like as much work. Is that right?

  • Are there advantage of using an alternate admin theme other than being able to switch between your own and the default?

  • Will modifications to the admin theme be different/better with Omeka S?

Using a separate admin theme would allow you to avoid some changes, but you’d have to look through and figure out which are changes just for styling purposes, which you could avoid, and which are functional changes which you’d probably have to integrate.

As for S, there aren’t any current plans to make modifying the admin easier. It’s possible, and perhaps easier, with an S module, as the more modular nature of the system makes overriding any view, including an admin one, accessbile to any module. However, the same idea of the “real” admin changing and updates needing to be integrated would probably remain.

I’d be interested to know what kinds of changes you’re making to the admin. My preference would be to make things work so that customizations can be applied by more targeted modules or perhaps preferences, rather than having people have to resort to direct changes to the admin views.

John, you asked what kind of changes we made to the admin theme. I’ve provided a list below, but first let me explain a few things.

  1. Originally I was creating a proof-of-concept and was new to Omeka. Making changes to the admin theme and core files was a quick and dirty, but effective approach. Now we have funding and the plan is to upgrade to 2.5 and do it right.

  2. Our model does not use Collections and we use only one Item Type in addition to Dublin Core. As such, I removed unused Collection and Item Type features from the admin user interface.

  3. Most of our enhancements are done with plugins that I wrote, but I also had to change some core files. I’ll save that list for a separate post if you are interested.

Here’s the list of admin theme changes:

  • Remove the Collections menu item in the side menu.
  • Show recently modified items instead of collections on Dashboard.
  • Increase dashboard recent and modified items to 100.
  • Don’t announce new Omeka version except to super user.
  • Various CSS changes.
  • Browse Items: Show different columns (Identifier, Type, Subject instead of Creator, Item_Type, Date Added).
  • Browse Items: Show different Item details.
  • Don’t display element set description above elements on Edit page.
  • Show item Identifier at top of Show page instead of Omeka internal item ID.
  • Show item Identifier at top of Edit page instead of Omeka internal item ID.
  • Add a Cancel button in the right sidebar to return to the admin/show page.
  • Remove Collection dropdown.
  • Don’t display element set description above elements on Edit page.
  • Display item thumbnail while in Edit mode.
  • Remove Item Type selector from the Item Type Metadata tab (we use only one type).
  • Customize the search options.
  • Display thumbnail instead of square_thumbnail on admin/item/show/item#.
  • Change the thumbnail’s link to open the original file instead of going to the admin/files/show page.
  • Add an “Add an Item” button in the side bar.
  • Don’t show Collections panel in the side bar.
  • Open the item’s file attachments in a new browser tab (target = ‘_blank’).
  • Only show user name instead of “Welcome” with hyperlink to edit user.
  • Display thumbnail instead of square_thumbnail in search results.
  • Show item Identifier number in search results first column instead of record type.
  • Fixed bug in logic that toggles show/hide details where you had to click the button twice.
  • Add notice that our plugins must be disabled before reindexing.

For each change above (minus the ones that 2.5 addresses), and for each core file change, I need to determine which ones I can accomplish using plugin hooks or some other means. The goal is to change as few admin and core files as possible. Any suggestions you have would be most appreciated.

That’s quite the list of changes.

Some of this is doable with plugins now (like modifying the navigation entries), but much of it isn’t and your choice is pretty much to live with the default or go ahead with the alternate theme route.

CSS changes are one of those things that a plugin can easily layer over the existing admin theme though, as you can pretty much add any additional CSS file you want. You could transition some of what you’re doing into more CSS rather than actual removal (display: none the Collection dropdown rather than removing it, for example) and then you’d be able to do more.

  • Remove the Collections menu item in the side menu
  • Show recently modified items instead of collections on Dashboard.
  • Increase dashboard recent and modified items to 100
    • the dashboard panels filter could work here also… but it’d be a little inefficient as the panels get rendered before the filter runs
  • Don’t announce new Omeka version except to super user
    • this you can’t easily do right now
  • Various CSS changes
  • Browse Items: Show different columns (Identifier, Type, Subject instead of Creator, Item_Type, Date Added).
    • not easily done currently
  • Browse Items: Show different Item details.
  • Don’t display element set description above elements on Edit page.
    • CSS could do this pretty simply, I’d think
  • Show item Identifier at top of Show page instead of Omeka internal item ID.
    • no filtering for this, you could filter the title display to cram the identifier in there
  • Show item Identifier at top of Edit page instead of Omeka internal item ID.
    • ditto
  • Add a Cancel button in the right sidebar to return to the admin/show page.
  • Remove Collection dropdown.
    • CSS
  • Don’t display element set description above elements on Edit page.
    • CSS
  • Display item thumbnail while in Edit mode.
    • the “panel buttons” hook would probably work to put it in the sidebar, or admin_items_form_tabs hook to add to the main form tab
  • Remove Item Type selector from the Item Type Metadata tab (we use only one type).
    • Could be done with CSS though making the actual selection would be tougher, JavaScript also an option
  • Customize the search options.
    • Depends on the exact customizations, but much of this is accessible with hooks or filters
  • Display thumbnail instead of square_thumbnail on admin/item/show/item#.
    • Not currently possible… We just added thumbnail vs. square selection in 2.5 but in general not for the admin
  • Change the thumbnail’s link to open the original file instead of going to the admin/files/show page.
    • Also tough
  • Add an “Add an Item” button in the side bar.
    • admin_items_show_sidebar hook
  • Don’t show Collections panel in the side bar.
    • CSS
  • Open the item’s file attachments in a new browser tab (target = ‘_blank’).
    • Tough
  • Only show user name instead of “Welcome” with hyperlink to edit user.
    • Not easy. If you revoke the user’s permission to edit themselves they won’t get a link there, but the Welcome will remain
  • Display thumbnail instead of square_thumbnail in search results.
    • See above on thumbnails
  • Show item Identifier number in search results first column instead of record type.
    • Tough
  • Fixed bug in logic that toggles show/hide details where you had to click the button twice.
    • This may be fixed already in 2.5
  • Add notice that our plugins must be disabled before reindexing.
    • admin_settings_search_form hook

Thank you John for taking time to go item by item and make a suggestion for each. I had wondered about some of these approaches not knowing what was actually possible. Your suggestions, especially naming specific hooks, where to use CSS, and saying “tough” will save me a lot of guesswork and time.

I expect that by applying your ideas, I can move the majority of my changes out of the admin theme and into a plugin or CSS. This is really helpful. Thanks again.