diff options
75 files changed, 438 insertions, 312 deletions
diff --git a/.gitignore b/.gitignore index 1210ac3b44a..60e17328880 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ vendor/bundle/* rails_best_practices_output.html doc/code/* .secret +*.log diff --git a/app/assets/javascripts/main.js.coffee b/app/assets/javascripts/main.js.coffee index f65211c5d13..f22c7a28f35 100644 --- a/app/assets/javascripts/main.js.coffee +++ b/app/assets/javascripts/main.js.coffee @@ -119,7 +119,7 @@ $ -> # Commit show suppressed diff - $(".supp_diff_link").bind "click", -> + $(".content").on "click", ".supp_diff_link", -> $(@).next('table').show() $(@).remove() diff --git a/app/assets/javascripts/merge_requests.js.coffee b/app/assets/javascripts/merge_requests.js.coffee index 769a940959b..153198ca5c5 100644 --- a/app/assets/javascripts/merge_requests.js.coffee +++ b/app/assets/javascripts/merge_requests.js.coffee @@ -22,12 +22,7 @@ class MergeRequest this.$('.show-all-commits').on 'click', => this.showAllCommits() - modal = $('#modal_merge_info').modal modal: true, show:false - - $('.how_to_merge_link').bind "click", -> - modal.show() - $('.modal-header .close').bind "click", -> - modal.hide() + modal = $('#modal_merge_info').modal(show: false) # Local jQuery finder $: (selector) -> diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index abbd6871008..2ab3a1b3b52 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -81,33 +81,6 @@ span.update-author { font-weight: normal; } -form { - @extend .form-horizontal; - - .actions { - @extend .form-actions; - } - - .clearfix { - @extend .control-group; - } - - .input { - @extend .controls; - } - - label { - @extend .control-label; - } - .xlarge { - @extend .input-xlarge; - } - .xxlarge { - @extend .input-xxlarge; - } -} - - .field_with_errors { display: inline; } @@ -121,15 +94,6 @@ ul.breadcrumb { } a { - color: #474D57; - font-weight: bold; - font-size: 14px; - } -} - -input[type=text] { - &.large_text { - padding: 6px; font-size: 16px; } } diff --git a/app/assets/stylesheets/gitlab_bootstrap.scss b/app/assets/stylesheets/gitlab_bootstrap.scss index 2ad1bf944a9..1b24683fd97 100644 --- a/app/assets/stylesheets/gitlab_bootstrap.scss +++ b/app/assets/stylesheets/gitlab_bootstrap.scss @@ -2,11 +2,49 @@ $baseFontSize: 13px !default; $baseLineHeight: 18px !default; -// BOOTSTRAP -@import "bootstrap"; +/** + * BOOTSTRAP + */ +@import "bootstrap/variables"; +@import "bootstrap/mixins"; +@import "bootstrap/reset"; +@import "bootstrap/scaffolding"; +@import "bootstrap/grid"; +@import "bootstrap/layouts"; +@import "bootstrap/type"; +@import "bootstrap/code"; +@import "bootstrap/forms"; +@import "bootstrap/tables"; +@import "bootstrap/sprites"; +@import "bootstrap/dropdowns"; +@import "bootstrap/wells"; +@import "bootstrap/component-animations"; +@import "bootstrap/close"; +@import "bootstrap/button-groups"; +@import "bootstrap/alerts"; +@import "bootstrap/navs"; +@import "bootstrap/navbar"; +@import "bootstrap/breadcrumbs"; +@import "bootstrap/pagination"; +@import "bootstrap/pager"; +@import "bootstrap/modals"; +@import "bootstrap/tooltip"; +@import "bootstrap/popovers"; +@import "bootstrap/thumbnails"; +@import "bootstrap/media"; +@import "bootstrap/labels-badges"; +@import "bootstrap/progress-bars"; +@import "bootstrap/accordion"; +@import "bootstrap/carousel"; +@import "bootstrap/hero-unit"; +@import "bootstrap/utilities"; @import "bootstrap/responsive-utilities"; @import "bootstrap/responsive-1200px-min"; +/** + * Font icons + * + */ @import "font-awesome"; /** @@ -26,3 +64,4 @@ $baseLineHeight: 18px !default; @import "gitlab_bootstrap/files.scss"; @import "gitlab_bootstrap/tables.scss"; @import "gitlab_bootstrap/lists.scss"; +@import "gitlab_bootstrap/forms.scss"; diff --git a/app/assets/stylesheets/gitlab_bootstrap/blocks.scss b/app/assets/stylesheets/gitlab_bootstrap/blocks.scss index 053c275c3bb..08202211e53 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/blocks.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/blocks.scss @@ -10,11 +10,10 @@ * */ .ui-box { - background: #F9F9F9; + background: #FFF; margin-bottom: 20px; border: 1px solid #CCC; word-wrap: break-word; - @include solid-shade; &.ui-box-show { margin:20px 0; @@ -71,10 +70,6 @@ border-top: 1px solid #eee; } - &.white { - background: #fff; - } - ul { margin: 0; } @@ -102,6 +97,8 @@ .btn { vertical-align: middle; + padding: 4px 12px; + @include box-shadow(0 0px 1px 1px #f2f2f2); } .nav-pills { diff --git a/app/assets/stylesheets/gitlab_bootstrap/buttons.scss b/app/assets/stylesheets/gitlab_bootstrap/buttons.scss index 90b041b29db..9eb32ca95e6 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/buttons.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/buttons.scss @@ -1,59 +1,103 @@ .btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 13px; + line-height: $baseLineHeight; + text-align: center; + vertical-align: middle; + cursor: pointer; + border: 1px solid #BBB; + color: $style_color; + @include border-radius($baseBorderRadius); + @include box-shadow(inset 0 1px 0 rgba(255,255,255,.2)); @include linear-gradient(#f1f1f1, #e1e1e1); text-shadow: 0 1px 1px #FFF; - border-color: #BBB; + text-decoration: none; + &.hover, &:hover { + color: $style_color; background: #f1f1f1; - @include linear-gradient(#fAfAfA, #f1f1f1); border-color: #AAA; - color: #333; + text-decoration: none; + @include linear-gradient(#fAfAfA, #f1f1f1); } - &.btn-primary { - background: #2a79A3; - @include linear-gradient(#47A7b7, #2585b5); - border-color: #2A79A3; - color: #fff; - text-shadow: 0 1px 1px #268; - &:hover { - background: $primary_color; - color: #fff; - } + &.focus, + &:focus { + text-decoration: none; + @include box-shadow(inset 0 2px 4px rgba(0,0,0,.15)); + } - &.disabled { - color: #fff; - background: $primary_color; - } + &.active, + &:active { + background-image: none; + outline: 0; + text-decoration: none; + @include box-shadow(inset 0 2px 4px rgba(0,0,0,.15)); } - &.btn-info { - background: #5aB9C3; - border-color: $primary_color; - color: #fff; - text-shadow: 0 1px 1px #268; - &:hover { - background: $primary_color; - color: #fff; - } + &.disabled, + &[disabled] { + cursor: default; + background-image: none; + @include opacity(65); + @include box-shadow(none); + } - &.disabled { - color: #fff; - background: $primary_color; + &.btn-primary { + color: #FFF; + border-color: #189; + text-shadow: 0 1px 1px #189; + @include linear-gradient(#4AC, #289); + + &.hover, + &:hover, + &.disabled, + &[disabled] { + color: #FFF; + background: #389; } } &.btn-success { - &:hover { - background: #51a351; + color: #FFF; + border-color: #1A1; + text-shadow: 0 1px 1px #FFF; + text-shadow: 0 1px 1px #181; + @include linear-gradient(#62C452, #51a351); + + + &.hover, + &:hover, + &.disabled, + &[disabled] { + color: #FFF; + background: #2A2; } + } + + &.btn-danger { + color: #FFF; + text-shadow: 0 1px 1px #811; + border-color: #BD362F; + @include linear-gradient(#EE5F5B, #BD362F); - &.disabled { - color: #fff; - background: #2b2; + + &.hover, + &:hover, + &.disabled, + &[disabled] { + color: #FFF; + background: #A22; } } + &.btn-new { + @extend .btn-success; + } + &.btn-create { @extend .wide; @extend .btn-success; @@ -67,12 +111,6 @@ &.btn-close, &.btn-remove { @extend .btn-danger; - border-color: #BD362F; - - &:hover { - color: #fff; - background: #EE4E49; - } } &.btn-cancel { @@ -84,13 +122,9 @@ padding-right: 20px; } - &.small { - @extend .btn-small; - } - - &.active { - border-color: #aaa; - background-color: #ccc; + &.btn-small { + padding: 2px 10px; + font-size: 12px; } &.btn-tiny { @@ -104,9 +138,4 @@ margin-right: 7px; float: left; } - - &.padded { - margin-right: 3px; - padding: 4px 10px 4px; - } } diff --git a/app/assets/stylesheets/gitlab_bootstrap/common.scss b/app/assets/stylesheets/gitlab_bootstrap/common.scss index 1d958a05b80..24544d74ac2 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/common.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/common.scss @@ -66,7 +66,7 @@ input[type='text'].danger { text-shadow: 0 1px 1px #fff } -fieldset legend { font-size: 17px; } +fieldset legend { font-size: 15px; } .tab-content { overflow: visible; @@ -90,3 +90,11 @@ pre.well-pre { border-radius: 0; color: #555; } + +.input-append .btn.active, .input-prepend .btn.active { + background: #CCC; + border-color: #BBB; + text-shadow: 0 1px 1px #fff; + font-weight: bold; + @include box-shadow(inset 0 2px 4px rgba(0,0,0,.15)); +} diff --git a/app/assets/stylesheets/gitlab_bootstrap/files.scss b/app/assets/stylesheets/gitlab_bootstrap/files.scss index ec03fd0d844..a0d6682eb8f 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/files.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/files.scss @@ -3,18 +3,18 @@ * */ .file-holder { - border: 1px solid #BBB; + border: 1px solid #CCC; margin-bottom: 1em; - @include solid-shade; .file-title { border-bottom: 1px solid #bbb; @include bg-dark-gray-gradient; + text-shadow: 0 1px 1px #fff; margin: 0; font-weight: normal; font-weight: bold; text-align: left; - color: #666; + color: $style_color; padding: 9px 10px; height: 18px; diff --git a/app/assets/stylesheets/gitlab_bootstrap/forms.scss b/app/assets/stylesheets/gitlab_bootstrap/forms.scss new file mode 100644 index 00000000000..20564cc1910 --- /dev/null +++ b/app/assets/stylesheets/gitlab_bootstrap/forms.scss @@ -0,0 +1,32 @@ +form { + @extend .form-horizontal; + + .actions { + @extend .form-actions; + } + + .clearfix { + @extend .control-group; + } + + .input { + @extend .controls; + } + + label { + @extend .control-label; + } + .xlarge { + @extend .input-xlarge; + } + .xxlarge { + @extend .input-xxlarge; + } +} + +input { + &.input-xpadding { + padding: 6px 10px; + } +} + diff --git a/app/assets/stylesheets/gitlab_bootstrap/lists.scss b/app/assets/stylesheets/gitlab_bootstrap/lists.scss index cc7084d27d5..83066b5beec 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/lists.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/lists.scss @@ -6,7 +6,6 @@ margin: 0; list-style: none; li { - background-color: #FFF; padding: 10px; min-height: 20px; border-bottom: 1px solid #eee; @@ -84,4 +83,13 @@ ul.bordered-list { a { color: #777; } } } + + &.top-list { + li:first-child { + padding-top: 0; + h4, h5 { + margin-top: 0; + } + } + } } diff --git a/app/assets/stylesheets/gitlab_bootstrap/mixins.scss b/app/assets/stylesheets/gitlab_bootstrap/mixins.scss index b9abb5e4c67..9ddaaf31c1c 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/mixins.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/mixins.scss @@ -90,7 +90,6 @@ @mixin page-title { color: $style_color; font-size: 20px; - font-weight: normal; line-height: 1.5; margin-top: 0px; margin-bottom: 15px; diff --git a/app/assets/stylesheets/gitlab_bootstrap/tables.scss b/app/assets/stylesheets/gitlab_bootstrap/tables.scss index f46ae91b6ab..a1a5139cda9 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/tables.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/tables.scss @@ -1,8 +1,7 @@ table { @extend .table; @extend .table-striped; - @include solid-shade; - border: 1px solid #bbb; + border: 1px solid #CCC; width: 100%; &.low { @@ -20,7 +19,7 @@ table { th { font-weight: bold; vertical-align: middle; - border-bottom: 1px solid #bbb; + border-bottom: 1px solid #CCC; text-shadow: 0 1px 1px #fff; @include bg-dark-gray-gradient; @@ -46,11 +45,11 @@ table { } &:first-child { - border-left: 1px solid #bbb; + border-left: 1px solid #CCC; } &:last-child { - border-right: 1px solid #bbb; + border-right: 1px solid #CCC; } } diff --git a/app/assets/stylesheets/gitlab_bootstrap/typography.scss b/app/assets/stylesheets/gitlab_bootstrap/typography.scss index 69292ca0b64..d3986556376 100644 --- a/app/assets/stylesheets/gitlab_bootstrap/typography.scss +++ b/app/assets/stylesheets/gitlab_bootstrap/typography.scss @@ -2,6 +2,10 @@ * Headers * */ +h1, h2, h3, h4, h5, h6 { + font-weight: 500; + line-height: 1.1; +} h1.page-title { @include page-title; @@ -48,13 +52,6 @@ a { text-decoration: underline; } - &.btn { - color: $style_color; - &:hover { - color: $style_color; - } - } - &.dark { color: $style_color; } diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss index 1a2c5e76706..35de2826c9b 100644 --- a/app/assets/stylesheets/sections/commits.scss +++ b/app/assets/stylesheets/sections/commits.scss @@ -421,8 +421,8 @@ .commits-compare-switch{ background: url("switch_icon.png") no-repeat center center; - width: 16px; - height: 18px; + width: 22px; + height: 22px; text-indent: -9999px; float: left; margin-right: 9px; @@ -471,3 +471,7 @@ li.commit { } } } + +.commit-breadcrumb { + padding: 0; +} diff --git a/app/assets/stylesheets/sections/issues.scss b/app/assets/stylesheets/sections/issues.scss index ed7902fec3a..5b79b30b5c2 100644 --- a/app/assets/stylesheets/sections/issues.scss +++ b/app/assets/stylesheets/sections/issues.scss @@ -44,7 +44,7 @@ input.check_all_issues { margin: 0; margin-right: 10px; position: relative; - top: 8px; + top: 10px; height: 22px; } @@ -52,6 +52,10 @@ input.check_all_issues { .title { height: 40px; } + + form { + margin: 0; + } } .btn.close_issue { @@ -88,14 +92,11 @@ input.check_all_issues { } .update_selected_issues { - position: relative; - top:5px; margin-left: 4px; - float: left; } .update_issues_text { - padding: 3px; + padding: 5px; line-height: 28px; float: left; color: #479; diff --git a/app/assets/stylesheets/sections/nav.scss b/app/assets/stylesheets/sections/nav.scss index 77ed57a6cfc..54263523e85 100644 --- a/app/assets/stylesheets/sections/nav.scss +++ b/app/assets/stylesheets/sections/nav.scss @@ -7,7 +7,7 @@ ul { margin: auto; - height: 42px; + height: 40px; overflow: hidden; .count { font-weight: normal; @@ -74,7 +74,7 @@ text-align: center; font-weight: normal; height: 38px; - line-height: 36px; + line-height: 34px; color: #777; text-shadow: 0 1px 1px white; padding: 0 10px; diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss index 505c8d960f4..c6bec5a4d9a 100644 --- a/app/assets/stylesheets/sections/projects.scss +++ b/app/assets/stylesheets/sections/projects.scss @@ -7,11 +7,6 @@ line-height: 20px; padding: 8px; } - .btn { - padding: 6px 10px; - margin-left: 10px; - margin-bottom: 8px; - } } .adv_settings { h6 { margin-left: 40px; } @@ -30,6 +25,10 @@ padding: 4px 7px; border: 1px solid #CCC; margin-bottom: 20px; + + .btn { + padding: 4px 12px; + } } .project_clone_holder { @@ -114,7 +113,7 @@ ul.nav.nav-projects-tabs { .public-clone { background: #333; color: #f5f5f5; - padding: 5px 10px; + padding: 6px 10px; margin: 1px; font-weight: normal; } diff --git a/app/assets/stylesheets/sections/tree.scss b/app/assets/stylesheets/sections/tree.scss index d8f32e49c2d..b8b82bcf68c 100644 --- a/app/assets/stylesheets/sections/tree.scss +++ b/app/assets/stylesheets/sections/tree.scss @@ -104,6 +104,8 @@ } .tree-btn-group { + top: 2px; + .btn { margin-right: 0px; padding: 2px 10px; diff --git a/app/assets/stylesheets/themes/ui_mars.scss b/app/assets/stylesheets/themes/ui_mars.scss index 44649ea037c..a2b8c21ea11 100644 --- a/app/assets/stylesheets/themes/ui_mars.scss +++ b/app/assets/stylesheets/themes/ui_mars.scss @@ -31,8 +31,4 @@ border-left: 1px solid #666; } } - - .main-nav { - box-shadow: 0 -1px 0 white inset; - } } diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index 7342393a707..ae3402b2617 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -1,2 +1,13 @@ module NotificationsHelper + def notification_icon(notification) + if notification.disabled? + content_tag :i, nil, class: 'icon-circle cred' + elsif notification.participating? + content_tag :i, nil, class: 'icon-circle cblue' + elsif notification.watch? + content_tag :i, nil, class: 'icon-circle cgreen' + else + content_tag :i, nil, class: 'icon-circle-blank cblue' + end + end end diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index b5cf5cedd6b..58ba9150d72 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -106,15 +106,15 @@ class NotificationService if note.commit_id.present? opts.merge!(commit_id: note.commit_id) - recipients = [note.commit_author] else opts.merge!(noteable_id: note.noteable_id) - target = note.noteable - if target.respond_to?(:participants) - recipients = target.participants - else - recipients = [] - end + end + + target = note.noteable + if target.respond_to?(:participants) + recipients = target.participants + else + recipients = note.mentioned_users end # Get users who left comment in thread diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index cff0251cd5a..8e45dc76ec6 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -4,7 +4,7 @@ allows you to keep projects organized. Use groups for uniting related projects. - = link_to 'New Group', new_admin_group_path, class: "btn btn-small pull-right" + = link_to 'New Group', new_admin_group_path, class: "btn btn-new pull-right" %br = form_tag admin_groups_path, method: :get, class: 'form-inline' do = text_field_tag :name, params[:name], class: "span6" diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml index 316e8235cbe..7c3b999afb3 100644 --- a/app/views/admin/hooks/index.html.haml +++ b/app/views/admin/hooks/index.html.haml @@ -13,7 +13,7 @@ .clearfix = f.label :url, "URL:" .input - = f.text_field :url, class: "text_field xxlarge" + = f.text_field :url, class: "text_field xxlarge input-xpadding" = f.submit "Add System Hook", class: "btn btn-create" %hr diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index d641d366ca7..bc297209ae5 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -38,7 +38,7 @@ .title Projects (#{@projects.total_count}) .pull-right - = link_to 'New Project', new_project_path, class: "btn btn-small btn-primary wide" + = link_to 'New Project', new_project_path, class: "btn btn-new" %ul.well-list - @projects.each do |project| %li diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index c2dfcb5e6fa..b32f0ae87cc 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -30,7 +30,7 @@ .title Users (#{@users.total_count}) .pull-right - = link_to 'New User', new_admin_user_path, class: "btn btn-small wide btn-primary" + = link_to 'New User', new_admin_user_path, class: "btn btn-new" %ul.well-list - @users.each do |user| %li @@ -55,4 +55,4 @@ - else = link_to 'Block', block_admin_user_path(user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove" = link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn btn-small btn-remove" - = paginate @users, theme: "gitlab" + = paginate @users, theme: "gitlab" diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index 63003c2859b..1041d9d1d51 100644 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -1,10 +1,11 @@ %h3.page-title - Issues - %span.light - – - Assigned to you + Issues assigned to me %span.pull-right #{@issues.total_count} issues +%p.light + For all issues you should visit project issues page. Or you can use search panel to find specific issue +%hr + .row .span3 = render 'filter', entity: 'issue' diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml index de5d8018757..77a40b2eef6 100644 --- a/app/views/dashboard/merge_requests.html.haml +++ b/app/views/dashboard/merge_requests.html.haml @@ -1,10 +1,11 @@ %h3.page-title Merge Requests - %span.light - – - Authored by or assigned to you %span.pull-right #{@merge_requests.total_count} merge requests + +%p.light + Only merge requests authored or assigned to you are listed here. +%hr .row .span3 = render 'filter', entity: 'merge_request' diff --git a/app/views/dashboard/projects.html.haml b/app/views/dashboard/projects.html.haml index 78ba479c5af..8fd0744a63f 100644 --- a/app/views/dashboard/projects.html.haml +++ b/app/views/dashboard/projects.html.haml @@ -1,3 +1,7 @@ +%h3.page-title My Projects +%p.light + All projects you have access to are listed here. Public projects are not included here unless you have membership in it +%hr .row .span3 %ul.nav.nav-pills.nav-stacked @@ -32,7 +36,7 @@ = label.name .span9 - %ul.bordered-list.my-projects + %ul.bordered-list.my-projects.top-list - @projects.each do |project| %li %h4.project-title diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index ba3333832ea..13264b37134 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -20,7 +20,7 @@ .ui-box .title %strong= @group.name - Group Settings: + group settings: %div.form-holder = form_for @group do |f| - if @group.errors.any? @@ -44,7 +44,7 @@ .ui-box .title %strong= @group.name - Projects: + projects: - if can? current_user, :manage_group, @group %span.pull-right = link_to new_project_path(namespace_id: @group.id), class: "btn btn-tiny" do @@ -85,4 +85,4 @@ %p %strong Removed group can not be restored! - = link_to 'Remove Group', @group, confirm: 'Removed group can not be restored! Are you sure?', method: :delete, class: "btn btn-remove btn-small" + = link_to 'Remove Group', @group, confirm: 'Removed group can not be restored! Are you sure?', method: :delete, class: "btn btn-remove" diff --git a/app/views/profiles/account.html.haml b/app/views/profiles/account.html.haml index 9b1354d9f2c..7951f639bfb 100644 --- a/app/views/profiles/account.html.haml +++ b/app/views/profiles/account.html.haml @@ -1,3 +1,10 @@ +%h3.page-title + Account settings +%p.light + You can change password, username, private token here. + - if current_user.ldap_user? + Some options are unavailable for LDAP accounts +%hr - unless current_user.ldap_user? - if Gitlab.config.omniauth.enabled %fieldset diff --git a/app/views/profiles/design.html.haml b/app/views/profiles/design.html.haml index 9b6cace4e89..75f00ab10a2 100644 --- a/app/views/profiles/design.html.haml +++ b/app/views/profiles/design.html.haml @@ -1,3 +1,9 @@ +%h3.page-title + My appearance settings +%p.light + Appearance settings saved to your profile and available across all devices +%hr + = form_for @user, url: profile_path, remote: true, method: :put do |f| %fieldset.application-theme %legend diff --git a/app/views/profiles/groups/index.html.haml b/app/views/profiles/groups/index.html.haml index 01f73a24f94..63695d7e0b9 100644 --- a/app/views/profiles/groups/index.html.haml +++ b/app/views/profiles/groups/index.html.haml @@ -1,12 +1,17 @@ +%h3.page-title + Group membership + - if current_user.can_create_group? + %span.pull-right + = link_to new_group_path, class: "btn btn-new" do + %i.icon-plus + New Group +%p.light + Members of group have access to all group projects. +%hr .ui-box .title %strong Groups (#{@groups.count}) - - if current_user.can_create_group? - %span.pull-right - = link_to new_group_path, class: "btn btn-small btn-primary" do - %i.icon-plus - New Group %ul.well-list - @groups.each do |group| %li diff --git a/app/views/profiles/history.html.haml b/app/views/profiles/history.html.haml index aa7006c569b..5e59463ce37 100644 --- a/app/views/profiles/history.html.haml +++ b/app/views/profiles/history.html.haml @@ -1,3 +1,8 @@ +%h3.page-title + Account history +%p.light + You can see all events authored by your account here +%hr .profile_history = render @events %hr diff --git a/app/views/profiles/keys/index.html.haml b/app/views/profiles/keys/index.html.haml index 03413764be4..0704874763e 100644 --- a/app/views/profiles/keys/index.html.haml +++ b/app/views/profiles/keys/index.html.haml @@ -1,16 +1,18 @@ +%h3.page-title + My SSH keys + .pull-right + = link_to "Add SSH Key", new_profile_key_path, class: "btn btn-new" %p.light SSH key allows you to establish a secure connection between your computer and GitLab -%p.light + %br Before you can add ssh key you need to = link_to "generate it", help_ssh_path - +%hr .ui-box .title SSH Keys (#{@keys.count}) - .pull-right - = link_to "Add SSH Key", new_profile_key_path, class: "btn btn-small btn-primary" %ul.well-list#keys-table = render @keys - if @keys.blank? diff --git a/app/views/profiles/notifications/_settings.html.haml b/app/views/profiles/notifications/_settings.html.haml index 1a4a4a9f916..5f62c8099d0 100644 --- a/app/views/profiles/notifications/_settings.html.haml +++ b/app/views/profiles/notifications/_settings.html.haml @@ -2,6 +2,8 @@ .row .span4 %span + = notification_icon(notification) + - if membership.kind_of? UsersGroup = link_to membership.group.name, membership.group - else diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml index 43b1cf6f8df..d7963a88d5d 100644 --- a/app/views/profiles/notifications/show.html.haml +++ b/app/views/profiles/notifications/show.html.haml @@ -1,19 +1,27 @@ -%h3.page-title Setup your notification level - -%p.light - %strong Disabled - – You will not get any notifications via email +%h3.page-title + Notifications settings %p.light - %strong Participating - – You will receive only notifications from related resources(ex. from assigned issue or your commit) -%p.light - %strong Watch - – You will receive all notifications from projects in which you participate + Application use email specified in your profile for notifications %hr +.alert.alert-info + %p + %i.icon-circle.cred + %strong Disabled + – You will not get any notifications via email + %p + %i.icon-circle.cblue + %strong Participating + – You will receive only notifications from related resources(ex. from assigned issue or your commit) + %p + %i.icon-circle.cgreen + %strong Watch + – You will receive all notifications from projects in which you participate .row .span4 - %h5 Global setting + %h4 + = notification_icon(@notification) + Global setting .span7 = form_tag profile_notifications_path, method: :put, remote: true, class: 'update-notifications' do = hidden_field_tag :notification_type, 'global' @@ -30,20 +38,21 @@ = radio_button_tag :notification_level, Notification::N_WATCH, @notification.watch?, class: 'trigger-submit' %span Watch -%hr +%br = link_to '#', class: 'js-toggle-visibility-link' do - %h6.btn.btn-tiny + %span.btn.btn-tiny %i.icon-chevron-down %span Advanced notifications settings .js-toggle-visibility-container.hide - %h5 Groups: - %ul.well-list + %hr + %h4 Groups: + %ul.bordered-list - @users_groups.each do |users_group| - notification = Notification.new(users_group) = render 'settings', type: 'group', membership: users_group, notification: notification - %h5 Projects: - %ul.well-list + %h4 Projects: + %ul.bordered-list - @users_projects.each do |users_project| - notification = Notification.new(users_project) = render 'settings', type: 'project', membership: users_project, notification: notification diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index dd1186fd37c..25bf7912f1e 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -87,4 +87,4 @@ = link_to "Add Public Key", new_profile_key_path, class: "btn btn-small" .form-actions - = f.submit 'Save', class: "btn btn-save" + = f.submit 'Save changes', class: "btn btn-save" diff --git a/app/views/projects/blame/_head.html.haml b/app/views/projects/blame/_head.html.haml deleted file mode 100644 index 3a883829562..00000000000 --- a/app/views/projects/blame/_head.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%div.tree-ref-holder - = render 'shared/ref_switcher', destination: 'tree', path: params[:path] diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index e9a69390577..cdca8b2e634 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -1,21 +1,11 @@ -= render "head" +%h3.page-title Blame view #tree-holder.tree-holder - %ul.breadcrumb - %li - %i.icon-angle-right - = link_to project_tree_path(@project, @ref) do - = @project.name - - tree_breadcrumbs(@tree, 6) do |link| - \/ - %li= link - .clear - .file-holder .file-title %i.icon-file %span.file_name - = @blob.name + = @path %small= number_to_human_size @blob.size %span.options= render "projects/blob/actions" .file-content.blame diff --git a/app/views/projects/blob/_actions.html.haml b/app/views/projects/blob/_actions.html.haml index 456c7432c94..5641c528a4f 100644 --- a/app/views/projects/blob/_actions.html.haml +++ b/app/views/projects/blob/_actions.html.haml @@ -1,12 +1,12 @@ .btn-group.tree-btn-group -# only show edit link for text files - if @blob.text? - = link_to "edit", project_edit_tree_path(@project, @id), class: "btn btn-tiny", disabled: !allowed_tree_edit? - = link_to "raw", project_raw_path(@project, @id), class: "btn btn-tiny", target: "_blank" + = link_to "edit", project_edit_tree_path(@project, @id), class: "btn btn-small", disabled: !allowed_tree_edit? + = link_to "raw", project_raw_path(@project, @id), class: "btn btn-small", target: "_blank" -# only show normal/blame view links for text files - if @blob.text? - if current_page? project_blame_path(@project, @id) - = link_to "normal view", project_blob_path(@project, @id), class: "btn btn-tiny" + = link_to "normal view", project_blob_path(@project, @id), class: "btn btn-small" - else - = link_to "blame", project_blame_path(@project, @id), class: "btn btn-tiny" unless @blob.empty? - = link_to "history", project_commits_path(@project, @id), class: "btn btn-tiny" + = link_to "blame", project_blame_path(@project, @id), class: "btn btn-small" unless @blob.empty? + = link_to "history", project_commits_path(@project, @id), class: "btn btn-small" diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index d56923fdca4..723c5a1c340 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -1,7 +1,7 @@ = render "head" - if @path.present? - %ul.breadcrumb + %ul.breadcrumb.commit-breadcrumb %li.light History for = commits_breadcrumbs diff --git a/app/views/projects/compare/_form.html.haml b/app/views/projects/compare/_form.html.haml index 0d388651e14..a83380841fa 100644 --- a/app/views/projects/compare/_form.html.haml +++ b/app/views/projects/compare/_form.html.haml @@ -14,9 +14,9 @@ .pull-left - if params[:to] && params[:from] = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'} - = text_field_tag :from, params[:from], placeholder: "master", class: "xlarge" + = text_field_tag :from, params[:from], placeholder: "master", class: "xlarge input-xpadding" = "..." - = text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge" + = text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge input-xpadding" .pull-left = submit_tag "Compare", class: "btn btn-create commits-compare-btn" diff --git a/app/views/projects/deploy_keys/index.html.haml b/app/views/projects/deploy_keys/index.html.haml index a1fa3475a84..757b8c00eea 100644 --- a/app/views/projects/deploy_keys/index.html.haml +++ b/app/views/projects/deploy_keys/index.html.haml @@ -1,12 +1,14 @@ %p.slead - Deploy keys allow read-only access to repository. They can be used for CI, staging or production servers + Deploy keys allow read-only access to repository -%p - You can create a deploy key or add existing one - = link_to new_project_deploy_key_path(@project), class: "btn btn-primary pull-right", title: "New Deploy Key" do + = link_to new_project_deploy_key_path(@project), class: "btn btn-new pull-right", title: "New Deploy Key" do %i.icon-plus New Deploy Key +%p.light + They can be used for CI, staging or production servers. + You can create a deploy key or add existing one + %hr.clearfix .row diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index f9fc65a71b4..ac8affbdc32 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -4,7 +4,7 @@ .ui-box.white .title %strong= @project.name - Project Settings: + project settings: .form-holder = form_for(@project, remote: true) do |f| %fieldset @@ -22,7 +22,7 @@ .input = f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250 - - unless @project.empty_repo? + - if @project.repository.exists? && @project.repository.branch_names.any? .clearfix = f.label :default_branch, "Default Branch" .input= f.select(:default_branch, @repository.branch_names, {}, {class: 'chosen'}) @@ -98,7 +98,7 @@ .form-actions - = f.submit 'Save', class: "btn btn-save" + = f.submit 'Save changes', class: "btn btn-save" - if can?(current_user, :change_namespace, @project) .ui-box.ui-box-danger diff --git a/app/views/projects/edit_tree/show.html.haml b/app/views/projects/edit_tree/show.html.haml index 65b6e994884..06396ba992b 100644 --- a/app/views/projects/edit_tree/show.html.haml +++ b/app/views/projects/edit_tree/show.html.haml @@ -1,3 +1,4 @@ +%h3.page-title Edit mode .file-editor = form_tag(project_edit_tree_path(@project, @id), method: :put, class: "form-horizontal") do .file-holder diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml index c4b51d09335..a85f50491d6 100644 --- a/app/views/projects/hooks/index.html.haml +++ b/app/views/projects/hooks/index.html.haml @@ -14,7 +14,7 @@ .clearfix = f.label :url, "URL:" .input - = f.text_field :url, class: "text_field xxlarge" + = f.text_field :url, class: "text_field xxlarge input-xpadding", placeholder: 'http://example.com/trigger-ci.json' = f.submit "Add Web Hook", class: "btn btn-create" %hr diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index ebe124d8906..50df3ee3b7a 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -6,7 +6,7 @@ .pull-right .span6 - if can? current_user, :write_issue, @project - = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-primary pull-right", title: "New Issue", id: "new_issue_link" do + = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new pull-right", title: "New Issue", id: "new_issue_link" do %i.icon-plus New Issue = form_tag project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: 'pull-right' do @@ -14,7 +14,7 @@ = hidden_field_tag :assignee_id, params[:assignee_id], id: 'search_assignee_id' = hidden_field_tag :milestone_id, params[:milestone_id], id: 'search_milestone_id' = hidden_field_tag :label_name, params[:label_name], id: 'search_label_name' - = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search input-xlarge append-right-10 search-text-input' } + = search_field_tag :issue_search, nil, { placeholder: 'Filter by title or description', class: 'input-xpadding issue_search input-xlarge append-right-10 search-text-input' } .row .span3 diff --git a/app/views/projects/merge_requests/edit.html.haml b/app/views/projects/merge_requests/edit.html.haml index 348ebee46e4..67a1541d9bf 100644 --- a/app/views/projects/merge_requests/edit.html.haml +++ b/app/views/projects/merge_requests/edit.html.haml @@ -1,4 +1,4 @@ %h3.page-title - = "Edit merge request #{@merge_request.id}" + = "Edit merge request ##{@merge_request.id}" %hr = render 'form' diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml index f54a213a3f3..9b9da8d1b8f 100644 --- a/app/views/projects/merge_requests/index.html.haml +++ b/app/views/projects/merge_requests/index.html.haml @@ -1,5 +1,5 @@ - if can? current_user, :write_merge_request, @project - = link_to new_project_merge_request_path(@project), class: "pull-right btn btn-primary", title: "New Merge Request" do + = link_to new_project_merge_request_path(@project), class: "pull-right btn btn-new", title: "New Merge Request" do %i.icon-plus New Merge Request %h3.page-title diff --git a/app/views/projects/merge_requests/show/_how_to_merge.html.haml b/app/views/projects/merge_requests/show/_how_to_merge.html.haml index 7f1e33418de..04d11092bed 100644 --- a/app/views/projects/merge_requests/show/_how_to_merge.html.haml +++ b/app/views/projects/merge_requests/show/_how_to_merge.html.haml @@ -1,7 +1,7 @@ %div#modal_merge_info.modal.hide .modal-header - %a.close{href: "#"} × - %h3 How To Merge + %a.close{href: "#", "data-dismiss" => "modal"} × + %h3 How to merge .modal-body %p %strong Step 1. diff --git a/app/views/projects/merge_requests/show/_mr_accept.html.haml b/app/views/projects/merge_requests/show/_mr_accept.html.haml index 01378d99c99..91543717467 100644 --- a/app/views/projects/merge_requests/show/_mr_accept.html.haml +++ b/app/views/projects/merge_requests/show/_mr_accept.html.haml @@ -11,7 +11,8 @@ %p You can accept this request automatically. If you still want to do it manually - - %strong= link_to "click here", "#", class: "how_to_merge_link vlink", title: "How To Merge" + %strong + = link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal" for instructions .accept_group = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request" @@ -31,7 +32,7 @@ .automerge_widget.cannot_be_merged{style: "display:none"} .alert.alert-disabled %span - = link_to "Show how to merge", "#", class: "how_to_merge_link btn btn-small padded", title: "How To Merge" + = link_to "Show how to merge", "#modal_merge_info", class: "how_to_merge_link btn btn-small padded", title: "How To Merge", "data-toggle" => "modal" %strong This request can't be merged with GitLab. You should do it manually diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index 0dc9dab872f..825243e773f 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -32,7 +32,7 @@ .form-actions - if @milestone.new_record? - = f.submit 'Create milestone', class: "btn-save btn" + = f.submit 'Create milestone', class: "btn-create btn" = link_to "Cancel", project_milestones_path(@project), class: "btn btn-cancel" -else = f.submit 'Save changes', class: "btn-save btn" diff --git a/app/views/projects/milestones/_milestone.html.haml b/app/views/projects/milestones/_milestone.html.haml index 894fa6c1133..bc3368b765c 100644 --- a/app/views/projects/milestones/_milestone.html.haml +++ b/app/views/projects/milestones/_milestone.html.haml @@ -4,8 +4,7 @@ = link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link grouped" do %i.icon-edit Edit - - if milestone.can_be_closed? - = link_to 'Close', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-remove" + = link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-remove" %h4 = link_to_gfm truncate(milestone.title, length: 100), project_milestone_path(milestone.project, milestone) - if milestone.expired? and not milestone.closed? diff --git a/app/views/projects/milestones/index.html.haml b/app/views/projects/milestones/index.html.haml index 727fa6149d1..0c0828c9064 100644 --- a/app/views/projects/milestones/index.html.haml +++ b/app/views/projects/milestones/index.html.haml @@ -3,7 +3,7 @@ %h3.page-title Milestones - if can? current_user, :admin_milestone, @project - = link_to new_project_milestone_path(@project), class: "pull-right btn btn-primary", title: "New Milestone" do + = link_to new_project_milestone_path(@project), class: "pull-right btn btn-new", title: "New Milestone" do %i.icon-plus New Milestone diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 7be3ba2f758..8a5c2a938b1 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -1,32 +1,23 @@ = render "projects/issues/head" -.row - .span6 - %h3.page-title - Milestone ##{@milestone.id} - %small - = @milestone.expires_at - .back-link - = link_to project_milestones_path(@project) do - ← To milestones list - .span6 - .pull-right - - unless @milestone.closed? - = link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn btn-small grouped", title: "New Issue" do - %i.icon-plus - New Issue - = link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link small grouped" - - if can?(current_user, :admin_milestone, @project) - = link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-small grouped" do - %i.icon-edit - Edit +%h3.page-title + Milestone ##{@milestone.id} + %small + = @milestone.expires_at + .pull-right + - if can?(current_user, :admin_milestone, @project) + = link_to edit_project_milestone_path(@project, @milestone), class: "btn grouped" do + %i.icon-edit + Edit + = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove" +- if @milestone.issues.any? && @milestone.can_be_closed? + .alert.alert-success + %span All issues for this milestone are closed. You may close milestone now. +.back-link + = link_to project_milestones_path(@project) do + ← To milestones list -- if @milestone.can_be_closed? - %hr - %p - %span All issues for this milestone are closed. You may close milestone now. - = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-remove" .ui-box.ui-box-show .ui-box-head @@ -69,6 +60,11 @@ Participants %span.badge= @users.count + .pull-right + = link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn btn-small grouped", title: "New Issue" do + %i.icon-plus + New Issue + = link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn btn-small edit-milestone-link grouped" .tab-content .tab-pane.active#tab-issues diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index e45b2b5757e..dca897dce67 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -8,7 +8,6 @@ Project name is .input = f.text_field :name, placeholder: "Example Project", class: "xxlarge", tabindex: 1, autofocus: true - = f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4 - if current_user.can_select_namespace? .clearfix @@ -38,14 +37,15 @@ %p.padded New projects are private by default. You choose who can see the project and commit to repository. - %hr + .form-actions + = f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4 - - if current_user.can_create_group? - .clearfix - .input.light - Need a group for several dependent projects? - = link_to new_group_path, class: "btn btn-tiny" do - Create a group + - if current_user.can_create_group? + .pull-right + .input.light + Need a group for several dependent projects? + = link_to new_group_path, class: "btn btn-tiny" do + Create a group .save-project-loader.hide %center diff --git a/app/views/projects/team_members/_group_members.html.haml b/app/views/projects/team_members/_group_members.html.haml index 5c3f813bb20..68f08006854 100644 --- a/app/views/projects/team_members/_group_members.html.haml +++ b/app/views/projects/team_members/_group_members.html.haml @@ -1,7 +1,7 @@ .ui-box .title - %strong #{@group.name} Group - members (#{@group.users_groups.count}) + %strong #{@group.name} + group members (#{@group.users_groups.count}) .pull-right = link_to members_group_path(@group), class: 'btn btn-small' do %i.icon-edit diff --git a/app/views/projects/team_members/_team.html.haml b/app/views/projects/team_members/_team.html.haml index ee660482f3f..2daf6847665 100644 --- a/app/views/projects/team_members/_team.html.haml +++ b/app/views/projects/team_members/_team.html.haml @@ -2,8 +2,8 @@ - can_admin_project = (can? current_user, :admin_project, @project) .ui-box .title - %strong #{@project.name} Project - members (#{members.count}) + %strong #{@project.name} + project members (#{members.count}) %ul.well-list - members.each do |team_member| = render 'team_member', member: team_member, current_user_can_admin_project: can_admin_project diff --git a/app/views/projects/team_members/index.html.haml b/app/views/projects/team_members/index.html.haml index e8ae84bb8f5..af80ceaed52 100644 --- a/app/views/projects/team_members/index.html.haml +++ b/app/views/projects/team_members/index.html.haml @@ -3,14 +3,14 @@ - if can? current_user, :admin_team_member, @project %span.pull-right - = link_to import_project_team_members_path(@project), class: "btn btn-small grouped", title: "Import team from another project" do + = link_to import_project_team_members_path(@project), class: "btn grouped", title: "Import team from another project" do Import team from another project - = link_to new_project_team_member_path(@project), class: "btn btn-primary small grouped", title: "New Team Member" do + = link_to new_project_team_member_path(@project), class: "btn btn-new grouped", title: "New Team Member" do New Team Member %p.light Read more about project permissions %strong= link_to "here", help_permissions_path, class: "vlink" += render "team", members: @users_projects - if @group = render "group_members" -= render "team", members: @users_projects diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml index 464b1508a7e..4a558826f29 100644 --- a/app/views/projects/wikis/_form.html.haml +++ b/app/views/projects/wikis/_form.html.haml @@ -29,8 +29,9 @@ = f.label :commit_message .input= f.text_field :message, class: 'span8' .actions - = f.submit 'Save', class: "btn-save btn" - if @wiki && @wiki.persisted? + = f.submit 'Save changes', class: "btn-save btn" = link_to "Cancel", project_wiki_path(@project, @wiki), class: "btn btn-cancel" - else + = f.submit 'Create page', class: "btn-create btn" = link_to "Cancel", project_wiki_path(@project, :home), class: "btn btn-cancel" diff --git a/app/views/projects/wikis/_nav.html.haml b/app/views/projects/wikis/_nav.html.haml index d62b46a7e5b..89325856acd 100644 --- a/app/views/projects/wikis/_nav.html.haml +++ b/app/views/projects/wikis/_nav.html.haml @@ -12,7 +12,7 @@ - if can?(current_user, :write_wiki, @project) .pull-right - = link_to '#', class: "add-new-wiki btn btn-small btn-primary" do + = link_to '#', class: "add-new-wiki btn btn-new" do %i.icon-plus New Page diff --git a/app/views/projects/wikis/git_access.html.haml b/app/views/projects/wikis/git_access.html.haml index e783a982ddb..dd01bb99041 100644 --- a/app/views/projects/wikis/git_access.html.haml +++ b/app/views/projects/wikis/git_access.html.haml @@ -1,10 +1,9 @@ = render 'nav' %h3.page-title - Git Access + Git access for %strong= @gollum_wiki.path_with_namespace = render 'main_links' -%br .content .project_clone_panel .row diff --git a/app/views/snippets/current_user_index.html.haml b/app/views/snippets/current_user_index.html.haml index b60026f4584..a2a9aef04eb 100644 --- a/app/views/snippets/current_user_index.html.haml +++ b/app/views/snippets/current_user_index.html.haml @@ -1,12 +1,13 @@ %h3.page-title My Snippets - %small share code pastes with others out of git repository .pull-right - = link_to new_snippet_path, class: "btn btn-small add_new grouped btn-primary", title: "New Snippet" do + = link_to new_snippet_path, class: "btn btn-new grouped", title: "New Snippet" do Add new snippet - = link_to snippets_path, class: "btn btn-small grouped" do + = link_to snippets_path, class: "btn grouped" do Discover snippets +%p.light + Share code pastes with others out of git repository %hr .row diff --git a/app/views/snippets/index.html.haml b/app/views/snippets/index.html.haml index c65ed4fb9df..2f6c914a159 100644 --- a/app/views/snippets/index.html.haml +++ b/app/views/snippets/index.html.haml @@ -1,13 +1,15 @@ %h3.page-title Public snippets - %small share code pastes with others out of git repository .pull-right - = link_to new_snippet_path, class: "btn btn-small add_new grouped btn-primary", title: "New Snippet" do + = link_to new_snippet_path, class: "btn btn-new grouped", title: "New Snippet" do Add new snippet - = link_to user_snippets_path(current_user), class: "btn btn-small grouped" do + = link_to user_snippets_path(current_user), class: "btn grouped" do My snippets +%p.light + Public snippets created by you and other users are listed here + %hr = render 'snippets' diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index 5cf1fefe5f0..37f9e7576f5 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -7,7 +7,7 @@ private .pull-right - = link_to new_snippet_path, class: "btn btn-small add_new grouped btn-primary", title: "New Snippet" do + = link_to new_snippet_path, class: "btn btn-new btn-small", title: "New Snippet" do Add new snippet diff --git a/doc/install/installation.md b/doc/install/installation.md index be6780d741c..c0809b69703 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -122,7 +122,7 @@ GitLab Shell is a ssh access and repository management software developed specia cd gitlab-shell # switch to right version - sudo -u git -H git checkout v1.4.0 + sudo -u git -H git checkout v1.7.0 sudo -u git -H cp config.yml.example config.yml @@ -199,6 +199,7 @@ You can change `5-3-stable` to `master` if you want the *bleeding edge* version, # Edit user.email according to what is set in gitlab.yml sudo -u git -H git config --global user.name "GitLab" sudo -u git -H git config --global user.email "gitlab@localhost" + sudo -u git -H git config --global core.autocrlf input **Important Note:** Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. diff --git a/doc/update/5.4-to-6.0.md b/doc/update/5.4-to-6.0.md index ffc152194db..37e8983df8f 100644 --- a/doc/update/5.4-to-6.0.md +++ b/doc/update/5.4-to-6.0.md @@ -9,9 +9,13 @@ So you need to move all your global projects under group/users manually before u #### Teams
-We drop teams support as separate entity for 6.0 in favor of group membership.
-So now you will be able to manage group members in order to provide access to corresponding projects.
-
+We deprecate teams as separate entity in 6.0 in favor of group membership.
+The old combination of groups and teams was confusing for a lot of people.
+And when the members of a team where changed this wasn't reflected in the project permissions.
+In GitLab 6.0 you will be able to add members to a group with a permission level for each member.
+These group members will have access to the projects in that group.
+Any changes to group members will immediately be reflected in the project permissions.
+You can even have multiple owners for a group, greatly simplifying administration.
### 0. Backup
@@ -88,4 +92,4 @@ To make sure you didn't miss anything run a more thorough check with: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
-If all items are green, then congratulations upgrade complete!
\ No newline at end of file +If all items are green, then congratulations upgrade complete!
diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb index 5ff4e8af1cd..9cd4e470250 100644 --- a/features/steps/profile/profile.rb +++ b/features/steps/profile/profile.rb @@ -12,7 +12,7 @@ class Profile < Spinach::FeatureSteps fill_in "user_skype", with: "testskype" fill_in "user_linkedin", with: "testlinkedin" fill_in "user_twitter", with: "testtwitter" - click_button "Save" + click_button "Save changes" @user.reload end diff --git a/features/steps/profile/profile_notifications.rb b/features/steps/profile/profile_notifications.rb index 54b02605689..7a41687dfde 100644 --- a/features/steps/profile/profile_notifications.rb +++ b/features/steps/profile/profile_notifications.rb @@ -7,7 +7,7 @@ class ProfileNotifications < Spinach::FeatureSteps end step 'I should see global notifications settings' do - page.should have_content "Setup your notification level" + page.should have_content "Notifications settings" page.should have_content "Global setting" end end diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb index e9ef1495dd1..a96b086fae5 100644 --- a/features/steps/project/project.rb +++ b/features/steps/project/project.rb @@ -9,7 +9,7 @@ class ProjectFeature < Spinach::FeatureSteps end And 'I save project' do - click_button 'Save' + click_button 'Save changes' end Then 'I should see project with new settings' do diff --git a/features/steps/project/project_wiki.rb b/features/steps/project/project_wiki.rb index 4c92d5672f7..f0e62e07321 100644 --- a/features/steps/project/project_wiki.rb +++ b/features/steps/project/project_wiki.rb @@ -17,7 +17,7 @@ class ProjectWiki < Spinach::FeatureSteps Given 'I create the Wiki Home page' do fill_in "Content", with: '[link test](test)' - click_on "Save" + click_on "Create page" end Then 'I should see the newly created wiki page' do @@ -43,7 +43,7 @@ class ProjectWiki < Spinach::FeatureSteps And 'I change the content' do fill_in "Content", with: 'Updated Wiki Content' - click_on "Save" + click_on "Save changes" end Then 'I should see the updated content' do diff --git a/lib/gitlab/blacklist.rb b/lib/gitlab/blacklist.rb index 59203b2fbd6..d00214a62cb 100644 --- a/lib/gitlab/blacklist.rb +++ b/lib/gitlab/blacklist.rb @@ -3,7 +3,7 @@ module Gitlab extend self def path - %w(admin dashboard groups help profile projects search public assets u s teams merge_requests issues users snippets services) + %w(admin dashboard groups help profile projects search public assets u s teams merge_requests issues users snippets services repository) end end end diff --git a/lib/tasks/migrate/migrate_keys.rake b/lib/tasks/migrate/migrate_keys.rake index b13d984907b..969ba6dc15e 100644 --- a/lib/tasks/migrate/migrate_keys.rake +++ b/lib/tasks/migrate/migrate_keys.rake @@ -1,15 +1,20 @@ desc "GITLAB | Migrate SSH Keys" task migrate_keys: :environment do puts "This will add fingerprint to ssh keys in db" + puts "If you have duplicate keys https://github.com/gitlabhq/gitlabhq/issues/4453 all but the first will be deleted".yellow ask_to_continue Key.find_each(batch_size: 20) do |key| if key.valid? && key.save print '.' + elsif key.fingerprint.present? + puts "\nDeleting #{key.inspect}".yellow + key.destroy else print 'F' end end + print "\n" end diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index 76501482303..02547254436 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -48,7 +48,7 @@ describe NotificationService do end context 'commit note' do - let(:note) { create :note_on_commit } + let(:note) { create(:note_on_commit) } before do build_team(note.project) @@ -56,32 +56,35 @@ describe NotificationService do describe :new_note do it do - should_email(@u_watcher.id) - should_not_email(note.author_id) - should_not_email(@u_participating.id) - should_not_email(@u_disabled.id) + should_email(@u_watcher.id, note) + should_not_email(@u_mentioned.id, note) + should_not_email(note.author_id, note) + should_not_email(@u_participating.id, note) + should_not_email(@u_disabled.id, note) notification.new_note(note) end it do - create(:note_on_commit, + new_note = create(:note_on_commit, author: @u_participating, project_id: note.project_id, - commit_id: note.commit_id) - - should_email(@u_watcher.id) - should_email(@u_participating.id) - should_not_email(note.author_id) - should_not_email(@u_disabled.id) - notification.new_note(note) + commit_id: note.commit_id, + note: '@mention referenced') + + should_email(@u_watcher.id, new_note) + should_email(@u_mentioned.id, new_note) + should_not_email(new_note.author_id, new_note) + should_not_email(@u_participating.id, new_note) + should_not_email(@u_disabled.id, new_note) + notification.new_note(new_note) end - def should_email(user_id) - Notify.should_receive(:note_commit_email).with(user_id, note.id) + def should_email(user_id, n) + Notify.should_receive(:note_commit_email).with(user_id, n.id) end - def should_not_email(user_id) - Notify.should_not_receive(:note_commit_email).with(user_id, note.id) + def should_not_email(user_id, n) + Notify.should_not_receive(:note_commit_email).with(user_id, n.id) end end end @@ -236,7 +239,7 @@ describe NotificationService do @u_watcher = create(:user, notification_level: Notification::N_WATCH) @u_participating = create(:user, notification_level: Notification::N_PARTICIPATING) @u_disabled = create(:user, notification_level: Notification::N_DISABLED) - @u_mentioned = create(:user, username: 'mention', notification_level: Notification::N_WATCH) + @u_mentioned = create(:user, username: 'mention', notification_level: Notification::N_PARTICIPATING) project.team << [@u_watcher, :master] project.team << [@u_participating, :master] |
