diff --git a/app/assets/stylesheets/gl_bootstrap.scss b/app/assets/stylesheets/gl_bootstrap.scss index 7f45d64fb7c..169f1268cd7 100644 --- a/app/assets/stylesheets/gl_bootstrap.scss +++ b/app/assets/stylesheets/gl_bootstrap.scss @@ -108,6 +108,8 @@ $pagination-active-bg: $bg_style_color; // Nav tabs .nav.nav-tabs { + margin-bottom: 15px; + li { > a { padding: 8px 20px; diff --git a/app/assets/stylesheets/sections/admin.scss b/app/assets/stylesheets/sections/admin.scss index 8ad9bc732b2..a558633d112 100644 --- a/app/assets/stylesheets/sections/admin.scss +++ b/app/assets/stylesheets/sections/admin.scss @@ -2,7 +2,7 @@ * Admin area * */ -.admin_dash { +.admin-dashboard { .data { a { h1 { @@ -14,6 +14,10 @@ } } } + + .str-truncated { + max-width: 60%; + } } .admin-filter form { diff --git a/app/assets/stylesheets/sections/dashboard.scss b/app/assets/stylesheets/sections/dashboard.scss index 1fd82c84fc9..6fc394e2e2b 100644 --- a/app/assets/stylesheets/sections/dashboard.scss +++ b/app/assets/stylesheets/sections/dashboard.scss @@ -41,7 +41,7 @@ .dash-sidebar-tabs { margin-bottom: 2px; border: none; - margin: 0; + margin: 0 !important; li { &.active { diff --git a/app/assets/stylesheets/sections/header.scss b/app/assets/stylesheets/sections/header.scss index c8091c84891..883c9a859ef 100644 --- a/app/assets/stylesheets/sections/header.scss +++ b/app/assets/stylesheets/sections/header.scss @@ -229,9 +229,9 @@ header { } .title { a { - color: #BBB; + color: #FFF; &:hover { - color: #FFF; + text-decoration: underline; } } color: #fff; diff --git a/app/assets/stylesheets/sections/merge_requests.scss b/app/assets/stylesheets/sections/merge_requests.scss index 4388da00735..6e21bf0b0a1 100644 --- a/app/assets/stylesheets/sections/merge_requests.scss +++ b/app/assets/stylesheets/sections/merge_requests.scss @@ -31,10 +31,10 @@ .mr_source_commit, .mr_target_commit { + margin-top: 10px; .commit { margin: 0; - padding: 0; - padding: 5px 0; + padding: 2px 0; list-style: none; &:hover { background: none; diff --git a/app/assets/stylesheets/themes/ui_color.scss b/app/assets/stylesheets/themes/ui_color.scss index 0fc72d4e0a8..edac4290e74 100644 --- a/app/assets/stylesheets/themes/ui_color.scss +++ b/app/assets/stylesheets/themes/ui_color.scss @@ -36,4 +36,8 @@ } } } + + .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { + background: #769; + } } diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index ca2644ec735..a3d786c2138 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -219,6 +219,14 @@ class MergeRequest < ActiveRecord::Base end end + def source_project_namespace + if source_project && source_project.namespace + source_project.namespace.path + else + "(removed)" + end + end + def source_branch_exists? return false unless self.source_project diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index dd663945ea9..bbd60bc6224 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -3,136 +3,137 @@ %p.light You can manage projects, users and other GitLab data from here. %hr -.admin_dash.row - .col-sm-4 - .light-well - %h4 Projects - .data - = link_to admin_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" +.admin-dashboard + .row + .col-sm-4 + .light-well + %h4 Projects + .data + = link_to admin_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| + .row.prepend-top-10 + .col-md-4 + %h4 Latest projects + %hr + - @projects.each do |project| + %p + = link_to project.name_with_namespace, [:admin, 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)} + + %br + .row + .col-md-4 + %h4 Stats + %hr %p - = link_to project.name_with_namespace, [:admin, project] + Forks %span.light.pull-right - #{time_ago_with_tooltip(project.created_at)} - - .col-md-4 - %h4 Latest users - %hr - - @users.each do |user| + = ForkedProjectLink.count %p - = link_to [:admin, user] do - = user.name + Issues %span.light.pull-right - #{time_ago_with_tooltip(user.created_at)} - - .col-md-4 - %h4 Latest groups - %hr - - @groups.each do |group| + = Issue.count %p - = link_to [:admin, group] do - = group.name + Merge Requests %span.light.pull-right - #{time_ago_with_tooltip(group.created_at)} + = 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 + .col-md-4 + %h4 + Features + %hr + %p + Sign up + %span.light.pull-right + = boolean_to_icon gitlab_config.signup_enabled + %p + LDAP + %span.light.pull-right + = boolean_to_icon Gitlab.config.ldap.enabled + %p + Gravatar + %span.light.pull-right + = boolean_to_icon Gitlab.config.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} -%br -.row - .col-md-4 - %h4 Stats - %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 - .col-md-4 - %h4 - Features - %hr - %p - Sign up - %span.light.pull-right - = boolean_to_icon gitlab_config.signup_enabled - %p - LDAP - %span.light.pull-right - = boolean_to_icon Gitlab.config.ldap.enabled - %p - Gravatar - %span.light.pull-right - = boolean_to_icon Gitlab.config.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} + %p + Rails + %span.pull-right + #{Rails::VERSION::STRING} diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index 7a373ee586c..9a0d5967927 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -1,11 +1,12 @@ %h3.page-title Groups (#{@groups.total_count}) - %small - allows you to keep projects organized. - Use groups for uniting related projects. - = link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right" -%br + +%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 .form-group = text_field_tag :name, params[:name], class: "form-control input-mn-300" @@ -23,24 +24,18 @@ %h4 = link_to [:admin, group] do + %i.icon-folder-close = group.name → %span.monospace - %i.icon-folder-close %strong #{group.path}/ - - .clearfix.light.append-bottom-10 - %span - %b Members: - %span.badge= group.members.size - \| - %span - %b Projects: - %span.badge= group.projects.count - .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/users/index.html.haml b/app/views/admin/users/index.html.haml index 1fa6fdfaff1..0b3934a712d 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -1,12 +1,6 @@ .row .col-md-3 .admin-filter - = form_tag admin_users_path, method: :get, class: 'form-inline' do - .append-bottom-10 - .form-group - = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control' - = button_tag type: 'submit', class: 'btn btn-primary' do - %i.icon-search %ul.nav.nav-pills.nav-stacked %li{class: "#{'active' unless params[:filter]}"} = link_to admin_users_path do @@ -25,6 +19,12 @@ 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 type: 'submit', class: 'btn btn-primary' do + %i.icon-search + %hr = link_to 'Reset', admin_users_path, class: "btn btn-cancel" .col-md-9 diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index 938f61d2093..bb87d9ecb4a 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -1,7 +1,7 @@ .login-box %h3.page-title Sign in - if ldap_enabled? - %ul.nav.nav-tabs.append-bottom-20 + %ul.nav.nav-tabs %li.active = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab' %li diff --git a/app/views/profiles/emails/index.html.haml b/app/views/profiles/emails/index.html.haml index dc45ab2de79..b5f1e438ccb 100644 --- a/app/views/profiles/emails/index.html.haml +++ b/app/views/profiles/emails/index.html.haml @@ -1,9 +1,13 @@ %h3.page-title - My Email Addresses + My email addresses %p.light Your %b Primary Email - will be used for account notifications, avatar detection and web based operations, such as edits and merges. All email addresses will be used to identify your commits. + will be used for account notifications, avatar detection and web based operations, such as edits and merges. + %br + All email addresses will be used to identify your commits. + +%hr .ui-box .title @@ -19,11 +23,11 @@ added #{time_ago_with_tooltip(email.created_at)} = link_to 'Remove', profile_email_path(email), data: { confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-small btn-remove pull-right' -%h3.page-title Add Email Address +%h4 Add email address = form_for 'email', url: profile_emails_path, html: { class: 'form-horizontal' } do |f| .form-group = f.label :email, class: 'control-label' .col-sm-10 = f.text_field :email, class: 'form-control' .form-actions - = f.submit 'Add', class: 'btn btn-create' \ No newline at end of file + = f.submit 'Add', class: 'btn btn-create' diff --git a/app/views/projects/commits/_head.html.haml b/app/views/projects/commits/_head.html.haml index b9ab27d212c..81e33743911 100644 --- a/app/views/projects/commits/_head.html.haml +++ b/app/views/projects/commits/_head.html.haml @@ -1,4 +1,4 @@ -%ul.nav.nav-tabs.append-bottom-15 +%ul.nav.nav-tabs %li= render partial: 'shared/ref_switcher', locals: {destination: 'commits'} = nav_link(controller: [:commit, :commits]) do diff --git a/app/views/projects/issues/_head.html.haml b/app/views/projects/issues/_head.html.haml index 2f0aa33fe14..0b7697622b0 100644 --- a/app/views/projects/issues/_head.html.haml +++ b/app/views/projects/issues/_head.html.haml @@ -1,4 +1,4 @@ -%ul.nav.nav-tabs.append-bottom-15 +%ul.nav.nav-tabs = nav_link(controller: :issues) do = link_to project_issues_path(@project), class: "tab" do Browse Issues diff --git a/app/views/projects/merge_requests/_form.html.haml b/app/views/projects/merge_requests/_form.html.haml index b9f80c35665..7049e313cde 100644 --- a/app/views/projects/merge_requests/_form.html.haml +++ b/app/views/projects/merge_requests/_form.html.haml @@ -6,19 +6,22 @@ %li= msg .merge-request-branches - .row - .col-md-5 + .form-group + = label_tag nil, class: 'control-label' do + From + .col-sm-10 .clearfix .pull-left = f.select(:source_project_id, [[@merge_request.source_project_path,@merge_request.source_project.id]] , {}, { class: 'source_project select2 span3', disabled: @merge_request.persisted? }) .pull-left   = f.select(:source_branch, @merge_request.source_branches, { include_blank: "Select branch" }, {class: 'source_branch select2 span2'}) - .mr_source_commit.prepend-top-10 - .col-md-2 - .merge-request-angle - %i.icon-long-arrow-right - .col-md-5 + .mr_source_commit + %br + .form-group + = label_tag nil, class: 'control-label' do + To + .col-sm-10 .clearfix .pull-left - projects = @project.forked_from_project.nil? ? [@project] : [ @project,@project.forked_from_project] @@ -26,7 +29,7 @@ .pull-left   = f.select(:target_branch, @merge_request.target_branches, { include_blank: "Select branch" }, {class: 'target_branch select2 span2'}) - .mr_target_commit.prepend-top-10 + .mr_target_commit %hr .merge-request-form-info diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index ff763bca307..980ac126742 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -10,14 +10,14 @@ %span.pull-right - if merge_request.for_fork? %span.light - = "#{merge_request.source_project_path}" - = "#{merge_request.source_branch}" + #{merge_request.source_project_namespace}: + = merge_request.source_branch %i.icon-angle-right.light - = "#{merge_request.target_branch}" + = merge_request.target_branch - else - = "#{merge_request.source_branch}" + = merge_request.source_branch %i.icon-angle-right.light - = "#{merge_request.target_branch}" + = merge_request.target_branch .merge-request-info - if merge_request.author authored by #{link_to_member(merge_request.source_project, merge_request.author)} diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml index 42641765c5c..0b9e4df3fd3 100644 --- a/app/views/projects/merge_requests/_show.html.haml +++ b/app/views/projects/merge_requests/_show.html.haml @@ -12,7 +12,7 @@ = render "projects/merge_requests/show/commits" - if @commits.present? - %ul.nav.nav-tabs.append-bottom-10 + %ul.nav.nav-tabs %li.notes-tab{data: {action: 'notes'}} = link_to project_merge_request_path(@project, @merge_request) do %i.icon-comment diff --git a/app/views/projects/merge_requests/branch_from.js.haml b/app/views/projects/merge_requests/branch_from.js.haml index ec4d7f2121b..d3147188d1c 100644 --- a/app/views/projects/merge_requests/branch_from.js.haml +++ b/app/views/projects/merge_requests/branch_from.js.haml @@ -1,5 +1,5 @@ :plain - $(".mr_source_commit").html("#{commit_to_html(@commit, @source_project)}"); + $(".mr_source_commit").html("#{commit_to_html(@commit, @source_project, false)}"); var mrTitle = $('#merge_request_title'); if(mrTitle.val().length == 0) { diff --git a/app/views/projects/merge_requests/branch_to.js.haml b/app/views/projects/merge_requests/branch_to.js.haml index f4e2886ee44..f7ede0ded53 100644 --- a/app/views/projects/merge_requests/branch_to.js.haml +++ b/app/views/projects/merge_requests/branch_to.js.haml @@ -1,2 +1,2 @@ :plain - $(".mr_target_commit").html("#{commit_to_html(@commit, @target_project)}"); + $(".mr_target_commit").html("#{commit_to_html(@commit, @target_project, false)}"); diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 4d504380c93..31eb5765fab 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -48,7 +48,7 @@ = preserve do = markdown @milestone.description -%ul.nav.nav-tabs.append-bottom-10 +%ul.nav.nav-tabs %li.active = link_to '#tab-issues', 'data-toggle' => 'tab' do Issues diff --git a/app/views/projects/wikis/_nav.html.haml b/app/views/projects/wikis/_nav.html.haml index 5e5aa5170d6..0a7e51e974c 100644 --- a/app/views/projects/wikis/_nav.html.haml +++ b/app/views/projects/wikis/_nav.html.haml @@ -1,4 +1,4 @@ -%ul.nav.nav-tabs.append-bottom-20 +%ul.nav.nav-tabs = nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do = link_to 'Home', project_wiki_path(@project, :home) diff --git a/app/views/search/_project_results.html.haml b/app/views/search/_project_results.html.haml index ea324b3a9aa..f285bda5736 100644 --- a/app/views/search/_project_results.html.haml +++ b/app/views/search/_project_results.html.haml @@ -1,4 +1,4 @@ -%ul.nav.nav-tabs.append-bottom-10 +%ul.nav.nav-tabs %li{class: ("active" if params[:search_code].present?)} = link_to search_path(params.merge(search_code: true)) do Repository Code