Ignore:
Timestamp:
Oct 22, 2009, 8:26:09 PM (15 years ago)
Author:
gav
Message:

Add Department domain class, controller, views and demo data.
Add costCode and department attributes to SystemSection? and regen non-detailed controller and views, adjust detailed views to suite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/systemSectionDetailed/create.gsp

    r151 r162  
    2929                            <tr class="prop">
    3030                                <td valign="top" class="name">
     31                                    <label for="name">Name:</label>
     32                                </td>
     33                                <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'name','errors')}">
     34                                    <input type="text" id="name" name="name" value="${fieldValue(bean:systemSectionInstance,field:'name')}"/>
     35                                </td>
     36                            </tr>
     37                       
     38                            <tr class="prop">
     39                                <td valign="top" class="name">
    3140                                    <label for="description">Description:</label>
    3241                                </td>
     
    3443                                    <input type="text" id="description" name="description" value="${fieldValue(bean:systemSectionInstance,field:'description')}"/>
    3544                                </td>
    36                             </tr> 
     45                            </tr>
    3746                       
    3847                            <tr class="prop">
    3948                                <td valign="top" class="name">
    40                                     <label for="isActive">Is Active:</label>
     49                                    <label for="costCode">Cost Code:</label>
    4150                                </td>
    42                                 <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'isActive','errors')}">
    43                                     <g:checkBox name="isActive" value="${systemSectionInstance?.isActive}" ></g:checkBox>
     51                                <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'costCode','errors')}">
     52                                    <input type="text" id="costCode" name="costCode" value="${fieldValue(bean:systemSectionInstance,field:'costCode')}"/>
    4453                                </td>
    4554                            </tr>
     
    4756                            <tr class="prop">
    4857                                <td valign="top" class="name">
    49                                     <label for="name">Name:</label>
     58                                    <label for="department">Department:</label>
    5059                                </td>
    51                                 <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'name','errors')}">
    52                                     <input type="text" id="name" name="name" value="${fieldValue(bean:systemSectionInstance,field:'name')}"/>
     60                                <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'department','errors')}">
     61                                    <g:select optionKey="id" from="${Department.list()}" name="department.id" value="${systemSectionInstance?.department?.id}" ></g:select>
    5362                                </td>
    5463                            </tr>
     
    6372                            </tr>
    6473                       
     74                            <tr class="prop">
     75                                <td valign="top" class="name">
     76                                    <label for="isActive">Is Active:</label>
     77                                </td>
     78                                <td valign="top" class="value ${hasErrors(bean:systemSectionInstance,field:'isActive','errors')}">
     79                                    <g:checkBox name="isActive" value="${systemSectionInstance?.isActive}" ></g:checkBox>
     80                                </td>
     81                            </tr>
     82                       
    6583                        </tbody>
    6684                    </table>
Note: See TracChangeset for help on using the changeset viewer.