Changeset 150


Ignore:
Timestamp:
Oct 9, 2009, 10:11:43 PM (14 years ago)
Author:
gav
Message:

Add params.message to Person create and edit views.
Code format to 4 spaces, no tabs.

Location:
trunk/grails-app
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/AppCoreController.groovy

    r149 r150  
    5555            def personInstance = Person.get(authenticateService.userDomain().id)
    5656            return [ personInstance : personInstance ]       
    57         } 
     57        }
    5858
    5959        if (request.method == 'POST') {
  • trunk/grails-app/controllers/AuthorityController.groovy

    r116 r150  
    33class AuthorityController extends BaseAppAdminController {
    44
    5         // the delete, save and update actions only accept POST requests
    6         static Map allowedMethods = [delete: 'POST', save: 'POST', update: 'POST']
     5    // the delete, save and update actions only accept POST requests
     6    static Map allowedMethods = [delete: 'POST', save: 'POST', update: 'POST']
    77
    8         def authenticateService
     8    def authenticateService
    99
    10         def index = {
    11                 redirect action: list, params: params
    12         }
     10    def index = {
     11        redirect action: list, params: params
     12    }
    1313
    14         /**
    15         * Display the list authority page.
    16         */
    17         def list = {
    18                 if (!params.max) {
    19                         params.max = 10
    20                 }
    21                 [authorityList: Authority.list(params)]
    22         }
     14    /**
     15    * Display the list authority page.
     16    */
     17    def list = {
     18        if (!params.max) {
     19            params.max = 10
     20        }
     21        [authorityList: Authority.list(params)]
     22    }
    2323
    24         /**
    25         * Display the show authority page.
    26         */
    27         def show = {
    28                 def authority = Authority.get(params.id)
    29                 if (!authority) {
    30                         flash.message = "Authority not found with id $params.id"
    31                         redirect action: list
    32                         return
    33                 }
     24    /**
     25    * Display the show authority page.
     26    */
     27    def show = {
     28        def authority = Authority.get(params.id)
     29        if (!authority) {
     30            flash.message = "Authority not found with id $params.id"
     31            redirect action: list
     32            return
     33        }
    3434
    35                 [authority: authority]
    36         }
     35        [authority: authority]
     36    }
    3737
    38         /**
    39         * Delete an authority.
    40         */
    41         def delete = {
    42                 def authority = Authority.get(params.id)
    43                 if (!authority) {
    44                         flash.message = "Authority not found with id $params.id"
    45                         redirect action: list
    46                         return
    47                 }
     38    /**
     39    * Delete an authority.
     40    */
     41    def delete = {
     42        def authority = Authority.get(params.id)
     43        if (!authority) {
     44            flash.message = "Authority not found with id $params.id"
     45            redirect action: list
     46            return
     47        }
    4848
    49                 authenticateService.deleteRole(authority)
     49        authenticateService.deleteRole(authority)
    5050
    51                 flash.message = "Authority $params.id deleted."
    52                 redirect action: list
    53         }
     51        flash.message = "Authority $params.id deleted."
     52        redirect action: list
     53    }
    5454
    55         /**
    56         * Display the edit authority page.
    57         */
    58         def edit = {
    59                 def authority = Authority.get(params.id)
    60                 if (!authority) {
    61                         flash.message = "Authority not found with id $params.id"
    62                         redirect action: list
    63                         return
    64                 }
     55    /**
     56    * Display the edit authority page.
     57    */
     58    def edit = {
     59        def authority = Authority.get(params.id)
     60        if (!authority) {
     61            flash.message = "Authority not found with id $params.id"
     62            redirect action: list
     63            return
     64        }
    6565
    66                 [authority: authority]
    67         }
     66        [authority: authority]
     67    }
    6868
    69         /**
    70         * Authority update action.
    71         */
    72         def update = {
     69    /**
     70    * Authority update action.
     71    */
     72    def update = {
    7373
    74                 def authority = Authority.get(params.id)
    75                 if (!authority) {
    76                         flash.message = "Authority not found with id $params.id"
    77                         redirect action: edit, id: params.id
    78                         return
    79                 }
     74        def authority = Authority.get(params.id)
     75        if (!authority) {
     76            flash.message = "Authority not found with id $params.id"
     77            redirect action: edit, id: params.id
     78            return
     79        }
    8080
    81                 long version = params.version.toLong()
    82                 if (authority.version > version) {
    83                         authority.errors.rejectValue 'version', 'authority.optimistic.locking.failure',
    84                                 'Another user has updated this Authority while you were editing.'
    85                         render view: 'edit', model: [authority: authority]
    86                         return
    87                 }
     81        long version = params.version.toLong()
     82        if (authority.version > version) {
     83            authority.errors.rejectValue 'version', 'authority.optimistic.locking.failure',
     84                'Another user has updated this Authority while you were editing.'
     85            render view: 'edit', model: [authority: authority]
     86            return
     87        }
    8888
    89                 if (authenticateService.updateRole(authority, params)) {
    90                         authenticateService.clearCachedRequestmaps()
    91                         redirect action: show, id: authority.id
    92                 }
    93                 else {
    94                         render view: 'edit', model: [authority: authority]
    95                 }
    96         }
     89        if (authenticateService.updateRole(authority, params)) {
     90            authenticateService.clearCachedRequestmaps()
     91            redirect action: show, id: authority.id
     92        }
     93        else {
     94            render view: 'edit', model: [authority: authority]
     95        }
     96    }
    9797
    98         /**
    99         * Display the create new authority page.
    100         */
    101         def create = {
    102                 [authority: new Authority()]
    103         }
     98    /**
     99    * Display the create new authority page.
     100    */
     101    def create = {
     102        [authority: new Authority()]
     103    }
    104104
    105         /**
    106         * Save a new authority.
    107         */
    108         def save = {
     105    /**
     106    * Save a new authority.
     107    */
     108    def save = {
    109109
    110                 def authority = new Authority()
    111                 authority.properties = params
    112                 if (authority.save()) {
    113                         redirect action: show, id: authority.id
    114                 }
    115                 else {
    116                         render view: 'create', model: [authority: authority]
    117                 }
    118         }
     110        def authority = new Authority()
     111        authority.properties = params
     112        if (authority.save()) {
     113            redirect action: show, id: authority.id
     114        }
     115        else {
     116            render view: 'create', model: [authority: authority]
     117        }
     118    }
    119119}
  • trunk/grails-app/controllers/PersonController.groovy

    r149 r150  
    77    def filterService
    88
    9         // the delete, save and update actions only accept POST requests
    10         static Map allowedMethods = [delete: 'POST', save: 'POST', update: 'POST']
     9    // the delete, save and update actions only accept POST requests
     10    static Map allowedMethods = [delete: 'POST', save: 'POST', update: 'POST']
    1111
    12         def index = {
    13                 redirect action: list, params: params
    14         }
     12    def index = {
     13        redirect action: list, params: params
     14    }
    1515
    1616    def list = {
     
    2727    }
    2828
    29         def show = {
     29    def show = {
    3030
    3131        // In the case of an actionSubmit button, rewrite action name from 'index'.
     
    3333        { params.action='show' }
    3434
    35                 def person = Person.get(params.id)
    36                 if (!person) {
    37                         flash.message = "Person not found with id $params.id"
    38                         redirect action: list
    39                         return
    40                 }
    41                 List roleNames = []
    42                 for (role in person.authorities) {
    43                         roleNames << role.authority
    44                 }
    45                 roleNames.sort { n1, n2 ->
    46                         n1 <=> n2
    47                 }
    48                 [person: person, roleNames: roleNames]
    49         }
     35        def person = Person.get(params.id)
     36        if (!person) {
     37            flash.message = "Person not found with id $params.id"
     38            redirect action: list
     39            return
     40        }
     41        List roleNames = []
     42        for (role in person.authorities) {
     43            roleNames << role.authority
     44        }
     45        roleNames.sort { n1, n2 ->
     46            n1 <=> n2
     47        }
     48        [person: person, roleNames: roleNames]
     49    }
    5050
    51         /**
    52         * Person delete action. Before removing an existing person,
    53         * they should be removed from those authorities which they are involved.
    54         */
    55         def delete = {
     51    /**
     52    * Person delete action. Before removing an existing person,
     53    * they should be removed from those authorities which they are involved.
     54    */
     55    def delete = {
    5656
    57                 def person = Person.get(params.id)
    58                 if (person) {
    59                         def authPrincipal = authenticateService.principal()
    60                         // Avoid self-delete.
    61                         if (!(authPrincipal instanceof String) && authPrincipal.username == person.loginName) {
    62                                 flash.message = "You cannot delete yourself, please login as another manager and try again."
     57        def person = Person.get(params.id)
     58        if (person) {
     59            def authPrincipal = authenticateService.principal()
     60            // Avoid self-delete.
     61            if (!(authPrincipal instanceof String) && authPrincipal.username == person.loginName) {
     62                flash.message = "You cannot delete yourself, please login as another manager and try again."
    6363                redirect(action:show,id:params.id)
    64                         }
    65                         else {
    66                                 //first, delete this person from Persons_Authorities table.
    67                                 Authority.findAll().each { it.removeFromPersons(person) }
     64            }
     65            else {
     66                //first, delete this person from Persons_Authorities table.
     67                Authority.findAll().each { it.removeFromPersons(person) }
    6868                person.isActive = false
    6969                person.save(flush: true)
     
    7878                    redirect(action:show,id:params.id)
    7979                }
    80                         }
    81                 }
    82                 else {
    83                         flash.message = "Person not found with id $params.id"
    84                 }
    85         }
     80            }
     81        }
     82        else {
     83            flash.message = "Person not found with id $params.id"
     84        }
     85    }
    8686
    87         def edit = {
     87    def edit = {
    8888
    8989        // In the case of an actionSubmit button, rewrite action name from 'index'.
     
    9191        { params.action='edit' }
    9292
    93                 def person = Person.get(params.id)
    94                 if (!person) {
    95                         flash.message = "Person not found with id $params.id"
    96                         redirect action: list
    97                         return
    98                 }
    99         flash.message = "To allow login at least the 'ROLE_AppUser' authority must be given."
    100                 return buildPersonModel(person)
    101         }
     93        def person = Person.get(params.id)
     94        if (!person) {
     95            flash.message = "Person not found with id $params.id"
     96            redirect action: list
     97            return
     98        }
     99        params.message = "To allow login at least the 'ROLE_AppUser' authority must be given."
     100        return buildPersonModel(person)
     101    }
    102102
    103         /**
    104         * Person update action.
    105         */
    106         def update = {
     103    /**
     104        * Person update action.
     105        */
     106    def update = {
    107107
    108                 def person = Person.get(params.id)
    109                 if (!person) {
    110                         flash.message = "Person not found with id $params.id"
    111                         redirect action: edit, id: params.id
    112                         return
    113                 }
     108        def person = Person.get(params.id)
     109        if (!person) {
     110            flash.message = "Person not found with id $params.id"
     111            redirect action: edit, id: params.id
     112            return
     113        }
    114114
    115                 long version = params.version.toLong()
    116                 if (person.version > version) {
    117                         person.errors.rejectValue 'version', "person.optimistic.locking.failure",
    118                                 "Another user has updated this Person while you were editing."
     115        long version = params.version.toLong()
     116        if (person.version > version) {
     117            person.errors.rejectValue 'version', "person.optimistic.locking.failure",
     118                "Another user has updated this Person while you were editing."
    119119            render view: 'edit', model: buildPersonModel(person)
    120                         return
    121                 }
     120            return
     121        }
    122122
    123                 person.properties = params
     123        person.properties = params
    124124
    125125        if(params.pass == "") {
     
    142142        }
    143143
    144         }
     144    }
    145145
    146         def create = {
    147         flash.message = "To allow login at least the 'ROLE_AppUser' authority must be given."
    148                 [person: new Person(params), authorityList: Authority.list()]
    149         }
     146    def create = {
     147        params.message = "To allow login at least the 'ROLE_AppUser' authority must be given."
     148        [person: new Person(params), authorityList: Authority.list()]
     149    }
    150150
    151         /**
    152         * Person save action.
    153         */
    154         def save = {
     151    /**
     152        * Person save action.
     153        */
     154    def save = {
    155155
    156                 def person = new Person()
    157                 person.properties = params
    158                 person.password = authenticateService.encodePassword(params.pass)
    159                 if (person.save()) {
    160                         addRoles(person)
    161                         redirect action: show, id: person.id
    162                 }
    163                 else {
    164                         render view: 'create', model: [authorityList: Authority.list(), person: person]
    165                 }
    166         }
     156        def person = new Person()
     157        person.properties = params
     158        person.password = authenticateService.encodePassword(params.pass)
     159        if (person.save()) {
     160            addRoles(person)
     161            redirect action: show, id: person.id
     162        }
     163        else {
     164            render view: 'create', model: [authorityList: Authority.list(), person: person]
     165        }
     166    }
    167167
    168         private void addRoles(person) {
    169                 for (String key in params.keySet()) {
    170                         if (key.contains('ROLE') && 'on' == params.get(key)) {
    171                                 Authority.findByAuthority(key).addToPersons(person)
    172                         }
    173                 }
    174         }
     168    private void addRoles(person) {
     169        for (String key in params.keySet()) {
     170            if (key.contains('ROLE') && 'on' == params.get(key)) {
     171                Authority.findByAuthority(key).addToPersons(person)
     172            }
     173        }
     174    }
    175175
    176         private Map buildPersonModel(person) {
     176    private Map buildPersonModel(person) {
    177177
    178                 List roles = Authority.list()
    179                 roles.sort { r1, r2 ->
    180                         r1.authority <=> r2.authority
    181                 }
    182                 Set userRoleNames = []
    183                 for (role in person.authorities) {
    184                         userRoleNames << role.authority
    185                 }
    186                 LinkedHashMap<Authority, Boolean> roleMap = [:]
    187                 for (role in roles) {
    188                         roleMap[(role)] = userRoleNames.contains(role.authority)
    189                 }
     178        List roles = Authority.list()
     179        roles.sort { r1, r2 ->
     180            r1.authority <=> r2.authority
     181        }
     182        Set userRoleNames = []
     183        for (role in person.authorities) {
     184            userRoleNames << role.authority
     185        }
     186        LinkedHashMap<Authority, Boolean> roleMap = [:]
     187        for (role in roles) {
     188            roleMap[(role)] = userRoleNames.contains(role.authority)
     189        }
    190190
    191                 return [person: person, roleMap: roleMap]
    192         }
     191        return [person: person, roleMap: roleMap]
     192    }
    193193}
  • trunk/grails-app/views/authority/create.gsp

    r59 r150  
    11<head>
    2         <meta name="layout" content="main" />
    3         <title>Create Authority</title>
     2    <meta name="layout" content="main" />
     3    <title>Create Authority</title>
    44</head>
    55
    66<body>
    77
    8         <div class="nav">
    9                 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
    10                 <span class="menuButton"><g:link class="list" action="list">Authority List</g:link></span>
    11         </div>
     8    <div class="nav">
     9        <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
     10        <span class="menuButton"><g:link class="list" action="list">Authority List</g:link></span>
     11    </div>
    1212
    13         <div class="body">
     13    <div class="body">
    1414
    15                 <h1>Create Authority</h1>
    16                 <g:if test="${flash.message}">
    17                 <div class="message">${flash.message}</div>
    18                 </g:if>
    19                 <g:hasErrors bean="${authority}">
    20                 <div class="errors">
    21                 <g:renderErrors bean="${authority}" as="list" />
    22                 </div>
    23                 </g:hasErrors>
     15        <h1>Create Authority</h1>
     16        <g:if test="${flash.message}">
     17        <div class="message">${flash.message}</div>
     18        </g:if>
     19        <g:hasErrors bean="${authority}">
     20        <div class="errors">
     21        <g:renderErrors bean="${authority}" as="list" />
     22        </div>
     23        </g:hasErrors>
    2424
    25                 <g:form action="save">
    26                 <div class="dialog">
    27                 <table>
    28                 <tbody>
    29                         <tr class="prop">
    30                                 <td valign="top" class="name"><label for="authority">Authority Name:</label></td>
    31                                 <td valign="top" class="value ${hasErrors(bean:authority,field:'authority','errors')}">
    32                                         <input type="text" id="authority" name="authority" value="${authority?.authority?.encodeAsHTML()}"/>
    33                                 </td>
    34                         </tr>
     25        <g:form action="save">
     26        <div class="dialog">
     27        <table>
     28        <tbody>
     29            <tr class="prop">
     30                <td valign="top" class="name"><label for="authority">Authority Name:</label></td>
     31                <td valign="top" class="value ${hasErrors(bean:authority,field:'authority','errors')}">
     32                    <input type="text" id="authority" name="authority" value="${authority?.authority?.encodeAsHTML()}"/>
     33                </td>
     34            </tr>
    3535
    36                         <tr class="prop">
    37                                 <td valign="top" class="name"><label for="description">Description:</label></td>
    38                                 <td valign="top" class="value ${hasErrors(bean:authority,field:'description','errors')}">
    39                                         <input type="text" id="description" name="description" value="${authority?.description?.encodeAsHTML()}"/>
    40                                 </td>
    41                         </tr>
    42                 </tbody>
    43                 </table>
    44                 </div>
     36            <tr class="prop">
     37                <td valign="top" class="name"><label for="description">Description:</label></td>
     38                <td valign="top" class="value ${hasErrors(bean:authority,field:'description','errors')}">
     39                    <input type="text" id="description" name="description" value="${authority?.description?.encodeAsHTML()}"/>
     40                </td>
     41            </tr>
     42        </tbody>
     43        </table>
     44        </div>
    4545
    46                 <div class="buttons">
    47                         <span class="button"><input class="save" type="submit" value="Create" /></span>
    48                 </div>
    49                 </g:form>
    50         </div>
     46        <div class="buttons">
     47            <span class="button"><input class="save" type="submit" value="Create" /></span>
     48        </div>
     49        </g:form>
     50    </div>
    5151</body>
  • trunk/grails-app/views/authority/edit.gsp

    r59 r150  
    11<head>
    2         <meta name="layout" content="main" />
    3         <title>Edit Authority</title>
     2    <meta name="layout" content="main" />
     3    <title>Edit Authority</title>
    44</head>
    55
    66<body>
    77
    8         <div class="nav">
    9                 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
    10                 <span class="menuButton"><g:link class="list" action="list">Authority List</g:link></span>
    11                 <span class="menuButton"><g:link class="create" action="create">New Authority</g:link></span>
    12         </div>
     8    <div class="nav">
     9        <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
     10        <span class="menuButton"><g:link class="list" action="list">Authority List</g:link></span>
     11        <span class="menuButton"><g:link class="create" action="create">New Authority</g:link></span>
     12    </div>
    1313
    14         <div class="body">
    15                 <h1>Edit Authority</h1>
    16                 <g:if test="${flash.message}">
    17                 <div class="message">${flash.message}</div>
    18                 </g:if>
    19                 <g:hasErrors bean="${authority}">
    20                 <div class="errors">
    21                         <g:renderErrors bean="${authority}" as="list" />
    22                 </div>
    23                 </g:hasErrors>
    24                 <div class="prop">
    25                         <span class="name">ID:</span>
    26                         <span class="value">${authority.id}</span>
    27                 </div>
    28                 <g:form>
    29                         <input type="hidden" name="id" value="${authority.id}" />
    30                         <input type="hidden" name="version" value="${authority.version}" />
    31                         <div class="dialog">
    32                         <table>
    33                         <tbody>
    34                                 <tr class="prop">
    35                                         <td valign="top" class="name"><label for="authority">Authority Name:</label></td>
    36                                         <td valign="top" class="value ${hasErrors(bean:authority,field:'authority','errors')}">
    37                                                 <input type="text" id="authority" name="authority" value="${authority.authority?.encodeAsHTML()}"/>
    38                                         </td>
    39                                 </tr>
     14    <div class="body">
     15        <h1>Edit Authority</h1>
     16        <g:if test="${flash.message}">
     17        <div class="message">${flash.message}</div>
     18        </g:if>
     19        <g:hasErrors bean="${authority}">
     20        <div class="errors">
     21            <g:renderErrors bean="${authority}" as="list" />
     22        </div>
     23        </g:hasErrors>
     24        <div class="prop">
     25            <span class="name">ID:</span>
     26            <span class="value">${authority.id}</span>
     27        </div>
     28        <g:form>
     29            <input type="hidden" name="id" value="${authority.id}" />
     30            <input type="hidden" name="version" value="${authority.version}" />
     31            <div class="dialog">
     32            <table>
     33            <tbody>
     34                <tr class="prop">
     35                    <td valign="top" class="name"><label for="authority">Authority Name:</label></td>
     36                    <td valign="top" class="value ${hasErrors(bean:authority,field:'authority','errors')}">
     37                        <input type="text" id="authority" name="authority" value="${authority.authority?.encodeAsHTML()}"/>
     38                    </td>
     39                </tr>
    4040
    41                                 <tr class="prop">
    42                                         <td valign="top" class="name"><label for="description">Description:</label></td>
    43                                         <td valign="top" class="value ${hasErrors(bean:authority,field:'description','errors')}">
    44                                                 <input type="text" id="description" name="description" value="${authority.description?.encodeAsHTML()}"/>
    45                                         </td>
    46                                 </tr>
     41                <tr class="prop">
     42                    <td valign="top" class="name"><label for="description">Description:</label></td>
     43                    <td valign="top" class="value ${hasErrors(bean:authority,field:'description','errors')}">
     44                        <input type="text" id="description" name="description" value="${authority.description?.encodeAsHTML()}"/>
     45                    </td>
     46                </tr>
    4747
    48                                 <tr class="prop">
    49                                         <td valign="top" class="name"><label for="persons">Persons:</label></td>
    50                                         <td valign="top" class="value ${hasErrors(bean:authority,field:'persons','errors')}">
    51                                                 <ul>
    52                                                 <g:each var="p" in="${authority.persons?}">
    53                                                         <li>${p}</li>
    54                                                 </g:each>
    55                                                 </ul>
    56                                         </td>
    57                                 </tr>
    58                         </tbody>
    59                         </table>
    60                         </div>
     48                <tr class="prop">
     49                    <td valign="top" class="name"><label for="persons">Persons:</label></td>
     50                    <td valign="top" class="value ${hasErrors(bean:authority,field:'persons','errors')}">
     51                        <ul>
     52                        <g:each var="p" in="${authority.persons?}">
     53                            <li>${p}</li>
     54                        </g:each>
     55                        </ul>
     56                    </td>
     57                </tr>
     58            </tbody>
     59            </table>
     60            </div>
    6161
    62                         <div class="buttons">
    63                                 <span class="button"><g:actionSubmit class="save" value="Update" /></span>
    64                                 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
    65                         </div>
     62            <div class="buttons">
     63                <span class="button"><g:actionSubmit class="save" value="Update" /></span>
     64                <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
     65            </div>
    6666
    67                 </g:form>
    68         </div>
     67        </g:form>
     68    </div>
    6969</body>
  • trunk/grails-app/views/authority/list.gsp

    r59 r150  
    11<head>
    2         <meta name="layout" content="main" />
    3         <title>Authority List</title>
     2    <meta name="layout" content="main" />
     3    <title>Authority List</title>
    44</head>
    55
    66<body>
    77
    8         <div class="nav">
    9                 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
    10                 <span class="menuButton"><g:link class="create" action="create">New Authority</g:link></span>
    11         </div>
     8    <div class="nav">
     9        <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
     10        <span class="menuButton"><g:link class="create" action="create">New Authority</g:link></span>
     11    </div>
    1212
    13         <div class="body">
    14                 <h1>Authority List</h1>
    15                 <g:if test="${flash.message}">
    16                 <div class="message">${flash.message}</div>
    17                 </g:if>
    18                 <div class="list">
    19                         <table>
    20                         <thead>
    21                                 <tr>
    22                                         <g:sortableColumn property="id" title="ID" />
    23                                         <g:sortableColumn property="authority" title="Authority Name" />
    24                                         <g:sortableColumn property="description" title="Description" />
    25                                         <th>&nbsp;</th>
    26                                 </tr>
    27                         </thead>
    28                         <tbody>
    29                         <g:each in="${authorityList}" status="i" var="authority">
    30                                 <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
    31                                         <td>${authority.id}</td>
    32                                         <td>${authority.authority?.encodeAsHTML()}</td>
    33                                         <td>${authority.description?.encodeAsHTML()}</td>
    34                                         <td class="actionButtons">
    35                                                 <span class="actionButton">
    36                                                         <g:link action="show" id="${authority.id}">Show</g:link>
    37                                                 </span>
    38                                         </td>
    39                                 </tr>
    40                         </g:each>
    41                         </tbody>
    42                         </table>
    43                 </div>
     13    <div class="body">
     14        <h1>Authority List</h1>
     15        <g:if test="${flash.message}">
     16        <div class="message">${flash.message}</div>
     17        </g:if>
     18        <div class="list">
     19            <table>
     20            <thead>
     21                <tr>
     22                    <g:sortableColumn property="id" title="ID" />
     23                    <g:sortableColumn property="authority" title="Authority Name" />
     24                    <g:sortableColumn property="description" title="Description" />
     25                    <th>&nbsp;</th>
     26                </tr>
     27            </thead>
     28            <tbody>
     29            <g:each in="${authorityList}" status="i" var="authority">
     30                <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
     31                    <td>${authority.id}</td>
     32                    <td>${authority.authority?.encodeAsHTML()}</td>
     33                    <td>${authority.description?.encodeAsHTML()}</td>
     34                    <td class="actionButtons">
     35                        <span class="actionButton">
     36                            <g:link action="show" id="${authority.id}">Show</g:link>
     37                        </span>
     38                    </td>
     39                </tr>
     40            </g:each>
     41            </tbody>
     42            </table>
     43        </div>
    4444
    45                 <div class="paginateButtons">
    46                         <g:paginate total="${Authority.count()}" />
    47                 </div>
    48         </div>
     45        <div class="paginateButtons">
     46            <g:paginate total="${Authority.count()}" />
     47        </div>
     48    </div>
    4949</body>
  • trunk/grails-app/views/authority/show.gsp

    r59 r150  
    11<head>
    2         <meta name="layout" content="main" />
    3         <title>Show Authority</title>
     2    <meta name="layout" content="main" />
     3    <title>Show Authority</title>
    44</head>
    55
    66<body>
    77
    8         <div class="nav">
    9                 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
    10                 <span class="menuButton"><g:link class="list" action="list">Authority List</g:link></span>
    11                 <span class="menuButton"><g:link class="create" action="create">New Authority</g:link></span>
    12         </div>
     8    <div class="nav">
     9        <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
     10        <span class="menuButton"><g:link class="list" action="list">Authority List</g:link></span>
     11        <span class="menuButton"><g:link class="create" action="create">New Authority</g:link></span>
     12    </div>
    1313
    14         <div class="body">
    15                 <h1>Show Authority</h1>
    16                 <g:if test="${flash.message}">
    17                 <div class="message">${flash.message}</div>
    18                 </g:if>
    19                 <div class="dialog">
    20                         <table>
    21                         <tbody>
     14    <div class="body">
     15        <h1>Show Authority</h1>
     16        <g:if test="${flash.message}">
     17        <div class="message">${flash.message}</div>
     18        </g:if>
     19        <div class="dialog">
     20            <table>
     21            <tbody>
    2222
    23                                 <tr class="prop">
    24                                         <td valign="top" class="name">ID:</td>
    25                                         <td valign="top" class="value">${authority.id}</td>
    26                                 </tr>
     23                <tr class="prop">
     24                    <td valign="top" class="name">ID:</td>
     25                    <td valign="top" class="value">${authority.id}</td>
     26                </tr>
    2727
    28                                 <tr class="prop">
    29                                         <td valign="top" class="name">Authority Name:</td>
    30                                         <td valign="top" class="value">${authority.authority}</td>
    31                                 </tr>
     28                <tr class="prop">
     29                    <td valign="top" class="name">Authority Name:</td>
     30                    <td valign="top" class="value">${authority.authority}</td>
     31                </tr>
    3232
    33                                 <tr class="prop">
    34                                         <td valign="top" class="name">Description:</td>
    35                                         <td valign="top" class="value">${authority.description}</td>
    36                                 </tr>
     33                <tr class="prop">
     34                    <td valign="top" class="name">Description:</td>
     35                    <td valign="top" class="value">${authority.description}</td>
     36                </tr>
    3737
    38                                 <tr class="prop">
    39                                         <td valign="top" class="name">Persons:</td>
    40                                         <td valign="top" class="value">${authority.persons}</td>
    41                                 </tr>
     38                <tr class="prop">
     39                    <td valign="top" class="name">Persons:</td>
     40                    <td valign="top" class="value">${authority.persons}</td>
     41                </tr>
    4242
    43                         </tbody>
    44                         </table>
    45                 </div>
     43            </tbody>
     44            </table>
     45        </div>
    4646
    47                 <div class="buttons">
    48                         <g:form>
    49                                 <input type="hidden" name="id" value="${authority?.id}" />
    50                                 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
    51                                 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
    52                         </g:form>
    53                 </div>
     47        <div class="buttons">
     48            <g:form>
     49                <input type="hidden" name="id" value="${authority?.id}" />
     50                <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
     51                <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
     52            </g:form>
     53        </div>
    5454
    55         </div>
     55    </div>
    5656
    5757</body>
  • trunk/grails-app/views/person/create.gsp

    r147 r150  
    11<head>
    2         <meta name="layout" content="main" />
    3         <title>Create Person</title>
     2    <meta name="layout" content="main" />
     3    <title>Create Person</title>
    44    <nav:resources override="true"/>
    55</head>
     
    77<body>
    88
    9         <div class="nav">
     9    <div class="nav">
    1010        <nav:renderSubItems group="navAlt"/>
    11         </div>
     11    </div>
    1212
    13         <div class="body">
    14                 <g:if test="${flash.message}">
    15                 <div class="message">${flash.message}</div>
    16                 </g:if>
    17                 <g:hasErrors bean="${person}">
    18                 <div class="errors">
    19                         <g:renderErrors bean="${person}" as="list" />
    20                 </div>
    21                 </g:hasErrors>
    22                 <g:form action="save">
    23                         <div class="dialog">
    24                                 <table>
    25                                 <tbody>
     13    <div class="body">
     14        <g:if test="${flash.message}">
     15        <div class="message">${flash.message}</div>
     16        </g:if>
     17        <g:if test="${params.message}">
     18            <div class="message">${params.message}</div>
     19        </g:if>
     20        <g:hasErrors bean="${person}">
     21        <div class="errors">
     22            <g:renderErrors bean="${person}" as="list" />
     23        </div>
     24        </g:hasErrors>
     25        <g:form action="save">
     26            <div class="dialog">
     27                <table>
     28                <tbody>
    2629
    27                                         <tr class="prop">
    28                                                 <td valign="top" class="name"><label for="loginName">Login Name:</label></td>
    29                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}">
    30                                                         <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/>
    31                                                 </td>
    32                                         </tr>
     30                    <tr class="prop">
     31                        <td valign="top" class="name"><label for="loginName">Login Name:</label></td>
     32                        <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}">
     33                            <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/>
     34                        </td>
     35                    </tr>
    3336
    34                                         <tr class="prop">
    35                                                 <td valign="top" class="name"><label for="firstName">First Name:</label></td>
    36                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}">
    37                                                         <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/>
    38                                                 </td>
    39                                         </tr>
     37                    <tr class="prop">
     38                        <td valign="top" class="name"><label for="firstName">First Name:</label></td>
     39                        <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}">
     40                            <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/>
     41                        </td>
     42                    </tr>
    4043
    4144                    <tr class="prop">
     
    4750
    4851
    49                                         <tr class="prop">
    50                                                 <td valign="top" class="name"><label for="pass">Password:</label></td>
    51                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}">
    52                                                         <input type="password" id="pass" name="pass"/>
    53                                                 </td>
    54                                         </tr>
     52                    <tr class="prop">
     53                        <td valign="top" class="name"><label for="pass">Password:</label></td>
     54                        <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}">
     55                            <input type="password" id="pass" name="pass"/>
     56                        </td>
     57                    </tr>
    5558
    56                                         <tr class="prop">
    57                                                 <td valign="top" class="name"><label for="isActive">isActive:</label></td>
    58                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}">
    59                                                         <g:checkBox name="isActive" value="${person.isActive}" ></g:checkBox>
    60                                                 </td>
    61                                         </tr>
     59                    <tr class="prop">
     60                        <td valign="top" class="name"><label for="isActive">isActive:</label></td>
     61                        <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}">
     62                            <g:checkBox name="isActive" value="${person.isActive}" ></g:checkBox>
     63                        </td>
     64                    </tr>
    6265
    63                                         <tr class="prop">
    64                                                 <td valign="top" class="name"><label for="description">Description:</label></td>
    65                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'description','errors')}">
    66                                                         <input type="text" id="description" name="description" value="${person.description?.encodeAsHTML()}"/>
    67                                                 </td>
    68                                         </tr>
     66                    <tr class="prop">
     67                        <td valign="top" class="name"><label for="description">Description:</label></td>
     68                        <td valign="top" class="value ${hasErrors(bean:person,field:'description','errors')}">
     69                            <input type="text" id="description" name="description" value="${person.description?.encodeAsHTML()}"/>
     70                        </td>
     71                    </tr>
    6972
    70                                         <tr class="prop">
    71                                                 <td valign="top" class="name"><label for="email">Email:</label></td>
    72                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'email','errors')}">
    73                                                         <input type="text" id="email" name="email" value="${person.email?.encodeAsHTML()}"/>
    74                                                 </td>
    75                                         </tr>
     73                    <tr class="prop">
     74                        <td valign="top" class="name"><label for="email">Email:</label></td>
     75                        <td valign="top" class="value ${hasErrors(bean:person,field:'email','errors')}">
     76                            <input type="text" id="email" name="email" value="${person.email?.encodeAsHTML()}"/>
     77                        </td>
     78                    </tr>
    7679
    77                                         <tr class="prop">
    78                                                 <td valign="top" class="name"><label for="emailShow">Show Email:</label></td>
    79                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'emailShow','errors')}">
    80                                                         <g:checkBox name="emailShow" value="${person.emailShow}"/>
    81                                                 </td>
    82                                         </tr>
     80                    <tr class="prop">
     81                        <td valign="top" class="name"><label for="emailShow">Show Email:</label></td>
     82                        <td valign="top" class="value ${hasErrors(bean:person,field:'emailShow','errors')}">
     83                            <g:checkBox name="emailShow" value="${person.emailShow}"/>
     84                        </td>
     85                    </tr>
    8386
    8487                    <tr class="prop">
     
    8992                    </tr>
    9093
    91                                         <tr class="prop">
    92                                                 <td valign="top" class="name" align="left">Authorities:</td>
    93                                         </tr>
     94                    <tr class="prop">
     95                        <td valign="top" class="name" align="left">Authorities:</td>
     96                    </tr>
    9497
    95                                         <g:each in="${authorityList}">
    96                                         <tr>
    97                                                 <td valign="top" class="name" align="left">${it.authority.encodeAsHTML()}</td>
    98                                                 <td align="left"><g:checkBox name="${it.authority}"/></td>
    99                                         </tr>
    100                                         </g:each>
     98                    <g:each in="${authorityList}">
     99                    <tr>
     100                        <td valign="top" class="name" align="left">${it.authority.encodeAsHTML()}</td>
     101                        <td align="left"><g:checkBox name="${it.authority}"/></td>
     102                    </tr>
     103                    </g:each>
    101104
    102                                 </tbody>
    103                                 </table>
    104                         </div>
     105                </tbody>
     106                </table>
     107            </div>
    105108
    106                         <div class="buttons">
    107                                 <span class="button"><input class="save" type="submit" value="Create" /></span>
    108                         </div>
     109            <div class="buttons">
     110                <span class="button"><input class="save" type="submit" value="Create" /></span>
     111            </div>
    109112
    110                 </g:form>
     113        </g:form>
    111114
    112         </div>
     115    </div>
    113116</body>
  • trunk/grails-app/views/person/edit.gsp

    r147 r150  
    11<head>
    2         <meta name="layout" content="main" />
    3         <title>Edit Person</title>
     2    <meta name="layout" content="main" />
     3    <title>Edit Person</title>
    44    <nav:resources override="true"/>
    55</head>
     
    77<body>
    88
    9         <div class="nav">
     9    <div class="nav">
    1010        <nav:renderSubItems group="navAlt"/>
    11         </div>
     11    </div>
    1212
    13         <div class="body">
    14                 <g:if test="${flash.message}">
    15                 <div class="message">${flash.message}</div>
    16                 </g:if>
    17                 <g:hasErrors bean="${person}">
    18                 <div class="errors">
    19                         <g:renderErrors bean="${person}" as="list" />
    20                 </div>
    21                 </g:hasErrors>
     13    <div class="body">
     14        <g:if test="${flash.message}">
     15        <div class="message">${flash.message}</div>
     16        </g:if>
     17        <g:if test="${params.message}">
     18            <div class="message">${params.message}</div>
     19        </g:if>
     20        <g:hasErrors bean="${person}">
     21        <div class="errors">
     22            <g:renderErrors bean="${person}" as="list" />
     23        </div>
     24        </g:hasErrors>
    2225
    23 <!--            <div class="prop">
    24                         <span class="name">ID: ${person.id}</span>
    25                 </div>-->
     26    <!--<div class="prop">
     27            <span class="name">ID: ${person.id}</span>
     28        </div>-->
    2629
    27                 <g:form>
    28                         <input type="hidden" name="id" value="${person.id}" />
    29                         <input type="hidden" name="version" value="${person.version}" />
     30        <g:form>
     31            <input type="hidden" name="id" value="${person.id}" />
     32            <input type="hidden" name="version" value="${person.version}" />
    3033            <input type="hidden" name="password" value="${person.password}" />
    31                         <div class="dialog">
    32                                 <table>
    33                                 <tbody>
     34            <div class="dialog">
     35                <table>
     36                <tbody>
    3437
    35                                         <tr class="prop">
    36                                                 <td valign="top" class="name"><label for="loginName">Login Name:</label></td>
    37                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}">
    38                                                         <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/>
    39                                                 </td>
    40                                         </tr>
     38                    <tr class="prop">
     39                        <td valign="top" class="name"><label for="loginName">Login Name:</label></td>
     40                        <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}">
     41                            <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/>
     42                        </td>
     43                    </tr>
    4144
    42                                         <tr class="prop">
    43                                                 <td valign="top" class="name"><label for="firstName">First Name:</label></td>
    44                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}">
    45                                                         <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/>
    46                                                 </td>
    47                                         </tr>
     45                    <tr class="prop">
     46                        <td valign="top" class="name"><label for="firstName">First Name:</label></td>
     47                        <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}">
     48                            <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/>
     49                        </td>
     50                    </tr>
    4851
    4952                    <tr class="prop">
     
    5457                    </tr>
    5558
    56                                         <tr class="prop">
    57                                                 <td valign="top" class="name"><label for="pass">Password:</label></td>
    58                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}">
    59                                                         <input type="password" id="pass" name="pass"  value="${person.pass?.encodeAsHTML()}"/>
    60                                                 </td>
    61                                         </tr>
     59                    <tr class="prop">
     60                        <td valign="top" class="name"><label for="pass">Password:</label></td>
     61                        <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}">
     62                            <input type="password" id="pass" name="pass"  value="${person.pass?.encodeAsHTML()}"/>
     63                        </td>
     64                    </tr>
    6265
    63                                         <tr class="prop">
    64                                                 <td valign="top" class="name"><label for="isActive">isActive:</label></td>
    65                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}">
    66                                                         <g:checkBox name="isActive" value="${person.isActive}"/>
    67                                                 </td>
    68                                         </tr>
     66                    <tr class="prop">
     67                        <td valign="top" class="name"><label for="isActive">isActive:</label></td>
     68                        <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}">
     69                            <g:checkBox name="isActive" value="${person.isActive}"/>
     70                        </td>
     71                    </tr>
    6972
    70                                         <tr class="prop">
    71                                                 <td valign="top" class="name"><label for="description">Description:</label></td>
    72                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'description','errors')}">
    73                                                         <input type="text" id="description" name="description" value="${person.description?.encodeAsHTML()}"/>
    74                                                 </td>
    75                                         </tr>
     73                    <tr class="prop">
     74                        <td valign="top" class="name"><label for="description">Description:</label></td>
     75                        <td valign="top" class="value ${hasErrors(bean:person,field:'description','errors')}">
     76                            <input type="text" id="description" name="description" value="${person.description?.encodeAsHTML()}"/>
     77                        </td>
     78                    </tr>
    7679
    77                                         <tr class="prop">
    78                                                 <td valign="top" class="name"><label for="email">Email:</label></td>
    79                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'email','errors')}">
    80                                                         <input type="text" id="email" name="email" value="${person?.email?.encodeAsHTML()}"/>
    81                                                 </td>
    82                                         </tr>
     80                    <tr class="prop">
     81                        <td valign="top" class="name"><label for="email">Email:</label></td>
     82                        <td valign="top" class="value ${hasErrors(bean:person,field:'email','errors')}">
     83                            <input type="text" id="email" name="email" value="${person?.email?.encodeAsHTML()}"/>
     84                        </td>
     85                    </tr>
    8386
    84                                         <tr class="prop">
    85                                                 <td valign="top" class="name"><label for="emailShow">Show Email:</label></td>
    86                                                 <td valign="top" class="value ${hasErrors(bean:person,field:'emailShow','errors')}">
    87                                                         <g:checkBox name="emailShow" value="${person.emailShow}"/>
    88                                                 </td>
    89                                         </tr>
     87                    <tr class="prop">
     88                        <td valign="top" class="name"><label for="emailShow">Show Email:</label></td>
     89                        <td valign="top" class="value ${hasErrors(bean:person,field:'emailShow','errors')}">
     90                            <g:checkBox name="emailShow" value="${person.emailShow}"/>
     91                        </td>
     92                    </tr>
    9093
    9194                    <tr class="prop">
     
    107110                    </g:each>
    108111
    109                                 </tbody>
    110                                 </table>
    111                         </div>
     112                </tbody>
     113                </table>
     114            </div>
    112115
    113                         <div class="buttons">
    114                                 <span class="button"><g:actionSubmit class="save" value="Update" /></span>
    115                                 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
    116                         </div>
     116            <div class="buttons">
     117                <span class="button"><g:actionSubmit class="save" value="Update" /></span>
     118                <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
     119            </div>
    117120
    118                 </g:form>
     121        </g:form>
    119122
    120         </div>
     123    </div>
    121124</body>
  • trunk/grails-app/views/person/show.gsp

    r147 r150  
    11<head>
    2         <meta name="layout" content="main" />
    3         <title>Show Person</title>
     2    <meta name="layout" content="main" />
     3    <title>Show Person</title>
    44    <nav:resources override="true"/>
    55</head>
     
    77<body>
    88
    9         <div class="nav">
     9    <div class="nav">
    1010        <nav:renderSubItems group="navAlt"/>
    11         </div>
     11    </div>
    1212
    13         <div class="body">
    14                 <g:if test="${flash.message}">
    15                 <div class="message">${flash.message}</div>
    16                 </g:if>
    17                 <div class="dialog">
    18                         <table>
    19                         <tbody>
     13    <div class="body">
     14        <g:if test="${flash.message}">
     15        <div class="message">${flash.message}</div>
     16        </g:if>
     17        <div class="dialog">
     18            <table>
     19            <tbody>
    2020
    21                                 <tr class="prop">
    22                                         <td valign="top" class="name">ID:</td>
    23                                         <td valign="top" class="value">${person.id}</td>
    24                                 </tr>
     21                <tr class="prop">
     22                    <td valign="top" class="name">ID:</td>
     23                    <td valign="top" class="value">${person.id}</td>
     24                </tr>
    2525
    26                                 <tr class="prop">
    27                                         <td valign="top" class="name">Login Name:</td>
    28                                         <td valign="top" class="value">${person.loginName?.encodeAsHTML()}</td>
    29                                 </tr>
     26                <tr class="prop">
     27                    <td valign="top" class="name">Login Name:</td>
     28                    <td valign="top" class="value">${person.loginName?.encodeAsHTML()}</td>
     29                </tr>
    3030
    31                                 <tr class="prop">
    32                                         <td valign="top" class="name">First Name:</td>
    33                                         <td valign="top" class="value">${person.firstName?.encodeAsHTML()}</td>
    34                                 </tr>
     31                <tr class="prop">
     32                    <td valign="top" class="name">First Name:</td>
     33                    <td valign="top" class="value">${person.firstName?.encodeAsHTML()}</td>
     34                </tr>
    3535
    3636                <tr class="prop">
     
    3939                </tr>
    4040
    41                                 <tr class="prop">
    42                                         <td valign="top" class="name">isActive:</td>
    43                                         <td valign="top" class="value">${person.isActive}</td>
    44                                 </tr>
     41                <tr class="prop">
     42                    <td valign="top" class="name">isActive:</td>
     43                    <td valign="top" class="value">${person.isActive}</td>
     44                </tr>
    4545
    46                                 <tr class="prop">
    47                                         <td valign="top" class="name">Description:</td>
    48                                         <td valign="top" class="value">${person.description?.encodeAsHTML()}</td>
    49                                 </tr>
     46                <tr class="prop">
     47                    <td valign="top" class="name">Description:</td>
     48                    <td valign="top" class="value">${person.description?.encodeAsHTML()}</td>
     49                </tr>
    5050
    51                                 <tr class="prop">
    52                                         <td valign="top" class="name">Email:</td>
    53                                         <td valign="top" class="value">${person.email?.encodeAsHTML()}</td>
    54                                 </tr>
     51                <tr class="prop">
     52                    <td valign="top" class="name">Email:</td>
     53                    <td valign="top" class="value">${person.email?.encodeAsHTML()}</td>
     54                </tr>
    5555
    56                                 <tr class="prop">
    57                                         <td valign="top" class="name">Show Email:</td>
    58                                         <td valign="top" class="value">${person.emailShow}</td>
    59                                 </tr>
     56                <tr class="prop">
     57                    <td valign="top" class="name">Show Email:</td>
     58                    <td valign="top" class="value">${person.emailShow}</td>
     59                </tr>
    6060
    6161                <tr class="prop">
     
    6464                </tr>
    6565
    66                                 <tr class="prop">
    67                                         <td valign="top" class="name">Authorities:</td>
    68                                         <td valign="top" class="value">
    69                                                 <ul>
    70                                                 <g:each in="${roleNames}" var='name'>
    71                                                         <li>${name}</li>
    72                                                 </g:each>
    73                                                 </ul>
    74                                         </td>
    75                                 </tr>
     66                <tr class="prop">
     67                    <td valign="top" class="name">Authorities:</td>
     68                    <td valign="top" class="value">
     69                        <ul>
     70                        <g:each in="${roleNames}" var='name'>
     71                            <li>${name}</li>
     72                        </g:each>
     73                        </ul>
     74                    </td>
     75                </tr>
    7676
    77                         </tbody>
    78                         </table>
    79                 </div>
     77            </tbody>
     78            </table>
     79        </div>
    8080
    81                 <div class="buttons">
    82                         <g:form>
    83                                 <input type="hidden" name="id" value="${person.id}" />
    84                                 <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
    85                                 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
    86                         </g:form>
    87                 </div>
     81        <div class="buttons">
     82            <g:form>
     83                <input type="hidden" name="id" value="${person.id}" />
     84                <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
     85                <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
     86            </g:form>
     87        </div>
    8888
    89         </div>
     89    </div>
    9090</body>
  • trunk/grails-app/views/taskDetailed/search.gsp

    r147 r150  
    1111            <nav:renderSubItems group="nav"/>
    1212        </div>
    13        
     13
    1414        <div class="body">
    1515            <g:if test="${flash.message}">
     
    3535                    <thead>
    3636                        <tr>
    37                        
    38                                 <g:sortableColumn property="id" title="Id" params="${filterParams}" />
    39                        
    40                                 <g:sortableColumn property="targetStartDate" title="Target Start Date" params="${filterParams}" />
    41                        
    42                                 <g:sortableColumn property="description" title="Description" params="${filterParams}" />
    43                        
    44                                 <g:sortableColumn  property="leadPerson" title="Lead Person" params="${filterParams}" />
    45                        
     37
     38                            <g:sortableColumn property="id" title="Id" params="${filterParams}" />
     39
     40                            <g:sortableColumn property="targetStartDate" title="Target Start Date" params="${filterParams}" />
     41
     42                            <g:sortableColumn property="description" title="Description" params="${filterParams}" />
     43
     44                            <g:sortableColumn  property="leadPerson" title="Lead Person" params="${filterParams}" />
     45
    4646                            <g:sortableColumn  property="taskPriority" title="Task Priority" params="${filterParams}" />
    47                        
     47
    4848                            <g:sortableColumn  property="taskStatus" title="Task Status" params="${filterParams}" />
    4949
    5050                            <th></th>
    51                            
     51
    5252                        </tr>
    5353                    </thead>
     
    5757
    5858                            <td>${fieldValue(bean:taskInstance, field:'id')}</td>
    59                        
     59
    6060                            <td><g:formatDate date="${taskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/></td>
    61                        
     61
    6262                            <td>${fieldValue(bean:taskInstance, field:'description')}</td>
    63                        
     63
    6464                            <td>${fieldValue(bean:taskInstance, field:'leadPerson')}</td>
    65                        
     65
    6666                            <td>${fieldValue(bean:taskInstance, field:'taskPriority')}</td>
    67                        
     67
    6868                            <td>${fieldValue(bean:taskInstance, field:'taskStatus')}</td>
    6969
     
    7373                                </g:link>
    7474                            </td>
    75                        
     75
    7676                        </tr>
    7777                    </g:each>
Note: See TracChangeset for help on using the changeset viewer.