Changeset 7403

Show
Ignore:
Timestamp:
03/11/09 17:07:24 (17 months ago)
Author:
josowski
Message:

Adding the competing interest statement to the list ratings page

References #1136

Location:
head/ambra/webapp/src/main
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • head/ambra/webapp/src/main/java/org/topazproject/ambra/rating/action/ArticleRatingSummary.java

    r7197 r7403  
    4646  private String commentTitle; 
    4747  private String commentValue; 
     48  private String ciStatement; 
    4849 
    4950  public ArticleRatingSummary(String articleURI, String articleTitle) { 
     
    6364    this.commentTitle = TextUtils.escapeHtml(rating.getBody().getCommentTitle()); 
    6465    this.commentValue = TextUtils.escapeHtml(rating.getBody().getCommentValue()); 
     66    this.ciStatement = TextUtils.escapeHtml(rating.getBody().getCIStatement()); 
    6567 
    6668    this.creatorURI = rating.getCreator(); 
     
    179181    return commentValue; 
    180182  } 
     183 
     184  /** 
     185   * Set the CI statment 
     186   * @param value the CI Statement value 
     187   */ 
     188  public void setCIStatement(String value) { 
     189    // protect against markup 
     190    this.ciStatement = TextUtils.escapeHtml(value); 
     191  } 
     192 
     193  /** 
     194  * Return the CIStatement. 
     195  * @return CIStatement as String. 
     196  */ 
     197  public String getCIStatement() { 
     198    return this.ciStatement; 
     199  } 
    181200} 
  • head/ambra/webapp/src/main/webapp/rating/ratedComments.ftl

    r5684 r7403  
    114114                <p>${articleRatingSummary.commentValue}</p> 
    115115              </#if> 
     116              <div class="cis"> 
     117                <#if articleRatingSummary.CIStatement??> 
     118                  <b>Competing interests declared:</b> ${articleRatingSummary.CIStatement} 
     119                <#else> 
     120                  <b>No competing interests declared.</b> 
     121                </#if> 
     122                </div> 
    116123            </blockquote> 
    117124          </div>