We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 6566

Summary: Publicly display keywords in article abstract pages, if they exist
Product: OJS Reporter: James MacGregor <jmacgreg>
Component: User InterfaceAssignee: James MacGregor <jmacgreg>
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

Description James MacGregor 2011-04-02 17:25:22 PDT
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 />
                <br />
Comment 1 Mike Kamermans 2011-06-01 12:55:29 PDT
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.
Comment 2 Mike Kamermans 2011-06-01 13:01:17 PDT
there are a lot of <br/> in this template, incidentally. Should these be engineered out of existence (in the spirit of html/css separation)?
Comment 3 Alec Smecher 2011-06-01 15:10:20 PDT
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.
Comment 4 Mike Kamermans 2011-06-06 17:54:55 PDT
Created attachment 3535 [details]
OCS patch

this patches the same issue in OCS, in the templates/paper/paper.tlp file
Comment 5 Alec Smecher 2011-06-07 12:53:17 PDT
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.)
Comment 6 Mike Kamermans 2011-06-07 13:39:10 PDT
Created attachment 3545 [details]
patch against ojs-stable-2_3

adds keywords between abstract and citations (fully escaped) in OJS
Comment 7 Mike Kamermans 2011-06-07 13:39:35 PDT
Created attachment 3546 [details]
patch against ocs-stable-2_3

adds keywords between abstract and citations (fully escaped) in OCS
Comment 8 Alec Smecher 2011-06-07 13:46:10 PDT
Committed to ojs-stable-2_3, ojs master, ocs-stable-2_3, ocs master.