Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin/users')
-rw-r--r--app/views/admin/users/_form.html.haml90
-rw-r--r--app/views/admin/users/edit.html.haml7
-rw-r--r--app/views/admin/users/index.html.haml88
-rw-r--r--app/views/admin/users/new.html.haml4
-rw-r--r--app/views/admin/users/show.html.haml227
5 files changed, 0 insertions, 416 deletions
diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml
deleted file mode 100644
index e18dd9bc905..00000000000
--- a/app/views/admin/users/_form.html.haml
+++ /dev/null
@@ -1,90 +0,0 @@
-.user_new
- = form_for [:admin, @user], html: { class: 'form-horizontal fieldset-form' } do |f|
- -if @user.errors.any?
- #error_explanation
- .alert.alert-danger
- - @user.errors.full_messages.each do |msg|
- %p= msg
-
- %fieldset
- %legend Account
- .form-group
- = f.label :name, class: 'control-label'
- .col-sm-10
- = f.text_field :name, required: true, autocomplete: "off", class: 'form-control'
- %span.help-inline * required
- .form-group
- = f.label :username, class: 'control-label'
- .col-sm-10
- = f.text_field :username, required: true, autocomplete: "off", class: 'form-control'
- %span.help-inline * required
- .form-group
- = f.label :email, class: 'control-label'
- .col-sm-10
- = f.text_field :email, required: true, autocomplete: "off", class: 'form-control'
- %span.help-inline * required
-
- - if @user.new_record?
- %fieldset
- %legend Password
- .form-group
- = f.label :password, class: 'control-label'
- .col-sm-10
- %strong
- Reset link will be generated and sent to the user.
- %br
- User will be forced to set the password on first sign in.
- - else
- %fieldset
- %legend Password
- .form-group
- = f.label :password, class: 'control-label'
- .col-sm-10= f.password_field :password, disabled: f.object.force_random_password, class: 'form-control'
- .form-group
- = f.label :password_confirmation, class: 'control-label'
- .col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control'
-
- %fieldset
- %legend Access
- .form-group
- = f.label :projects_limit, class: 'control-label'
- .col-sm-10= f.number_field :projects_limit, class: 'form-control'
-
- .form-group
- = f.label :can_create_group, class: 'control-label'
- .col-sm-10= f.check_box :can_create_group
-
- .form-group
- = f.label :admin, class: 'control-label'
- - if current_user == @user
- .col-sm-10= f.check_box :admin, disabled: true
- .col-sm-10 You cannot remove your own admin rights
- - else
- .col-sm-10= f.check_box :admin
- %fieldset
- %legend Profile
- .form-group
- = f.label :avatar, class: 'control-label'
- .col-sm-10
- = f.file_field :avatar
-
- .form-group
- = f.label :skype, class: 'control-label'
- .col-sm-10= f.text_field :skype, class: 'form-control'
- .form-group
- = f.label :linkedin, class: 'control-label'
- .col-sm-10= f.text_field :linkedin, class: 'form-control'
- .form-group
- = f.label :twitter, class: 'control-label'
- .col-sm-10= f.text_field :twitter, class: 'form-control'
- .form-group
- = f.label :website_url, 'Website', class: 'control-label'
- .col-sm-10= f.text_field :website_url, class: 'form-control'
-
- .form-actions
- - if @user.new_record?
- = f.submit 'Create user', class: "btn btn-create"
- = link_to 'Cancel', admin_users_path, class: "btn btn-cancel"
- - else
- = f.submit 'Save changes', class: "btn btn-save"
- = link_to 'Cancel', admin_user_path(@user), class: "btn btn-cancel"
diff --git a/app/views/admin/users/edit.html.haml b/app/views/admin/users/edit.html.haml
deleted file mode 100644
index d71d8189c51..00000000000
--- a/app/views/admin/users/edit.html.haml
+++ /dev/null
@@ -1,7 +0,0 @@
-%h3.page-title
- Edit user: #{@user.name}
-.back-link
- = link_to admin_user_path(@user) do
- ← Back to user page
-%hr
-= render 'form'
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
deleted file mode 100644
index 25c1730ef70..00000000000
--- a/app/views/admin/users/index.html.haml
+++ /dev/null
@@ -1,88 +0,0 @@
-.row
- = link_to '#aside', class: 'show-aside' do
- %i.fa.fa-angle-left
- %aside.col-md-3
- .admin-filter
- %ul.nav.nav-pills.nav-stacked
- %li{class: "#{'active' unless params[:filter]}"}
- = link_to admin_users_path do
- Active
- %small.pull-right= User.active.count
- %li{class: "#{'active' if params[:filter] == "admins"}"}
- = link_to admin_users_path(filter: "admins") do
- Admins
- %small.pull-right= User.admins.count
- %li{class: "#{'active' if params[:filter] == "blocked"}"}
- = link_to admin_users_path(filter: "blocked") do
- Blocked
- %small.pull-right= User.blocked.count
- %li{class: "#{'active' if params[:filter] == "wop"}"}
- = link_to admin_users_path(filter: "wop") do
- Without projects
- %small.pull-right= User.without_projects.count
- %hr
- = form_tag admin_users_path, method: :get, class: 'form-inline' do
- .form-group
- = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control'
- = button_tag class: 'btn btn-primary' do
- %i.fa.fa-search
- %hr
- = link_to 'Reset', admin_users_path, class: "btn btn-cancel"
-
- %section.col-md-9
- .panel.panel-default
- .panel-heading
- Users (#{@users.total_count})
- .panel-head-actions
- .dropdown.inline
- %a.dropdown-toggle.btn.btn-sm{href: '#', "data-toggle" => "dropdown"}
- %span.light sort:
- - if @sort.present?
- = sort_options_hash[@sort]
- - else
- = sort_title_name
- %b.caret
- %ul.dropdown-menu
- %li
- = link_to admin_users_path(sort: sort_value_name) do
- = sort_title_name
- = link_to admin_users_path(sort: sort_value_recently_signin) do
- = sort_title_recently_signin
- = link_to admin_users_path(sort: sort_value_oldest_signin) do
- = sort_title_oldest_signin
- = link_to admin_users_path(sort: sort_value_recently_created) do
- = sort_title_recently_created
- = link_to admin_users_path(sort: sort_value_oldest_created) do
- = sort_title_oldest_created
- = link_to admin_users_path(sort: sort_value_recently_updated) do
- = sort_title_recently_updated
- = link_to admin_users_path(sort: sort_value_oldest_updated) do
- = sort_title_oldest_updated
-
- = link_to 'New User', new_admin_user_path, class: "btn btn-new btn-sm"
- %ul.well-list
- - @users.each do |user|
- %li
- .list-item-name
- - if user.blocked?
- %i.fa.fa-lock.cred
- - else
- %i.fa.fa-user.cgreen
- = link_to user.name, [:admin, user]
- - if user.admin?
- %strong.cred (Admin)
- - if user == current_user
- %span.cred It's you!
- .pull-right
- %span.light
- %i.fa.fa-envelope
- = mail_to user.email, user.email, class: 'light'
-  
- = link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-sm"
- - unless user == current_user
- - if user.blocked?
- = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-sm success"
- - else
- = link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-sm btn-remove"
- = link_to 'Destroy', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All tickets linked to this user will also be removed! Maybe block the user instead? Are you sure?" }, method: :delete, class: "btn btn-sm btn-remove"
- = paginate @users, theme: "gitlab"
diff --git a/app/views/admin/users/new.html.haml b/app/views/admin/users/new.html.haml
deleted file mode 100644
index 8fbb757f424..00000000000
--- a/app/views/admin/users/new.html.haml
+++ /dev/null
@@ -1,4 +0,0 @@
-%h3.page-title
- New user
-%hr
-= render 'form'
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml
deleted file mode 100644
index 3524f04c5ed..00000000000
--- a/app/views/admin/users/show.html.haml
+++ /dev/null
@@ -1,227 +0,0 @@
-%h3.page-title
- User:
- = @user.name
- - if @user.blocked?
- %span.cred (Blocked)
- - if @user.admin
- %span.cred (Admin)
-
- .pull-right
- = link_to edit_admin_user_path(@user), class: "btn btn-grouped" do
- %i.fa.fa-pencil-square-o
- Edit
-%hr
-%ul.nav.nav-tabs
- %li.active
- %a{"data-toggle" => "tab", href: "#account"} Account
- %li
- %a{"data-toggle" => "tab", href: "#profile"} Profile
- %li
- %a{"data-toggle" => "tab", href: "#groups"} Groups
- %li
- %a{"data-toggle" => "tab", href: "#projects"} Projects
- %li
- %a{"data-toggle" => "tab", href: "#ssh-keys"} SSH keys
-
-.tab-content
- #account.tab-pane.active
- .row
- .col-md-6
- .panel.panel-default
- .panel-heading
- Account:
- %ul.well-list
- %li
- %span.light Name:
- %strong= @user.name
- %li
- %span.light Username:
- %strong
- = @user.username
- %li
- %span.light Email:
- %strong
- = mail_to @user.email
- - @user.emails.each do |email|
- %li
- %span.light Secondary email:
- %strong= email.email
- = link_to remove_email_admin_user_path(@user, email), data: { confirm: "Are you sure you want to remove #{email.email}?" }, method: :delete, class: "btn-xs btn btn-remove pull-right", title: 'Remove secondary email', id: "remove_email_#{email.id}" do
- %i.fa.fa-times
-
- %li
- %span.light Can create groups:
- %strong
- = @user.can_create_group ? "Yes" : "No"
- %li
- %span.light Personal projects limit:
- %strong
- = @user.projects_limit
- %li
- %span.light Member since:
- %strong
- = @user.created_at.stamp("Nov 12, 2031")
- - if @user.confirmed_at
- %li
- %span.light Confirmed at:
- %strong
- = @user.confirmed_at.stamp("Nov 12, 2031")
- - else
- %li
- %span.light Confirmed:
- %strong.cred
- No
-
- %li
- %span.light Current sign-in at:
- %strong
- - if @user.current_sign_in_at
- = @user.current_sign_in_at.stamp("Nov 12, 2031")
- - else
- never
-
- %li
- %span.light Last sign-in at:
- %strong
- - if @user.last_sign_in_at
- = @user.last_sign_in_at.stamp("Nov 12, 2031")
- - else
- never
-
- %li
- %span.light Sign-in count:
- %strong
- = @user.sign_in_count
-
- - if @user.ldap_user?
- %li
- %span.light LDAP uid:
- %strong
- = @user.ldap_identity.extern_uid
-
- - if @user.created_by
- %li
- %span.light Created by:
- %strong
- = link_to @user.created_by.name, [:admin, @user.created_by]
-
- .col-md-6
- - unless @user == current_user
- - if @user.blocked?
- .panel.panel-info
- .panel-heading
- This user is blocked
- .panel-body
- %p Blocking user has the following effects:
- %ul
- %li User will not be able to login
- %li User will not be able to access git repositories
- %li Personal projects will be left
- %li Owned groups will be left
- %br
- = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-info", data: { confirm: 'Are you sure?' }
- - else
- .panel.panel-warning
- .panel-heading
- Block this user
- .panel-body
- %p Blocking user has the following effects:
- %ul
- %li User will not be able to login
- %li User will not be able to access git repositories
- %li User will be removed from joined projects and groups
- %li Personal projects will be left
- %li Owned groups will be left
- %br
- = link_to 'Block user', block_admin_user_path(@user), data: { confirm: 'USER WILL BE BLOCKED! Are you sure?' }, method: :put, class: "btn btn-warning"
-
- .panel.panel-danger
- .panel-heading
- Remove user
- .panel-body
- %p Deleting a user has the following effects:
- %ul
- %li All user content like authored issues, snippets, comments will be removed
- - rp = @user.personal_projects.count
- - unless rp.zero?
- %li #{pluralize rp, 'personal project'} will be removed and cannot be restored
- - if @user.solo_owned_groups.present?
- %li
- Next groups with all content will be removed:
- %strong #{@user.solo_owned_groups.map(&:name).join(', ')}
- %br
- = link_to 'Remove user', [:admin, @user], data: { confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-remove"
-
- #profile.tab-pane
- .row
- .col-md-6
- .panel.panel-default
- .panel-heading
- = @user.name
- %ul.well-list
- %li
- = image_tag avatar_icon(@user.email, 60), class: "avatar s60"
- %li
- %span.light Profile page:
- %strong
- = link_to user_path(@user) do
- = @user.username
- .col-md-6
- = render 'users/profile', user: @user
-
- #groups.tab-pane
- - if @user.group_members.present?
- .panel.panel-default
- .panel-heading Groups:
- %ul.well-list
- - @user.group_members.each do |group_member|
- - group = group_member.group
- %li.group_member
- %span{class: ("list-item-name" unless group_member.owner?)}
- %strong= link_to group.name, admin_group_path(group)
- .pull-right
- %span.light= group_member.human_access
- - unless group_member.owner?
- = link_to group_group_member_path(group, group_member), data: { confirm: remove_user_from_group_message(group, group_member) }, method: :delete, remote: true, class: "btn-xs btn btn-remove", title: 'Remove user from group' do
- %i.fa.fa-times.fa-inverse
- - else
- .nothing-here-block This user has no groups.
-
- #projects.tab-pane
- - if @user.groups.any?
- .panel.panel-default
- .panel-heading Group projects
- %ul.well-list
- - @user.groups.each do |group|
- %li
- %strong= group.name
- – access to
- #{pluralize(group.projects.count, 'project')}
-
- .row
- .col-md-6
- = render 'users/projects', projects: @personal_projects
-
- .col-md-6
- .panel.panel-default
- .panel-heading Joined projects (#{@joined_projects.count})
- %ul.well-list
- - @joined_projects.sort_by(&:name_with_namespace).each do |project|
- - member = project.team.find_member(@user.id)
- %li.project_member
- .list-item-name
- = link_to admin_namespace_project_path(project.namespace, project), class: dom_class(project) do
- = project.name_with_namespace
-
- - if member
- .pull-right
- - if member.owner?
- %span.light Owner
- - else
- %span.light= member.human_access
-
- - if member.respond_to? :project
- = link_to namespace_project_project_member_path(project.namespace, project, member), data: { confirm: remove_from_project_team_message(project, member) }, remote: true, method: :delete, class: "btn-xs btn btn-remove", title: 'Remove user from project' do
- %i.fa.fa-times
- #ssh-keys.tab-pane
- = render 'profiles/keys/key_table', admin: true