|
|
%h1 Listing users
|
|
|
.submitbox
|
|
|
%b Quick add
|
|
|
= form_tag :action => 'create' do
|
|
|
%table{:border => "0"}
|
|
|
%tr
|
|
|
%td
|
|
|
%label{:for => "user_login"} Login
|
|
|
%td
|
|
|
%label{:for => "user_full_name"} Full name
|
|
|
%td
|
|
|
%label{:for => "user_password"} Password
|
|
|
%td
|
|
|
%label{:for => "user_password_confirmation"} Confirm
|
|
|
%td
|
|
|
%label{:for => "user_email"} Email
|
|
|
%tr
|
|
|
%td= text_field 'user', 'login', :size => 10
|
|
|
%td= text_field 'user', 'full_name', :size => 30
|
|
|
%td= password_field 'user', 'password', :size => 10
|
|
|
%td= password_field 'user', 'password_confirmation', :size => 10
|
|
|
%td= email_field 'user', 'email', :size => 15
|
|
|
%td= submit_tag "Create"
|
|
|
%br/
|
|
|
%b Import from site management
|
|
|
= form_tag({:action => 'import'}, :multipart => true) do
|
|
|
File: #{file_field_tag 'file'} #{submit_tag 'Import'}
|
|
|
%br/
|
|
|
%b What else:
|
|
|
= link_to 'New user', {:action => 'new'}, { class: 'btn btn-default btn-sm'}
|
|
|
= link_to 'New list of users',{ :action => 'new_list'}, { class: 'btn btn-default btn-sm'}
|
|
|
= link_to 'View administrators',{ :action => 'admin'}, { class: 'btn btn-default btn-sm'}
|
|
|
= link_to 'Random passwords',{ :action => 'random_all_passwords'}, { class: 'btn btn-default btn-sm'}
|
|
|
= link_to 'View active users',{ :action => 'active'}, { class: 'btn btn-default btn-sm'}
|
|
|
= link_to 'Mass mailing',{ :action => 'mass_mailing'}, { class: 'btn btn-default btn-sm'}
|
|
|
- if GraderConfiguration.multicontests?
|
|
|
%br/
|
|
|
%b Multi-contest:
|
|
|
= link_to '[Manage bulk users in contests]', :action => 'contest_management'
|
|
|
View users in:
|
|
|
- @contests.each do |contest|
|
|
|
= link_to "[#{contest.name}]", :action => 'contests', :id => contest.id
|
|
|
= link_to "[no contest]", :action => 'contests', :id => 'none'
|
|
|
Total #{@user_count} users |
|
|
|
- if !@paginated
|
|
|
Display all users.
|
|
|
\#{link_to '[show in pages]', :action => 'index', :page => '1'}
|
|
|
- else
|
|
|
Display in pages.
|
|
|
\#{link_to '[display all]', :action => 'index', :page => 'all'} |
|
|
|
\#{will_paginate @users, :container => false}
|
|
|
|
|
|
|
|
|
%table.table.table-hover.table-condense
|
|
|
%thead
|
|
|
%th Login
|
|
|
%th Full name
|
|
|
%th email
|
|
|
%th Remark
|
|
|
%th
|
|
|
Activated
|
|
|
%sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'User has already confirmed the email?' } [?]
|
|
|
%th
|
|
|
Enabled
|
|
|
%sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'Allow the user to login?' } [?]
|
|
|
%th Last IP
|
|
|
%th
|
|
|
%th
|
|
|
%th
|
|
|
%th
|
|
|
- for user in @users
|
|
|
%tr
|
|
|
%td= link_to user.login, controller: :users, :action => 'profile', :id => user
|
|
|
%td= user.full_name
|
|
|
%td= user.email
|
|
|
%td= user.remark
|
|
|
%td= toggle_button(user.activated?, toggle_activate_user_url(user),"toggle_activate_user_#{user.id}")
|
|
|
%td= toggle_button(user.enabled?, toggle_enable_user_url(user),"toggle_enable_user_#{user.id}")
|
|
|
%td= user.last_ip
|
|
|
%td= link_to 'Clear IP', {:action => 'clear_last_ip', :id => user, :page=>params[:page]}, :confirm => 'This will reset last logging in ip of the user, are you sure?', class: 'btn btn-default btn-xs btn-block'
|
|
|
%td= link_to 'Show', {:action => 'show', :id => user}, class: 'btn btn-default btn-xs btn-block'
|
|
|
%td= link_to 'Edit', {:action => 'edit', :id => user}, class: 'btn btn-default btn-xs btn-block'
|
|
|
%td= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post, class: 'btn btn-danger btn-xs btn-block'
|
|
|
%br/
|
|
|
= link_to '[New user]', :action => 'new'
|
|
|
= link_to '[New list of users]', :action => 'new_list'
|
|
|
|