Second part of admin-namespace-reorder. Also renamed OrderGroup into Ordergroup. More view-sharing between groups is neccessary.
This commit is contained in:
parent
2d5dc03b90
commit
fadc951208
83 changed files with 410 additions and 518 deletions
|
|
@ -1,4 +1,5 @@
|
|||
class Admin::WorkgroupsController < ApplicationController
|
||||
before_filter :authenticate_admin
|
||||
|
||||
def index
|
||||
if (params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 100)
|
||||
|
|
@ -10,6 +11,7 @@ class Admin::WorkgroupsController < ApplicationController
|
|||
# if the search field is used
|
||||
conditions = "name LIKE '%#{params[:query]}%'" unless params[:query].nil?
|
||||
|
||||
@total = Ordergroup.count(:conditions => conditions )
|
||||
@workgroups = Workgroup.paginate(:conditions => conditions, :page => params[:page],
|
||||
:per_page => @per_page, :order => 'name')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue