phase2/oa_contextual_tabs — pull request #3 by dsnopek (2014-07-09 20:21:46+00:00)
Title: Give node/%node/archive-content a title callback so it can change when the node is already archived.

Currently, oa_contextual_tabs is adding a "Archive This Content" link under the gear icon on nodes. After a node has been archived, it still says "Archive This Content" even though that will take the user to a page to remove it from the archive!

This PR uses a title callback to dynamically change what that link says depending on if the node is already archived or not.

It uses the 'flag_short' and 'unflag_short' labels from the Flag itself, which say "Archive This" and "Remove this from archive". While that's a little inconsistent (with both "This" and "this"), I think using those labels is the right thing to do. If we want to make them consistent, that should be changed in oa_archive which sets those labels.