diff --git a/app/assets/images/Storage-UI.PNG b/app/assets/images/Storage-UI.PNG deleted file mode 100644 index 8ab6678de325550c5c504ee383df323f80b5c5d6..0000000000000000000000000000000000000000 Binary files a/app/assets/images/Storage-UI.PNG and /dev/null differ diff --git a/app/assets/images/file_bin.png b/app/assets/images/file_bin.png deleted file mode 100644 index b3feafcce0befa79ffbaa68ac6dda0c549cba911..0000000000000000000000000000000000000000 Binary files a/app/assets/images/file_bin.png and /dev/null differ diff --git a/app/assets/images/file_dir.png b/app/assets/images/file_dir.png deleted file mode 100644 index ea277bb14dba38fa633a32675ee58b88b88f80a4..0000000000000000000000000000000000000000 Binary files a/app/assets/images/file_dir.png and /dev/null differ diff --git a/app/assets/images/file_empty.png b/app/assets/images/file_empty.png deleted file mode 100644 index 2e85bb487378a9b3139dd95c8836d691d884891d..0000000000000000000000000000000000000000 Binary files a/app/assets/images/file_empty.png and /dev/null differ diff --git a/app/assets/images/file_img.png b/app/assets/images/file_img.png deleted file mode 100644 index ca554c5aefe554beec3745e0c194ed5f1b1fe34f..0000000000000000000000000000000000000000 Binary files a/app/assets/images/file_img.png and /dev/null differ diff --git a/app/assets/images/file_txt.png b/app/assets/images/file_txt.png deleted file mode 100644 index b3230b5add08d624539197e94100885217dffca2..0000000000000000000000000000000000000000 Binary files a/app/assets/images/file_txt.png and /dev/null differ diff --git a/app/assets/images/rss_ui.png b/app/assets/images/rss_ui.png deleted file mode 100644 index c45afbab519ad7582f5c4558b28a95424aefdea5..0000000000000000000000000000000000000000 Binary files a/app/assets/images/rss_ui.png and /dev/null differ diff --git a/app/assets/images/submodule.png b/app/assets/images/submodule.png deleted file mode 100644 index 62a88cc619b1b7c21aeae765c5ac5b94cf3bff57..0000000000000000000000000000000000000000 Binary files a/app/assets/images/submodule.png and /dev/null differ diff --git a/app/assets/stylesheets/generic/forms.scss b/app/assets/stylesheets/generic/forms.scss index 36551f85b6a4e2c2e5b897bf19db09c29440754c..bd9d4bceb83be2b18c0380d89b582ec2a7222126 100644 --- a/app/assets/stylesheets/generic/forms.scss +++ b/app/assets/stylesheets/generic/forms.scss @@ -98,3 +98,7 @@ label { z-index: 2; } } + +.fieldset-form fieldset { + margin-bottom: 20px; +} diff --git a/app/assets/stylesheets/generic/typography.scss b/app/assets/stylesheets/generic/typography.scss index 4ab83786b5034231eacd0efd0c5000fa558f1cab..9aa819d40fc847ff04d1c23191d3a8027c6cf2cd 100644 --- a/app/assets/stylesheets/generic/typography.scss +++ b/app/assets/stylesheets/generic/typography.scss @@ -14,6 +14,7 @@ h2.page-title { h3.page-title { @include page-title; + font-size: 22px; } h6 { diff --git a/app/assets/stylesheets/main/mixins.scss b/app/assets/stylesheets/main/mixins.scss index 747676620b319d84a1ce6017bb4f3ca182879175..289490712b66059149781bdef9ed2c6d6ef9ce7e 100644 --- a/app/assets/stylesheets/main/mixins.scss +++ b/app/assets/stylesheets/main/mixins.scss @@ -117,11 +117,11 @@ } @mixin page-title { - color: #333; - font-size: 20px; + color: #555; line-height: 1.5; + font-weight: normal; margin-top: 0px; - margin-bottom: 15px; + margin-bottom: 10px; } @mixin str-truncated($max_width: "82%") { diff --git a/app/assets/stylesheets/sections/admin.scss b/app/assets/stylesheets/sections/admin.scss index a558633d1121aba5f4812e4a5b82279d2fc414dd..a51deee7970bd0ecb5950347126c36a04f24ebdb 100644 --- a/app/assets/stylesheets/sections/admin.scss +++ b/app/assets/stylesheets/sections/admin.scss @@ -21,12 +21,22 @@ } .admin-filter form { - label { width: 110px; } - .controls { margin-left: 130px; } - .form-actions { padding-left: 130px; background: #fff } - .visibility-levels { - .controls { - margin-bottom: 9px; + .select2-container { + width: 100% + } + + .controls { + margin-left: 130px; + } + + .form-actions { + padding-left: 130px; + background: #fff + } + + .visibility-levels { + .controls { + margin-bottom: 9px; } i { diff --git a/app/assets/stylesheets/sections/tree.scss b/app/assets/stylesheets/sections/tree.scss index db177a0083cde740fb3430796effad8017a4767c..b0ce78ddb357d64a6435942e518dda466934ea77 100644 --- a/app/assets/stylesheets/sections/tree.scss +++ b/app/assets/stylesheets/sections/tree.scss @@ -57,6 +57,10 @@ } } + i { + color: $bg_primary; + } + img { position: relative; top:-1px; diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 8c1f45ac01c7a41508bf057795e8c5e2dc1a3e8b..d2f86369b58b81ce8ab22a383b14f55300cd0fab 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -4,10 +4,8 @@ class Admin::ProjectsController < Admin::ApplicationController before_filter :repository, only: [:show, :transfer] def index - owner_id = params[:owner_id] - user = User.find_by(id: owner_id) - - @projects = user ? user.owned_projects : Project.all + @projects = Project.all + @projects = @projects.where(namespace_id: params[:namespace_id]) if params[:namespace_id].present? @projects = @projects.where("visibility_level IN (?)", params[:visibility_levels]) if params[:visibility_levels].present? @projects = @projects.with_push if params[:with_push].present? @projects = @projects.abandoned if params[:abandoned].present? diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 5b06af79d5a1f5e98c3471de3a7d85c28410cfe0..5ecdfbd807eecd39d0fd416874a00ab2b7ec18fb 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -8,7 +8,8 @@ def index end def show - @projects = user.authorized_projects + @personal_projects = user.personal_projects + @joined_projects = user.projects.joined(@user) end def new diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index f39d0081dce4fa1b75f421bb6c1c9f4143ead5ef..2d82b6a0b47e6a7b76a8830f1cfc4fe031473233 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -25,8 +25,13 @@ def render_tree(tree) # # type - String type of the tree item; either 'folder' or 'file' def tree_icon(type) - image = type == 'folder' ? 'file_dir.png' : 'file_txt.png' - image_tag(image, size: '16x16') + icon_class = if type == 'folder' + 'icon-folder-close' + else + 'icon-file-alt' + end + + content_tag :i, nil, class: icon_class end def tree_hex_class(content) diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index 7a23b7020ccd459847a02e7e98cd47edc32ccdf2..5ca6090f8d3a0f439fb50ae356a9d88f0ce0b633 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -1,5 +1,5 @@ .row - .col-md-4 + .col-md-3 .admin-filter = form_tag admin_projects_path, method: :get, class: '' do .form-group @@ -7,19 +7,21 @@ = text_field_tag :name, params[:name], class: "form-control" .form-group - = label_tag :owner_id, 'Owner:' - %div - = users_select_tag :owner_id, selected: params[:owner_id], class: 'input-large input-clamp' - .checkbox - = label_tag :with_push, 'Not empty' - = check_box_tag :with_push, 1, params[:with_push] - - %span.light Projects with push events - .checkbox - = label_tag :abandoned, 'Abandoned' - = check_box_tag :abandoned, 1, params[:abandoned] - - %span.light No activity over 6 month + = 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, 'Not empty' + = check_box_tag :with_push, 1, params[:with_push] + + %span.light Projects with push events + .checkbox + = label_tag :abandoned, 'Abandoned' + = check_box_tag :abandoned, 1, params[:abandoned] + + %span.light No activity over 6 month %fieldset %strong Visibility level: @@ -31,12 +33,12 @@ %span.descr = visibility_level_icon(level) = label - .form-actions - = hidden_field_tag :sort, params[:sort] - = submit_tag "Search", class: "btn submit btn-primary" - = link_to "Reset", admin_projects_path, class: "btn" + %hr + = hidden_field_tag :sort, params[:sort] + = submit_tag "Search", class: "btn submit btn-primary" + = link_to "Reset", admin_projects_path, class: "btn btn-cancel" - .col-md-8 + .col-md-9 .panel.panel-default .panel-heading Projects (#{@projects.total_count}) diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index b9e6382ea885787103b2090539f590ed2a3e86bb..d00772d4dfefe30298a454faa6208e493c5e3440 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -1,5 +1,5 @@ .user_new - = form_for [:admin, @user], html: { class: 'form-horizontal' } do |f| + = form_for [:admin, @user], html: { class: 'form-horizontal fieldset-form' } do |f| -if @user.errors.any? #error_explanation .alert.alert-danger @@ -61,16 +61,13 @@ .col-sm-10 You cannot remove your own admin rights - else .col-sm-10= f.check_box :admin - - unless @user.new_record? || current_user == @user - .alert.alert-danger - - if @user.blocked? - %p This user is blocked and is not able to login to GitLab - = link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small" - - else - %p Blocked users will be removed from all projects & will not be able to login to GitLab. - = link_to 'Block User', block_admin_user_path(@user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-small btn-remove" %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' diff --git a/app/views/admin/users/edit.html.haml b/app/views/admin/users/edit.html.haml index 2a4f8c60546e97e5b4af55e56e6136152fd41b88..d71d8189c51274626eb34781fc8ecc462964f0a7 100644 --- a/app/views/admin/users/edit.html.haml +++ b/app/views/admin/users/edit.html.haml @@ -1,6 +1,7 @@ %h3.page-title - #{@user.name} → - %i.icon-edit - Edit user + 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/new.html.haml b/app/views/admin/users/new.html.haml index a1c90c48946ce4992dcf6cdbc27a84b1bb8d408c..8fbb757f42455c1673a7d25681ee513c07740f62 100644 --- a/app/views/admin/users/new.html.haml +++ b/app/views/admin/users/new.html.haml @@ -1,5 +1,4 @@ %h3.page-title - %i.icon-plus New user %hr = render 'form' diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 28c91c2c3e24474d5eac8656fc7e53ae843dc27a..a255c64fc275e71abd06f42028046924f71e213c 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -1,5 +1,5 @@ %h3.page-title - %span.cgray User: + User: = @user.name - if @user.blocked? %span.cred (Blocked) @@ -11,112 +11,144 @@ %i.icon-edit 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 -.row - .col-md-6 - .panel.panel-default - .panel-heading - Account: - .pull-right - = image_tag avatar_icon(@user.email, 32), class: "avatar s32" - %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 - %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 +.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 - %li - %span.light Last sign-in at: - %strong - - if @user.last_sign_in_at - = @user.last_sign_in_at.stamp("Nov 12, 2031") + %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 - never + %li + %span.light Confirmed: + %strong.cred + No + + %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 - - if @user.ldap_user? - %li - %span.light LDAP uid: - %strong - = @user.extern_uid + - if @user.ldap_user? + %li + %span.light LDAP uid: + %strong + = @user.extern_uid - - if @user.created_by - %li - %span.light Created by: - %strong - = link_to @user.created_by.name, [:admin, @user.created_by] + - if @user.created_by + %li + %span.light Created by: + %strong + = link_to @user.created_by.name, [:admin, @user.created_by] - - unless @user == current_user - - if @user.blocked? - .alert.alert-info - %h4 This user is blocked - %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 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-new", data: { confirm: 'Are you sure?' } - - else - .alert.alert-warning - %h4 Block this user - %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-remove" + .col-md-6 + - unless @user == current_user + - if @user.blocked? + .alert.alert-info + %h4 This user is blocked + %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 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-new", data: { confirm: 'Are you sure?' } + - else + .alert.alert-warning + %h4 Block this user + %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-remove" - .alert.alert-danger - %h4 - Remove user - %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? + .alert.alert-danger + %h4 + Remove user + %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 - 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" + %span.light Profile page: + %strong + = link_to user_path(@user) do + = @user.username + .col-md-6 + = render 'users/profile', user: @user - .col-md-6 + #groups.tab-pane - if @user.users_groups.present? .panel.panel-default .panel-heading Groups: @@ -131,23 +163,42 @@ - unless user_group.owner? = link_to group_users_group_path(group, user_group), data: { confirm: remove_user_from_group_message(group, @user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do %i.icon-remove.icon-white + - else + .nothing-here-block This user has no groups. - .panel.panel-default - .panel-heading Projects (#{@projects.count}) - %ul.well-list - - @projects.sort_by(&:name_with_namespace).each do |project| - - tm = project.team.find_tm(@user.id) - %li.users_project - = link_to admin_project_path(project), class: dom_class(project) do - = project.name_with_namespace + #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')} - - if tm - .pull-right - - if tm.owner? - %span.light Owner - - else - %span.light= tm.human_access + .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| + - tm = project.team.find_tm(@user.id) + %li.users_project + .list-item-name + = link_to admin_project_path(project), class: dom_class(project) do + = project.name_with_namespace + + - if tm + .pull-right + - if tm.owner? + %span.light Owner + - else + %span.light= tm.human_access - - if tm.respond_to? :project - = link_to project_team_member_path(project, @user), data: { confirm: remove_from_project_team_message(project, @user) }, remote: true, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from project' do - %i.icon-remove + - if tm.respond_to? :project + = link_to project_team_member_path(project, @user), data: { confirm: remove_from_project_team_message(project, @user) }, remote: true, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from project' do + %i.icon-remove diff --git a/app/views/projects/tree/_submodule_item.html.haml b/app/views/projects/tree/_submodule_item.html.haml index ae87dbde67a80a2858fd1abb1d93f541ff872eed..3e2655cc4f65a5f02ed4961714d92462df4c217c 100644 --- a/app/views/projects/tree/_submodule_item.html.haml +++ b/app/views/projects/tree/_submodule_item.html.haml @@ -1,7 +1,7 @@ - tree, commit = submodule_links(submodule_item) %tr{ class: "tree-item" } %td.tree-item-file-name - = image_tag "submodule.png" + %i.icon-archive %span = link_to truncate(submodule_item.name, length: 40), tree @ diff --git a/app/views/projects/tree/_tree.html.haml b/app/views/projects/tree/_tree.html.haml index 1fc06928bcfe2cfeb1d74c5455249e67e7dc54eb..49c9edffc661e7a71846cacf575a96f8f9fdeffc 100644 --- a/app/views/projects/tree/_tree.html.haml +++ b/app/views/projects/tree/_tree.html.haml @@ -36,8 +36,7 @@ - if @path.present? %tr.tree-item %td.tree-item-file-name - = image_tag "file_empty.png", size: '16x16' - = link_to "..", project_tree_path(@project, up_dir_path(tree)) + = link_to "..", project_tree_path(@project, up_dir_path(tree)), class: 'prepend-left-10' %td %td %td diff --git a/app/views/users/_projects.html.haml b/app/views/users/_projects.html.haml index bcaec4a27e760eaaabbef8c498fa56da82e4dfbd..1d38f8e8ab8b0838fe723b793feac72d8a1af8e3 100644 --- a/app/views/users/_projects.html.haml +++ b/app/views/users/_projects.html.haml @@ -1,6 +1,6 @@ .panel.panel-default .panel-heading Personal projects %ul.well-list - - @projects.each do |project| + - projects.each do |project| %li = link_to_project project diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 948b59fead1de99421bb7d0d28b678f6fa3f9bda..60159a29b995f4a94cd4deac86d8fd83437ffdff 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -13,12 +13,14 @@ %br %small member since #{@user.created_at.stamp("Nov 12, 2031")} .clearfix - %h4 Groups: - = render 'groups', groups: @groups - %hr + + - if @groups.any? + %h4 Groups: + = render 'groups', groups: @groups + %hr %h4 User Activity: = render @events .col-md-4 = render 'profile', user: @user - if @projects.present? - = render 'projects' + = render 'projects', projects: @projects