Skip to content

Commit

Permalink
Add roles to admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Lee committed Feb 21, 2012
1 parent efcbee6 commit a61f12e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/extensions/controllers/fluxx_admin_items_controller.rb
Expand Up @@ -14,7 +14,7 @@ def self.included(base)

base.insta_edit do |insta|
insta.template = "model_types"
insta.template_map = {:alerts => "alerts", :model_document_templates => "model_document_templates", :additional_settings => "additional_settings", :dynamic_cards => "dynamic_cards"}
insta.template_map = {:alerts => "alerts", :model_document_templates => "model_document_templates", :additional_settings => "additional_settings", :dynamic_cards => "dynamic_cards", :roles_and_profiles => "roles_and_profiles"}
insta.icon_style = ICON_STYLE
insta.post do |triple|
controller_dsl, model, outcome = triple
Expand Down
11 changes: 11 additions & 0 deletions lib/extensions/controllers/fluxx_roles_controller.rb
Expand Up @@ -7,6 +7,17 @@ def self.included(base)
insta.filter_template = 'roles/role_filter'
insta.order_clause = 'name asc, updated_at desc'
insta.icon_style = ICON_STYLE
insta.format do |format|
format.html do |triple|
controller_dsl, outcome, default_block = triple
if params[:admin]
@suppress_model_iteration = true
else
@suppress_model_iteration = false
end
default_block.call
end
end
end
base.insta_show Role do |insta|
insta.template = 'role_show'
Expand Down

0 comments on commit a61f12e

Please sign in to comment.