Merge pull request #334 from warpc/270-user_control
[Refs 270] Customize users admin menu * moved Add button to sidebar; * added translate to search label; * changed translation to Admin.
This commit is contained in:
commit
da5863ba0f
|
@ -1,5 +1,7 @@
|
|||
- content_for :sidebar do
|
||||
.bordered.nopadding
|
||||
.bordered
|
||||
- if can? :create, User.new
|
||||
= link_to t("layout.users.new"), new_user_path, :class => 'button'
|
||||
%h3= t("layout.users.filter_header")
|
||||
%table
|
||||
- t('layout.users.users_filter').each_key do |base|
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
%h3.fix= t("layout.users.list_header")
|
||||
- if can? :create, User.new
|
||||
= link_to t("layout.users.new"), new_user_path, :class => 'button'
|
||||
|
||||
- columns = [{:type => 'html'}, {:type => 'html'}, {:type => 'html'}, {:type => 'html', :sortable => false, :searchable => false}, {:type => nil, :sortable => false, :searchable => false, :class => 'buttons'}]
|
||||
= raw datatable(columns, {:sort_by => "[0, 'asc']", :processing => t("layout.processing"),
|
||||
= raw datatable(columns, {:sort_by => "[0, 'asc']", :processing => t("layout.processing"), :search_label => t("layout.search.header"),
|
||||
:pagination_labels => {:previous => t("datatables.previous_label"), :next => t("datatables.next_label")},
|
||||
:empty_label => t("datatables.empty_label"),
|
||||
:info_label => t("datatables.info_label"),
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
- if can? :index, base.to_s.classify.constantize
|
||||
%li= link_to title, send(:"#{base}_path"), :class => controller_name == base.to_s ? 'active' : ''
|
||||
- if current_user.admin? && which_menu == 'top_menu'
|
||||
%li= link_to 'Admin', users_path, :class => t('admins_menu').has_key?(controller_name.to_sym) ? 'active' : ''
|
||||
%li= link_to t('admins_menu_header'), users_path, :class => t('admins_menu').has_key?(controller_name.to_sym) ? 'active' : ''
|
||||
|
|
|
@ -33,6 +33,7 @@ en:
|
|||
wiki: Wiki
|
||||
platform_menu:
|
||||
settings: Settings
|
||||
admins_menu_header: Admin
|
||||
admins_menu:
|
||||
users: Пользователи
|
||||
event_logs: Лог событий
|
||||
|
|
|
@ -33,6 +33,7 @@ ru:
|
|||
wiki: Вики
|
||||
platform_menu:
|
||||
settings: Настройки
|
||||
admins_menu_header: Центр управления
|
||||
admins_menu:
|
||||
users: Пользователи
|
||||
event_logs: Лог событий
|
||||
|
|
Loading…
Reference in New Issue