omeka / Omeka

A flexible web publishing platform for the display of library, museum and scholarly collections, archives and exhibitions.
http://omeka.org
GNU General Public License v3.0
487 stars 194 forks source link

Navigation pages should be able to automatically appear #332

Closed zerocrates closed 12 years ago

zerocrates commented 12 years ago

When you install or reactivate a plugin, it can set the visible option as false in the array it adds to the public navigation hook, so it's not automatically checked when you go to the Navigation page.

If you don't set visible or you set it to true, the checkbox is pre-checked when you go to that page. However, if you don't go to Navigation and re-save there, the new page, even though its pre-checked, doesn't actually get added to the navigation.

If a plugin's adding a page with visiblenon-false, it should automatically show up in the navigation without further user intervention. Obviously the user can go to Navigation and un-check it, but we do want to maintain the old sense that things would get added there automatically.

I believe the code that's displaying the public nav now already goes through the filter, but with more of an eye to removing pages that are now gone. I'd like to see it adding new pages where appropriate as well.

willynilly commented 12 years ago

@zerocrates After merging with the lastest master, all the styling on Navigation has been messed up. Prior to merging with master, my last commit worked great. What changed?

willynilly commented 12 years ago

@zerocrates False alarm. It looks like my CSS cache in my browser needed to be refreshed. I think it looks good.

willynilly commented 12 years ago

@zerocrates @kimisgold Actually, it may be a true alarm. Elements are disappearing on the page. Can you test out my code. I worry that the navigation javascript is broken if class names were changed on master.

zerocrates commented 12 years ago

Kim recently changed a lot of the classes and CSS for the navigation, but the javascript is updated to account for those changes, at least some of them.

What specifically isn't working?

willynilly commented 12 years ago

Well, I when I move an user-generated nav link to the top of the list and then resave, it disappears. This does not happen on master. This makes me think that it may be a bug in my refactoring. I am looking into now.

willynilly commented 12 years ago

I suspect the problem lies in Omeka_Navigation_Form::_saveNavigationFromPost, which is not using the new Omeka_Navigation changes.

willynilly commented 12 years ago

I need to look at how it removes expired pages.

willynilly commented 12 years ago

So I think I fixed the issue with bcf975caa4eae0d08842b876fc0ed2963d312d78

willynilly commented 12 years ago

@zerocrates I removed the activate and deactivate plugin hooks like you requested.

willynilly commented 12 years ago

@zerocrates I need this merged so I can finish up on the Omeka_Navigation unit testing.

willynilly commented 12 years ago

@zerocrates can you close this issue?