diff options
Diffstat (limited to 'app')
51 files changed, 250 insertions, 235 deletions
diff --git a/app/assets/javascripts/activities.js.coffee b/app/assets/javascripts/activities.js.coffee index 3b6b453ac51..5092e824e65 100644 --- a/app/assets/javascripts/activities.js.coffee +++ b/app/assets/javascripts/activities.js.coffee @@ -1,7 +1,7 @@ class @Activities constructor: -> Pager.init 20, true - $(".event-filter a").bind "click", (event) => + $(".event-filter-link").on "click", (event) => event.preventDefault() @toggleFilter($(event.currentTarget)) @reloadActivities() @@ -12,18 +12,10 @@ class @Activities toggleFilter: (sender) -> - sender.closest('li').toggleClass "active" + $('.event-filter .active').removeClass "active" event_filters = $.cookie("event_filter") filter = sender.attr("id").split("_")[0] - if event_filters - event_filters = event_filters.split(",") - else - event_filters = new Array() + $.cookie "event_filter", (if event_filters isnt filter then filter else ""), { path: '/' } - index = event_filters.indexOf(filter) - if index is -1 - event_filters.push filter - else - event_filters.splice index, 1 - - $.cookie "event_filter", event_filters.join(","), { path: '/' } + if event_filters isnt filter + sender.closest('li').toggleClass "active" diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 367bd098bfd..0651bd20d26 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -210,7 +210,7 @@ $ -> $this = $(this) $this.attr 'value', $this.val() return - + $(document) .off 'keyup', 'input[type="search"]' .on 'keyup', 'input[type="search"]' , (e) -> @@ -253,7 +253,7 @@ $ -> $('.page-with-sidebar') .removeClass('right-sidebar-collapsed') .addClass('right-sidebar-expanded') - $.cookie("collapsed_gutter", + $.cookie("collapsed_gutter", $('.right-sidebar') .hasClass('right-sidebar-collapsed'), { path: '/' }) diff --git a/app/assets/javascripts/awards_handler.coffee b/app/assets/javascripts/awards_handler.coffee index 360acb864f6..8f89d3e61a2 100644 --- a/app/assets/javascripts/awards_handler.coffee +++ b/app/assets/javascripts/awards_handler.coffee @@ -1,10 +1,10 @@ class @AwardsHandler constructor: (@post_emoji_url, @noteable_type, @noteable_id, @aliases) -> - $(".add-award").click (event)-> + $(".add-award").click (event) => event.stopPropagation() event.preventDefault() - $(".emoji-menu").show() - $("#emoji_search").focus() + + @showEmojiMenu() $("html").on 'click', (event) -> if !$(event.target).closest(".emoji-menu").length @@ -14,6 +14,16 @@ class @AwardsHandler @renderFrequentlyUsedBlock() @setupSearch() + showEmojiMenu: -> + if $(".emoji-menu").length + $(".emoji-menu").show() + $("#emoji_search").focus() + else + $.get "/emojis", (response) -> + $(".add-award").after response + $(".emoji-menu").show() + $("#emoji_search").focus() + addAward: (emoji) -> emoji = @normilizeEmojiName(emoji) @postEmoji emoji, => diff --git a/app/assets/javascripts/dispatcher.js.coffee b/app/assets/javascripts/dispatcher.js.coffee index 407005d8adf..89f1993797f 100644 --- a/app/assets/javascripts/dispatcher.js.coffee +++ b/app/assets/javascripts/dispatcher.js.coffee @@ -76,6 +76,8 @@ class Dispatcher shortcut_handler = new ShortcutsNavigation() when 'projects:show' shortcut_handler = new ShortcutsNavigation() + + new TreeView() if $('#tree-slider').length when 'groups:show' new Activities() shortcut_handler = new ShortcutsNavigation() @@ -88,6 +90,7 @@ class Dispatcher when 'groups:new', 'groups:edit', 'admin:groups:edit', 'admin:groups:new' new GroupAvatar() when 'projects:tree:show' + shortcut_handler = new ShortcutsNavigation() new TreeView() when 'projects:find_file:show' shortcut_handler = true diff --git a/app/assets/javascripts/merge_request_tabs.js.coffee b/app/assets/javascripts/merge_request_tabs.js.coffee index 6f569f9e1aa..40cfa59a229 100644 --- a/app/assets/javascripts/merge_request_tabs.js.coffee +++ b/app/assets/javascripts/merge_request_tabs.js.coffee @@ -70,6 +70,7 @@ class @MergeRequestTabs @loadCommits($target.attr('href')) else if action == 'diffs' @loadDiff($target.attr('href')) + @shrinkView() else if action == 'builds' @loadBuilds($target.attr('href')) @@ -185,3 +186,14 @@ class @MergeRequestTabs expandViewContainer: -> $('.container-fluid').removeClass('container-limited') + + shrinkView: -> + $gutterIcon = $('.gutter-toggle i') + + # Wait until listeners are set + setTimeout( -> + # Only when sidebar is collapsed + if $gutterIcon.is('.fa-angle-double-right') + $gutterIcon.closest('a').trigger('click') + , 0) + diff --git a/app/assets/javascripts/shortcuts_issuable.coffee b/app/assets/javascripts/shortcuts_issuable.coffee index cefa1857d7f..bbf02f1db24 100644 --- a/app/assets/javascripts/shortcuts_issuable.coffee +++ b/app/assets/javascripts/shortcuts_issuable.coffee @@ -24,6 +24,10 @@ class @ShortcutsIssuable extends ShortcutsNavigation @nextIssue() return false ) + Mousetrap.bind('e', => + @editIssue() + return false + ) if isMergeRequest @@ -63,3 +67,7 @@ class @ShortcutsIssuable extends ShortcutsNavigation # Focus the input field replyField.focus() + + editIssue: -> + $editBtn = $('.issuable-edit') + Turbolinks.visit($editBtn.attr('href')) diff --git a/app/assets/javascripts/sidebar.js.coffee b/app/assets/javascripts/sidebar.js.coffee index ae59480af9e..cff309c5972 100644 --- a/app/assets/javascripts/sidebar.js.coffee +++ b/app/assets/javascripts/sidebar.js.coffee @@ -8,4 +8,10 @@ $(document).on("click", '.toggle-nav-collapse', (e) -> $('.sidebar-wrapper').toggleClass("sidebar-collapsed sidebar-expanded") $('.toggle-nav-collapse i').toggleClass("fa-angle-right fa-angle-left") $.cookie("collapsed_nav", $('.page-with-sidebar').hasClass(collapsed), { path: '/' }) + + setTimeout ( -> + niceScrollBars = $('.nicescroll').niceScroll(); + niceScrollBars.updateScrollBar(); + ), 300 + ) diff --git a/app/assets/javascripts/wikis.js.coffee b/app/assets/javascripts/wikis.js.coffee index 19420f42468..1ee827f1fa3 100644 --- a/app/assets/javascripts/wikis.js.coffee +++ b/app/assets/javascripts/wikis.js.coffee @@ -2,7 +2,7 @@ class @Wikis constructor: -> - $('.build-new-wiki').bind 'click', (e) => + $('.new-wiki-page').on 'submit', (e) => $('[data-error~=slug]').addClass('hidden') field = $('#new_wiki_path') slug = @slugify(field.val()) @@ -10,6 +10,7 @@ class @Wikis if (slug.length > 0) path = field.attr('data-wikis-path') location.href = path + '/' + slug + e.preventDefault() dasherize: (value) -> value.replace(/[_\s]+/g, '-') diff --git a/app/assets/stylesheets/framework/blocks.scss b/app/assets/stylesheets/framework/blocks.scss index bd89cc7dc1d..d7e4153ddc0 100644 --- a/app/assets/stylesheets/framework/blocks.scss +++ b/app/assets/stylesheets/framework/blocks.scss @@ -66,7 +66,7 @@ } .oneline { - line-height: 42px; + line-height: 35px; } > p:last-child { diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss index c7f3604850d..07907e6e5a6 100644 --- a/app/assets/stylesheets/framework/files.scss +++ b/app/assets/stylesheets/framework/files.scss @@ -158,7 +158,7 @@ } &:hover { - background: $hover; + background: $row-hover; } } } diff --git a/app/assets/stylesheets/framework/header.scss b/app/assets/stylesheets/framework/header.scss index 531dedb89fe..e624982c5c9 100644 --- a/app/assets/stylesheets/framework/header.scss +++ b/app/assets/stylesheets/framework/header.scss @@ -142,9 +142,13 @@ header { } @media (max-width: $screen-md-max) { - .header-collapsed, .header-expanded { - @include collapsed-header; + .header-collapsed { + margin-left: $sidebar_collapsed_width; } + + .header-expanded { + margin-left: $sidebar_width; + } } @media(min-width: $screen-md-max) { diff --git a/app/assets/stylesheets/framework/jquery.scss b/app/assets/stylesheets/framework/jquery.scss index d6cd78813c0..0cdcd923b3c 100644 --- a/app/assets/stylesheets/framework/jquery.scss +++ b/app/assets/stylesheets/framework/jquery.scss @@ -48,8 +48,8 @@ .ui-state-hover, .ui-state-focus { - border: 1px solid $hover; - background: $hover; + border: 1px solid $row-hover; + background: $row-hover; color: #333; } } diff --git a/app/assets/stylesheets/framework/lists.scss b/app/assets/stylesheets/framework/lists.scss index 5c65383ec1a..354392d5ec3 100644 --- a/app/assets/stylesheets/framework/lists.scss +++ b/app/assets/stylesheets/framework/lists.scss @@ -38,7 +38,7 @@ &.smoke { background-color: $background-color; } &:hover { - background: $hover; + background: $row-hover; } &:last-child { diff --git a/app/assets/stylesheets/framework/nav.scss b/app/assets/stylesheets/framework/nav.scss index 252a586358c..d24faa897a1 100644 --- a/app/assets/stylesheets/framework/nav.scss +++ b/app/assets/stylesheets/framework/nav.scss @@ -77,12 +77,21 @@ margin-bottom: 0px; > .dropdown { - margin-right: 10px; + margin-right: $gl-padding-top; display: inline-block; } > .btn { + margin-right: $gl-padding-top; display: inline-block; + + &:last-child { + margin-right: 0; + } + } + + > .btn-grouped { + float: none; } > form { @@ -94,7 +103,7 @@ display: inline-block; position: relative; top: 1px; - margin-right: 10px; + margin-right: $gl-padding-top; /* Medium devices (desktops, 992px and up) */ @media (min-width: $screen-md-min) { width: 200px; } diff --git a/app/assets/stylesheets/framework/sidebar.scss b/app/assets/stylesheets/framework/sidebar.scss index b141928f706..e0ccd6f100f 100644 --- a/app/assets/stylesheets/framework/sidebar.scss +++ b/app/assets/stylesheets/framework/sidebar.scss @@ -12,6 +12,10 @@ height: 100%; transition-duration: .3s; } + + &.right-sidebar-expanded { + padding-right: $gutter_width; + } } .sidebar-wrapper { @@ -45,19 +49,6 @@ overflow: hidden; transition-duration: .3s; - .home { - z-index: 1; - position: absolute; - left: 0px; - } - - #logo { - z-index: 2; - position: absolute; - width: 58px; - cursor: pointer; - } - a { float: left; height: $header-height; @@ -83,7 +74,7 @@ width: 158px; float: left; margin: 0; - margin-left: 50px; + margin-left: 14px; font-size: 19px; line-height: 41px; font-weight: normal; @@ -194,6 +185,10 @@ @mixin expanded-sidebar { padding-left: $sidebar_width; + &.right-sidebar-collapsed { + padding-right: $sidebar_collapsed_width; + } + .sidebar-wrapper { width: $sidebar_width; @@ -213,17 +208,13 @@ } } -@mixin expanded-gutter { - padding-right: $gutter_width; -} - -@mixin collapsed-gutter { - padding-right: $sidebar_collapsed_width; -} - @mixin collapsed-sidebar { padding-left: $sidebar_collapsed_width; + &.right-sidebar-collapsed { + padding-right: $sidebar_collapsed_width; + } + .sidebar-wrapper { width: $sidebar_collapsed_width; @@ -287,47 +278,10 @@ background: #f2f6f7; } -// page is small enough -@media (max-width: $screen-md-max) { - .page-sidebar-collapsed { - @include collapsed-sidebar; - } - - .page-sidebar-expanded { - @include collapsed-sidebar; - } - - .page-gutter { - &.right-sidebar-collapsed { - @include collapsed-gutter; - } - &.right-sidebar-expanded { - @include expanded-gutter; - } - } - - .collapse-nav { - display: none; - } +.page-sidebar-collapsed { + @include collapsed-sidebar; } -// page is large enough -@media(min-width: $screen-md-max) { - - .page-gutter { - &.right-sidebar-collapsed { - @include collapsed-gutter; - } - &.right-sidebar-expanded { - @include expanded-gutter; - } - } - - .page-sidebar-collapsed { - @include collapsed-sidebar; - } - - .page-sidebar-expanded { - @include expanded-sidebar; - } -}
\ No newline at end of file +.page-sidebar-expanded { + @include expanded-sidebar; +} diff --git a/app/assets/stylesheets/framework/timeline.scss b/app/assets/stylesheets/framework/timeline.scss index 47b843e5e3d..aa244fe548d 100644 --- a/app/assets/stylesheets/framework/timeline.scss +++ b/app/assets/stylesheets/framework/timeline.scss @@ -5,13 +5,13 @@ padding: 0; .timeline-entry { - padding: $gl-padding 0; + padding: $gl-padding $gl-btn-padding; border-color: $table-border-color; color: $gl-gray; border-bottom: 1px solid $border-white-light; &:target { - background: $hover; + background: $row-hover; } &:last-child { diff --git a/app/assets/stylesheets/framework/tw_bootstrap_variables.scss b/app/assets/stylesheets/framework/tw_bootstrap_variables.scss index 33270388e64..b1b8295411b 100644 --- a/app/assets/stylesheets/framework/tw_bootstrap_variables.scss +++ b/app/assets/stylesheets/framework/tw_bootstrap_variables.scss @@ -70,7 +70,7 @@ $pagination-bg: #fff; $pagination-border: $border-color; $pagination-hover-color: $gl-gray; -$pagination-hover-bg: $hover; +$pagination-hover-bg: $row-hover; $pagination-hover-border: $border-color; $pagination-active-color: $blue-dark; diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index 04db0da73d1..4d72c7e905e 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -1,4 +1,4 @@ -$hover: #faf9f9; +$row-hover: #f4f8fe; $gl-text-color: #54565B; $gl-text-green: #4A2; $gl-text-red: #D12F19; diff --git a/app/assets/stylesheets/pages/profile.scss b/app/assets/stylesheets/pages/profile.scss index 95fc26a608a..4767c65d9a7 100644 --- a/app/assets/stylesheets/pages/profile.scss +++ b/app/assets/stylesheets/pages/profile.scss @@ -51,9 +51,17 @@ .profile-link-holder { display: inline; + a { + color: $blue-dark; + text-decoration: none; + } +} + +// Middle dot divider between each element in a list of items. +.middle-dot-divider { &:after { - content: "\00B7"; - padding: 0px 6px; + content: "\00B7"; // Middle Dot + padding: 0 6px; font-weight: bold; } @@ -63,9 +71,10 @@ padding: 0; } } +} - a { - color: $blue-dark; - text-decoration: none; - } +.profile-user-bio { + // Limits the width of the user bio for readability. + max-width: 750px; + margin: auto; } diff --git a/app/assets/stylesheets/pages/tree.scss b/app/assets/stylesheets/pages/tree.scss index c7411617cb3..ef63b010600 100644 --- a/app/assets/stylesheets/pages/tree.scss +++ b/app/assets/stylesheets/pages/tree.scss @@ -21,7 +21,7 @@ &:hover { td { - background: $hover; + background: $row-hover; } cursor: pointer; } diff --git a/app/assets/stylesheets/pages/wiki.scss b/app/assets/stylesheets/pages/wiki.scss index cdf514197cb..dfaeba41cf6 100644 --- a/app/assets/stylesheets/pages/wiki.scss +++ b/app/assets/stylesheets/pages/wiki.scss @@ -4,8 +4,3 @@ margin-right: auto; padding-right: 7px; } - -.wiki-last-edit-by { - font-size: 80%; - font-weight: normal; -} diff --git a/app/controllers/emojis_controller.rb b/app/controllers/emojis_controller.rb new file mode 100644 index 00000000000..1bec5a7d27f --- /dev/null +++ b/app/controllers/emojis_controller.rb @@ -0,0 +1,6 @@ +class EmojisController < ApplicationController + layout false + + def index + end +end diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index a8f091819ca..00df1c9c965 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -64,9 +64,9 @@ class Projects::RefsController < Projects::ApplicationController } end - if @logs.present? - @log_url = namespace_project_tree_url(@project.namespace, @project, tree_join(@ref, @path || '/')) - @more_log_url = logs_file_namespace_project_ref_path(@project.namespace, @project, @ref, @path || '', offset: (@offset + @limit)) + offset = (@offset + @limit) + if contents.size > offset + @more_log_url = logs_file_namespace_project_ref_path(@project.namespace, @project, @ref, @path || '', offset: offset) end respond_to do |format| diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index dbc8eda6196..1136afbf29c 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -1,6 +1,6 @@ - page_title "Sign in" %div - - if signin_enabled? || ldap_enabled? + - if signin_enabled? || ldap_enabled? || crowd_enabled? = render 'devise/shared/signin_box' -# Omniauth fits between signin/ldap signin and signup and does not have a surrounding box diff --git a/app/views/emojis/index.html.haml b/app/views/emojis/index.html.haml new file mode 100644 index 00000000000..b66e513e4d2 --- /dev/null +++ b/app/views/emojis/index.html.haml @@ -0,0 +1,9 @@ +.emoji-menu + .emoji-menu-content + = text_field_tag :emoji_search, "", class: "emoji-search search-input form-control" + - AwardEmoji.emoji_by_category.each do |category, emojis| + %h5= AwardEmoji::CATEGORIES[category] + %ul + - emojis.each do |emoji| + %li + = emoji_icon(emoji["name"], emoji["unicode"], emoji["aliases"])
\ No newline at end of file diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml index 9c16ab7e30f..209729dc7ee 100644 --- a/app/views/groups/_projects.html.haml +++ b/app/views/groups/_projects.html.haml @@ -1,11 +1,12 @@ .top-area .nav-controls = form_tag request.original_url, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f| - = search_field_tag :filter_projects, params[:filter_projects], placeholder: 'Filter by name...', class: 'input-short project-filter-form-field form-control projects-list-filter', spellcheck: false, id: 'project-filter-form-field' - - if current_user && current_user.can_create_project? - = link_to new_project_path, class: 'btn btn-new' do - = icon('plus') - New Project + - if @projects.present? + = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false + - if can? current_user, :create_projects, @group + = link_to new_project_path(namespace_id: @group.id), class: 'btn btn-new pull-right' do + = icon('plus') + New Project .projects-list-holder = render 'shared/projects/list', projects: @projects, projects_limit: 20, stars: false, skip_namespace: true diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index a0ba11b11a1..6148d8cb3d2 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -32,10 +32,9 @@ %li.active = link_to "#activity", 'data-toggle' => 'tab' do Activity - - if @projects.present? - %li - = link_to "#projects", 'data-toggle' => 'tab' do - Projects + %li + = link_to "#projects", 'data-toggle' => 'tab' do + Projects - if can?(current_user, :read_group, @group) %div{ class: container_class } diff --git a/app/views/help/_shortcuts.html.haml b/app/views/help/_shortcuts.html.haml index 8e982718d23..82d2d4aabed 100644 --- a/app/views/help/_shortcuts.html.haml +++ b/app/views/help/_shortcuts.html.haml @@ -229,6 +229,10 @@ %td.shortcut .key r %td Reply (quoting selected text) + %tr + %td.shortcut + .key e + %td Edit issue %tbody{ class: 'hidden-shortcut merge_requests', style: 'display:none' } %tr %th @@ -245,3 +249,7 @@ %td.shortcut .key r %td Reply (quoting selected text) + %tr + %td.shortcut + .key e + %td Edit merge request diff --git a/app/views/profiles/applications.html.haml b/app/views/profiles/applications.html.haml index 0436c2213da..86f35823406 100644 --- a/app/views/profiles/applications.html.haml +++ b/app/views/profiles/applications.html.haml @@ -1,7 +1,7 @@ - page_title "Applications" - header_title page_title, applications_profile_path -.gray-content-block.top-block +.alert.alert-help.prepend-top-default - if user_oauth_applications? Manage applications that can use GitLab as an OAuth provider, and applications that you've authorized to use your account. diff --git a/app/views/profiles/audit_log.html.haml b/app/views/profiles/audit_log.html.haml index 8fdba45b193..8f45f41cfe3 100644 --- a/app/views/profiles/audit_log.html.haml +++ b/app/views/profiles/audit_log.html.haml @@ -1,7 +1,7 @@ - page_title "Audit Log" - header_title page_title, audit_log_profile_path -.gray-content-block.top-block +.alert.alert-help.prepend-top-default History of authentications .prepend-top-default diff --git a/app/views/profiles/emails/index.html.haml b/app/views/profiles/emails/index.html.haml index 1d140347a5f..705e1804717 100644 --- a/app/views/profiles/emails/index.html.haml +++ b/app/views/profiles/emails/index.html.haml @@ -1,24 +1,22 @@ - page_title "Emails" - header_title page_title, profile_emails_path -.gray-content-block.top-block - Control emails linked to your account - -%ul.prepend-top-default - %li - Your - %b Primary Email - will be used for avatar detection and web based operations, such as edits and merges. - %li - Your - %b Notification Email - will be used for account notifications. - %li - Your - %b Public Email - will be displayed on your public profile. - %li - All email addresses will be used to identify your commits. +.alert.alert-help.prepend-top-default + %ul + %li + Your + %b Primary Email + will be used for avatar detection and web based operations, such as edits and merges. + %li + Your + %b Notification Email + will be used for account notifications. + %li + Your + %b Public Email + will be displayed on your public profile. + %li + All email addresses will be used to identify your commits. .panel.panel-default .panel-heading diff --git a/app/views/profiles/keys/index.html.haml b/app/views/profiles/keys/index.html.haml index 17a4195030e..c9a6a93f545 100644 --- a/app/views/profiles/keys/index.html.haml +++ b/app/views/profiles/keys/index.html.haml @@ -1,14 +1,14 @@ - page_title "SSH Keys" - header_title page_title, profile_keys_path -.gray-content-block.top-block - .pull-right +.top-area + .nav-text + Before you can add an SSH key you need to + = link_to "generate it.", help_page_path("ssh", "README") + .nav-controls = link_to new_profile_key_path, class: "btn btn-new" do = icon('plus') Add SSH Key - .oneline - Before you can add an SSH key you need to - = link_to "generate it.", help_page_path("ssh", "README") .prepend-top-default = render 'key_table' diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml index 0bcadc965fa..d5f61d9f0ca 100644 --- a/app/views/profiles/notifications/show.html.haml +++ b/app/views/profiles/notifications/show.html.haml @@ -1,9 +1,6 @@ - page_title "Notifications" - header_title page_title, profile_notifications_path -.gray-content-block.top-block - These are your global notification settings. - .prepend-top-default = form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications form-horizontal global-notifications-form' } do |f| -if @user.errors.any? diff --git a/app/views/profiles/passwords/edit.html.haml b/app/views/profiles/passwords/edit.html.haml index fab7c45c9b2..ab070c09beb 100644 --- a/app/views/profiles/passwords/edit.html.haml +++ b/app/views/profiles/passwords/edit.html.haml @@ -1,7 +1,7 @@ - page_title "Password" - header_title page_title, edit_profile_password_path -.gray-content-block.top-block +.alert.alert-help.prepend-top-default - if @user.password_automatically_set? Set your password. - else diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 877589dc390..1a53b4393e4 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -1,8 +1,7 @@ - page_title 'Preferences' - header_title page_title, profile_preferences_path -- @blank_container = true -.alert.alert-help +.alert.alert-help.prepend-top-default These settings allow you to customize the appearance and behavior of the site. They are saved with your account and will persist to any device you use to access the site. diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index add9a00138b..5051c6bf83b 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -1,4 +1,4 @@ -.gray-content-block.top-block +.alert.alert-help.prepend-top-default This information will appear on your profile. - if current_user.ldap_user? Some options are unavailable for LDAP accounts diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml index 5e3bd14565e..14f1d3226bb 100644 --- a/app/views/projects/builds/index.html.haml +++ b/app/views/projects/builds/index.html.haml @@ -51,9 +51,11 @@ %th Name %th Duration %th Finished at + - if @project.build_coverage_enabled? + %th Coverage %th - @builds.each do |build| - = render 'projects/commit_statuses/commit_status', commit_status: build, commit_sha: true, stage: true, allow_retry: true + = render 'projects/commit_statuses/commit_status', commit_status: build, commit_sha: true, stage: true, coverage: @project.build_coverage_enabled?, allow_retry: true = paginate @builds, theme: 'gitlab' diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 042f660077e..f2e56081afe 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -1,5 +1,3 @@ -- @blank_container = true - .project-edit-container.prepend-top-default .project-edit-errors .project-edit-content diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index b34d106d565..6ad7b05155a 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -18,7 +18,7 @@ = link_to "adding README", new_readme_path, class: 'underlined-link' file to this project. -- if can?(current_user, :download_code, @project) +- if can?(current_user, :push_code, @project) %div{ class: container_class } .prepend-top-20 .empty_wrapper diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 673020a4e30..eb9c225df2f 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -1,7 +1,7 @@ - content_for :note_actions do - if can?(current_user, :update_issue, @issue) - = link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-reopen btn-comment js-note-target-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen Issue' - = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-close btn-comment js-note-target-close #{issue_button_visibility(@issue, true)}", title: 'Close Issue' + = link_to 'Reopen issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-reopen btn-comment js-note-target-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen issue' + = link_to 'Close issue', issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-close btn-comment js-note-target-close #{issue_button_visibility(@issue, true)}", title: 'Close issue' #notes = render 'projects/notes/notes_with_form' diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index 69a0e2a0c4d..1173e0a78c7 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -8,12 +8,12 @@ .detail-page-header .pull-right - if can?(current_user, :create_issue, @project) - = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-nr btn-grouped new-issue-link btn-success', title: 'New Issue', id: 'new_issue_link' do + = link_to new_namespace_project_issue_path(@project.namespace, @project), class: 'btn btn-nr btn-grouped new-issue-link btn-success', title: 'New issue', id: 'new_issue_link' do = icon('plus') - New Issue + New issue - if can?(current_user, :update_issue, @issue) - = link_to 'Reopen', issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen Issue' - = link_to 'Close', issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-close #{issue_button_visibility(@issue, true)}", title: 'Close Issue' + = link_to 'Reopen issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen issue' + = link_to 'Close issue', issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-close #{issue_button_visibility(@issue, true)}", title: 'Close issue' = link_to edit_namespace_project_issue_path(@project.namespace, @project, @issue), class: 'btn btn-nr btn-grouped issuable-edit' do = icon('pencil-square-o') diff --git a/app/views/projects/refs/logs_tree.js.haml b/app/views/projects/refs/logs_tree.js.haml index db7f244d002..8ee2aef0e61 100644 --- a/app/views/projects/refs/logs_tree.js.haml +++ b/app/views/projects/refs/logs_tree.js.haml @@ -8,12 +8,9 @@ row.find("td.tree_time_ago").html('#{escape_javascript time_ago_with_tooltip(commit.committed_date)}'); row.find("td.tree_commit").html('#{escape_javascript render("projects/tree/tree_commit_column", commit: commit)}'); -- if @logs.present? +- if @more_log_url :plain - var current_url = location.href.replace(/\/?$/, '/'); - var log_url = "#{escape_javascript(@log_url)}".replace(/\/?$/, '/'); - - if(current_url == log_url) { + if($('#tree-slider').length) { // Load more commit logs for each file in tree // if we still on the same page var url = "#{escape_javascript(@more_log_url)}"; diff --git a/app/views/projects/wikis/_main_links.html.haml b/app/views/projects/wikis/_main_links.html.haml index 29bf5d62abe..2b91b7e8f65 100644 --- a/app/views/projects/wikis/_main_links.html.haml +++ b/app/views/projects/wikis/_main_links.html.haml @@ -1,12 +1,11 @@ -%span.pull-right - - if (@page && @page.persisted?) - = link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn btn-grouped" do - Page History - - if can?(current_user, :create_wiki, @project) - = link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn btn-grouped" do - %i.fa.fa-pencil-square-o - Edit - - if can?(current_user, :admin_wiki, @project) - = link_to namespace_project_wiki_path(@project.namespace, @project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-remove" do - = icon('trash') - Delete +- if (@page && @page.persisted?) + = link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn btn-grouped" do + Page History + - if can?(current_user, :create_wiki, @project) + = link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn btn-grouped" do + %i.fa.fa-pencil-square-o + Edit + - if can?(current_user, :admin_wiki, @project) + = link_to namespace_project_wiki_path(@project.namespace, @project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-remove" do + = icon('trash') + Delete diff --git a/app/views/projects/wikis/_nav.html.haml b/app/views/projects/wikis/_nav.html.haml index 56a53ffff2a..a722fbc5352 100644 --- a/app/views/projects/wikis/_nav.html.haml +++ b/app/views/projects/wikis/_nav.html.haml @@ -16,4 +16,4 @@ = icon('plus') New Page - = render 'projects/wikis/new' += render 'projects/wikis/new' diff --git a/app/views/projects/wikis/_new.html.haml b/app/views/projects/wikis/_new.html.haml index 53b37b1104e..919daf0a7b2 100644 --- a/app/views/projects/wikis/_new.html.haml +++ b/app/views/projects/wikis/_new.html.haml @@ -5,9 +5,10 @@ %a.close{href: "#", "data-dismiss" => "modal"} × %h3.page-title New Wiki Page .modal-body - .form-group - = label_tag :new_wiki_path do - %span Page slug - = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'form-control', required: true, :'data-wikis-path' => namespace_project_wikis_path(@project.namespace, @project) - .form-actions - = link_to 'Create Page', '#', class: 'build-new-wiki btn btn-create' + %form.new-wiki-page + .form-group + = label_tag :new_wiki_path do + %span Page slug + = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'form-control', required: true, :'data-wikis-path' => namespace_project_wikis_path(@project.namespace, @project), autofocus: true + .form-actions + = button_tag 'Create Page', class: 'build-new-wiki btn btn-create' diff --git a/app/views/projects/wikis/edit.html.haml b/app/views/projects/wikis/edit.html.haml index 23f64fbbd10..4dd818c7f67 100644 --- a/app/views/projects/wikis/edit.html.haml +++ b/app/views/projects/wikis/edit.html.haml @@ -1,16 +1,20 @@ - page_title "Edit", @page.title.capitalize, "Wiki" = render "header_title" - = render 'nav' -.gray-content-block - .pull-right + +.top-area + .nav-text + %strong + - if @page.persisted? + = link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page) + - else + = @page.title.capitalize + %span.light + · + Edit Page + + .nav-controls = render 'main_links' - %h3.page-title.oneline - %span.light Edit Page - - if @page.persisted? - = link_to @page.title, namespace_project_wiki_path(@project.namespace, @project, @page) - - else - = @page.title = render 'form' diff --git a/app/views/projects/wikis/history.html.haml b/app/views/projects/wikis/history.html.haml index 4322146ce34..dcaddae2b04 100644 --- a/app/views/projects/wikis/history.html.haml +++ b/app/views/projects/wikis/history.html.haml @@ -1,11 +1,14 @@ - page_title "History", @page.title.capitalize, "Wiki" = render "header_title" - = render 'nav' -.gray-content-block - %h3.page-title - %span.light History for - = link_to @page.title, namespace_project_wiki_path(@project.namespace, @project, @page) + +.top-area + .nav-text + %strong + = link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page) + %span.light + · + History .table-holder %table.table diff --git a/app/views/projects/wikis/pages.html.haml b/app/views/projects/wikis/pages.html.haml index aae1ad69ad9..92b494a513c 100644 --- a/app/views/projects/wikis/pages.html.haml +++ b/app/views/projects/wikis/pages.html.haml @@ -2,15 +2,12 @@ = render "header_title" = render 'nav' -.gray-content-block - All pages in this wiki are listed below. - + %ul.content-list - @wiki_pages.each do |wiki_page| %li - %h4 - = link_to wiki_page.title, namespace_project_wiki_path(@project.namespace, @project, wiki_page) - %small (#{wiki_page.format}) - .pull-right - %small Last edited #{time_ago_with_tooltip(wiki_page.commit.authored_date)} + = link_to wiki_page.title, namespace_project_wiki_path(@project.namespace, @project, wiki_page) + %small (#{wiki_page.format}) + .pull-right + %small Last edited #{time_ago_with_tooltip(wiki_page.commit.authored_date)} = paginate @wiki_pages, theme: 'gitlab' diff --git a/app/views/projects/wikis/show.html.haml b/app/views/projects/wikis/show.html.haml index 309d40f52bc..067fb7f8f54 100644 --- a/app/views/projects/wikis/show.html.haml +++ b/app/views/projects/wikis/show.html.haml @@ -1,17 +1,18 @@ - page_title @page.title.capitalize, "Wiki" = render "header_title" - = render 'nav' -.gray-content-block - = render 'main_links' - %h3.page-title.oneline - = @page.title.capitalize +.top-area + .nav-text + %strong= @page.title.capitalize %span.wiki-last-edit-by · last edited by #{@page.commit.author.name} #{time_ago_with_tooltip(@page.commit.authored_date)} + .nav-controls + = render 'main_links' + - if @page.historical? .warning_message This is an old version of this page. diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 3bfd781e51d..d109635fa1e 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -35,35 +35,37 @@ = @user.name .cover-desc - %span - @#{@user.username}. - - if @user.bio.present? - %span - #{@user.bio}. - %span + %span.middle-dot-divider + @#{@user.username} + %span.middle-dot-divider Member since #{@user.created_at.to_s(:medium)} + + - if @user.bio.present? + .cover-desc + %p.profile-user-bio + = @user.bio .cover-desc - unless @user.public_email.blank? - .profile-link-holder + .profile-link-holder.middle-dot-divider = link_to @user.public_email, "mailto:#{@user.public_email}" - unless @user.skype.blank? - .profile-link-holder + .profile-link-holder.middle-dot-divider = link_to "skype:#{@user.skype}", title: "Skype" do = icon('skype') - unless @user.linkedin.blank? - .profile-link-holder + .profile-link-holder.middle-dot-divider = link_to "https://www.linkedin.com/in/#{@user.linkedin}", title: "LinkedIn" do = icon('linkedin-square') - unless @user.twitter.blank? - .profile-link-holder + .profile-link-holder.middle-dot-divider = link_to "https://twitter.com/#{@user.twitter}", title: "Twitter" do = icon('twitter-square') - unless @user.website_url.blank? - .profile-link-holder + .profile-link-holder.middle-dot-divider = link_to @user.short_website_url, @user.full_website_url - unless @user.location.blank? - .profile-link-holder + .profile-link-holder.middle-dot-divider = icon('map-marker') = @user.location diff --git a/app/views/votes/_votes_block.html.haml b/app/views/votes/_votes_block.html.haml index 91c5b7eac5e..176fd29cb57 100644 --- a/app/views/votes/_votes_block.html.haml +++ b/app/views/votes/_votes_block.html.haml @@ -9,15 +9,6 @@ .awards-controls %a.add-award{"href" => "#"} = icon('smile-o') - .emoji-menu - .emoji-menu-content - = text_field_tag :emoji_search, "", class: "emoji-search search-input form-control" - - AwardEmoji.emoji_by_category.each do |category, emojis| - %h5= AwardEmoji::CATEGORIES[category] - %ul - - emojis.each do |emoji| - %li - = emoji_icon(emoji["name"], emoji["unicode"], emoji["aliases"]) - if current_user :javascript |