diff options
Diffstat (limited to 'app/views/admin')
32 files changed, 0 insertions, 1488 deletions
diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml deleted file mode 100644 index 4f3565c67eb..00000000000 --- a/app/views/admin/application_settings/_form.html.haml +++ /dev/null @@ -1,69 +0,0 @@ -= form_for @application_setting, url: admin_application_settings_path, html: { class: 'form-horizontal fieldset-form' } do |f| - - if @application_setting.errors.any? - #error_explanation - .alert.alert-danger - - @application_setting.errors.full_messages.each do |msg| - %p= msg - - %fieldset - %legend Features - .form-group - .col-sm-offset-2.col-sm-10 - .checkbox - = f.label :signup_enabled do - = f.check_box :signup_enabled - Signup enabled - .form-group - .col-sm-offset-2.col-sm-10 - .checkbox - = f.label :signin_enabled do - = f.check_box :signin_enabled - Signin enabled - .form-group - .col-sm-offset-2.col-sm-10 - .checkbox - = f.label :gravatar_enabled do - = f.check_box :gravatar_enabled - Gravatar enabled - .form-group - .col-sm-offset-2.col-sm-10 - .checkbox - = f.label :twitter_sharing_enabled do - = f.check_box :twitter_sharing_enabled, :'aria-describedby' => 'twitter_help_block' - %strong Twitter enabled - %span.help-block#twitter_help_block Show users a button to share their newly created public or internal projects on twitter - %fieldset - %legend Misc - .form-group - = f.label :default_projects_limit, class: 'control-label col-sm-2' - .col-sm-10 - = f.number_field :default_projects_limit, class: 'form-control' - .form-group - = f.label :default_branch_protection, class: 'control-label col-sm-2' - .col-sm-10 - = f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, @application_setting.default_branch_protection), {}, class: 'form-control' - .form-group - = f.label :restricted_visibility_levels, class: 'control-label col-sm-2' - .col-sm-10 - - data_attrs = { toggle: 'buttons' } - .btn-group{ data: data_attrs } - - restricted_level_checkboxes('restricted-visibility-help').each do |level| - = level - %span.help-block#restricted-visibility-help Selected levels cannot be used by non-admin users for projects or snippets - .form-group - = f.label :home_page_url, class: 'control-label col-sm-2' - .col-sm-10 - = f.text_field :home_page_url, class: 'form-control', placeholder: 'http://company.example.com', :'aria-describedby' => 'home_help_block' - %span.help-block#home_help_block We will redirect non-logged in users to this page - .form-group - = f.label :sign_in_text, class: 'control-label col-sm-2' - .col-sm-10 - = f.text_area :sign_in_text, class: 'form-control', rows: 4 - .help-block Markdown enabled - .form-group - = f.label :max_attachment_size, 'Maximum attachment size (MB)', class: 'control-label col-sm-2' - .col-sm-10 - = f.number_field :max_attachment_size, class: 'form-control' - - .form-actions - = f.submit 'Save', class: 'btn btn-primary' diff --git a/app/views/admin/application_settings/show.html.haml b/app/views/admin/application_settings/show.html.haml deleted file mode 100644 index 39b66647a5a..00000000000 --- a/app/views/admin/application_settings/show.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -%h3.page-title Application settings -%hr -= render 'form' diff --git a/app/views/admin/applications/_delete_form.html.haml b/app/views/admin/applications/_delete_form.html.haml deleted file mode 100644 index 3147cbd659f..00000000000 --- a/app/views/admin/applications/_delete_form.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- submit_btn_css ||= 'btn btn-link btn-remove btn-sm' -= form_tag admin_application_path(application) do - %input{:name => "_method", :type => "hidden", :value => "delete"}/ - = submit_tag 'Destroy', onclick: "return confirm('Are you sure?')", class: submit_btn_css
\ No newline at end of file diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml deleted file mode 100644 index fa4e6335c73..00000000000 --- a/app/views/admin/applications/_form.html.haml +++ /dev/null @@ -1,26 +0,0 @@ -= form_for [:admin, @application], url: @url, html: {class: 'form-horizontal', role: 'form'} do |f| - - if application.errors.any? - .alert.alert-danger - %button{ type: "button", class: "close", "data-dismiss" => "alert"} × - - application.errors.full_messages.each do |msg| - %p= msg - = content_tag :div, class: 'form-group' do - = f.label :name, class: 'col-sm-2 control-label' - .col-sm-10 - = f.text_field :name, class: 'form-control' - = doorkeeper_errors_for application, :name - = content_tag :div, class: 'form-group' do - = f.label :redirect_uri, class: 'col-sm-2 control-label' - .col-sm-10 - = f.text_area :redirect_uri, class: 'form-control' - = doorkeeper_errors_for application, :redirect_uri - %span.help-block - Use one line per URI - - if Doorkeeper.configuration.native_redirect_uri - %span.help-block - Use - %code= Doorkeeper.configuration.native_redirect_uri - for local tests - .form-actions - = f.submit 'Submit', class: "btn btn-primary wide" - = link_to "Cancel", admin_applications_path, class: "btn btn-default" diff --git a/app/views/admin/applications/edit.html.haml b/app/views/admin/applications/edit.html.haml deleted file mode 100644 index e408ae2f29d..00000000000 --- a/app/views/admin/applications/edit.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -%h3.page-title Edit application -- @url = admin_application_path(@application) -= render 'form', application: @application
\ No newline at end of file diff --git a/app/views/admin/applications/index.html.haml b/app/views/admin/applications/index.html.haml deleted file mode 100644 index d550278710e..00000000000 --- a/app/views/admin/applications/index.html.haml +++ /dev/null @@ -1,22 +0,0 @@ -%h3.page-title - System OAuth applications -%p.light - System OAuth application does not belong to certain user and can be managed only by admins -%hr -%p= link_to 'New Application', new_admin_application_path, class: 'btn btn-success' -%table.table.table-striped - %thead - %tr - %th Name - %th Callback URL - %th Clients - %th - %th - %tbody.oauth-applications - - @applications.each do |application| - %tr{:id => "application_#{application.id}"} - %td= link_to application.name, admin_application_path(application) - %td= application.redirect_uri - %td= application.access_tokens.map(&:resource_owner_id).uniq.count - %td= link_to 'Edit', edit_admin_application_path(application), class: 'btn btn-link' - %td= render 'delete_form', application: application diff --git a/app/views/admin/applications/new.html.haml b/app/views/admin/applications/new.html.haml deleted file mode 100644 index 7c62425f19c..00000000000 --- a/app/views/admin/applications/new.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -%h3.page-title New application -- @url = admin_applications_path -= render 'form', application: @application
\ No newline at end of file diff --git a/app/views/admin/applications/show.html.haml b/app/views/admin/applications/show.html.haml deleted file mode 100644 index 2abe390ce13..00000000000 --- a/app/views/admin/applications/show.html.haml +++ /dev/null @@ -1,26 +0,0 @@ -%h3.page-title - Application: #{@application.name} - - -%table.table - %tr - %td - Application Id - %td - %code#application_id= @application.uid - %tr - %td - Secret: - %td - %code#secret= @application.secret - - %tr - %td - Callback url - %td - - @application.redirect_uri.split.each do |uri| - %div - %span.monospace= uri -.form-actions - = link_to 'Edit', edit_admin_application_path(@application), class: 'btn btn-primary wide pull-left' - = render 'delete_form', application: @application, submit_btn_css: 'btn btn-danger prepend-left-10' diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml deleted file mode 100644 index 4ef8e878a7f..00000000000 --- a/app/views/admin/background_jobs/show.html.haml +++ /dev/null @@ -1,44 +0,0 @@ -%h3.page-title Background Jobs -%p.light GitLab uses #{link_to "sidekiq", "http://sidekiq.org/"} library for async job processing - -%hr - -.panel.panel-default - .panel-heading Sidekiq running processes - .panel-body - - if @sidekiq_processes.empty? - %h4.cred - %i.fa.fa-exclamation-triangle - There are no running sidekiq processes. Please restart GitLab - - else - %table.table - %thead - %th USER - %th PID - %th CPU - %th MEM - %th STATE - %th START - %th COMMAND - %tbody - - @sidekiq_processes.each do |process| - - next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/) - - data = process.strip.split(' ') - %tr - %td= gitlab_config.user - - 5.times do - %td= data.shift - %td= data.join(' ') - - .clearfix - %p - %i.fa.fa-exclamation-circle - If '[25 of 25 busy]' is shown, restart GitLab with 'sudo service gitlab reload'. - %p - %i.fa.fa-exclamation-circle - If more than one sidekiq process is listed, stop GitLab, kill the remaining sidekiq processes (sudo pkill -u #{gitlab_config.user} -f sidekiq) and restart GitLab. - - - -.panel.panel-default - %iframe{src: sidekiq_path, width: '100%', height: 970, style: "border: none"} diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml deleted file mode 100644 index 7e29311bf42..00000000000 --- a/app/views/admin/broadcast_messages/index.html.haml +++ /dev/null @@ -1,59 +0,0 @@ -%h3.page-title - Broadcast Messages -%p.light - Broadcast messages are displayed for every user and can be used to notify users about scheduled maintenance, recent upgrades and more. -.broadcast-message-preview - %i.fa.fa-bullhorn - %span Your message here - -= form_for [:admin, @broadcast_message], html: { class: 'broadcast-message-form form-horizontal'} do |f| - -if @broadcast_message.errors.any? - .alert.alert-danger - - @broadcast_message.errors.full_messages.each do |msg| - %p= msg - .form-group - = f.label :message, class: 'control-label' - .col-sm-10 - = f.text_area :message, class: "form-control", rows: 2, required: true - %div - = link_to '#', class: 'js-toggle-colors-link' do - Customize colors - .form-group.js-toggle-colors-container.hide - = f.label :color, "Background Color", class: 'control-label' - .col-sm-10 - = f.color_field :color, value: "#AA33EE", class: "form-control" - .form-group.js-toggle-colors-container.hide - = f.label :font, "Font Color", class: 'control-label' - .col-sm-10 - = f.color_field :font, value: "#224466", class: "form-control" - .form-group - = f.label :starts_at, class: 'control-label' - .col-sm-10.datetime-controls - = f.datetime_select :starts_at - .form-group - = f.label :ends_at, class: 'control-label' - .col-sm-10.datetime-controls - = f.datetime_select :ends_at - .form-actions - = f.submit "Add broadcast message", class: "btn btn-create" - --if @broadcast_messages.any? - %ul.bordered-list.broadcast-messages - - @broadcast_messages.each do |broadcast_message| - %li - .pull-right - - if broadcast_message.starts_at - %strong - #{broadcast_message.starts_at.to_s(:short)} - \... - - if broadcast_message.ends_at - %strong - #{broadcast_message.ends_at.to_s(:short)} - - = link_to [:admin, broadcast_message], method: :delete, remote: true, class: 'remove-row btn btn-xs' do - %i.fa.fa-times.cred - - .message= broadcast_message.message - - - = paginate @broadcast_messages diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml deleted file mode 100644 index d1c586328a2..00000000000 --- a/app/views/admin/dashboard/index.html.haml +++ /dev/null @@ -1,137 +0,0 @@ -.admin-dashboard - .row - .col-md-4 - %h4 Statistics - %hr - %p - Forks - %span.light.pull-right - = ForkedProjectLink.count - %p - Issues - %span.light.pull-right - = Issue.count - %p - Merge Requests - %span.light.pull-right - = MergeRequest.count - %p - Notes - %span.light.pull-right - = Note.count - %p - Snippets - %span.light.pull-right - = Snippet.count - %p - SSH Keys - %span.light.pull-right - = Key.count - %p - Milestones - %span.light.pull-right - = Milestone.count - %p - Active Users - %span.light.pull-right - = User.active.count - .col-md-4 - %h4 - Features - %hr - %p - Sign up - %span.light.pull-right - = boolean_to_icon signup_enabled? - %p - LDAP - %span.light.pull-right - = boolean_to_icon Gitlab.config.ldap.enabled - %p - Gravatar - %span.light.pull-right - = boolean_to_icon gravatar_enabled? - %p - OmniAuth - %span.light.pull-right - = boolean_to_icon Gitlab.config.omniauth.enabled - .col-md-4 - %h4 Components - %hr - %p - GitLab - %span.pull-right - = Gitlab::VERSION - %p - GitLab Shell - %span.pull-right - = Gitlab::Shell.new.version - %p - GitLab API - %span.pull-right - = API::API::version - %p - Ruby - %span.pull-right - #{RUBY_VERSION}p#{RUBY_PATCHLEVEL} - - %p - Rails - %span.pull-right - #{Rails::VERSION::STRING} - %hr - .row - .col-sm-4 - .light-well - %h4 Projects - .data - = link_to admin_namespaces_projects_path do - %h1= Project.count - %hr - = link_to('New Project', new_project_path, class: "btn btn-new") - .col-sm-4 - .light-well - %h4 Users - .data - = link_to admin_users_path do - %h1= User.count - %hr - = link_to 'New User', new_admin_user_path, class: "btn btn-new" - .col-sm-4 - .light-well - %h4 Groups - .data - = link_to admin_groups_path do - %h1= Group.count - %hr - = link_to 'New Group', new_admin_group_path, class: "btn btn-new" - - .row.prepend-top-10 - .col-md-4 - %h4 Latest projects - %hr - - @projects.each do |project| - %p - = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project], class: 'str-truncated' - %span.light.pull-right - #{time_ago_with_tooltip(project.created_at)} - - .col-md-4 - %h4 Latest users - %hr - - @users.each do |user| - %p - = link_to [:admin, user], class: 'str-truncated' do - = user.name - %span.light.pull-right - #{time_ago_with_tooltip(user.created_at)} - - .col-md-4 - %h4 Latest groups - %hr - - @groups.each do |group| - %p - = link_to [:admin, group], class: 'str-truncated' do - = group.name - %span.light.pull-right - #{time_ago_with_tooltip(group.created_at)} diff --git a/app/views/admin/deploy_keys/index.html.haml b/app/views/admin/deploy_keys/index.html.haml deleted file mode 100644 index 2ae83ab95f7..00000000000 --- a/app/views/admin/deploy_keys/index.html.haml +++ /dev/null @@ -1,27 +0,0 @@ -.panel.panel-default - .panel-heading - Public deploy keys (#{@deploy_keys.count}) - .panel-head-actions - = link_to 'New Deploy Key', new_admin_deploy_key_path, class: "btn btn-new btn-sm" - - if @deploy_keys.any? - %table.table - %thead.panel-heading - %tr - %th Title - %th Fingerprint - %th Added at - %th - %tbody - - @deploy_keys.each do |deploy_key| - %tr - %td - = link_to admin_deploy_key_path(deploy_key) do - %strong= deploy_key.title - %td - %span - (#{deploy_key.fingerprint}) - %td - %span.cgray - added #{time_ago_with_tooltip(deploy_key.created_at)} - %td - = link_to 'Remove', admin_deploy_key_path(deploy_key), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-sm btn-remove delete-key pull-right" diff --git a/app/views/admin/deploy_keys/new.html.haml b/app/views/admin/deploy_keys/new.html.haml deleted file mode 100644 index c00049424c5..00000000000 --- a/app/views/admin/deploy_keys/new.html.haml +++ /dev/null @@ -1,26 +0,0 @@ -%h3.page-title New public deploy key -%hr - -%div - = form_for [:admin, @deploy_key], html: { class: 'deploy-key-form form-horizontal' } do |f| - -if @deploy_key.errors.any? - .alert.alert-danger - %ul - - @deploy_key.errors.full_messages.each do |msg| - %li= msg - - .form-group - = f.label :title, class: "control-label" - .col-sm-10= f.text_field :title, class: 'form-control' - .form-group - = f.label :key, class: "control-label" - .col-sm-10 - %p.light - Paste a machine public key here. Read more about how to generate it - = link_to "here", help_page_path("ssh", "README") - = f.text_area :key, class: "form-control thin_area", rows: 5 - - .form-actions - = f.submit 'Create', class: "btn-create btn" - = link_to "Cancel", admin_deploy_keys_path, class: "btn btn-cancel" - diff --git a/app/views/admin/deploy_keys/show.html.haml b/app/views/admin/deploy_keys/show.html.haml deleted file mode 100644 index cfa2adf92ee..00000000000 --- a/app/views/admin/deploy_keys/show.html.haml +++ /dev/null @@ -1,34 +0,0 @@ -.row - .col-md-4 - .panel.panel-default - .panel-heading - Deploy Key - %ul.well-list - %li - %span.light Title: - %strong= @deploy_key.title - %li - %span.light Created on: - %strong= @deploy_key.created_at.stamp("Aug 21, 2011") - - .panel.panel-default - .panel-heading Projects (#{@deploy_key.deploy_keys_projects.count}) - - if @deploy_key.deploy_keys_projects.any? - %ul.well-list - - @deploy_key.projects.each do |project| - %li - %span - %strong - = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project] - .pull-right - = link_to disable_namespace_project_deploy_key_path(project.namespace, project, @deploy_key), data: { confirm: "Are you sure?" }, method: :put, class: "btn-xs btn btn-remove", title: 'Remove deploy key from project' do - %i.fa.fa-times.fa-inverse - - .col-md-8 - %p - %span.light Fingerprint: - %strong= @deploy_key.fingerprint - %pre.well-pre - = @deploy_key.key - .pull-right - = link_to 'Remove', admin_deploy_key_path(@deploy_key), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key" diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml deleted file mode 100644 index 9e7751830a4..00000000000 --- a/app/views/admin/groups/_form.html.haml +++ /dev/null @@ -1,27 +0,0 @@ -= form_for [:admin, @group], html: { class: "form-horizontal" } do |f| - - if @group.errors.any? - .alert.alert-danger - %span= @group.errors.full_messages.first - - = render 'shared/group_form', f: f - - .form-group.group-description-holder - = f.label :avatar, "Group avatar", class: 'control-label' - .col-sm-10 - = render 'shared/choose_group_avatar_button', f: f - - - if @group.new_record? - .form-group - .col-sm-2 - .col-sm-10 - .alert.alert-info - = render 'shared/group_tips' - .form-actions - = f.submit 'Create group', class: "btn btn-create" - = link_to 'Cancel', admin_groups_path, class: "btn btn-cancel" - - - else - .form-actions - = f.submit 'Save changes', class: "btn btn-primary" - = link_to 'Cancel', admin_group_path(@group), class: "btn btn-cancel" - diff --git a/app/views/admin/groups/edit.html.haml b/app/views/admin/groups/edit.html.haml deleted file mode 100644 index 824e51c1cf1..00000000000 --- a/app/views/admin/groups/edit.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -%h3.page-title Edit group: #{@group.name} -%hr -= render 'form' diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml deleted file mode 100644 index 4c53ff55708..00000000000 --- a/app/views/admin/groups/index.html.haml +++ /dev/null @@ -1,62 +0,0 @@ -%h3.page-title - Groups (#{@groups.total_count}) - = link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right" - -%p.light - Group allows you to keep projects organized. - Use groups for uniting related projects. - -%hr -= form_tag admin_groups_path, method: :get, class: 'form-inline' do - = hidden_field_tag :sort, @sort - .form-group - = text_field_tag :name, params[:name], class: "form-control input-mn-300" - = button_tag "Search", class: "btn submit btn-primary" - - .pull-right - .dropdown.inline - %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} - %span.light sort: - - if @sort.present? - = sort_options_hash[@sort] - - else - = sort_title_recently_created - %b.caret - %ul.dropdown-menu - %li - = link_to admin_groups_path(sort: sort_value_recently_created) do - = sort_title_recently_created - = link_to admin_groups_path(sort: sort_value_oldest_created) do - = sort_title_oldest_created - = link_to admin_groups_path(sort: sort_value_recently_updated) do - = sort_title_recently_updated - = link_to admin_groups_path(sort: sort_value_oldest_updated) do - = sort_title_oldest_updated - -%hr - -%ul.bordered-list - - @groups.each do |group| - %li - .clearfix - .pull-right.prepend-top-10 - = link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-sm" - = link_to 'Destroy', [:admin, group], data: {confirm: "REMOVE #{group.name}? Are you sure?"}, method: :delete, class: "btn btn-sm btn-remove" - - %h4 - = link_to [:admin, group] do - %i.fa.fa-folder - = group.name - - → - %span.monospace - %strong #{group.path}/ - .clearfix - %p - = truncate group.description, length: 150 - .clearfix - %p.light - #{pluralize(group.members.size, 'member')}, #{pluralize(group.projects.count, 'project')} - - -= paginate @groups, theme: "gitlab" diff --git a/app/views/admin/groups/new.html.haml b/app/views/admin/groups/new.html.haml deleted file mode 100644 index f46f45c5514..00000000000 --- a/app/views/admin/groups/new.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -%h3.page-title New group -%hr -= render 'form' diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml deleted file mode 100644 index 14996dcd6a2..00000000000 --- a/app/views/admin/groups/show.html.haml +++ /dev/null @@ -1,91 +0,0 @@ -%h3.page-title - Group: #{@group.name} - - = link_to edit_admin_group_path(@group), class: "btn pull-right" do - %i.fa.fa-pencil-square-o - Edit -%hr -.row - .col-md-6 - .panel.panel-default - .panel-heading - Group info: - %ul.well-list - %li - = image_tag group_icon(@group), class: "avatar s60" - %li - %span.light Name: - %strong= @group.name - %li - %span.light Path: - %strong - = @group.path - - %li - %span.light Description: - %strong - = @group.description - - %li - %span.light Created on: - %strong - = @group.created_at.stamp("March 1, 1999") - - .panel.panel-default - .panel-heading - %h3.panel-title - Projects - %span.badge - #{@group.projects.count} - %ul.well-list - - @projects.each do |project| - %li - %strong - = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project] - %span.label.label-gray - = repository_size(project) - %span.pull-right.light - %span.monospace= project.path_with_namespace + ".git" - .panel-footer - = paginate @projects, param_name: 'projects_page', theme: 'gitlab' - - .col-md-6 - .panel.panel-default - .panel-heading - Add user(s) to the group: - .panel-body.form-holder - %p.light - Read more about project permissions - %strong= link_to "here", help_page_path("permissions", "permissions"), class: "vlink" - - = form_tag members_update_admin_group_path(@group), id: "new_project_member", class: "bulk_import", method: :put do - %div - = users_select_tag(:user_ids, multiple: true, email_user: true) - %div.prepend-top-10 - = select_tag :access_level, options_for_select(GroupMember.access_level_roles), class: "project-access-select select2" - %hr - = button_tag 'Add users to group', class: "btn btn-create" - .panel.panel-default - .panel-heading - %h3.panel-title - Members - %span.badge - #{@group.group_members.count} - %ul.well-list.group-users-list - - @members.each do |member| - - user = member.user - %li{class: dom_class(member), id: (dom_id(user) if user)} - .list-item-name - - if user - %strong - = link_to user.name, admin_user_path(user) - - else - %strong - = member.invite_email - (invited) - %span.pull-right.light - = member.human_access - = link_to group_group_member_path(@group, member), data: { confirm: remove_user_from_group_message(@group, member) }, method: :delete, remote: true, class: "btn-xs btn btn-remove", title: 'Remove user from group' do - %i.fa.fa-minus.fa-inverse - .panel-footer - = paginate @members, param_name: 'members_page', theme: 'gitlab' diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml deleted file mode 100644 index 7a9dc113f2a..00000000000 --- a/app/views/admin/hooks/index.html.haml +++ /dev/null @@ -1,37 +0,0 @@ -%h3.page-title - System hooks - -%p.light - #{link_to "System hooks ", help_page_path("system_hooks", "system_hooks"), class: "vlink"} can be - used for binding events when GitLab creates a User or Project. - -%hr - - -= form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-horizontal' } do |f| - -if @hook.errors.any? - .alert.alert-danger - - @hook.errors.full_messages.each do |msg| - %p= msg - .form-group - = f.label :url, "URL:", class: 'control-label' - .col-sm-10 - = f.text_field :url, class: "form-control" - .form-actions - = f.submit "Add System Hook", class: "btn btn-create" -%hr - --if @hooks.any? - .panel.panel-default - .panel-heading - System hooks (#{@hooks.count}) - %ul.well-list - - @hooks.each do |hook| - %li - .list-item-name - = link_to admin_hook_path(hook) do - %strong= hook.url - - .pull-right - = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-sm" - = link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-remove btn-sm" diff --git a/app/views/admin/keys/show.html.haml b/app/views/admin/keys/show.html.haml deleted file mode 100644 index 5b23027b3ab..00000000000 --- a/app/views/admin/keys/show.html.haml +++ /dev/null @@ -1 +0,0 @@ -= render "profiles/keys/key_details", admin: true diff --git a/app/views/admin/logs/show.html.haml b/app/views/admin/logs/show.html.haml deleted file mode 100644 index 384c6ee9af5..00000000000 --- a/app/views/admin/logs/show.html.haml +++ /dev/null @@ -1,25 +0,0 @@ -- loggers = [Gitlab::GitLogger, Gitlab::AppLogger, - Gitlab::ProductionLogger, Gitlab::SidekiqLogger] -%ul.nav.nav-tabs.log-tabs - - loggers.each do |klass| - %li{ class: (klass == Gitlab::GitLogger ? 'active' : '') } - = link_to klass::file_name, "##{klass::file_name_noext}", - 'data-toggle' => 'tab' -%p.light To prevent performance issues admin logs output the last 2000 lines -.tab-content - - loggers.each do |klass| - .tab-pane{ class: (klass == Gitlab::GitLogger ? 'active' : ''), - id: klass::file_name_noext } - .file-holder#README - .file-title - %i.fa.fa-file - = klass::file_name - .pull-right - = link_to '#', class: 'log-bottom' do - %i.fa.fa-arrow-down - Scroll down - .file-content.logs - %ol - - klass.read_latest.each do |line| - %li - %p= line diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml deleted file mode 100644 index 3bbe10bc270..00000000000 --- a/app/views/admin/projects/index.html.haml +++ /dev/null @@ -1,81 +0,0 @@ -.row - = link_to '#aside', class: 'show-aside' do - %i.fa.fa-angle-left - %aside.col-md-3 - .admin-filter - = form_tag admin_namespaces_projects_path, method: :get, class: '' do - .form-group - = label_tag :name, 'Name:' - = text_field_tag :name, params[:name], class: "form-control" - - .form-group - = label_tag :namespace_id, "Namespace" - = namespace_select_tag :namespace_id, selected: params[:namespace_id], class: 'input-large' - - .form-group - %strong Activity - .checkbox - = label_tag :with_push do - = check_box_tag :with_push, 1, params[:with_push] - %span Projects with push events - .checkbox - = label_tag :abandoned do - = check_box_tag :abandoned, 1, params[:abandoned] - %span No activity over 6 month - - %fieldset - %strong Visibility level: - .visibility-levels - - Project.visibility_levels.each do |label, level| - .checkbox - %label - = check_box_tag 'visibility_levels[]', level, params[:visibility_levels].present? && params[:visibility_levels].include?(level.to_s) - %span.descr - = visibility_level_icon(level) - = label - %hr - = hidden_field_tag :sort, params[:sort] - = button_tag "Search", class: "btn submit btn-primary" - = link_to "Reset", admin_namespaces_projects_path, class: "btn btn-cancel" - - %section.col-md-9 - .panel.panel-default - .panel-heading - Projects (#{@projects.total_count}) - .panel-head-actions - .dropdown.inline - %button.dropdown-toggle.btn.btn-sm{type: 'button', 'data-toggle' => 'dropdown'} - %span.light sort: - - if @sort.present? - = sort_options_hash[@sort] - - else - = sort_title_recently_created - %b.caret - %ul.dropdown-menu - %li - = link_to admin_namespaces_projects_path(sort: sort_value_recently_created) do - = sort_title_recently_created - = link_to admin_namespaces_projects_path(sort: sort_value_oldest_created) do - = sort_title_oldest_created - = link_to admin_namespaces_projects_path(sort: sort_value_recently_updated) do - = sort_title_recently_updated - = link_to admin_namespaces_projects_path(sort: sort_value_oldest_updated) do - = sort_title_oldest_updated - = link_to admin_namespaces_projects_path(sort: sort_value_largest_repo) do - = sort_title_largest_repo - = link_to 'New Project', new_project_path, class: "btn btn-sm btn-success" - %ul.well-list - - @projects.each do |project| - %li - .list-item-name - %span{ class: visibility_level_color(project.visibility_level) } - = visibility_level_icon(project.visibility_level) - = link_to project.name_with_namespace, [:admin, project.namespace.becomes(Namespace), project] - .pull-right - %span.label.label-gray - = repository_size(project) - = link_to 'Edit', edit_namespace_project_path(project.namespace, project), id: "edit_#{dom_id(project)}", class: "btn btn-sm" - = link_to 'Destroy', [project.namespace.becomes(Namespace), project], data: { confirm: remove_project_message(project) }, method: :delete, class: "btn btn-sm btn-remove" - - if @projects.blank? - .nothing-here-block 0 projects matches - = paginate @projects, theme: "gitlab" diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml deleted file mode 100644 index 78684c692c7..00000000000 --- a/app/views/admin/projects/show.html.haml +++ /dev/null @@ -1,142 +0,0 @@ -%h3.page-title - Project: #{@project.name_with_namespace} - = link_to edit_project_path(@project), class: "btn pull-right" do - %i.fa.fa-pencil-square-o - Edit -%hr -.row - .col-md-6 - .panel.panel-default - .panel-heading - Project info: - %ul.well-list - %li - %span.light Name: - %strong - = link_to @project.name, project_path(@project) - %li - %span.light Namespace: - %strong - - if @project.namespace - = link_to @project.namespace.human_name, [:admin, @project.group || @project.owner] - - else - Global - %li - %span.light Owned by: - %strong - - if @project.owner - = link_to @project.owner_name, [:admin, @project.owner] - - else - (deleted) - - %li - %span.light Created by: - %strong - = @project.creator.try(:name) || '(deleted)' - - %li - %span.light Created on: - %strong - = @project.created_at.stamp("March 1, 1999") - - %li - %span.light http: - %strong - = link_to @project.http_url_to_repo, project_path(@project) - %li - %span.light ssh: - %strong - = link_to @project.ssh_url_to_repo, project_path(@project) - - if @project.repository.exists? - %li - %span.light fs: - %strong - = @repository.path_to_repo - - %li - %span.light Size - %strong - = repository_size(@project) - - %li - %span.light last commit: - %strong - = last_commit(@project) - - else - %li - %span.light repository: - %strong.cred - does not exist - - - if @project.archived? - %li - %span.light archived: - %strong repository is read-only - - %li - %span.light access: - %strong - %span{ class: visibility_level_color(@project.visibility_level) } - = visibility_level_icon(@project.visibility_level) - = visibility_level_label(@project.visibility_level) - - .panel.panel-default - .panel-heading - Transfer project - .panel-body - = form_for @project, url: transfer_admin_namespace_project_path(@project.namespace, @project), method: :put, html: { class: 'form-horizontal' } do |f| - .form-group - = f.label :new_namespace_id, "Namespace", class: 'control-label' - .col-sm-10 - = namespace_select_tag :new_namespace_id, selected: params[:namespace_id], class: 'input-large' - - .form-group - .col-sm-2 - .col-sm-10 - = f.submit 'Transfer', class: 'btn btn-primary' - - .col-md-6 - - if @group - .panel.panel-default - .panel-heading - %strong #{@group.name} - group members (#{@group.group_members.count}) - .pull-right - = link_to admin_group_path(@group), class: 'btn btn-xs' do - %i.fa.fa-pencil-square-o - %ul.well-list - - @group_members.each do |member| - = render 'groups/group_members/group_member', member: member, show_controls: false - .panel-footer - = paginate @group_members, param_name: 'group_members_page', theme: 'gitlab' - - .panel.panel-default - .panel-heading - Project members - %small - (#{@project.users.count}) - .pull-right - = link_to namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-xs" do - %i.fa.fa-pencil-square-o - Manage Access - %ul.well-list.project_members - - @project_members.each do |project_member| - - user = project_member.user - %li.project_member - .list-item-name - - if user - %strong - = link_to user.name, admin_user_path(user) - - else - %strong - = project_member.invite_email - (invited) - .pull-right - - if project_member.owner? - %span.light Owner - - else - %span.light= project_member.human_access - = link_to namespace_project_project_member_path(@project.namespace, @project, project_member), data: { confirm: remove_from_project_team_message(@project, project_member)}, method: :delete, remote: true, class: "btn btn-sm btn-remove" do - %i.fa.fa-times - .panel-footer - = paginate @project_members, param_name: 'project_members_page', theme: 'gitlab' diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml deleted file mode 100644 index eb7a099bfe2..00000000000 --- a/app/views/admin/services/_form.html.haml +++ /dev/null @@ -1,94 +0,0 @@ -%h3.page-title - = @service.title - -%p #{@service.description} template - -= form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'form-horizontal fieldset-form' } do |f| - - if @service.errors.any? - #error_explanation - .alert.alert-danger - - @service.errors.full_messages.each do |msg| - %p= msg - - if @service.help.present? - .well - = preserve do - = markdown @service.help - - .form-group - = f.label :active, "Active", class: "control-label" - .col-sm-10 - = f.check_box :active - - - if @service.supported_events.length > 1 - .form-group - = f.label :url, "Trigger", class: 'control-label' - .col-sm-10 - - if @service.supported_events.include?("push") - %div - = f.check_box :push_events, class: 'pull-left' - .prepend-left-20 - = f.label :push_events, class: 'list-label' do - %strong Push events - %p.light - This url will be triggered by a push to the repository - - if @service.supported_events.include?("tag_push") - %div - = f.check_box :tag_push_events, class: 'pull-left' - .prepend-left-20 - = f.label :tag_push_events, class: 'list-label' do - %strong Tag push events - %p.light - This url will be triggered when a new tag is pushed to the repository - - if @service.supported_events.include?("note") - %div - = f.check_box :note_events, class: 'pull-left' - .prepend-left-20 - = f.label :note_events, class: 'list-label' do - %strong Comments - %p.light - This url will be triggered when someone adds a comment - - if @service.supported_events.include?("issue") - %div - = f.check_box :issues_events, class: 'pull-left' - .prepend-left-20 - = f.label :issues_events, class: 'list-label' do - %strong Issues events - %p.light - This url will be triggered when an issue is created - - if @service.supported_events.include?("merge_request") - %div - = f.check_box :merge_requests_events, class: 'pull-left' - .prepend-left-20 - = f.label :merge_requests_events, class: 'list-label' do - %strong Merge Request events - %p.light - This url will be triggered when a merge request is created - - - @service.fields.each do |field| - - name = field[:name] - - title = field[:title] || name.humanize - - value = @service.send(name) unless field[:type] == 'password' - - type = field[:type] - - placeholder = field[:placeholder] - - choices = field[:choices] - - default_choice = field[:default_choice] - - help = field[:help] - - .form-group - = f.label name, title, class: "control-label" - .col-sm-10 - - if type == 'text' - = f.text_field name, class: "form-control", placeholder: placeholder - - elsif type == 'textarea' - = f.text_area name, rows: 5, class: "form-control", placeholder: placeholder - - elsif type == 'checkbox' - = f.check_box name - - elsif type == 'select' - = f.select name, options_for_select(choices, value ? value : default_choice), {}, { class: "form-control" } - - elsif type == 'password' - = f.password_field name, class: 'form-control' - - if help - %span.help-block= help - - .form-actions - = f.submit 'Save', class: 'btn btn-save' diff --git a/app/views/admin/services/edit.html.haml b/app/views/admin/services/edit.html.haml deleted file mode 100644 index bcc5832792f..00000000000 --- a/app/views/admin/services/edit.html.haml +++ /dev/null @@ -1 +0,0 @@ -= render 'form' diff --git a/app/views/admin/services/index.html.haml b/app/views/admin/services/index.html.haml deleted file mode 100644 index 0093fb97765..00000000000 --- a/app/views/admin/services/index.html.haml +++ /dev/null @@ -1,22 +0,0 @@ -%h3.page-title Service templates -%p.light Service template allows you to set default values for project services - -%table.table - %thead - %tr - %th - %th Service - %th Description - %th Last edit - - @services.sort_by(&:title).each do |service| - %tr - %td - = icon("copy", class: 'clgray') - %td - = link_to edit_admin_application_settings_service_path(service.id) do - %strong= service.title - %td - = service.description - %td.light - = time_ago_in_words service.updated_at - ago 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 |