extends ../layout/default.jade

block title
    | Rights Management
    
block pageheader
    | Rights
    
block content
    .panel.panel-primary
        .panel-heading
            | Users
        table.table
            thead
                th #
                th Name
                th Permissions
                th Groups
            tbody
                each user in users
                    tr
                        td= user.id
                        td
                            a(href='/rights/user/#{user.id}')= user.username
                        if user.permissions.length > 0
                            td= user.permissions.join(' - ')
                        else
                            td None
                            
                        if user.groups.length > 0
                            td= user.groups.join(', ')
                        else
                            td None
            
    .panel.panel-primary
        .panel-heading
            | Groups
        table.table
            thead
                th #
                th Name
                th Permissions
                th # Users
            tbody
                each group in groups
                    tr
                        td= group.id
                        td
                            a(href='/rights/group/#{group.id}')= group.name
                        if group.permissions.length > 0
                            td= group.permissions.join(', ')
                        else
                            td None
                            
                        td= group.users

extends ../layout/default.jade

block title
    | Rights Management
    
block pageheader
    | Rights
    
block content
    .panel.panel-primary
        .panel-heading
            | Users
        table.table
            thead
                th #
                th Name
                th Permissions
                th Groups
            tbody
                each user in users
                    tr
                        td= user.id
                        td
                            a(href='/rights/user/#{user.id}')= user.username
                        if user.permissions.length > 0
                            td= user.permissions.join(' - ')
                        else
                            td None
                            
                        if user.groups.length > 0
                            td= _.map(user.groups, function(group) { return group.name; }).join(', ')
                        else
                            td None
            
    .panel.panel-primary
        .panel-heading
            | Groups
        table.table
            thead
                th #
                th Name
                th Permissions
                th # Users
            tbody
                each group in groups
                    tr
                        td= group.id
                        td
                            a(href='/rights/group/#{group.id}')= group.name
                        if group.permissions.length > 0
                            td= group.permissions.join(', ')
                        else
                            td None
                            
                        td= group.users

Fix groups not getting displayed correctly.
Fix groups not getting displayed correctly.
