Ignore:
Timestamp:
Apr 4, 2009, 6:41:25 PM (15 years ago)
Author:
gav
Message:

Installed help-balloons plugin.
Adjust security config to allow javascript and help-balloons folders.
Add "Repeat password" to change password.
Detailed Entry views, including only allow user to edit their own entries.
Adjust Entry constraints.
Add comments to layouts/main.gsp.
Work on TaskDetailed? view to show entry durations and allow editing.
Entry duration formatting to CSS and increased base font size to 14px.

Location:
trunk/src/grails-app/views/entryDetailed
Files:
4 edited

Legend:

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

    r92 r98  
    4242                                </td>
    4343                                <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'comment','errors')}">
    44                                     <textarea style="width:450px" rows="5" cols="40" name="comment">${fieldValue(bean:entryInstance, field:'comment')}</textarea>
     44                                    <textarea rows="5" cols="40" name="comment">${fieldValue(bean:entryInstance, field:'comment')}</textarea>
    4545                                </td>
    4646                            </tr>
     
    5757                            <tr class="prop">
    5858                                <td valign="top" class="name">
    59                                     <label for="durationHour">Duration Hour:</label>
     59                                    <label for="durationHour">Duration:</label>
    6060                                </td>
    61                                 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'durationHour','errors')}">
    62                                     <input type="text" id="durationHour" name="durationHour" value="${fieldValue(bean:entryInstance,field:'durationHour')}" />
    63                                 </td>
    64                             </tr>
    65                        
    66                             <tr class="prop">
    67                                 <td valign="top" class="name">
    68                                     <label for="durationMinute">Duration Minute:</label>
    69                                 </td>
    70                                 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}">
    71                                     <input type="text" id="durationMinute" name="durationMinute" value="${fieldValue(bean:entryInstance,field:'durationMinute')}" />
    72                                 </td>
    73                             </tr>
    7461
    75                        
     62                                <td valign="top" class="value">
     63                                    <input class="duration ${hasErrors(bean:entryInstance,field:'durationHour','errors')}"
     64                                        type="text" id="durationHour" name="durationHour"
     65                                        value="${fieldValue(bean:entryInstance,field:'durationHour')}" />
     66                                    :
     67                                    <input class="duration ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}"
     68                                        type="text" id="durationMinute" name="durationMinute"
     69                                        value="${fieldValue(bean:entryInstance,field:'durationMinute')}" />
     70                                    <g:helpBalloon code="entry.duration" />
     71                                </td>
     72                            </tr>
     73                     
    7674                            <tr class="prop">
    7775                                <td valign="top" class="name">
  • trunk/src/grails-app/views/entryDetailed/edit.gsp

    r92 r98  
    5252                                </td>
    5353                                <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateDone','errors')}">
    54                                     <g:datePicker name="dateDone" value="${entryInstance?.dateDone}" ></g:datePicker>
     54                                    <g:datePicker name="dateDone" value="${entryInstance?.dateDone}" precision="day"></g:datePicker>
    5555                                </td>
    5656                            </tr>
     
    5858                            <tr class="prop">
    5959                                <td valign="top" class="name">
    60                                     <label for="durationHour">Duration Hour:</label>
     60                                    <label for="durationHour">Duration:</label>
    6161                                </td>
    62                                 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'durationHour','errors')}">
    63                                     <input type="text" id="durationHour" name="durationHour" value="${fieldValue(bean:entryInstance,field:'durationHour')}" />
    64                                 </td>
    65                             </tr>
    66                        
    67                             <tr class="prop">
    68                                 <td valign="top" class="name">
    69                                     <label for="durationMinute">Duration Minute:</label>
    70                                 </td>
    71                                 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}">
    72                                     <input type="text" id="durationMinute" name="durationMinute" value="${fieldValue(bean:entryInstance,field:'durationMinute')}" />
    73                                 </td>
    74                             </tr>
     62
     63                                <td valign="top" class="value">
     64                                    <input class="duration ${hasErrors(bean:entryInstance,field:'durationHour','errors')}"
     65                                        type="text" id="durationHour" name="durationHour"
     66                                        value="${fieldValue(bean:entryInstance,field:'durationHour')}" />
     67                                    :
     68                                    <input class="duration ${hasErrors(bean:entryInstance,field:'durationMinute','errors')}"
     69                                        type="text" id="durationMinute" name="durationMinute"
     70                                        value="${fieldValue(bean:entryInstance,field:'durationMinute')}" />
     71                                    <g:helpBalloon code="entry.duration" />
     72                                </td>
     73                            </tr>
    7574                       
    7675                            <tr class="prop">
     
    7877                                    <label for="dateEntered">Date Entered:</label>
    7978                                </td>
    80                                 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateEntered','errors')}">
    81                                     <g:datePicker name="dateEntered" value="${entryInstance?.dateEntered}" ></g:datePicker>
     79                                <td valign="top" class="value">
     80                                    <g:formatDate date="${entryInstance?.dateEntered}" format="EEE, dd MMM yyyy @ HH:mm"/>
    8281                                </td>
    8382                            </tr>
     
    8786                                    <label for="enteredBy">Entered By:</label>
    8887                                </td>
    89                                 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'enteredBy','errors')}">
    90                                     <g:select optionKey="id" from="${Person.list()}" name="enteredBy.id" value="${entryInstance?.enteredBy?.id}" ></g:select>
     88                                <td valign="top" class="value">
     89                                    ${entryInstance?.enteredBy?.toString()}
    9190                                </td>
    9291                            </tr>
  • trunk/src/grails-app/views/entryDetailed/list.gsp

    r92 r98  
    3030                                <g:sortableColumn property="dateDone" title="Date Done" />
    3131                       
    32                                 <g:sortableColumn property="durationHour" title="Duration Hour" />
    33                        
    34                                 <g:sortableColumn property="durationMinute" title="Duration Minute" />
    35                        
     32                                <g:sortableColumn property="enteredBy" title="Entered By" />
     33
     34                            <th>Edit</th>
     35
     36                            <th>Show</th>
     37
    3638                        </tr>
    3739                    </thead>
     
    4042                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
    4143                       
    42                             <td><g:link action="show" id="${entryInstance.id}">${fieldValue(bean:entryInstance, field:'id')}</g:link></td>
     44                            <td>${fieldValue(bean:entryInstance, field:'id')}</td>
    4345                       
    4446                            <td>${fieldValue(bean:entryInstance, field:'task')}</td>
     
    4850                            <td>${fieldValue(bean:entryInstance, field:'dateDone')}</td>
    4951                       
    50                             <td>${fieldValue(bean:entryInstance, field:'durationHour')}</td>
    51                        
    52                             <td>${fieldValue(bean:entryInstance, field:'durationMinute')}</td>
     52                            <td>${fieldValue(bean:entryInstance, field:'enteredBy')}</td>
     53
     54                            <td><g:link action="edit" id="${entryInstance.id}">Edit</g:link></td>
     55
     56                            <td><g:link action="show" id="${entryInstance.id}">Show</g:link></td>
    5357                       
    5458                        </tr>
  • trunk/src/grails-app/views/entryDetailed/show.gsp

    r92 r98  
    3333                            <td valign="top" class="name">Task:</td>
    3434                           
    35                             <td valign="top" class="value"><g:link controller="task" action="show" id="${entryInstance?.task?.id}">${entryInstance?.task?.encodeAsHTML()}</g:link></td>
     35                            <td valign="top" class="value"><g:link controller="taskDetailed" action="show" id="${entryInstance?.task?.id}">${entryInstance?.task?.encodeAsHTML()}</g:link></td>
    3636                           
    3737                        </tr>
     
    7575                            <td valign="top" class="name">Entered By:</td>
    7676                           
    77                             <td valign="top" class="value"><g:link controller="person" action="show" id="${entryInstance?.enteredBy?.id}">${entryInstance?.enteredBy?.encodeAsHTML()}</g:link></td>
     77                            <td valign="top" class="value">${entryInstance?.enteredBy?.encodeAsHTML()}</td>
    7878                           
    7979                        </tr>
     
    8282                            <td valign="top" class="name">Entry Type:</td>
    8383                           
    84                             <td valign="top" class="value"><g:link controller="entryType" action="show" id="${entryInstance?.entryType?.id}">${entryInstance?.entryType?.encodeAsHTML()}</g:link></td>
     84                            <td valign="top" class="value">${entryInstance?.entryType?.encodeAsHTML()}</td>
    8585                           
    8686                        </tr>
Note: See TracChangeset for help on using the changeset viewer.