Skip to content
Browse files

Updated ubiquo_users_list helper [#685]

  • Loading branch information...
1 parent 1c0b2f4 commit 70fb25179a34d2f19d9de4904cb80dac3fe0aa35 @areina areina committed Feb 2, 2012
Showing with 20 additions and 19 deletions.
  1. +20 −19 ubiquo_authentication/app/helpers/ubiquo/ubiquo_users_helper.rb
View
39 ubiquo_authentication/app/helpers/ubiquo/ubiquo_users_helper.rb
@@ -13,30 +13,31 @@ def ubiquo_user_filters
#renders the ubiquo_user list
def ubiquo_user_list(collection, pages, options = {}, &block)
- concat render(:partial => "shared/ubiquo/lists/boxes", :locals => {
- :name => 'ubiquo_user',
- :rows => collection.collect do |ubiquo_user|
- {
- :id => ubiquo_user.id,
- :content => capture(ubiquo_user, &block),
- :actions => ubiquo_user_actions(ubiquo_user)
- }
- end,
- :pages => pages,
- :link_to_new => link_to(t("ubiquo.auth.new_user"),
- ubiquo.new_ubiquo_user_path, :class => 'new')
- })
+ render(:partial => "shared/ubiquo/lists/boxes", :locals => {
+ :name => 'ubiquo_user',
+ :rows => collection.collect do |ubiquo_user|
+ {
+ :id => ubiquo_user.id,
+ :content => capture(ubiquo_user, &block),
+ :actions => ubiquo_user_actions(ubiquo_user)
+ }
+ end,
+ :pages => pages,
+ :link_to_new => link_to(t("ubiquo.auth.new_user"),
+ ubiquo.new_ubiquo_user_path, :class => 'new')
+ })
end
private
- #return the actios related to an ubiquo_user
+ #return the actions related to an ubiquo_user
def ubiquo_user_actions(ubiquo_user, options = {})
- actions = []
- actions << link_to(t("ubiquo.edit"), ubiquo.edit_ubiquo_user_path(ubiquo_user), :class => "edit")
- actions << link_to(t("ubiquo.remove"), ubiquo.ubiquo_user_path(ubiquo_user),
- :confirm => t("ubiquo.auth.confirm_user_removal"), :method => :delete, :class => "delete")
- actions
+ [
+ link_to(t("ubiquo.edit"), ubiquo.edit_ubiquo_user_path(ubiquo_user), :class => "btn-edit"),
+ link_to(t("ubiquo.remove"), ubiquo.ubiquo_user_path(ubiquo_user),
+ :confirm => t("ubiquo.auth.confirm_user_removal"),
+ :method => :delete, :class => "btn-delete")
+ ]
end
end

0 comments on commit 70fb251

Please sign in to comment.
Something went wrong with that request. Please try again.