source: trunk/grails-app/views/templateEditor/elements/_liFieldInUse.gsp @ 558

Last change on this file since 558 was 558, checked in by roberth, 11 years ago

Improved template editor , stringlists and ontologyfields can be edited and extra checks are built in.

File size: 1.6 KB
Line 
1<g:set var="numUses" value="${templateField.numUses()}" />
2<span class="listButtons">
3  <img onClick="showTemplateFieldForm( 'templateField_' + ${templateField.id}); this.blur(); return false;" src="${createLinkTo( dir: 'images', file: 'icons/famfamfam/application_edit.png')}" alt="Edit template field properties" title="Edit template field properties">
4  <img class="disabled" src="${createLinkTo( dir: 'images', file: 'icons/famfamfam/delete.png')}" alt="Deleting this field is not possible. Field is used in ${numUses} templates." title="Deleting this field is not possible. Field is used in ${numUses} templates.">
5  <img onClick="addTemplateField( ${templateField.id}, null, true );" src="${createLinkTo( dir: 'images', file: 'icons/famfamfam/add.png')}" alt="Add field to template" title="Add field to template">
6</span>
7
8    <b>${templateField.name}</b>
9    (<g:if test="${templateField.unit}">${templateField.unit}, </g:if><g:render template="elements/${templateField.type.toString().toLowerCase().replaceAll(/ /,'_')}" model="[templateField: templateField]"/>)
10   
11<form class="templateField_form" id="templateField_${templateField.id}_form" action="updateField">
12        <g:hiddenField name="id" value="${templateField.id}" />
13        <g:hiddenField name="version" value="${templateField.version}" />
14        <p class="noEditsPossible">Editing not possible. Field is used in ${numUses} template(s).</p>
15        <g:render template="elements/disabledFieldForm" model="['templateField': templateField, 'ontologies': ontologies, 'fieldTypes': fieldTypes]"/>
16        <div class="templateFieldButtons">
17                <input type="button" value="Close" onClick="hideTemplateFieldForm( ${templateField.id} );">
18        </div>
19</form>
20
Note: See TracBrowser for help on using the repository browser.