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

Last change on this file since 1159 was 1159, checked in by robert@…, 12 years ago

Improved the template editor so that template fields can be removed from templates, even if the templates are in use, but only if the template fields are never filled. (see ticket #74)

Also changed the user registration so that the administrator confirmation mails will be sent to the administrators in production environment, but still to gscfproject@… in other environments.

  • Property svn:keywords set to Author Date Rev
File size: 1.7 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="${resource( dir: 'images/icons', file: 'application_edit.png', plugin: 'famfamfam' )}" alt="Edit template field properties" title="Edit template field properties">
4  <img class="disabled" src="${resource( dir: 'images/icons', file: 'delete.png', plugin: 'famfamfam' )}" 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="${resource( dir: 'images/icons', file: 'add.png', plugin: 'famfamfam' )}" 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.