Ignore:
Timestamp:
Jun 10, 2010, 4:45:53 PM (10 years ago)
Author:
roberth
Message:

Improved the TemplateEditor? again: templates can be created and removed and some checks were built in to ensure that the same fields in different templates point to the same TemplateField? object.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/templateEditor/elements/_liFieldNotInUse.gsp

    r544 r556  
    1 <a class="title" href="#" onClick="showTemplateFieldForm( 'templateField_' + ${templateField.id}); this.blur(); return false;">
    2         <span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
    3         <b>${templateField.name}</b>
    4         (<g:render template="elements/${templateField.type.toString().toLowerCase().replaceAll(/ /,'_')}" />)
    5 </a>
     1<span class="listButtons">
     2  <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">
     3  <img onClick="if( confirm( 'Are you sure?' ) ) { deleteTemplateField( ${templateField.id} ); }" src="${createLinkTo( dir: 'images', file: 'icons/famfamfam/delete.png')}" alt="Delete this template field" title="Delete this template field">
     4  <img onClick="addTemplateField( ${templateField.id} ); moveFieldListItem( ${templateField.id}, '#selectedTemplateFields' );" src="${createLinkTo( dir: 'images', file: 'icons/famfamfam/add.png')}" alt="Add field to template" title="Add field to template">
     5</span>
    66
    7 <form class="templateField_form" id="templateField_${templateField.id}_form" action="update">
     7<b>${templateField.name}</b>
     8(<g:if test="${templateField.unit}">${templateField.unit}, </g:if><g:render template="elements/${templateField.type.toString().toLowerCase().replaceAll(/ /,'_')}" model="[templateField: templateField]" />)
     9
     10<form class="templateField_form" id="templateField_${templateField.id}_form" action="updateField">
    811        <g:hiddenField name="id" value="${templateField.id}" />
    912        <g:hiddenField name="version" value="${templateField.version}" />
     
    1114        <div class="templateFieldButtons">
    1215                <input type="button" value="Save" onClick="updateTemplateField( ${templateField.id} );">
    13                 <input type="button" value="Delete" onClick="deleteTemplateField( ${templateField.id} );">
    1416                <input type="button" value="Close" onClick="hideTemplateFieldForm( ${templateField.id} );">
    1517        </div>
Note: See TracChangeset for help on using the changeset viewer.