~vcs-imports/norfellocmms/trunk

« back to all changes in this revision

Viewing changes to app/controllers/user_group_controller.rb

  • Committer: markku
  • Date: 2008-02-21 16:50:54 UTC
  • Revision ID: vcs-imports@canonical.com-20080221165054-q34ijezsuuhn7vip
1. Closes #530:
 * ApplicationController#items_for_page modified to consider the :order option as the default ordering.
 * AttachmentController#list and TypeAttachmentController#list modified to use items_for_page.
 * Added column ordering links and/or default ordering to many lists.
2. Closes #531.
3. Also fixed headers not translated in the action key list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
  # Lists all user groups
19
19
  def list
20
20
    @title = _('User groups')
 
21
    @fields = [ [_('Name'), :name, 'name'],
 
22
                [_('Information'), :info, 'info']
 
23
              ]
21
24
    @items = items_for_page(UserGroup, :order => 'name')
22
 
    @fields = [ [_('Name'), :name],
23
 
                [_('Information'), :info]
24
 
              ]
25
25
    @actions = [ [_('Users'), {:action => 'users', :image => '16x16/user_group.png' }],
26
26
                 [_('Edit'), {:action => 'edit', :image => '16x16/edit.gif' }]
27
27
               ]
28
28
    # Render remove user groups form?
29
29
    @check = session[:user].authorized?(LoginSystem::ActionKeyMapper.keys_for('user_group', 'remove'))
30
 
    common_list
 
30
     common_list
31
31
  end
32
32
 
33
33
  # Function: create