HistoryAtState / hsg-shell

Source code for the history.state.gov website
https://history.state.gov
9 stars 13 forks source link

[frus] Disable link to unpublished volume in administration listings #166

Closed joewiz closed 4 years ago

joewiz commented 8 years ago

In https://history.state.gov/historicaldocuments/reagan, notice that volumes that have not yet been published are links:

screen_shot_2016-03-24_at_2_38_45_pm

(The 3rd entry here is the only one that has been published.)

Compare to hsg-shell http://localhost:8080/exist/apps/hsg-shell/historicaldocuments/reagan:

screen shot 2016-03-24 at 2 40 04 pm

(Disregard the fact that the 3rd entry says the volume is still in production; the data is just out of date.)

If possible, please disable the link for unpublished titles, and restore the commented-out link on the publication status at https://github.com/eXistSolutions/hsg-shell/blob/master/modules/frus-html.xqm#L257.

The motivation is to help users see clearly which volumes have been published vs. those that are not yet available at all.

joewiz commented 8 years ago

The fix will require a change to the pages/historicaldocuments/administrations.html page's templating behavior, which outputs an <a> element around all volume titles. We need to disable the link depending on the publication status of the volume; as an example of this logic, see https://github.com/eXistSolutions/hsg-shell/blob/master/modules/frus-html.xqm#L209 and https://github.com/eXistSolutions/hsg-shell/blob/master/modules/frus-html.xqm#L233.

I'm not sure how to perform conditional logic in the templating; or if you want to move this logic back into the frus-html.xqm module.

joewiz commented 4 years ago

The link is actually useful for registering the URL and volume ID, allowing linking to a volume even before it's been published.