Changeset 331


Ignore:
Timestamp:
Feb 9, 2010, 1:36:22 AM (14 years ago)
Author:
gav
Message:

Add comment attribute to Section and limit description to 75 char.
Update detailed views to suite.

Location:
trunk/grails-app
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/Section.groovy

    r268 r331  
    66    String name
    77    String description = ""
     8    String comment = ""
    89    boolean isActive = true
    910
     
    1617    static constraints = {
    1718        name(maxSize:50, unique:true, blank:false)
    18         description(maxSize:100)
     19        description(maxSize:75)
     20        comment(maxSize:500)
    1921        isActive()
    2022    }
  • trunk/grails-app/views/sectionDetailed/create.gsp

    r308 r331  
    3131                                </td>
    3232                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'name','errors')}">
    33                                     <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:sectionInstance,field:'name')}"/>
     33                                    <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:sectionInstance,field:'name')}"/>
    3434                                </td>
    3535                            </tr>
     
    4040                                </td>
    4141                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'description','errors')}">
    42                                     <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:sectionInstance,field:'description')}"/>
     42                                    <input type="text" class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:sectionInstance,field:'description')}"/>
     43                                </td>
     44                            </tr>
     45                           
     46                            <tr class="prop">
     47                                <td valign="top" class="name">
     48                                    <label for="comment">Comment:</label>
     49                                </td>
     50                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'comment','errors')}">
     51                                    <textarea rows="5" cols="40" name="comment">${fieldValue(bean:sectionInstance, field:'comment')}</textarea>
    4352                                </td>
    4453                            </tr>
  • trunk/grails-app/views/sectionDetailed/edit.gsp

    r308 r331  
    3434                                </td>
    3535                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'name','errors')}">
    36                                     <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:sectionInstance,field:'name')}"/>
     36                                    <input type="text" class="description" maxlength="50" id="name" name="name" value="${fieldValue(bean:sectionInstance,field:'name')}"/>
    3737                                </td>
    3838                            </tr>
     
    4343                                </td>
    4444                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'description','errors')}">
    45                                     <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:sectionInstance,field:'description')}"/>
     45                                    <input type="text" class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:sectionInstance,field:'description')}"/>
     46                                </td>
     47                            </tr>
     48                           
     49                            <tr class="prop">
     50                                <td valign="top" class="name">
     51                                    <label for="comment">Comment:</label>
     52                                </td>
     53                                <td valign="top" class="value ${hasErrors(bean:sectionInstance,field:'comment','errors')}">
     54                                    <textarea rows="5" cols="40" name="comment">${fieldValue(bean:sectionInstance, field:'comment')}</textarea>
    4655                                </td>
    4756                            </tr>
  • trunk/grails-app/views/sectionDetailed/show.gsp

    r288 r331  
    4040                           
    4141                            <td valign="top" class="value">${fieldValue(bean:sectionInstance, field:'description')}</td>
     42                           
     43                        </tr>
     44                   
     45                        <tr class="prop">
     46                            <td valign="top" class="name">Comment:</td>
     47                           
     48                            <td valign="top" class="value">${fieldValue(bean:sectionInstance, field:'comment')}</td>
    4249                           
    4350                        </tr>
Note: See TracChangeset for help on using the changeset viewer.