Changeset 1244

Show
Ignore:
Timestamp:
09-12-10 14:24:17 (3 years ago)
Author:
work@…
Message:

- as description is a template field and hence may not exist in a study template, the view is now checking if the field exists or not, and sets a default description if it doesn't
- the like button on the study show page will only show if the study is published

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/study/show.gsp

    r1243 r1244  
    77        <g:if test="${studyList.size()}"> 
    88        <meta property="og:title" content="${studyList[0].title}"/> 
     9        <g:if test="${studyList[0].getField('description')}"> 
    910        <meta property="og:description" content="${(studyList[0].getFieldValue('Description')) ? studyList[0].getFieldValue('Description') : 'A study in the Generic Study Capture Framework'}"/> 
     11        </g:if><g:else> 
     12        <meta property="og:description" content="A study in the Generic Study Capture Framework"/> 
     13        </g:else> 
    1014        </g:if> 
    1115        <g:set var="entityName" value="${message(code: 'study.label', default: 'Study')}"/>