Citation info on volume pages - #8188
Conversation
|
Build successful. Some useful links:
This preview will be removed when the branch is merged. |
mbollmann
left a comment
There was a problem hiding this comment.
In general, if Volume pages will have more or less the same components as Paper pages, we should factor them out into Hugo partials rather than duplicating all the code and markup in two places.
| {{ $paper := index hugo.Data.volumes .Params.anthology_id }} | ||
| <script src="{{ relURL "js/clipboard.min.js" }}"></script> | ||
| <script src="{{ relURL "js/FileSaver.js" }}"></script> | ||
| <script> |
There was a problem hiding this comment.
If we have the same dialog on two kinds of layout pages, we shouldn’t duplicate all the code.
| {{ partial "author_link.html" (dict "ctx" $ "person" $person) | chomp }}{{ if ne (add $index 1) $len }}, {{ end }} | ||
| {{ end }} | ||
| <span class="text-muted">({{ cond (eq (len .) 1) "Editor" "Editors" }})</span> | ||
| </p> |
There was a problem hiding this comment.
Why’s there an added </p> without an added <p> somewhere?
There was a problem hiding this comment.
There was an unclosed <p> in the existing template.
| {{ end }} | ||
| </div> | ||
|
|
||
| <div class="modal fade" id="metadataModal" tabindex="-1" aria-labelledby="metadataModalLabel" aria-hidden="true"> |
There was a problem hiding this comment.
Same for the dialog, this shouldn’t be duplicated but probably be a Hugo partial.
| {{ $expfile := printf "volumes/%s.xml" $anthology_id }} | ||
| {{ if (fileExists (printf "/data-export/%s" $expfile)) }} | ||
| <a class="btn btn-secondary btn-sm" href="{{ $expfile | relURL }}">MODS XML</a> | ||
| <dt class="acl-button-row">Bibkey:</dt> |
There was a problem hiding this comment.
I’m wondering the same thing (re: duplication) about this list of attributes, is it exactly identical to regular papers now? Though this could maybe also be tackled after #8000.
|
Re: paper template vs. volume template, here are the differences (you can do a diff between the files to see in detail):
The cite modal dialog is the same AFAICT (haven't tested it because it relies on changes to the I am not sure refactoring to abstract over just these two pages would actually make the site easier to maintain. It would make the code organization more complex and raises the possibility of making a change that applies to both but forgetting to test it for both. (If there is a new template being created for Talks, that would be a good time to see what is shared across the 3 templates and abstract it.) |
|
I wanted to see what library changes would be necessary for this. Having some trouble getting citation.py to recognize Presumably #8000 will make some of this easier. |

Update the volume page template to mirror the paper page template more closely: include citation info/dialog, "Fix data" dialog
closes #8169