|
PKP Bugzilla – Full Text Bug Listing |
| Summary: | Publicly display keywords in article abstract pages, if they exist | ||
|---|---|---|---|
| Product: | OJS | Reporter: | James MacGregor <jmacgreg> |
| Component: | User Interface | Assignee: | James MacGregor <jmacgreg> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | alec, pkp-support, pomax |
| Priority: | P3 | ||
| Version: | 2.3.x | ||
| Hardware: | All | ||
| OS: | All | ||
| Version Reported In: | Also Affects: | ||
| Attachments: |
adds "keywords" section to article view
OCS patch patch against ojs-stable-2_3 patch against ocs-stable-2_3 |
||
Created attachment 3530 [details]
adds "keywords" section to article view
This patch adds a "keywords" section to the article view, between abstract and citations; I made it use the "article.subject" key which we already had mapping to "keywords" so we won't need a new key for this.
there are a lot of <br/> in this template, incidentally. Should these be engineered out of existence (in the spirit of html/css separation)? No, leave the <br/> tags for now; best not to disrupt the CSS. This will probably need porting to OCS as well, if you get the chance. Created attachment 3535 [details]
OCS patch
this patches the same issue in OCS, in the templates/paper/paper.tlp file
On closer look -- the keywords should be fully escaped, rather than permitting limited HTML, as per the use of getLocalizedSubject in other template files. (This is for both OJS and OCS.) Created attachment 3545 [details]
patch against ojs-stable-2_3
adds keywords between abstract and citations (fully escaped) in OJS
Created attachment 3546 [details]
patch against ocs-stable-2_3
adds keywords between abstract and citations (fully escaped) in OCS
Committed to ojs-stable-2_3, ojs master, ocs-stable-2_3, ocs master. |
Keywords aren't currently displayed publicly on article abstract pages (except in the RT, if enabled, which is a little buried). I think it's pretty standard that they be publicly displayed if they exist. The following code does just this (I've placed it between the abstract and citation code chunks in in templates/article/article.tpl), but should probably be refactored slightly (eg. this should probably have its own locale key): {if $article->getLocalizedSubject()} <h4>{translate key="rt.metadata.pkp.subject"}</h4> <br /> <div>{$article->getLocalizedSubject()|strip_unsafe_html|nl2br}</div> <br /> {/if}