Show More
Commit Description:
merge
Commit Description:
merge
References:
File last commit:
Show/Diff file:
Action:
app/views/user_admin/bulk_manage.html.haml
| 92 lines
| 3.0 KiB
| text/x-haml
| HamlLexer
|
r643 | %h1 Bulk Manage User | |||
r749 | = form_tag bulk_manage_user_admin_index_path | |||
r643 | .row | |||
.col-md-6 | ||||
.panel.panel-primary | ||||
.panel-title.panel-heading | ||||
Filter User | ||||
.panel-body | ||||
Filtering users whose login match the following MySQL regex | ||||
.form-group | ||||
= label_tag "regex", 'Regex Pattern' | ||||
= text_field_tag "regex", params[:regex], class: 'form-control' | ||||
%p | ||||
Example | ||||
%ul | ||||
%li | ||||
%code root | ||||
matches every user whose login contains "root" | ||||
%li | ||||
%code ^56 | ||||
matches every user whose login starts with "56" | ||||
%li | ||||
%code 21$ | ||||
matches every user whose login ends with "21" | ||||
r808 | .form-group | |||
.div.checkbox | ||||
%label | ||||
= check_box_tag :filter_group, 1, params[:filter_group] == '1' | ||||
Apply to this group only | ||||
= select_tag "filter_group_id", options_from_collection_for_select( Group.all, 'id','name',params[:filter_group_id]), id: 'group_name',class: 'select2' | ||||
r643 | .col-md-6 | |||
.panel.panel-primary | ||||
.panel-title.panel-heading | ||||
Action | ||||
.panel-body | ||||
.row.form-group | ||||
.col-md-6 | ||||
%label.checkbox-inline | ||||
= check_box_tag "enabled", true, params[:enabled] | ||||
Change "Enabled" to | ||||
.col-md-3 | ||||
%label.radio-inline | ||||
= radio_button_tag "enable", 1, params[:enable] == '1', id: 'enable-yes' | ||||
Yes | ||||
.col-md-3 | ||||
%label.radio-inline | ||||
= radio_button_tag "enable", 0, params[:enable] == '0', id: 'enable-no' | ||||
No | ||||
.row.form-group | ||||
.col-md-6 | ||||
%label.checkbox-inline | ||||
= check_box_tag "gen_password", true, params[:gen_password] | ||||
Generate new random password | ||||
r671 | .row.form-group | |||
.col-md-4 | ||||
%label.checkbox-inline | ||||
= check_box_tag "add_group", true, params[:add_group] | ||||
Add users to group | ||||
%label.col-md-3.control-label.text-right Group name | ||||
.col-md-5 | ||||
r672 | = select_tag "group_name", options_from_collection_for_select( Group.all, 'id','name',params[:group_name]), id: 'group_name',class: 'form-control select2' | |||
r671 | ||||
r643 | ||||
.row | ||||
.col-md-12 | ||||
= submit_tag "Preview Result", class: 'btn btn-default' | ||||
- if @users | ||||
.row | ||||
.col-md-4 | ||||
- if @action | ||||
%h2 Confirmation | ||||
- if @action[:set_enable] | ||||
.alert.alert-info The following users will be set #{(@action[:enabled] ? 'enable' : 'disable')}. | ||||
- if @action[:gen_password] | ||||
.alert.alert-info The password of the following users will be randomly generated. | ||||
.row | ||||
.col-md-4 | ||||
= submit_tag "Perform", class: 'btn btn-primary' | ||||
.row | ||||
.col-md-12 | ||||
The pattern matches #{@users.count} following users. | ||||
%br | ||||
- @users.each do |user| | ||||
= user.login | ||||
= ' ' | ||||
= user.full_name | ||||
= ' ' | ||||
= "(#{user.remark})" if user.remark | ||||
%br | ||||