~vcs-imports/norfellocmms/trunk

« back to all changes in this revision

Viewing changes to app/controllers/task_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:
63
63
    conditions[0] = "(#{conditions[0]}) AND task_type_id != ?"
64
64
    conditions.push(TaskType.get_service_request_type.id)
65
65
 
66
 
    @items = items_for_page(Task, :finder_method => :find_authorized_to_read, :conditions => conditions, :readonly => true)
 
66
    @items = items_for_page(Task, :finder_method => :find_authorized_to_read, :conditions => conditions, :order => 'id')
67
67
    common_list
68
68
  end
69
69
 
389
389
    conditions[0] = "(#{conditions[0]}) AND task_type_id = ?"
390
390
    conditions.push(TaskType.get_service_request_type.id)
391
391
 
392
 
    @items = items_for_page(Task, :finder_method => :find_authorized_to_read, :conditions => conditions, :readonly => true)
 
392
    @items = items_for_page(Task, :finder_method => :find_authorized_to_read, :conditions => conditions, :order => 'id')
393
393
    common_list
394
394
  end
395
395
 
403
403
    @hide_subaction_links = true
404
404
 
405
405
    @items = items_for_page(Task, :finder_method => :find_authorized_to_read,
406
 
                            :conditions => ['task_type_id = ? AND state = ?', TaskType.get_service_request_type.id, Task.NEW],
407
 
                            :readonly => true)
 
406
                            :conditions => ['task_type_id = ? AND state = ?', TaskType.get_service_request_type.id, Task.NEW])
408
407
    common_list
409
408
  end
410
409