Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/application.js.coffee4
-rw-r--r--app/assets/javascripts/behaviors/toggle_diff_line_wrap_behavior.coffee14
-rw-r--r--app/assets/javascripts/calendar.js.coffee17
-rw-r--r--app/assets/javascripts/issue.js.coffee2
-rw-r--r--app/assets/javascripts/merge_request.js.coffee4
-rw-r--r--app/assets/javascripts/notes.js.coffee2
-rw-r--r--app/assets/javascripts/notes_votes.js.coffee20
-rw-r--r--app/assets/stylesheets/base/gl_variables.scss755
-rw-r--r--app/assets/stylesheets/base/variables.scss14
-rw-r--r--app/assets/stylesheets/generic/calendar.scss62
-rw-r--r--app/assets/stylesheets/generic/common.scss19
-rw-r--r--app/assets/stylesheets/generic/files.scss2
-rw-r--r--app/assets/stylesheets/generic/forms.scss4
-rw-r--r--app/assets/stylesheets/generic/lists.scss11
-rw-r--r--app/assets/stylesheets/generic/nav_sidebar.scss32
-rw-r--r--app/assets/stylesheets/generic/selects.scss48
-rw-r--r--app/assets/stylesheets/generic/timeline.scss4
-rw-r--r--app/assets/stylesheets/generic/typography.scss3
-rw-r--r--app/assets/stylesheets/pages/dashboard.scss17
-rw-r--r--app/assets/stylesheets/pages/diff.scss6
-rw-r--r--app/assets/stylesheets/pages/editor.scss2
-rw-r--r--app/assets/stylesheets/pages/events.scss6
-rw-r--r--app/assets/stylesheets/pages/groups.scss1
-rw-r--r--app/assets/stylesheets/pages/header.scss2
-rw-r--r--app/assets/stylesheets/pages/issuable.scss8
-rw-r--r--app/assets/stylesheets/pages/issues.scss35
-rw-r--r--app/assets/stylesheets/pages/merge_requests.scss12
-rw-r--r--app/assets/stylesheets/pages/profile.scss5
-rw-r--r--app/assets/stylesheets/pages/projects.scss8
-rw-r--r--app/assets/stylesheets/pages/tree.scss4
-rw-r--r--app/assets/stylesheets/pages/votes.scss35
-rw-r--r--app/controllers/profiles_controller.rb5
-rw-r--r--app/controllers/projects/merge_requests_controller.rb4
-rw-r--r--app/controllers/projects/services_controller.rb2
-rw-r--r--app/controllers/search_controller.rb46
-rw-r--r--app/controllers/users_controller.rb19
-rw-r--r--app/helpers/events_helper.rb2
-rw-r--r--app/helpers/external_wiki_helper.rb11
-rw-r--r--app/helpers/gitlab_routing_helper.rb1
-rw-r--r--app/helpers/merge_requests_helper.rb2
-rw-r--r--app/helpers/projects_helper.rb37
-rw-r--r--app/models/event.rb2
-rw-r--r--app/models/merge_request.rb4
-rw-r--r--app/models/note.rb33
-rw-r--r--app/models/project.rb1
-rw-r--r--app/models/project_contributions.rb9
-rw-r--r--app/models/project_services/bamboo_service.rb4
-rw-r--r--app/models/project_services/buildbox_service.rb4
-rw-r--r--app/models/project_services/ci_service.rb4
-rw-r--r--app/models/project_services/external_wiki_service.rb48
-rw-r--r--app/models/project_services/gitlab_ci_service.rb20
-rw-r--r--app/models/project_services/teamcity_service.rb4
-rw-r--r--app/models/repository.rb38
-rw-r--r--app/models/service.rb26
-rw-r--r--app/models/tree.rb54
-rw-r--r--app/services/git_push_service.rb2
-rw-r--r--app/services/merge_requests/refresh_service.rb2
-rw-r--r--app/services/notification_service.rb2
-rw-r--r--app/views/admin/application_settings/_form.html.haml4
-rw-r--r--app/views/dashboard/_projects.html.haml6
-rw-r--r--app/views/dashboard/projects/starred.html.haml6
-rw-r--r--app/views/events/event/_push.html.haml10
-rw-r--r--app/views/groups/_projects.html.haml6
-rw-r--r--app/views/groups/group_members/_group_member.html.haml6
-rw-r--r--app/views/groups/show.html.haml15
-rw-r--r--app/views/layouts/nav/_project.html.haml2
-rw-r--r--app/views/notify/project_was_moved_email.html.haml4
-rw-r--r--app/views/profiles/show.html.haml3
-rw-r--r--app/views/projects/_commit_button.html.haml3
-rw-r--r--app/views/projects/_issuable_form.html.haml4
-rw-r--r--app/views/projects/diffs/_diffs.html.haml2
-rw-r--r--app/views/projects/diffs/_file.html.haml12
-rw-r--r--app/views/projects/diffs/_stats.html.haml7
-rw-r--r--app/views/projects/issues/_discussion.html.haml12
-rw-r--r--app/views/projects/issues/_issue.html.haml2
-rw-r--r--app/views/projects/issues/_issue_context.html.haml31
-rw-r--r--app/views/projects/issues/index.html.haml2
-rw-r--r--app/views/projects/merge_requests/_discussion.html.haml10
-rw-r--r--app/views/projects/merge_requests/_merge_request.html.haml2
-rw-r--r--app/views/projects/merge_requests/_new_submit.html.haml4
-rw-r--r--app/views/projects/merge_requests/show/_context.html.haml27
-rw-r--r--app/views/projects/merge_requests/show/_mr_ci.html.haml6
-rw-r--r--app/views/projects/new.html.haml103
-rw-r--r--app/views/projects/project_members/_project_member.html.haml8
-rw-r--r--app/views/projects/protected_branches/index.html.haml10
-rw-r--r--app/views/projects/services/_form.html.haml5
-rw-r--r--app/views/projects/show.html.haml21
-rw-r--r--app/views/shared/_group_form.html.haml2
-rw-r--r--app/views/users/_profile.html.haml6
-rw-r--r--app/views/users/calendar.html.haml3
-rw-r--r--app/views/users/calendar_activities.html.haml33
-rw-r--r--app/views/users/show.html.haml33
-rw-r--r--app/views/votes/_votes_block.html.haml14
-rw-r--r--app/views/votes/_votes_inline.html.haml4
-rw-r--r--app/workers/irker_worker.rb6
95 files changed, 707 insertions, 1271 deletions
diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee
index c7acde2afe5..fda142293bc 100644
--- a/app/assets/javascripts/application.js.coffee
+++ b/app/assets/javascripts/application.js.coffee
@@ -169,9 +169,7 @@ $ ->
# Show/hide comments on diff
$("body").on "click", ".js-toggle-diff-comments", (e) ->
- $(@).find('i').
- toggleClass('fa fa-chevron-down').
- toggleClass('fa fa-chevron-up')
+ $(@).toggleClass('active')
$(@).closest(".diff-file").find(".notes_holder").toggle()
e.preventDefault()
diff --git a/app/assets/javascripts/behaviors/toggle_diff_line_wrap_behavior.coffee b/app/assets/javascripts/behaviors/toggle_diff_line_wrap_behavior.coffee
deleted file mode 100644
index 691ed4f98ae..00000000000
--- a/app/assets/javascripts/behaviors/toggle_diff_line_wrap_behavior.coffee
+++ /dev/null
@@ -1,14 +0,0 @@
-$ ->
- # Toggle line wrapping in diff.
- #
- # %div.diff-file
- # %input.js-toggle-diff-line-wrap
- # %td.line_content
- #
- $("body").on "click", ".js-toggle-diff-line-wrap", (e) ->
- diffFile = $(@).closest(".diff-file")
- if $(@).is(":checked")
- diffFile.addClass("diff-wrap-lines")
- else
- diffFile.removeClass("diff-wrap-lines")
-
diff --git a/app/assets/javascripts/calendar.js.coffee b/app/assets/javascripts/calendar.js.coffee
index 19ea4ccc4cf..2891a48e249 100644
--- a/app/assets/javascripts/calendar.js.coffee
+++ b/app/assets/javascripts/calendar.js.coffee
@@ -4,7 +4,7 @@ class @calendar
day: "numeric"
year: "numeric"
- constructor: (timestamps, starting_year, starting_month) ->
+ constructor: (timestamps, starting_year, starting_month, calendar_activities_path) ->
cal = new CalHeatMap()
cal.init
itemName: ["commit"]
@@ -26,5 +26,16 @@ class @calendar
]
legendCellPadding: 3
onClick: (date, count) ->
- return
- return
+ formated_date = date.getFullYear() + "-" + (date.getMonth()+1) + "-" + date.getDate()
+ $(".calendar_commit_activity").fadeOut 400
+ $.ajax
+ url: calendar_activities_path
+ data:
+ date: formated_date
+ cache: false
+ dataType: "html"
+ success: (data) ->
+ $(".user-calendar-activities").html data
+ $(".calendar_commit_activity").find(".js-toggle-content").hide()
+ $(".calendar_commit_activity").fadeIn 400
+
diff --git a/app/assets/javascripts/issue.js.coffee b/app/assets/javascripts/issue.js.coffee
index f2753170478..bf71c144eaf 100644
--- a/app/assets/javascripts/issue.js.coffee
+++ b/app/assets/javascripts/issue.js.coffee
@@ -19,6 +19,6 @@ class @Issue
$('.issue-details').waitForImages ->
$('.issuable-affix').affix offset:
top: ->
- @top = $('.issue-details').outerHeight(true) + 25
+ @top = ($('.issuable-affix').offset().top - 70)
bottom: ->
@bottom = $('.footer').outerHeight(true)
diff --git a/app/assets/javascripts/merge_request.js.coffee b/app/assets/javascripts/merge_request.js.coffee
index 1fee9dc1892..09c202e42a5 100644
--- a/app/assets/javascripts/merge_request.js.coffee
+++ b/app/assets/javascripts/merge_request.js.coffee
@@ -23,7 +23,7 @@ class @MergeRequest
$('.merge-request-details').waitForImages ->
$('.issuable-affix').affix offset:
top: ->
- @top = $('.merge-request-details').outerHeight(true) + 91
+ @top = ($('.issuable-affix').offset().top - 70)
bottom: ->
@bottom = $('.footer').outerHeight(true)
@@ -110,7 +110,7 @@ class @MergeRequest
showCiState: (state) ->
$('.ci_widget').hide()
- allowed_states = ["failed", "running", "pending", "success"]
+ allowed_states = ["failed", "canceled", "running", "pending", "success"]
if state in allowed_states
$('.ci_widget.ci-' + state).show()
else
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee
index 90e6fd6d154..c366c98cf54 100644
--- a/app/assets/javascripts/notes.js.coffee
+++ b/app/assets/javascripts/notes.js.coffee
@@ -425,7 +425,7 @@ class @Notes
@removeDiscussionNoteForm(form)
updateVotes: ->
- (new NotesVotes).updateVotes()
+ true
###
Called after an attachment file has been selected.
diff --git a/app/assets/javascripts/notes_votes.js.coffee b/app/assets/javascripts/notes_votes.js.coffee
deleted file mode 100644
index 65c149b7886..00000000000
--- a/app/assets/javascripts/notes_votes.js.coffee
+++ /dev/null
@@ -1,20 +0,0 @@
-class @NotesVotes
- updateVotes: ->
- votes = $("#votes .votes")
- notes = $("#notes-list .note .vote")
-
- # only update if there is a vote display
- if votes.size()
- upvotes = notes.filter(".upvote").size()
- downvotes = notes.filter(".downvote").size()
- votesCount = upvotes + downvotes
- upvotesPercent = (if votesCount then (100.0 / votesCount * upvotes) else 0)
- downvotesPercent = (if votesCount then (100.0 - upvotesPercent) else 0)
-
- # change vote bar lengths
- votes.find(".bar-success").css "width", upvotesPercent + "%"
- votes.find(".bar-danger").css "width", downvotesPercent + "%"
-
- # replace vote numbers
- votes.find(".upvotes").text votes.find(".upvotes").text().replace(/\d+/, upvotes)
- votes.find(".downvotes").text votes.find(".downvotes").text().replace(/\d+/, downvotes)
diff --git a/app/assets/stylesheets/base/gl_variables.scss b/app/assets/stylesheets/base/gl_variables.scss
index ce82ad80318..17b5622d74a 100644
--- a/app/assets/stylesheets/base/gl_variables.scss
+++ b/app/assets/stylesheets/base/gl_variables.scss
@@ -1,5 +1,5 @@
// Override Bootstrap variables here (defaults from bootstrap-sass v3.3.3):
-
+// For all variables see https://github.com/twbs/bootstrap-sass/blob/master/templates/project/_bootstrap-variables.sass
//
// Variables
// --------------------------------------------------
@@ -15,12 +15,6 @@
// $gray: lighten($gray-base, 33.5%) // #555
// $gray-light: lighten($gray-base, 46.7%) // #777
// $gray-lighter: lighten($gray-base, 93.5%) // #eee
-$gray-base: #000;
-$gray-darker: lighten($gray-base, 13.5%); // #222
-$gray-dark: #7b8a8b; // #333
-$gray: #95a5a6; // #555
-$gray-light: #b4bcc2; // #999
-$gray-lighter: #ecf0f1; // #eee
$brand-primary: $gl-primary;
$brand-success: $gl-success;
@@ -31,68 +25,17 @@ $brand-danger: $gl-danger;
//== Scaffolding
//
-//## Settings for some of the most global styles.
-
-//** Background color for `<body>`.
-// $body-bg: #fff
-//** Global text color on `<body>`.
-$text-color: $brand-primary;
-
-//** Global textual link color.
+$text-color: $gl-text-color;
$link-color: $gl-link-color;
-//** Link hover color set via `darken()` function.
-// $link-hover-color: darken($link-color, 15%)
-//** Link hover decoration.
-// $link-hover-decoration: underline
//== Typography
//
//## Font, line-height, and color for body text, headings, and more.
-// $font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif
-// $font-family-serif: Georgia, "Times New Roman", Times, serif
-//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
-// $font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace
-// $font-family-base: $font-family-sans-serif
-
-$font-size-base: $gl-font-size;
-// $font-size-large: ceil(($font-size-base * 1.25)) // ~18px
-// $font-size-small: ceil(($font-size-base * 0.85)) // ~12px
-
-// $font-size-h1: floor(($font-size-base * 2.6)) // ~36px
-// $font-size-h2: floor(($font-size-base * 2.15)) // ~30px
-// $font-size-h3: ceil(($font-size-base * 1.7)) // ~24px
-// $font-size-h4: ceil(($font-size-base * 1.25)) // ~18px
-// $font-size-h5: $font-size-base
-// $font-size-h6: ceil(($font-size-base * 0.85)) // ~12px
-
-//** Unit-less `line-height` for use in components like buttons.
-// $line-height-base: 1.428571429 // 20/14
-//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
-// $line-height-computed: floor(($font-size-base * $line-height-base)) // ~20px
-
-//** By default, this inherits from the `<body>`.
-// $headings-font-family: inherit
-// $headings-font-weight: 500
-// $headings-line-height: 1.1
-// $headings-color: inherit
-
-
-//== Iconography
-//
-//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
-
-//** Load fonts from this directory.
-
-// [converter] If $bootstrap-sass-asset-helper if used, provide path relative to the assets load path.
-// [converter] This is because some asset helpers, such as Sprockets, do not work with file-relative paths.
-// $icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/")
-
-//** File name for all font files.
-// $icon-font-name: "glyphicons-halflings-regular"
-//** Element ID within SVG icon file.
-// $icon-font-svg-id: "glyphicons_halflingsregular"
+$font-family-sans-serif: $regular_font;
+$font-family-monospace: $monospace_font;
+$font-size-base: $gl-font-size;
//== Components
@@ -102,348 +45,15 @@ $font-size-base: $gl-font-size;
$padding-base-vertical: 6px;
$padding-base-horizontal: 14px;
-// $padding-large-vertical: 10px
-// $padding-large-horizontal: 16px
-
-// $padding-small-vertical: 5px
-// $padding-small-horizontal: 10px
-
-// $padding-xs-vertical: 1px
-// $padding-xs-horizontal: 5px
-
-// $line-height-large: 1.3333333 // extra decimals for Win 8.1 Chrome
-// $line-height-small: 1.5
-
-// $border-radius-base: 4px
-// $border-radius-large: 6px
-// $border-radius-small: 3px
-
-//** Global color for active items (e.g., navs or dropdowns).
-// $component-active-color: #fff
-//** Global background color for active items (e.g., navs or dropdowns).
-// $component-active-bg: $brand-primary
-
-//** Width of the `border` for generating carets that indicator dropdowns.
-// $caret-width-base: 4px
-//** Carets increase slightly in size for larger components.
-// $caret-width-large: 5px
-
-
-//== Tables
-//
-//## Customizes the `.table` component with basic values, each used across all table variations.
-
-//** Padding for `<th>`s and `<td>`s.
-// $table-cell-padding: 8px
-//** Padding for cells in `.table-condensed`.
-// $table-condensed-cell-padding: 5px
-
-//** Default background color used for all tables.
-// $table-bg: transparent
-//** Background color used for `.table-striped`.
-// $table-bg-accent: #f9f9f9
-//** Background color used for `.table-hover`.
-// $table-bg-hover: #f5f5f5
-// $table-bg-active: $table-bg-hover
-
-//** Border color for table and cell borders.
-// $table-border-color: #ddd
-
-
-//== Buttons
-//
-//## For each of Bootstrap's buttons, define text, background and border color.
-
-// $btn-font-weight: normal
-
-// $btn-default-color: #333
-// $btn-default-bg: #fff
-// $btn-default-border: #ccc
-
-// $btn-primary-color: #fff
-// $btn-primary-bg: $brand-primary
-// $btn-primary-border: darken($btn-primary-bg, 5%)
-
-// $btn-success-color: #fff
-// $btn-success-bg: $brand-success
-// $btn-success-border: darken($btn-success-bg, 5%)
-
-// $btn-info-color: #fff
-// $btn-info-bg: $brand-info
-// $btn-info-border: darken($btn-info-bg, 5%)
-
-// $btn-warning-color: #fff
-// $btn-warning-bg: $brand-warning
-// $btn-warning-border: darken($btn-warning-bg, 5%)
-
-// $btn-danger-color: #fff
-// $btn-danger-bg: $brand-danger
-// $btn-danger-border: darken($btn-danger-bg, 5%)
-
-// $btn-link-disabled-color: $gray-light
-
//== Forms
//
//##
-//** `<input>` background color
-// $input-bg: #fff
-//** `<input disabled>` background color
-// $input-bg-disabled: $gray-lighter
-
-//** Text color for `<input>`s
$input-color: $text-color;
-//** `<input>` border color
-$input-border: #dce4ec;
-
-// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
-//** Default `.form-control` border radius
-// This has no effect on `<select>`s in some browsers, due to the limited stylability of `<select>`s in CSS.
-// $input-border-radius: $border-radius-base
-//** Large `.form-control` border radius
-// $input-border-radius-large: $border-radius-large
-//** Small `.form-control` border radius
-// $input-border-radius-small: $border-radius-small
-
-//** Border color for inputs on focus
+$input-border: #DDD;
$input-border-focus: $brand-info;
-
-//** Placeholder text color
-// $input-color-placeholder: #999
-
-//** Default `.form-control` height
-// $input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2)
-//** Large `.form-control` height
-// $input-height-large: (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2)
-//** Small `.form-control` height
-// $input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2)
-
$legend-color: $text-color;
-// $legend-border-color: #e5e5e5
-
-//** Background color for textual input addons
-// $input-group-addon-bg: $gray-lighter
-//** Border color for textual input addons
-// $input-group-addon-border-color: $input-border
-
-//** Disabled cursor for form controls and buttons.
-// $cursor-disabled: not-allowed
-
-
-//== Dropdowns
-//
-//## Dropdown menu container and contents.
-
-//** Background for the dropdown menu.
-// $dropdown-bg: #fff
-//** Dropdown menu `border-color`.
-// $dropdown-border: rgba(0,0,0,.15)
-//** Dropdown menu `border-color` **for IE8**.
-// $dropdown-fallback-border: #ccc
-//** Divider color for between dropdown items.
-// $dropdown-divider-bg: #e5e5e5
-
-//** Dropdown link text color.
-// $dropdown-link-color: $gray-dark
-//** Hover color for dropdown links.
-// $dropdown-link-hover-color: darken($gray-dark, 5%)
-//** Hover background for dropdown links.
-// $dropdown-link-hover-bg: #f5f5f5
-
-//** Active dropdown menu item text color.
-// $dropdown-link-active-color: $component-active-color
-//** Active dropdown menu item background color.
-// $dropdown-link-active-bg: $component-active-bg
-
-//** Disabled dropdown menu item background color.
-// $dropdown-link-disabled-color: $gray-light
-
-//** Text color for headers within dropdown menus.
-// $dropdown-header-color: $gray-light
-
-//** Deprecated `$dropdown-caret-color` as of v3.1.0
-// $dropdown-caret-color: #000
-
-
-//-- Z-index master list
-//
-// Warning: Avoid customizing these values. They're used for a bird's eye view
-// of components dependent on the z-axis and are designed to all work together.
-//
-// Note: These variables are not generated into the Customizer.
-
-// $zindex-navbar: 1000
-// $zindex-dropdown: 1000
-// $zindex-popover: 1060
-// $zindex-tooltip: 1070
-// $zindex-navbar-fixed: 1030
-// $zindex-modal: 1040
-
-
-//== Media queries breakpoints
-//
-//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
-
-// Extra small screen / phone
-//** Deprecated `$screen-xs` as of v3.0.1
-// $screen-xs: 480px
-//** Deprecated `$screen-xs-min` as of v3.2.0
-// $screen-xs-min: $screen-xs
-//** Deprecated `$screen-phone` as of v3.0.1
-// $screen-phone: $screen-xs-min
-
-// Small screen / tablet
-//** Deprecated `$screen-sm` as of v3.0.1
-// $screen-sm: 768px
-// $screen-sm-min: $screen-sm
-//** Deprecated `$screen-tablet` as of v3.0.1
-// $screen-tablet: $screen-sm-min
-
-// Medium screen / desktop
-//** Deprecated `$screen-md` as of v3.0.1
-// $screen-md: 992px
-// $screen-md-min: $screen-md
-//** Deprecated `$screen-desktop` as of v3.0.1
-// $screen-desktop: $screen-md-min
-
-// Large screen / wide desktop
-//** Deprecated `$screen-lg` as of v3.0.1
-// $screen-lg: 1200px
-// $screen-lg-min: $screen-lg
-//** Deprecated `$screen-lg-desktop` as of v3.0.1
-// $screen-lg-desktop: $screen-lg-min
-
-// So media queries don't overlap when required, provide a maximum
-// $screen-xs-max: ($screen-sm-min - 1)
-// $screen-sm-max: ($screen-md-min - 1)
-// $screen-md-max: ($screen-lg-min - 1)
-
-
-//== Grid system
-//
-//## Define your custom responsive grid.
-
-//** Number of columns in the grid.
-// $grid-columns: 12
-//** Padding between columns. Gets divided in half for the left and right.
-// $grid-gutter-width: 30px
-// Navbar collapse
-//** Point at which the navbar becomes uncollapsed.
-// $grid-float-breakpoint: $screen-sm-min
-//** Point at which the navbar begins collapsing.
-// $grid-float-breakpoint-max: ($grid-float-breakpoint - 1)
-
-
-//== Container sizes
-//
-//## Define the maximum width of `.container` for different screen sizes.
-
-// Small screen / tablet
-// $container-tablet: (720px + $grid-gutter-width)
-//** For `$screen-sm-min` and up.
-// $container-sm: $container-tablet
-
-// Medium screen / desktop
-// $container-desktop: (940px + $grid-gutter-width)
-//** For `$screen-md-min` and up.
-// $container-md: $container-desktop
-
-// Large screen / wide desktop
-// $container-large-desktop: (1140px + $grid-gutter-width)
-//** For `$screen-lg-min` and up.
-// $container-lg: $container-large-desktop
-
-
-//== Navbar
-//
-//##
-
-// Basics of a navbar
-// $navbar-height: 50px
-// $navbar-margin-bottom: $line-height-computed
-// $navbar-border-radius: $border-radius-base
-// $navbar-padding-horizontal: floor(($grid-gutter-width / 2))
-// $navbar-padding-vertical: (($navbar-height - $line-height-computed) / 2)
-// $navbar-collapse-max-height: 340px
-
-// $navbar-default-color: #777
-// $navbar-default-bg: #f8f8f8
-// $navbar-default-border: darken($navbar-default-bg, 6.5%)
-
-// Navbar links
-// $navbar-default-link-color: #777
-// $navbar-default-link-hover-color: #333
-// $navbar-default-link-hover-bg: transparent
-// $navbar-default-link-active-color: #555
-// $navbar-default-link-active-bg: darken($navbar-default-bg, 6.5%)
-// $navbar-default-link-disabled-color: #ccc
-// $navbar-default-link-disabled-bg: transparent
-
-// Navbar brand label
-// $navbar-default-brand-color: $navbar-default-link-color
-// $navbar-default-brand-hover-color: darken($navbar-default-brand-color, 10%)
-// $navbar-default-brand-hover-bg: transparent
-
-// Navbar toggle
-// $navbar-default-toggle-hover-bg: #ddd
-// $navbar-default-toggle-icon-bar-bg: #888
-// $navbar-default-toggle-border-color: #ddd
-
-
-// Inverted navbar
-// Reset inverted navbar basics
-// $navbar-inverse-color: lighten($gray-light, 15%)
-// $navbar-inverse-bg: #222
-// $navbar-inverse-border: darken($navbar-inverse-bg, 10%)
-
-// Inverted navbar links
-// $navbar-inverse-link-color: lighten($gray-light, 15%)
-// $navbar-inverse-link-hover-color: #fff
-// $navbar-inverse-link-hover-bg: transparent
-// $navbar-inverse-link-active-color: $navbar-inverse-link-hover-color
-// $navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 10%)
-// $navbar-inverse-link-disabled-color: #444
-// $navbar-inverse-link-disabled-bg: transparent
-
-// Inverted navbar brand label
-// $navbar-inverse-brand-color: $navbar-inverse-link-color
-// $navbar-inverse-brand-hover-color: #fff
-// $navbar-inverse-brand-hover-bg: transparent
-
-// Inverted navbar toggle
-// $navbar-inverse-toggle-hover-bg: #333
-// $navbar-inverse-toggle-icon-bar-bg: #fff
-// $navbar-inverse-toggle-border-color: #333
-
-
-//== Navs
-//
-//##
-
-//=== Shared nav styles
-// $nav-link-padding: 10px 15px
-// $nav-link-hover-bg: $gray-lighter
-
-// $nav-disabled-link-color: $gray-light
-// $nav-disabled-link-hover-color: $gray-light
-
-//== Tabs
-// $nav-tabs-border-color: #ddd
-
-// $nav-tabs-link-hover-border-color: $gray-lighter
-
-// $nav-tabs-active-link-hover-bg: $body-bg
-// $nav-tabs-active-link-hover-color: $gray
-// $nav-tabs-active-link-hover-border-color: #ddd
-
-// $nav-tabs-justified-link-border-color: #ddd
-// $nav-tabs-justified-active-link-border-color: $body-bg
-
-//== Pills
-// $nav-pills-border-radius: $border-radius-base
-// $nav-pills-active-link-hover-bg: $component-active-bg
-// $nav-pills-active-link-hover-color: $component-active-color
//== Pagination
@@ -467,38 +77,10 @@ $pagination-disabled-bg: lighten($brand-success, 15%);
$pagination-disabled-border: transparent;
-//== Pager
-//
-//##
-
-// $pager-bg: $pagination-bg
-// $pager-border: $pagination-border
-// $pager-border-radius: 15px
-
-// $pager-hover-bg: $pagination-hover-bg
-
-// $pager-active-bg: $pagination-active-bg
-// $pager-active-color: $pagination-active-color
-
-// $pager-disabled-color: $pagination-disabled-color
-
-
-//== Jumbotron
-//
-//##
-
-// $jumbotron-padding: 30px
-// $jumbotron-color: inherit
-// $jumbotron-bg: $gray-lighter
-// $jumbotron-heading-color: inherit
-// $jumbotron-font-size: ceil(($font-size-base * 1.5))
-
-
//== Form states and alerts
//
//## Define colors for form feedback states and, by default, alerts.
-
$state-success-text: #fff;
$state-success-bg: $brand-success;
$state-success-border: $brand-success;
@@ -516,316 +98,22 @@ $state-danger-bg: $brand-danger;
$state-danger-border: $brand-danger;
-//== Tooltips
-//
-//##
-
-//** Tooltip max width
-// $tooltip-max-width: 200px
-//** Tooltip text color
-// $tooltip-color: #fff
-//** Tooltip background color
-// $tooltip-bg: #000
-// $tooltip-opacity: .9
-
-//** Tooltip arrow width
-// $tooltip-arrow-width: 5px
-//** Tooltip arrow color
-// $tooltip-arrow-color: $tooltip-bg
-
-
-//== Popovers
-//
-//##
-
-//** Popover body background color
-// $popover-bg: #fff
-//** Popover maximum width
-// $popover-max-width: 276px
-//** Popover border color
-// $popover-border-color: rgba(0,0,0,.2)
-//** Popover fallback border color
-// $popover-fallback-border-color: #ccc
-
-//** Popover title background color
-// $popover-title-bg: darken($popover-bg, 3%)
-
-//** Popover arrow width
-// $popover-arrow-width: 10px
-//** Popover arrow color
-// $popover-arrow-color: $popover-bg
-
-//** Popover outer arrow width
-// $popover-arrow-outer-width: ($popover-arrow-width + 1)
-//** Popover outer arrow color
-// $popover-arrow-outer-color: fade_in($popover-border-color, 0.05)
-//** Popover outer arrow fallback color
-// $popover-arrow-outer-fallback-color: darken($popover-fallback-border-color, 20%)
-
-
-//== Labels
-//
-//##
-
-//** Default label background color
-// $label-default-bg: $gray-light
-//** Primary label background color
-// $label-primary-bg: $brand-primary
-//** Success label background color
-// $label-success-bg: $brand-success
-//** Info label background color
-// $label-info-bg: $brand-info
-//** Warning label background color
-// $label-warning-bg: $brand-warning
-//** Danger label background color
-// $label-danger-bg: $brand-danger
-
-//** Default label text color
-// $label-color: #fff
-//** Default text color of a linked label
-// $label-link-hover-color: #fff
-
-
-//== Modals
-//
-//##
-
-//** Padding applied to the modal body
-// $modal-inner-padding: 15px
-
-//** Padding applied to the modal title
-// $modal-title-padding: 15px
-//** Modal title line-height
-// $modal-title-line-height: $line-height-base
-
-//** Background color of modal content area
-// $modal-content-bg: #fff
-//** Modal content border color
-// $modal-content-border-color: rgba(0,0,0,.2)
-//** Modal content border color **for IE8**
-// $modal-content-fallback-border-color: #999
-
-//** Modal backdrop background color
-// $modal-backdrop-bg: #000
-//** Modal backdrop opacity
-// $modal-backdrop-opacity: .5
-//** Modal header border color
-// $modal-header-border-color: #e5e5e5
-//** Modal footer border color
-// $modal-footer-border-color: $modal-header-border-color
-
-// $modal-lg: 900px
-// $modal-md: 600px
-// $modal-sm: 300px
-
-
//== Alerts
//
//## Define alert colors, border radius, and padding.
-// $alert-padding: 15px
$alert-border-radius: 0;
-// $alert-link-font-weight: bold
-
-// $alert-success-bg: $state-success-bg
-// $alert-success-text: $state-success-text
-// $alert-success-border: $state-success-border
-
-// $alert-info-bg: $state-info-bg
-// $alert-info-text: $state-info-text
-// $alert-info-border: $state-info-border
-
-// $alert-warning-bg: $state-warning-bg
-// $alert-warning-text: $state-warning-text
-// $alert-warning-border: $state-warning-border
-
-// $alert-danger-bg: $state-danger-bg
-// $alert-danger-text: $state-danger-text
-// $alert-danger-border: $state-danger-border
-
-
-//== Progress bars
-//
-//##
-
-//** Background color of the whole progress component
-// $progress-bg: #f5f5f5
-//** Progress bar text color
-// $progress-bar-color: #fff
-//** Variable for setting rounded corners on progress bar.
-// $progress-border-radius: $border-radius-base
-
-//** Default progress bar color
-// $progress-bar-bg: $brand-primary
-//** Success progress bar color
-// $progress-bar-success-bg: $brand-success
-//** Warning progress bar color
-// $progress-bar-warning-bg: $brand-warning
-//** Danger progress bar color
-// $progress-bar-danger-bg: $brand-danger
-//** Info progress bar color
-// $progress-bar-info-bg: $brand-info
-
-
-//== List group
-//
-//##
-
-//** Background color on `.list-group-item`
-// $list-group-bg: #fff
-//** `.list-group-item` border color
-// $list-group-border: #ddd
-//** List group border radius
-// $list-group-border-radius: $border-radius-base
-
-//** Background color of single list items on hover
-// $list-group-hover-bg: #f5f5f5
-//** Text color of active list items
-// $list-group-active-color: $component-active-color
-//** Background color of active list items
-// $list-group-active-bg: $component-active-bg
-//** Border color of active list elements
-// $list-group-active-border: $list-group-active-bg
-//** Text color for content within active list items
-// $list-group-active-text-color: lighten($list-group-active-bg, 40%)
-
-//** Text color of disabled list items
-// $list-group-disabled-color: $gray-light
-//** Background color of disabled list items
-// $list-group-disabled-bg: $gray-lighter
-//** Text color for content within disabled list items
-// $list-group-disabled-text-color: $list-group-disabled-color
-
-// $list-group-link-color: #555
-// $list-group-link-hover-color: $list-group-link-color
-// $list-group-link-heading-color: #333
//== Panels
//
//##
-// $panel-bg: #fff
-// $panel-body-padding: 15px
-// $panel-heading-padding: 10px 15px
-// $panel-footer-padding: $panel-heading-padding
$panel-border-radius: 0;
-
-//** Border color for elements within panels
-// $panel-inner-border: #ddd
-// $panel-footer-bg: #f5f5f5
-
$panel-default-text: $text-color;
$panel-default-border: $border-color;
$panel-default-heading-bg: $background-color;
-// $panel-primary-text: #fff
-// $panel-primary-border: $brand-primary
-// $panel-primary-heading-bg: $brand-primary
-
-// $panel-success-text: $state-success-text
-// $panel-success-border: $state-success-border
-// $panel-success-heading-bg: $state-success-bg
-
-// $panel-info-text: $state-info-text
-// $panel-info-border: $state-info-border
-// $panel-info-heading-bg: $state-info-bg
-
-// $panel-warning-text: $state-warning-text
-// $panel-warning-border: $state-warning-border
-// $panel-warning-heading-bg: $state-warning-bg
-
-// $panel-danger-text: $state-danger-text
-// $panel-danger-border: $state-danger-border
-// $panel-danger-heading-bg: $state-danger-bg
-
-
-//== Thumbnails
-//
-//##
-
-//** Padding around the thumbnail image
-// $thumbnail-padding: 4px
-//** Thumbnail background color
-// $thumbnail-bg: $body-bg
-//** Thumbnail border color
-// $thumbnail-border: #ddd
-//** Thumbnail border radius
-// $thumbnail-border-radius: $border-radius-base
-
-//** Custom text color for thumbnail captions
-// $thumbnail-caption-color: $text-color
-//** Padding around the thumbnail caption
-// $thumbnail-caption-padding: 9px
-
-
-//== Wells
-//
-//##
-
-$well-bg: $gray-lighter;
-$well-border: transparent;
-
-
-//== Badges
-//
-//##
-
-// $badge-color: #fff
-//** Linked badge text color on hover
-// $badge-link-hover-color: #fff
-// $badge-bg: $gray-light
-
-//** Badge text color in active nav link
-// $badge-active-color: $link-color
-//** Badge background color in active nav link
-// $badge-active-bg: #fff
-
-// $badge-font-weight: bold
-// $badge-line-height: 1
-// $badge-border-radius: 10px
-
-
-//== Breadcrumbs
-//
-//##
-
-// $breadcrumb-padding-vertical: 8px
-// $breadcrumb-padding-horizontal: 15px
-//** Breadcrumb background color
-// $breadcrumb-bg: #f5f5f5
-//** Breadcrumb text color
-// $breadcrumb-color: #ccc
-//** Text color of current page in the breadcrumb
-// $breadcrumb-active-color: $gray-light
-//** Textual separator for between breadcrumb elements
-// $breadcrumb-separator: "/"
-
-
-//== Carousel
-//
-//##
-
-// $carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6)
-
-// $carousel-control-color: #fff
-// $carousel-control-width: 15%
-// $carousel-control-opacity: .5
-// $carousel-control-font-size: 20px
-
-// $carousel-indicator-active-bg: #fff
-// $carousel-indicator-border-color: #fff
-
-// $carousel-caption-color: #fff
-
-
-//== Close
-//
-//##
-
-// $close-font-weight: bold
-// $close-color: #000
-// $close-text-shadow: 0 1px 0 #fff
//== Code
@@ -837,34 +125,3 @@ $code-bg: #f9f2f4;
$kbd-color: #fff;
$kbd-bg: #333;
-
-$pre-bg: $gray-lighter;
-$pre-color: $text-color;
-$pre-border-color: #ccc;
-// $pre-scrollable-max-height: 340px
-
-
-//== Type
-//
-//##
-
-//** Horizontal offset for forms and lists.
-// $component-offset-horizontal: 180px
-//** Text muted color
-// $text-muted: $gray-light
-//** Abbreviations and acronyms border color
-// $abbr-border-color: $gray-light
-//** Headings small color
-$headings-small-color: $gray-dark;
-//** Blockquote small color
-// $blockquote-small-color: $gray-light
-//** Blockquote font size
-// $blockquote-font-size: ($font-size-base * 1.25)
-//** Blockquote border color
-// $blockquote-border-color: $gray-lighter
-//** Page header border color
-// $page-header-border-color: $gray-lighter
-//** Width of horizontal description list titles
-// $dl-horizontal-offset: $component-offset-horizontal
-//** Horizontal line color.
-// $hr-border: $gray-lighter
diff --git a/app/assets/stylesheets/base/variables.scss b/app/assets/stylesheets/base/variables.scss
index 4e2c64aa132..596376c3970 100644
--- a/app/assets/stylesheets/base/variables.scss
+++ b/app/assets/stylesheets/base/variables.scss
@@ -1,5 +1,6 @@
$style_color: #474D57;
$hover: #FFF3EB;
+$gl-text-color: #222222;
$gl-link-color: #446e9b;
$nprogress-color: #c0392b;
$gl-font-size: 14px;
@@ -8,23 +9,18 @@ $sidebar_width: 230px;
$avatar_radius: 50%;
$code_font_size: 13px;
$code_line_height: 1.5;
-$border-color: #dce4ec;
-$background-color: #ECF0F1;
+$border-color: #E5E5E5;
+$background-color: #f5f5f5;
/*
* State colors:
*/
-$gl-success: #019875;
-$gl-danger: #d9534f;
$gl-primary: #446e9b;
+$gl-success: #019875;
$gl-info: #029ACF;
$gl-warning: #EB9532;
+$gl-danger: #d9534f;
-$gl-primary: #2C3E50;
-$gl-success: #18BC9C;
-$gl-info: #3498DB;
-$gl-warning: #F39C12;
-$gl-danger: #E74C3C;
/*
* Commit Diff Colors
*/
diff --git a/app/assets/stylesheets/generic/calendar.scss b/app/assets/stylesheets/generic/calendar.scss
index 9483b26164e..e2ab7fc51a5 100644
--- a/app/assets/stylesheets/generic/calendar.scss
+++ b/app/assets/stylesheets/generic/calendar.scss
@@ -1,29 +1,45 @@
-.calendar_onclick_placeholder {
- padding: 0 0 2px 0;
-}
-
-.calendar_commit_activity {
- padding: 5px 0 0;
-}
-
-.calendar_onclick_second {
- font-size: 14px;
- display: block;
-}
-
-.calendar_onclick_hr {
- padding: 0;
- margin: 10px 0;
-}
+.user-calendar-activities {
+
+ .calendar_commit_activity {
+ padding: 5px 0 0;
+ }
+
+ .calendar_onclick_hr {
+ padding: 0;
+ margin: 10px 0;
+ }
+
+ .calendar_commit_date {
+ color: #999;
+ }
+
+ .calendar_activity_summary {
+ font-size: 14px;
+ }
-.calendar_commit_date {
- color: #999;
-}
+ .str-truncated {
+ max-width: 70%;
+ }
-.calendar_activity_summary {
- font-size: 14px;
+ .text-expander {
+ background: #eee;
+ color: #555;
+ padding: 0 5px;
+ cursor: pointer;
+ margin-left: 4px;
+ &:hover {
+ background-color: #ddd;
+ }
+ }
+
+ .commit-row-message {
+ color: #333;
+ &:hover {
+ color: #444;
+ text-decoration: underline;
+ }
+ }
}
-
/**
* This overwrites the default values of the cal-heatmap gem
*/
diff --git a/app/assets/stylesheets/generic/common.scss b/app/assets/stylesheets/generic/common.scss
index 876eea72e8a..db393e08819 100644
--- a/app/assets/stylesheets/generic/common.scss
+++ b/app/assets/stylesheets/generic/common.scss
@@ -355,3 +355,22 @@ table {
bottom: 20px !important;
left: 20px !important;
}
+
+.header-with-avatar {
+ h3 {
+ margin: 0;
+ font-weight: bold;
+ }
+
+ .username {
+ font-size: 18px;
+ color: #666;
+ margin-top: 8px;
+ }
+
+ .description {
+ font-size: 16px;
+ color: #666;
+ margin-top: 8px;
+ }
+}
diff --git a/app/assets/stylesheets/generic/files.scss b/app/assets/stylesheets/generic/files.scss
index 91220a856ac..8014dcb165b 100644
--- a/app/assets/stylesheets/generic/files.scss
+++ b/app/assets/stylesheets/generic/files.scss
@@ -94,7 +94,7 @@
}
.author,
.blame_commit {
- background: #f5f5f5;
+ background: $background-color;
vertical-align: top;
}
.lines {
diff --git a/app/assets/stylesheets/generic/forms.scss b/app/assets/stylesheets/generic/forms.scss
index 19bc11086e9..31fe5a03f37 100644
--- a/app/assets/stylesheets/generic/forms.scss
+++ b/app/assets/stylesheets/generic/forms.scss
@@ -29,8 +29,8 @@ fieldset legend {
padding: 17px 20px 18px;
margin-top: 18px;
margin-bottom: 18px;
- background-color: #ecf0f1;
- border-top: 1px solid #e5e5e5;
+ background-color: $background-color;
+ border-top: 1px solid $border-color;
}
@media (min-width: $screen-sm-min) {
diff --git a/app/assets/stylesheets/generic/lists.scss b/app/assets/stylesheets/generic/lists.scss
index 5950885c42c..08bf6e943d2 100644
--- a/app/assets/stylesheets/generic/lists.scss
+++ b/app/assets/stylesheets/generic/lists.scss
@@ -35,7 +35,7 @@
color: #8a6d3b;
}
- &.smoke { background-color: #f5f5f5; }
+ &.smoke { background-color: $background-color; }
&:hover {
background: $hover;
@@ -46,7 +46,7 @@
border-bottom: none;
&.bottom {
- background: #f5f5f5;
+ background: $background-color;
}
}
@@ -61,7 +61,7 @@
p {
padding-top: 1px;
margin: 0;
- color: #222;
+ color: $gray-dark;
img {
position: relative;
top: 3px;
@@ -74,9 +74,10 @@
}
.row_title {
- color: #444;
+ color: $gray-dark;
+
&:hover {
- color: #444;
+ color: $text-color;
text-decoration: underline;
}
}
diff --git a/app/assets/stylesheets/generic/nav_sidebar.scss b/app/assets/stylesheets/generic/nav_sidebar.scss
index c14f12284da..3bcb7b81333 100644
--- a/app/assets/stylesheets/generic/nav_sidebar.scss
+++ b/app/assets/stylesheets/generic/nav_sidebar.scss
@@ -1,18 +1,18 @@
.page-with-sidebar {
- background: #F5F5F5;
+ background: $background-color;
.sidebar-wrapper {
position: fixed;
top: 0;
left: 0;
height: 100%;
- border-right: 1px solid #EAEAEA;
+ border-right: 1px solid $border-color;
}
}
.sidebar-wrapper {
z-index: 99;
- background: #F5F5F5;
+ background: $background-color;
}
.content-wrapper {
@@ -39,7 +39,7 @@
.nav-sidebar li {
&.active a {
- color: #333;
+ color: $text-color;
background: #FFF !important;
font-weight: bold;
border: 1px solid #EEE;
@@ -52,32 +52,31 @@
}
i {
- color: #444;
+ color: $text-color;
}
}
}
.nav-sidebar li {
&.separate-item {
- border-top: 1px solid #ddd;
+ border-top: 1px solid $border-color;
padding-top: 10px;
margin-top: 10px;
}
a {
- color: #555;
+ color: $gray;
display: block;
text-decoration: none;
padding: 8px 15px;
font-size: 13px;
line-height: 20px;
- text-shadow: 0 1px 2px #FFF;
padding-left: 20px;
&:hover {
text-decoration: none;
- color: #333;
- background: #EEE;
+ color: $text-color;
+ background: $border-color;
}
&:active, &:focus {
@@ -86,7 +85,7 @@
i {
width: 20px;
- color: #888;
+ color: $gray-light;
margin-right: 23px;
}
}
@@ -156,18 +155,17 @@
position: fixed;
top: 46px;
padding: 5px 13px 5px 13px;
- left: 197px;
+ left: 198px;
font-size: 13px;
- background: #EEE;
+ background: transparent;
color: black;
- border-left: 1px solid rgba(0,0,0,0.035);
- border-right: 1px solid rgba(0,0,0,0.035);
+ border-left: 1px solid $border-color;
+ border-bottom: 1px solid $border-color;
}
.collapse-nav a:hover {
text-decoration: none;
- color: #333;
- background: #eaeaea;
+ background: #f2f6f7;
}
@media (max-width: $screen-md-max) {
diff --git a/app/assets/stylesheets/generic/selects.scss b/app/assets/stylesheets/generic/selects.scss
index c13a685a528..7557f411111 100644
--- a/app/assets/stylesheets/generic/selects.scss
+++ b/app/assets/stylesheets/generic/selects.scss
@@ -46,55 +46,13 @@
}
}
-select {
- &.select2 {
- width: 100px;
- }
-
- &.select2-sm {
- width: 100px;
- }
-}
-
-@media (min-width: $screen-sm-min) {
- select {
- &.select2 {
- width: 150px;
- }
- &.select2-sm {
- width: 120px;
- }
- }
+.select2-container {
+ width: 100% !important;
}
-/* Medium devices (desktops, 992px and up) */
-@media (min-width: $screen-md-min) {
- select {
- &.select2 {
- width: 170px;
- }
- &.select2-sm {
- width: 140px;
- }
- }
-}
-
-/* Large devices (large desktops, 1200px and up) */
-@media (min-width: $screen-lg-min) {
- select {
- &.select2 {
- width: 200px;
- }
- &.select2-sm {
- width: 150px;
- }
- }
-}
-
-
/** Branch/tag selector **/
.project-refs-form .select2-container {
- margin-right: 10px;
+ width: 160px !important;
}
.ajax-users-dropdown, .ajax-project-users-dropdown {
diff --git a/app/assets/stylesheets/generic/timeline.scss b/app/assets/stylesheets/generic/timeline.scss
index f92a79f7a5f..97831eb7c27 100644
--- a/app/assets/stylesheets/generic/timeline.scss
+++ b/app/assets/stylesheets/generic/timeline.scss
@@ -54,7 +54,7 @@
.timeline-content {
position: relative;
- background: #f5f5f6;
+ background: $background-color;
padding: 10px 15px;
margin-left: 60px;
@@ -70,7 +70,7 @@
height: 0;
border-style: solid;
border-width: 9px 9px 9px 0;
- border-color: transparent #f5f5f6 transparent transparent;
+ border-color: transparent $background-color transparent transparent;
left: 0;
top: 10px;
margin-left: -9px;
diff --git a/app/assets/stylesheets/generic/typography.scss b/app/assets/stylesheets/generic/typography.scss
index 4d940ee6b29..80190424c1b 100644
--- a/app/assets/stylesheets/generic/typography.scss
+++ b/app/assets/stylesheets/generic/typography.scss
@@ -4,7 +4,6 @@
*/
.page-title {
margin-top: 0px;
- color: #333;
line-height: 1.5;
font-weight: normal;
margin-bottom: 5px;
@@ -16,7 +15,7 @@ pre {
&.dark {
background: #333;
- color: #f5f5f5;
+ color: $background-color;
}
}
diff --git a/app/assets/stylesheets/pages/dashboard.scss b/app/assets/stylesheets/pages/dashboard.scss
index 5a543a852c2..af9c83e5dc8 100644
--- a/app/assets/stylesheets/pages/dashboard.scss
+++ b/app/assets/stylesheets/pages/dashboard.scss
@@ -28,6 +28,10 @@
font-size: 14px;
line-height: 24px;
+ .str-truncated {
+ max-width: 72%;
+ }
+
a {
display: block;
padding: 8px 15px;
@@ -87,16 +91,3 @@
margin-right: 5px;
width: 16px;
}
-
-.dash-new-project {
- background: $gl-success;
- border: 1px solid $gl-success;
-
- a {
- color: #FFF;
- }
-}
-
-.dash-list .str-truncated {
- max-width: 72%;
-}
diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss
index 5a9f93dc03d..7b7bb88bc20 100644
--- a/app/assets/stylesheets/pages/diff.scss
+++ b/app/assets/stylesheets/pages/diff.scss
@@ -11,8 +11,10 @@
z-index: 10;
> span {
- @include str-truncated(65%);
font-family: $monospace_font;
+ word-break: break-all;
+ margin-right: 200px;
+ display: block;
}
.diff-btn-group {
@@ -89,7 +91,7 @@
margin: 0px;
padding: 0px;
border: none;
- background: #F5F5F5;
+ background: $background-color;
color: rgba(0,0,0,0.3);
padding: 0px 5px;
border-right: 1px solid $border-color;
diff --git a/app/assets/stylesheets/pages/editor.scss b/app/assets/stylesheets/pages/editor.scss
index 851f126318d..759ba6b1c22 100644
--- a/app/assets/stylesheets/pages/editor.scss
+++ b/app/assets/stylesheets/pages/editor.scss
@@ -37,7 +37,7 @@
}
.editor-ref {
- background: #f5f5f5;
+ background: $background-color;
padding: 11px 15px;
border-right: 1px solid #CCC;
display: inline-block;
diff --git a/app/assets/stylesheets/pages/events.scss b/app/assets/stylesheets/pages/events.scss
index 3e9e36e477e..83daea10ed5 100644
--- a/app/assets/stylesheets/pages/events.scss
+++ b/app/assets/stylesheets/pages/events.scss
@@ -154,10 +154,12 @@
overflow: auto;
.event-last-push-text {
@include str-truncated(100%);
+ padding: 5px 0;
+ font-size: 13px;
float:left;
margin-right: -150px;
padding-right: 150px;
- line-height: 24px;
+ line-height: 20px;
}
}
@@ -188,7 +190,7 @@
li a {
font-size: 13px;
padding: 5px 10px;
- background: rgba(0,0,0,0.045);
+ background: $background-color;
margin-left: 4px;
}
}
diff --git a/app/assets/stylesheets/pages/groups.scss b/app/assets/stylesheets/pages/groups.scss
index e49fe1a9dd6..2b1b747139a 100644
--- a/app/assets/stylesheets/pages/groups.scss
+++ b/app/assets/stylesheets/pages/groups.scss
@@ -1,6 +1,5 @@
.new-group-member-holder {
margin-top: 50px;
- background: #f9f9f9;
padding-top: 20px;
}
diff --git a/app/assets/stylesheets/pages/header.scss b/app/assets/stylesheets/pages/header.scss
index 26b4d04106e..dde19b801f8 100644
--- a/app/assets/stylesheets/pages/header.scss
+++ b/app/assets/stylesheets/pages/header.scss
@@ -31,7 +31,7 @@ header {
.navbar-toggle {
color: $style_color;
- margin: 0 -15px 0 0;
+ margin: 0;
padding: 10px;
border-radius: 0;
diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss
index d8d12338859..a640a4e2051 100644
--- a/app/assets/stylesheets/pages/issuable.scss
+++ b/app/assets/stylesheets/pages/issuable.scss
@@ -25,7 +25,7 @@
}
.issuable-context-title {
- font-size: 15px;
+ font-size: 14px;
line-height: 1.4;
margin-bottom: 5px;
@@ -39,3 +39,9 @@
margin-right: 4px;
}
}
+
+.issuable-affix .context {
+ font-size: 13px;
+
+ .btn { font-size: 13px; }
+}
diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss
index 4ea34cc1dac..6c1dd4f7e9f 100644
--- a/app/assets/stylesheets/pages/issues.scss
+++ b/app/assets/stylesheets/pages/issues.scss
@@ -59,33 +59,34 @@
}
}
-@media (min-width: 800px) { .issues_filters select { width: 160px; } }
-@media (min-width: 1200px) { .issues_filters select { width: 220px; } }
+@media (min-width: 800px) {
+ .issues_bulk_update {
+ select, .select2-container {
+ width: 120px !important;
+ display: inline-block;
+ }
+ }
+}
-@media (min-width: 800px) { .issues_bulk_update .select2-container { min-width: 120px; } }
-@media (min-width: 1200px) { .issues_bulk_update .select2-container { min-width: 160px; } }
+@media (min-width: 1200px) {
+ .issues_bulk_update {
+ select, .select2-container {
+ width: 160px !important;
+ display: inline-block;
+ }
+ }
+}
.issues_bulk_update {
.select2-container .select2-choice {
color: #444 !important;
- font-weight: 500;
}
}
-#update_status {
- width: 100px;
-}
-
.participants {
margin-bottom: 20px;
}
-.issues_bulk_update {
- .select2-container {
- text-shadow: none;
- }
-}
-
.issue-search-form {
margin: 0;
height: 24px;
@@ -177,6 +178,6 @@ h2.issue-title {
font-weight: bold;
}
-.context .select2-container {
- width: 100% !important;
+.issue-form .select2-container {
+ width: 250px !important;
}
diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss
index d41e34caba1..d8fe339b7b3 100644
--- a/app/assets/stylesheets/pages/merge_requests.scss
+++ b/app/assets/stylesheets/pages/merge_requests.scss
@@ -129,7 +129,7 @@
font-size: 15px;
border-bottom: 1px solid #BBB;
color: #777;
- background-color: #F5F5F5;
+ background-color: $background-color;
&.ci-success {
color: $gl-success;
@@ -155,6 +155,12 @@
background-color: #FAF1F1;
}
+ &.ci-canceled {
+ color: $gl-warning;
+ border-color: $gl-danger;
+ background-color: #FAF5F1;
+ }
+
&.ci-error {
color: $gl-danger;
border-color: $gl-danger;
@@ -194,3 +200,7 @@
}
}
}
+
+.merge-request-form .select2-container {
+ width: 250px !important;
+}
diff --git a/app/assets/stylesheets/pages/profile.scss b/app/assets/stylesheets/pages/profile.scss
index 81afe05162f..fbe71a5b5ad 100644
--- a/app/assets/stylesheets/pages/profile.scss
+++ b/app/assets/stylesheets/pages/profile.scss
@@ -41,11 +41,6 @@
}
}
-.user-show-username {
- font-weight: 200;
- color: #666;
-}
-
/*
* Appearance settings
*
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss
index 74755951670..6d55a5fa66e 100644
--- a/app/assets/stylesheets/pages/projects.scss
+++ b/app/assets/stylesheets/pages/projects.scss
@@ -49,16 +49,20 @@
@extend .clearfix;
margin-bottom: 15px;
+ .project-home-desc,
+ .star-fork-buttons {
+ font-size: 16px;
+ line-height: 1.3;
+ }
+
.project-home-desc {
float: left;
color: #666;
- font-size: 16px;
}
.star-fork-buttons {
float: right;
min-width: 200px;
- font-size: 14px;
font-weight: bold;
.star-buttons, .fork-buttons {
diff --git a/app/assets/stylesheets/pages/tree.scss b/app/assets/stylesheets/pages/tree.scss
index ce02cdb1652..57f63b52aa1 100644
--- a/app/assets/stylesheets/pages/tree.scss
+++ b/app/assets/stylesheets/pages/tree.scss
@@ -27,7 +27,7 @@
}
&.selected {
td {
- background: #f5f5f5;
+ background: $background-color;
border-top: 1px solid #EEE;
border-bottom: 1px solid #EEE;
}
@@ -112,7 +112,7 @@
.tree-ref-holder {
float: left;
- margin-right: 6px;
+ margin-right: 15px;
.select2-container .select2-choice, .select2-container.select2-drop-above .select2-choice {
padding: 4px 12px;
diff --git a/app/assets/stylesheets/pages/votes.scss b/app/assets/stylesheets/pages/votes.scss
index ba0a519dca6..dc9a7d71e8b 100644
--- a/app/assets/stylesheets/pages/votes.scss
+++ b/app/assets/stylesheets/pages/votes.scss
@@ -1,39 +1,4 @@
-.votes {
- font-size: 13px;
- line-height: 15px;
- .progress {
- height: 4px;
- margin: 0;
- .bar {
- float: left;
- height: 100%;
- }
- .bar-success {
- @include linear-gradient(#62C462, #51A351);
- background-color: #468847;
- }
- .bar-danger {
- @include linear-gradient(#EE5F5B, #BD362F);
- background-color: #B94A48;
- }
- }
- .upvotes {
- display: inline-block;
- color: #468847;
- }
- .downvotes {
- display: inline-block;
- color: #B94A48;
- }
-}
-.votes-block {
- margin: 6px;
- .downvotes {
- float: right;
- }
-}
.votes-inline {
display: inline-block;
margin: 0 8px;
}
-
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 1b9a86ee42c..9252e85e8cc 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -25,7 +25,8 @@ class ProfilesController < ApplicationController
if @user.update_attributes(user_params)
flash[:notice] = "Profile was successfully updated"
else
- flash[:alert] = "Failed to update profile"
+ messages = @user.errors.full_messages.uniq.join('. ')
+ flash[:alert] = "Failed to update profile. #{messages}"
end
respond_to do |format|
@@ -68,7 +69,7 @@ class ProfilesController < ApplicationController
params.require(:user).permit(
:email, :password, :password_confirmation, :bio, :name, :username,
:skype, :linkedin, :twitter, :website_url, :color_scheme_id, :theme_id,
- :avatar, :hide_no_ssh_key, :hide_no_password
+ :avatar, :hide_no_ssh_key, :hide_no_password, :location
)
end
end
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index c63a9b0cd44..e9b7d7e0083 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -160,10 +160,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def ci_status
ci_service = @merge_request.source_project.ci_service
- status = ci_service.commit_status(merge_request.last_commit.sha)
+ status = ci_service.commit_status(merge_request.last_commit.sha, merge_request.source_branch)
if ci_service.respond_to?(:commit_coverage)
- coverage = ci_service.commit_coverage(merge_request.last_commit.sha)
+ coverage = ci_service.commit_coverage(merge_request.last_commit.sha, merge_request.source_branch)
end
response = {
diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb
index 570447c746c..9a484c109ba 100644
--- a/app/controllers/projects/services_controller.rb
+++ b/app/controllers/projects/services_controller.rb
@@ -53,7 +53,7 @@ class Projects::ServicesController < Projects::ApplicationController
:description, :issues_url, :new_issue_url, :restrict_to_branch, :channel,
:colorize_messages, :channels,
:push_events, :issues_events, :merge_requests_events, :tag_push_events,
- :note_events, :send_from_committer_email, :disable_diffs
+ :note_events, :send_from_committer_email, :disable_diffs, :external_wiki_url
)
end
end
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index 55926a1ed22..a3284c82d3f 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -2,34 +2,34 @@ class SearchController < ApplicationController
include SearchHelper
def show
+ return if params[:search].nil? || params[:search].blank?
@project = Project.find_by(id: params[:project_id]) if params[:project_id].present?
@group = Group.find_by(id: params[:group_id]) if params[:group_id].present?
@scope = params[:scope]
@show_snippets = params[:snippets].eql? 'true'
- @search_results = if @project
- return access_denied! unless can?(current_user, :download_code, @project)
-
- unless %w(blobs notes issues merge_requests wiki_blobs).
- include?(@scope)
- @scope = 'blobs'
- end
-
- Search::ProjectService.new(@project, current_user, params).execute
- elsif @show_snippets
- unless %w(snippet_blobs snippet_titles).include?(@scope)
- @scope = 'snippet_blobs'
- end
-
- Search::SnippetService.new(current_user, params).execute
- else
- unless %w(projects issues merge_requests).include?(@scope)
- @scope = 'projects'
- end
-
- Search::GlobalService.new(current_user, params).execute
- end
-
+ @search_results =
+ if @project
+ return access_denied! unless can?(current_user, :download_code, @project)
+
+ unless %w(blobs notes issues merge_requests wiki_blobs).
+ include?(@scope)
+ @scope = 'blobs'
+ end
+
+ Search::ProjectService.new(@project, current_user, params).execute
+ elsif @show_snippets
+ unless %w(snippet_blobs snippet_titles).include?(@scope)
+ @scope = 'snippet_blobs'
+ end
+
+ Search::SnippetService.new(current_user, params).execute
+ else
+ unless %w(projects issues merge_requests).include?(@scope)
+ @scope = 'projects'
+ end
+ Search::GlobalService.new(current_user, params).execute
+ end
@objects = @search_results.objects(@scope, params[:page])
end
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 8a13394dbac..68130eb128c 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -32,6 +32,7 @@ class UsersController < ApplicationController
def calendar
projects = Project.where(id: authorized_projects_ids & @user.contributed_projects_ids)
+
calendar = Gitlab::CommitsCalendar.new(projects, @user)
@timestamps = calendar.timestamps
@starting_year = calendar.starting_year
@@ -40,6 +41,24 @@ class UsersController < ApplicationController
render 'calendar', layout: false
end
+ def calendar_activities
+ projects = Project.where(id: authorized_projects_ids & @user.contributed_projects_ids)
+
+ date = Date.parse(params[:date]) rescue nil
+ if date
+ @calendar_activities = Gitlab::CommitsCalendar.get_commits_for_date(projects, @user, date)
+ else
+ @calendar_activities = {}
+ end
+
+ # get the total number of unique commits
+ @commit_count = @calendar_activities.values.flatten.map(&:id).uniq.count
+
+ @calendar_date = date
+
+ render 'calendar_activities', layout: false
+ end
+
def determine_layout
if current_user
'navless'
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb
index 779cebc0136..c9fd0f0362b 100644
--- a/app/helpers/events_helper.rb
+++ b/app/helpers/events_helper.rb
@@ -96,7 +96,7 @@ module EventsHelper
end
end
elsif event.push?
- if event.push_with_commits?
+ if event.push_with_commits? && event.md_ref?
if event.commits_count > 1
namespace_project_compare_url(event.project.namespace, event.project,
from: event.commit_from, to:
diff --git a/app/helpers/external_wiki_helper.rb b/app/helpers/external_wiki_helper.rb
new file mode 100644
index 00000000000..838b85afdfe
--- /dev/null
+++ b/app/helpers/external_wiki_helper.rb
@@ -0,0 +1,11 @@
+module ExternalWikiHelper
+ def get_project_wiki_path(project)
+ external_wiki_service = project.services.
+ select { |service| service.to_param == 'external_wiki' }.first
+ if external_wiki_service.present? && external_wiki_service.active?
+ external_wiki_service.properties['external_wiki_url']
+ else
+ namespace_project_wiki_path(project.namespace, project, :home)
+ end
+ end
+end
diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb
index b005cb8e417..3386fac8657 100644
--- a/app/helpers/gitlab_routing_helper.rb
+++ b/app/helpers/gitlab_routing_helper.rb
@@ -47,6 +47,5 @@ module GitlabRoutingHelper
def project_snippet_url(entity, *args)
namespace_project_snippet_url(entity.project.namespace, entity.project, entity, *args)
-
end
end
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb
index 3b1589da57f..51b60770e0b 100644
--- a/app/helpers/merge_requests_helper.rb
+++ b/app/helpers/merge_requests_helper.rb
@@ -35,7 +35,7 @@ module MergeRequestsHelper
end
def ci_build_details_path(merge_request)
- merge_request.source_project.ci_service.build_page(merge_request.last_commit.sha)
+ merge_request.source_project.ci_service.build_page(merge_request.last_commit.sha, merge_request.source_branch)
end
def merge_path_description(merge_request, separator)
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 2225b110651..a14277180c7 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -232,12 +232,45 @@ module ProjectsHelper
end
def contribution_guide_url(project)
- if project && project.repository.contribution_guide
+ if project && contribution_guide = project.repository.contribution_guide
namespace_project_blob_path(
project.namespace,
project,
tree_join(project.default_branch,
- project.repository.contribution_guide.name)
+ contribution_guide.name)
+ )
+ end
+ end
+
+ def changelog_url(project)
+ if project && changelog = project.repository.changelog
+ namespace_project_blob_path(
+ project.namespace,
+ project,
+ tree_join(project.default_branch,
+ changelog.name)
+ )
+ end
+ end
+
+ def license_url(project)
+ if project && license = project.repository.license
+ namespace_project_blob_path(
+ project.namespace,
+ project,
+ tree_join(project.default_branch,
+ license.name)
+ )
+ end
+ end
+
+ def version_url(project)
+ if project && version = project.repository.version
+ namespace_project_blob_path(
+ project.namespace,
+ project,
+ tree_join(project.default_branch,
+ version.name)
)
end
end
diff --git a/app/models/event.rb b/app/models/event.rb
index 8d20d7ef252..2103a48a71b 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -247,7 +247,7 @@ class Event < ActiveRecord::Base
end
def push_with_commits?
- md_ref? && commits.any? && commit_from && commit_to
+ !commits.empty? && commit_from && commit_to
end
def last_push_to_non_root?
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 4cbdc612297..798306f6dcc 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -95,11 +95,11 @@ class MergeRequest < ActiveRecord::Base
end
event :mark_as_mergeable do
- transition unchecked: :can_be_merged
+ transition [:unchecked, :cannot_be_merged] => :can_be_merged
end
event :mark_as_unmergeable do
- transition unchecked: :cannot_be_merged
+ transition [:unchecked, :can_be_merged] => :cannot_be_merged
end
state :unchecked
diff --git a/app/models/note.rb b/app/models/note.rb
index 9ca3e4d7e97..27b583a869a 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -59,7 +59,7 @@ class Note < ActiveRecord::Base
class << self
def create_status_change_note(noteable, project, author, status, source)
- body = "_Status changed to #{status}#{' by ' + source.gfm_reference if source}_"
+ body = "Status changed to #{status}#{' by ' + source.gfm_reference if source}"
create(
noteable: noteable,
@@ -95,9 +95,9 @@ class Note < ActiveRecord::Base
def create_milestone_change_note(noteable, project, author, milestone)
body = if milestone.nil?
- '_Milestone removed_'
+ 'Milestone removed'
else
- "_Milestone changed to #{milestone.title}_"
+ "Milestone changed to #{milestone.title}"
end
create(
@@ -110,7 +110,7 @@ class Note < ActiveRecord::Base
end
def create_assignee_change_note(noteable, project, author, assignee)
- body = assignee.nil? ? '_Assignee removed_' : "_Reassigned to @#{assignee.username}_"
+ body = assignee.nil? ? 'Assignee removed' : "Reassigned to @#{assignee.username}"
create({
noteable: noteable,
@@ -140,7 +140,7 @@ class Note < ActiveRecord::Base
end
message << ' ' << 'label'.pluralize(labels_count)
- body = "_#{message.capitalize}_"
+ body = "#{message.capitalize}"
create(
noteable: noteable,
@@ -151,7 +151,7 @@ class Note < ActiveRecord::Base
)
end
- def create_new_commits_note(merge_request, project, author, new_commits, existing_commits = [])
+ def create_new_commits_note(merge_request, project, author, new_commits, existing_commits = [], oldrev = nil)
total_count = new_commits.length + existing_commits.length
commits_text = ActionController::Base.helpers.pluralize(total_count, 'commit')
body = "Added #{commits_text}:\n\n"
@@ -161,19 +161,23 @@ class Note < ActiveRecord::Base
if existing_commits.length == 1
existing_commits.first.short_id
else
- "#{existing_commits.first.short_id}..#{existing_commits.last.short_id}"
+ if oldrev
+ "#{Commit.truncate_sha(oldrev)}...#{existing_commits.last.short_id}"
+ else
+ "#{existing_commits.first.short_id}..#{existing_commits.last.short_id}"
+ end
end
commits_text = ActionController::Base.helpers.pluralize(existing_commits.length, 'commit')
- branch =
+ branch =
if merge_request.for_fork?
"#{merge_request.target_project_namespace}:#{merge_request.target_branch}"
else
merge_request.target_branch
end
- message = "* #{commit_ids} - _#{commits_text} from branch `#{branch}`_"
+ message = "* #{commit_ids} - #{commits_text} from branch `#{branch}`"
body << message
body << "\n"
end
@@ -236,7 +240,7 @@ class Note < ActiveRecord::Base
where(noteable_id: noteable.id)
end
- notes.where('note like ?', cross_reference_note_content(gfm_reference)).
+ notes.where('note like ?', cross_reference_note_pattern(gfm_reference)).
system.any?
end
@@ -245,13 +249,18 @@ class Note < ActiveRecord::Base
end
def cross_reference_note_prefix
- '_mentioned in '
+ 'mentioned in '
end
private
def cross_reference_note_content(gfm_reference)
- cross_reference_note_prefix + "#{gfm_reference}_"
+ cross_reference_note_prefix + "#{gfm_reference}"
+ end
+
+ def cross_reference_note_pattern(gfm_reference)
+ # Older cross reference notes contained underscores for emphasis
+ "%" + cross_reference_note_content(gfm_reference) + "%"
end
# Prepend the mentioner's namespaced project path to the GFM reference for
diff --git a/app/models/project.rb b/app/models/project.rb
index b19606e9635..c50b8a12621 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -89,6 +89,7 @@ class Project < ActiveRecord::Base
has_one :redmine_service, dependent: :destroy
has_one :custom_issue_tracker_service, dependent: :destroy
has_one :gitlab_issue_tracker_service, dependent: :destroy
+ has_one :external_wiki_service, dependent: :destroy
has_one :forked_project_link, dependent: :destroy, foreign_key: "forked_to_project_id"
diff --git a/app/models/project_contributions.rb b/app/models/project_contributions.rb
index 8ab2d814a94..bfe9928b158 100644
--- a/app/models/project_contributions.rb
+++ b/app/models/project_contributions.rb
@@ -17,6 +17,15 @@ class ProjectContributions
end
end
+ def user_commits_on_date(date)
+ repository = @project.repository
+
+ if !repository.exists? || repository.empty?
+ return []
+ end
+ commits = repository.commits_by_user_on_date_log(@user, date)
+ end
+
def cache_key
"#{Date.today.to_s}-commits-log-#{project.id}-#{user.email}"
end
diff --git a/app/models/project_services/bamboo_service.rb b/app/models/project_services/bamboo_service.rb
index 0100f1e4a10..f968afe9fa8 100644
--- a/app/models/project_services/bamboo_service.rb
+++ b/app/models/project_services/bamboo_service.rb
@@ -93,7 +93,7 @@ class BambooService < CiService
end
end
- def build_page(sha)
+ def build_page(sha, ref)
build_info(sha) if @response.nil? || !@response.code
if @response.code != 200 || @response['results']['results']['size'] == '0'
@@ -106,7 +106,7 @@ class BambooService < CiService
end
end
- def commit_status(sha)
+ def commit_status(sha, ref)
build_info(sha) if @response.nil? || !@response.code
return :error unless @response.code == 200 || @response.code == 404
diff --git a/app/models/project_services/buildbox_service.rb b/app/models/project_services/buildbox_service.rb
index 270863c1576..fef1c9b7349 100644
--- a/app/models/project_services/buildbox_service.rb
+++ b/app/models/project_services/buildbox_service.rb
@@ -48,7 +48,7 @@ class BuildboxService < CiService
service_hook.execute(data)
end
- def commit_status(sha)
+ def commit_status(sha, ref)
response = HTTParty.get(commit_status_path(sha), verify: false)
if response.code == 200 && response['status']
@@ -62,7 +62,7 @@ class BuildboxService < CiService
"#{buildbox_endpoint('gitlab')}/status/#{status_token}.json?commit=#{sha}"
end
- def build_page(sha)
+ def build_page(sha, ref)
"#{project_url}/builds?commit=#{sha}"
end
diff --git a/app/models/project_services/ci_service.rb b/app/models/project_services/ci_service.rb
index c6f6b4952c9..1a36e439245 100644
--- a/app/models/project_services/ci_service.rb
+++ b/app/models/project_services/ci_service.rb
@@ -34,7 +34,7 @@ class CiService < Service
# Ex.
# http://jenkins.example.com:8888/job/test1/scm/bySHA1/12d65c
#
- def build_page(sha)
+ def build_page(sha, ref)
# implement inside child
end
@@ -51,7 +51,7 @@ class CiService < Service
# # => 'running'
#
#
- def commit_status(sha)
+ def commit_status(sha, ref)
# implement inside child
end
end
diff --git a/app/models/project_services/external_wiki_service.rb b/app/models/project_services/external_wiki_service.rb
new file mode 100644
index 00000000000..e521186798c
--- /dev/null
+++ b/app/models/project_services/external_wiki_service.rb
@@ -0,0 +1,48 @@
+# == Schema Information
+#
+# Table name: services
+#
+# id :integer not null, primary key
+# type :string(255)
+# title :string(255)
+# project_id :integer not null
+# created_at :datetime
+# updated_at :datetime
+# active :boolean default(FALSE), not null
+# properties :text
+#
+
+class ExternalWikiService < Service
+ include HTTParty
+
+ prop_accessor :external_wiki_url
+ validates :external_wiki_url,
+ presence: true,
+ format: { with: URI::regexp },
+ if: :activated?
+
+ def title
+ 'External Wiki'
+ end
+
+ def description
+ 'Replaces the link to the internal wiki with a link to an external wiki.'
+ end
+
+ def to_param
+ 'external_wiki'
+ end
+
+ def fields
+ [
+ { type: 'text', name: 'external_wiki_url', placeholder: 'The URL of the external Wiki' },
+ ]
+ end
+
+ def execute(_data)
+ @response = HTTParty.get(properties['external_wiki_url'], verify: true) rescue nil
+ if @response !=200
+ nil
+ end
+ end
+end
diff --git a/app/models/project_services/gitlab_ci_service.rb b/app/models/project_services/gitlab_ci_service.rb
index d81623625c9..edaeeffc228 100644
--- a/app/models/project_services/gitlab_ci_service.rb
+++ b/app/models/project_services/gitlab_ci_service.rb
@@ -40,17 +40,17 @@ class GitlabCiService < CiService
service_hook.execute(data)
end
- def commit_status_path(sha)
- project_url + "/commits/#{sha}/status.json?token=#{token}"
+ def commit_status_path(sha, ref)
+ project_url + "/refs/#{ref}/commits/#{sha}/status.json?token=#{token}"
end
- def get_ci_build(sha)
+ def get_ci_build(sha, ref)
@ci_builds ||= {}
- @ci_builds[sha] ||= HTTParty.get(commit_status_path(sha), verify: false)
+ @ci_builds[sha] ||= HTTParty.get(commit_status_path(sha, ref), verify: false)
end
- def commit_status(sha)
- response = get_ci_build(sha)
+ def commit_status(sha, ref)
+ response = get_ci_build(sha, ref)
if response.code == 200 and response["status"]
response["status"]
@@ -59,16 +59,16 @@ class GitlabCiService < CiService
end
end
- def commit_coverage(sha)
- response = get_ci_build(sha)
+ def commit_coverage(sha, ref)
+ response = get_ci_build(sha, ref)
if response.code == 200 and response["coverage"]
response["coverage"]
end
end
- def build_page(sha)
- project_url + "/commits/#{sha}"
+ def build_page(sha, ref)
+ project_url + "/refs/#{ref}/commits/#{sha}"
end
def builds_path
diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb
index 7403e19da9a..c26bc551352 100644
--- a/app/models/project_services/teamcity_service.rb
+++ b/app/models/project_services/teamcity_service.rb
@@ -88,7 +88,7 @@ class TeamcityService < CiService
@response = HTTParty.get("#{url}", verify: false, basic_auth: auth)
end
- def build_page(sha)
+ def build_page(sha, ref)
build_info(sha) if @response.nil? || !@response.code
if @response.code != 200
@@ -103,7 +103,7 @@ class TeamcityService < CiService
end
end
- def commit_status(sha)
+ def commit_status(sha, ref)
build_info(sha) if @response.nil? || !@response.code
return :error unless @response.code == 200 || @response.code == 404
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 47758b8ad68..c6eaa485b8a 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -122,7 +122,7 @@ class Repository
def expire_cache
%i(size branch_names tag_names commit_count graph_log
- readme version contribution_guide).each do |key|
+ readme version contribution_guide changelog license).each do |key|
cache.expire(key)
end
end
@@ -157,6 +157,20 @@ class Repository
end
end
+ def commits_by_user_on_date_log(user, date)
+ # format the date string for git
+ start_date = date.strftime("%Y-%m-%d 00:00:00")
+ end_date = date.strftime("%Y-%m-%d 23:59:59")
+
+ author_emails = '(' + user.all_emails.map{ |e| Regexp.escape(e) }.join('|') + ')'
+ args = %W(git log -E --author=#{author_emails} --after=#{start_date.to_s} --until=#{end_date.to_s} --branches --pretty=format:%h)
+ commits = Gitlab::Popen.popen(args, path_to_repo).first.split("\n")
+
+ commits.map! do |commit_id|
+ commit(commit_id)
+ end
+ end
+
def commits_per_day_for_user(user)
timestamps_by_user_log(user).
group_by { |commit_date| commit_date }.
@@ -197,7 +211,27 @@ class Repository
end
def contribution_guide
- cache.fetch(:contribution_guide) { tree(:head).contribution_guide }
+ cache.fetch(:contribution_guide) do
+ tree(:head).blobs.find do |file|
+ file.contributing?
+ end
+ end
+ end
+
+ def changelog
+ cache.fetch(:changelog) do
+ tree(:head).blobs.find do |file|
+ file.name =~ /^(changelog|history)/i
+ end
+ end
+ end
+
+ def license
+ cache.fetch(:license) do
+ tree(:head).blobs.find do |file|
+ file.name =~ /^license/i
+ end
+ end
end
def head_commit
diff --git a/app/models/service.rb b/app/models/service.rb
index 33734e97c55..f54ad19666b 100644
--- a/app/models/service.rb
+++ b/app/models/service.rb
@@ -112,7 +112,7 @@ class Service < ActiveRecord::Base
def async_execute(data)
return unless supported_events.include?(data[:object_kind])
-
+
Sidekiq::Client.enqueue(ProjectServiceWorker, id, data)
end
@@ -121,9 +121,27 @@ class Service < ActiveRecord::Base
end
def self.available_services_names
- %w(gitlab_ci campfire hipchat pivotaltracker flowdock assembla asana
- emails_on_push gemnasium slack pushover buildbox bamboo teamcity jira
- redmine custom_issue_tracker irker)
+ %w(
+ gitlab_ci
+ campfire
+ hipchat
+ pivotaltracker
+ flowdock
+ assembla
+ asana
+ emails_on_push
+ gemnasium
+ slack
+ pushover
+ buildbox
+ bamboo
+ teamcity
+ jira
+ redmine
+ custom_issue_tracker
+ irker
+ external_wiki
+ )
end
def self.create_from_template(project_id, template)
diff --git a/app/models/tree.rb b/app/models/tree.rb
index 4f5d81f0a5e..f279e896cda 100644
--- a/app/models/tree.rb
+++ b/app/models/tree.rb
@@ -1,38 +1,38 @@
class Tree
include Gitlab::MarkdownHelper
- attr_accessor :entries, :readme, :contribution_guide
+ attr_accessor :repository, :sha, :path, :entries
def initialize(repository, sha, path = '/')
path = '/' if path.blank?
- git_repo = repository.raw_repository
- @entries = Gitlab::Git::Tree.where(git_repo, sha, path)
-
- available_readmes = @entries.select(&:readme?)
-
- if available_readmes.count > 0
- # If there is more than 1 readme in tree, find readme which is supported
- # by markup renderer.
- if available_readmes.length > 1
- supported_readmes = available_readmes.select do |readme|
- previewable?(readme.name)
- end
-
- # Take the first supported readme, or the first available readme, if we
- # don't support any of them
- readme_tree = supported_readmes.first || available_readmes.first
- else
- readme_tree = available_readmes.first
- end
-
- readme_path = path == '/' ? readme_tree.name : File.join(path, readme_tree.name)
- @readme = Gitlab::Git::Blob.find(git_repo, sha, readme_path)
- end
+
+ @repository = repository
+ @sha = sha
+ @path = path
+
+ git_repo = @repository.raw_repository
+ @entries = Gitlab::Git::Tree.where(git_repo, @sha, @path)
+ end
+
+ def readme
+ return @readme if defined?(@readme)
- if contribution_tree = @entries.find(&:contributing?)
- contribution_path = path == '/' ? contribution_tree.name : File.join(path, contribution_tree.name)
- @contribution_guide = Gitlab::Git::Blob.find(git_repo, sha, contribution_path)
+ available_readmes = blobs.select(&:readme?)
+
+ if available_readmes.count == 0
+ return @readme = nil
end
+
+ # Take the first previewable readme, or the first available readme, if we
+ # can't preview any of them
+ readme_tree = available_readmes.find do |readme|
+ previewable?(readme.name)
+ end || available_readmes.first
+
+ readme_path = path == '/' ? readme_tree.name : File.join(path, readme_tree.name)
+
+ git_repo = repository.raw_repository
+ @readme = Gitlab::Git::Blob.find(git_repo, sha, readme_path)
end
def trees
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb
index 4885e1b2fc5..a0da07f5c90 100644
--- a/app/services/git_push_service.rb
+++ b/app/services/git_push_service.rb
@@ -109,7 +109,7 @@ class GitPushService
def push_to_existing_branch?(ref, oldrev)
# Return if this is not a push to a branch (e.g. new commits)
- Gitlab::Git.branch_ref?(ref) && oldrev != Gitlab::Git::BLANK_SHA
+ Gitlab::Git.branch_ref?(ref) && !Gitlab::Git.blank_ref?(oldrev)
end
def push_to_new_branch?(ref, oldrev)
diff --git a/app/services/merge_requests/refresh_service.rb b/app/services/merge_requests/refresh_service.rb
index cab8a1e880e..7eef2c2d6a5 100644
--- a/app/services/merge_requests/refresh_service.rb
+++ b/app/services/merge_requests/refresh_service.rb
@@ -89,7 +89,7 @@ module MergeRequests
end
Note.create_new_commits_note(merge_request, merge_request.project,
- @current_user, new_commits, existing_commits)
+ @current_user, new_commits, existing_commits, @oldrev)
end
end
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 848ed77ebf8..cc5853144c5 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -120,7 +120,7 @@ class NotificationService
return true unless note.noteable_type.present?
# ignore gitlab service messages
- return true if note.note.start_with?('_Status changed to closed_')
+ return true if note.note.start_with?('Status changed to closed')
return true if note.cross_reference? && note.system == true
opts = { noteable_type: note.noteable_type, project_id: note.project_id }
diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml
index 781600a3766..edfcccfcf4c 100644
--- a/app/views/admin/application_settings/_form.html.haml
+++ b/app/views/admin/application_settings/_form.html.haml
@@ -12,13 +12,13 @@
.checkbox
= f.label :signup_enabled do
= f.check_box :signup_enabled
- Signin enabled
+ Signup enabled
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
= f.label :signin_enabled do
= f.check_box :signin_enabled
- Signup enabled
+ Signin enabled
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
diff --git a/app/views/dashboard/_projects.html.haml b/app/views/dashboard/_projects.html.haml
index 3634b2bfd7b..d676576067c 100644
--- a/app/views/dashboard/_projects.html.haml
+++ b/app/views/dashboard/_projects.html.haml
@@ -3,8 +3,8 @@
.input-group
= search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control'
- if current_user.can_create_project?
- .input-group-addon.dash-new-project
- = link_to new_project_path do
- %strong New project
+ %span.input-group-btn
+ = link_to new_project_path, class: 'btn btn-success' do
+ New project
= render 'shared/projects_list', projects: @projects, projects_limit: 20
diff --git a/app/views/dashboard/projects/starred.html.haml b/app/views/dashboard/projects/starred.html.haml
index 94de6092563..670f5ac7af7 100644
--- a/app/views/dashboard/projects/starred.html.haml
+++ b/app/views/dashboard/projects/starred.html.haml
@@ -8,9 +8,9 @@
.input-group
= search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control'
- if current_user.can_create_project?
- .input-group-addon.dash-new-project
- = link_to new_project_path do
- %strong New project
+ %span.input-group-btn
+ = link_to new_project_path, class: 'btn btn-success' do
+ New project
= render 'shared/projects_list', projects: @projects,
projects_limit: 20, stars: true, avatar: false
diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml
index 489138887ae..60d7978b13f 100644
--- a/app/views/events/event/_push.html.haml
+++ b/app/views/events/event/_push.html.haml
@@ -21,5 +21,11 @@
%li.commits-stat
- if event.commits_count > 2
%span ... and #{event.commits_count - 2} more commits.
- = link_to namespace_project_compare_path(event.project.namespace, event.project, from: event.commit_from, to: event.commit_to) do
- %strong Compare &rarr; #{truncate_sha(event.commit_from)}...#{truncate_sha(event.commit_to)}
+ - if event.md_ref?
+ - from = event.commit_from
+ - from_label = truncate_sha(from)
+ - else
+ - from = event.project.default_branch
+ - from_label = from
+ = link_to namespace_project_compare_path(event.project.namespace, event.project, from: from, to: event.commit_to) do
+ %strong Compare &rarr; #{from_label}...#{truncate_sha(event.commit_to)}
diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml
index 6f53e125c47..4f8aec1c67e 100644
--- a/app/views/groups/_projects.html.haml
+++ b/app/views/groups/_projects.html.haml
@@ -3,8 +3,8 @@
.input-group
= search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control'
- if can? current_user, :create_projects, @group
- .input-group-addon.dash-new-project
- = link_to new_project_path(namespace_id: @group.id) do
- %strong New project
+ %span.input-group-btn
+ = link_to new_project_path(namespace_id: @group.id), class: 'btn btn-success' do
+ New project
= render 'shared/projects_list', projects: @projects, projects_limit: 20
diff --git a/app/views/groups/group_members/_group_member.html.haml b/app/views/groups/group_members/_group_member.html.haml
index 003025221b2..30e5faf822e 100644
--- a/app/views/groups/group_members/_group_member.html.haml
+++ b/app/views/groups/group_members/_group_member.html.haml
@@ -31,7 +31,9 @@
%i.fa.fa-minus.fa-inverse
.edit-member.hide.js-toggle-content
+ %br
= form_for [@group, member], remote: true do |f|
- .alert.prepend-top-20
- = f.select :access_level, options_for_select(GroupMember.access_level_roles, member.access_level)
+ .prepend-top-10
+ = f.select :access_level, options_for_select(GroupMember.access_level_roles, member.access_level), {}, class: 'form-control'
+ .prepend-top-10
= f.submit 'Save', class: 'btn btn-save btn-sm'
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml
index 25efe973d4f..8df9366ecbe 100644
--- a/app/views/groups/show.html.haml
+++ b/app/views/groups/show.html.haml
@@ -1,12 +1,13 @@
.dashboard
- %div
+ .header-with-avatar.clearfix
= image_tag group_icon(@group), class: "avatar group-avatar s90"
- .clearfix
- %h2
- = @group.name
- - if @group.description.present?
- %p
- = escaped_autolink(@group.description)
+ %h3
+ = @group.name
+ .username
+ @#{@group.path}
+ - if @group.description.present?
+ .description
+ = escaped_autolink(@group.description)
%hr
.row
%section.activities.col-md-8
diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml
index d340ab1796a..91cae2b572c 100644
--- a/app/views/layouts/nav/_project.html.haml
+++ b/app/views/layouts/nav/_project.html.haml
@@ -75,7 +75,7 @@
- if project_nav_tab? :wiki
= nav_link(controller: :wikis) do
- = link_to namespace_project_wiki_path(@project.namespace, @project, :home), title: 'Wiki', class: 'shortcuts-wiki' do
+ = link_to get_project_wiki_path(@project), title: 'Wiki', class: 'shortcuts-wiki' do
%i.fa.fa-book
%span
Wiki
diff --git a/app/views/notify/project_was_moved_email.html.haml b/app/views/notify/project_was_moved_email.html.haml
index f53de2de287..3cd759f1f57 100644
--- a/app/views/notify/project_was_moved_email.html.haml
+++ b/app/views/notify/project_was_moved_email.html.haml
@@ -6,10 +6,10 @@
= @project.name_with_namespace
%p
To update the remote url in your local repository run (for ssh):
-%p{ style: "background:#f5f5f5; padding:10px; border:1px solid #ddd" }
+%p{ style: "background: #f5f5f5; padding:10px; border:1px solid #ddd" }
git remote set-url origin #{@project.ssh_url_to_repo}
%p
or for http(s):
-%p{ style: "background:#f5f5f5; padding:10px; border:1px solid #ddd" }
+%p{ style: "background: #f5f5f5; padding:10px; border:1px solid #ddd" }
git remote set-url origin #{@project.http_url_to_repo}
%br
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index 409b6b5a193..5a501e43149 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -54,6 +54,9 @@
= f.label :website_url, 'Website', class: "control-label"
.col-sm-10= f.text_field :website_url, class: "form-control"
.form-group
+ = f.label :location, 'Location', class: "control-label"
+ .col-sm-10= f.text_field :location, class: "form-control"
+ .form-group
= f.label :bio, class: "control-label"
.col-sm-10
= f.text_area :bio, rows: 4, class: "form-control", maxlength: 250
diff --git a/app/views/projects/_commit_button.html.haml b/app/views/projects/_commit_button.html.haml
index fd8320adb8d..35f7e7bb34b 100644
--- a/app/views/projects/_commit_button.html.haml
+++ b/app/views/projects/_commit_button.html.haml
@@ -2,8 +2,5 @@
.commit-button-annotation
= button_tag 'Commit Changes',
class: 'btn commit-btn js-commit-button btn-create'
- .message
- to branch
- %strong= ref
= link_to 'Cancel', cancel_path,
class: 'btn btn-cancel', data: {confirm: leave_edit_message}
diff --git a/app/views/projects/_issuable_form.html.haml b/app/views/projects/_issuable_form.html.haml
index a7cd129b631..7fd5fe8a6e1 100644
--- a/app/views/projects/_issuable_form.html.haml
+++ b/app/views/projects/_issuable_form.html.haml
@@ -71,10 +71,10 @@
= link_to 'Create new label', new_namespace_project_label_path(issuable.project.namespace, issuable.project), target: :blank
.form-actions
- - if !issuable.project.empty_repo? && contribution_guide_url(issuable.project) && !issuable.persisted?
+ - if !issuable.project.empty_repo? && (guide_url = contribution_guide_url(issuable.project)) && !issuable.persisted?
%p
Please review the
- %strong #{link_to 'guidelines for contribution', contribution_guide_url(issuable.project)}
+ %strong #{link_to 'guidelines for contribution', guide_url}
to this repository.
- if issuable.new_record?
= f.submit "Submit new #{issuable.class.model_name.human.downcase}", class: 'btn btn-create'
diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml
index 48d4c33ce85..1747f36dcf3 100644
--- a/app/views/projects/diffs/_diffs.html.haml
+++ b/app/views/projects/diffs/_diffs.html.haml
@@ -1,4 +1,4 @@
-.row
+.row.prepend-top-20.append-bottom-10
.col-md-8
= render 'projects/diffs/stats', diffs: diffs
.col-md-4
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index 36d98b26712..860ab096341 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -22,14 +22,8 @@
.diff-btn-group
- if blob.text?
- - unless params[:view] == 'parallel'
- %label
- = check_box_tag nil, 1, false, class: 'js-toggle-diff-line-wrap'
- Wrap text
- &nbsp;
- = link_to '#', class: 'js-toggle-diff-comments btn btn-sm' do
- %i.fa.fa-chevron-down
- Show/Hide comments
+ = link_to '#', class: 'js-toggle-diff-comments btn btn-sm active has_tooltip', title: "Toggle comments for this file" do
+ %i.fa.fa-comments
&nbsp;
- if @merge_request && @merge_request.source_project
@@ -39,7 +33,7 @@
= view_file_btn(@commit.id, diff_file, project)
- .diff-content
+ .diff-content.diff-wrap-lines
-# Skipp all non non-supported blobs
- return unless blob.respond_to?('text?')
- if blob.text?
diff --git a/app/views/projects/diffs/_stats.html.haml b/app/views/projects/diffs/_stats.html.haml
index d387ec2f75c..1625930615a 100644
--- a/app/views/projects/diffs/_stats.html.haml
+++ b/app/views/projects/diffs/_stats.html.haml
@@ -1,17 +1,14 @@
.js-toggle-container
.commit-stat-summary
Showing
- %strong.cdark #{pluralize(diffs.count, "changed file")}
+ = link_to '#', class: 'js-toggle-button' do
+ %strong #{pluralize(diffs.count, "changed file")}
- if current_controller?(:commit)
- unless @commit.has_zero_stats?
with
%strong.cgreen #{@commit.stats.additions} additions
and
%strong.cred #{@commit.stats.deletions} deletions
- &nbsp;
- = link_to '#', class: 'btn btn-sm js-toggle-button' do
- Show diff stats
- %i.fa.fa-chevron-down
.file-stats.js-toggle-content.hide
%ul.bordered-list
- diffs.each_with_index do |diff, i|
diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml
index fc3e35640dc..0d3028d50b4 100644
--- a/app/views/projects/issues/_discussion.html.haml
+++ b/app/views/projects/issues/_discussion.html.haml
@@ -6,11 +6,12 @@
= link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close js-note-target-close", title: "Close Issue"
.row
%section.col-md-9
+ .votes-holder.pull-right
+ #votes= render 'votes/votes_block', votable: @issue
.participants
%span= pluralize(@issue.participants.count, 'participant')
- @issue.participants.each do |participant|
= link_to_member(@project, participant, name: false, size: 24)
-
.voting_notes#notes= render "projects/notes/notes_with_form"
%aside.col-md-3
.issuable-affix
@@ -20,15 +21,10 @@
%hr
.context
= render partial: 'issue_context', locals: { issue: @issue }
- %hr
- .clearfix
- .votes-holder
- %h6 Votes
- #votes= render 'votes/votes_block', votable: @issue
- if @issue.labels.any?
- %hr
- %h6 Labels
+ .issuable-context-title
+ %label Labels
.issue-show-labels
- @issue.labels.each do |label|
= link_to namespace_project_issues_path(@project.namespace, @project, label_name: label.name) do
diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml
index 3b50ce01351..7b06fe72882 100644
--- a/app/views/projects/issues/_issue.html.haml
+++ b/app/views/projects/issues/_issue.html.haml
@@ -17,7 +17,7 @@
= issue.notes.count
.issue-info
- %span.light= "##{issue.iid}"
+ = link_to "##{issue.iid}", issue_path(issue), class: "light"
- if issue.assignee
assigned to #{link_to_member(@project, issue.assignee)}
- if issue.votes_count > 0
diff --git a/app/views/projects/issues/_issue_context.html.haml b/app/views/projects/issues/_issue_context.html.haml
index cb4846a41d1..91fe0b68371 100644
--- a/app/views/projects/issues/_issue_context.html.haml
+++ b/app/views/projects/issues/_issue_context.html.haml
@@ -27,22 +27,23 @@
= hidden_field_tag :issue_context
= f.submit class: 'btn'
- %div.prepend-top-20.clearfix
- .issuable-context-title
- %label
- Subscription:
- %button.btn.btn-block.subscribe-button
- %i.fa.fa-eye
- %span= @issue.subscribed?(current_user) ? "Unsubscribe" : "Subscribe"
- - subscribtion_status = @issue.subscribed?(current_user) ? "subscribed" : "unsubscribed"
- .subscription-status{"data-status" => subscribtion_status}
- .description-block.unsubscribed{class: ( "hidden" if @issue.subscribed?(current_user) )}
- You're not receiving notifications from this thread.
- .description-block.subscribed{class: ( "hidden" unless @issue.subscribed?(current_user) )}
- You're receiving notifications because you're subscribed to this thread.
+ - if current_user
+ %div.prepend-top-20.clearfix
+ .issuable-context-title
+ %label
+ Subscription:
+ %button.btn.btn-block.subscribe-button
+ %i.fa.fa-eye
+ %span= @issue.subscribed?(current_user) ? "Unsubscribe" : "Subscribe"
+ - subscribtion_status = @issue.subscribed?(current_user) ? "subscribed" : "unsubscribed"
+ .subscription-status{"data-status" => subscribtion_status}
+ .description-block.unsubscribed{class: ( "hidden" if @issue.subscribed?(current_user) )}
+ You're not receiving notifications from this thread.
+ .description-block.subscribed{class: ( "hidden" unless @issue.subscribed?(current_user) )}
+ You're receiving notifications because you're subscribed to this thread.
:coffeescript
$ ->
new Subscription("#{toggle_subscription_namespace_project_issue_path(@issue.project.namespace, @project, @issue)}")
-
- \ No newline at end of file
+
+
diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml
index 2cb94d10b6f..54e3009cca2 100644
--- a/app/views/projects/issues/index.html.haml
+++ b/app/views/projects/issues/index.html.haml
@@ -18,7 +18,7 @@
.clearfix
.issues_bulk_update.hide
= form_tag bulk_update_namespace_project_issues_path(@project.namespace, @project), method: :post do
- = select_tag('update[state_event]', options_for_select([['Open', 'reopen'], ['Closed', 'close']]), prompt: "Status")
+ = select_tag('update[state_event]', options_for_select([['Open', 'reopen'], ['Closed', 'close']]), prompt: "Status", class: 'form-control')
= project_users_select_tag('update[assignee_id]', placeholder: 'Assignee')
= select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone")
= hidden_field_tag 'update[issues_ids]', []
diff --git a/app/views/projects/merge_requests/_discussion.html.haml b/app/views/projects/merge_requests/_discussion.html.haml
index 79a093dc775..eb72eaabd8b 100644
--- a/app/views/projects/merge_requests/_discussion.html.haml
+++ b/app/views/projects/merge_requests/_discussion.html.haml
@@ -7,6 +7,8 @@
.row
%section.col-md-9
+ .votes-holder.pull-right
+ #votes= render 'votes/votes_block', votable: @merge_request
= render "projects/merge_requests/show/participants"
= render "projects/notes/notes_with_form"
%aside.col-md-3
@@ -17,14 +19,10 @@
%hr
.context
= render partial: 'projects/merge_requests/show/context', locals: { merge_request: @merge_request }
- %hr
- .votes-holder
- %h6 Votes
- #votes= render 'votes/votes_block', votable: @merge_request
- if @merge_request.labels.any?
- %hr
- %h6 Labels
+ .issuable-context-title
+ %label Labels
.merge-request-show-labels
- @merge_request.labels.each do |label|
= link_to namespace_project_merge_requests_path(@project.namespace, @project, label_name: label.name) do
diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml
index 1eba1a96b7b..ecbff722b42 100644
--- a/app/views/projects/merge_requests/_merge_request.html.haml
+++ b/app/views/projects/merge_requests/_merge_request.html.haml
@@ -22,7 +22,7 @@
%i.fa.fa-comments
= merge_request.mr_and_commit_notes.count
.merge-request-info
- %span.light= "##{merge_request.iid}"
+ = link_to "##{merge_request.iid}", merge_request_path(merge_request), class: "light"
- if merge_request.assignee
assigned to #{link_to_member(merge_request.source_project, merge_request.assignee)}
- else
diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml
index bf80afe8785..1d8eef4e8ce 100644
--- a/app/views/projects/merge_requests/_new_submit.html.haml
+++ b/app/views/projects/merge_requests/_new_submit.html.haml
@@ -69,10 +69,10 @@
= link_to 'Create new label', new_namespace_project_label_path(@merge_request.target_project.namespace, @merge_request.target_project), target: :blank
.form-actions
- - if contribution_guide_url(@target_project)
+ - if guide_url = contribution_guide_url(@target_project)
%p
Please review the
- %strong #{link_to 'guidelines for contribution', contribution_guide_url(@target_project)}
+ %strong #{link_to 'guidelines for contribution', guide_url}
to this repository.
= f.hidden_field :source_project_id
= f.hidden_field :source_branch
diff --git a/app/views/projects/merge_requests/show/_context.html.haml b/app/views/projects/merge_requests/show/_context.html.haml
index 753c7e0e611..14ad89a2000 100644
--- a/app/views/projects/merge_requests/show/_context.html.haml
+++ b/app/views/projects/merge_requests/show/_context.html.haml
@@ -29,19 +29,20 @@
= hidden_field_tag :merge_request_context
= f.submit class: 'btn'
- %div.prepend-top-20.clearfix
- .issuable-context-title
- %label
- Subscription:
- %button.btn.btn-block.subscribe-button
- %i.fa.fa-eye
- %span= @merge_request.subscribed?(current_user) ? "Unsubscribe" : "Subscribe"
- - subscribtion_status = @merge_request.subscribed?(current_user) ? "subscribed" : "unsubscribed"
- .subscription-status{"data-status" => subscribtion_status}
- .description-block.unsubscribed{class: ( "hidden" if @merge_request.subscribed?(current_user) )}
- You're not receiving notifications from this thread.
- .description-block.subscribed{class: ( "hidden" unless @merge_request.subscribed?(current_user) )}
- You're receiving notifications because you're subscribed to this thread.
+ - if current_user
+ %div.prepend-top-20.clearfix
+ .issuable-context-title
+ %label
+ Subscription:
+ %button.btn.btn-block.subscribe-button
+ %i.fa.fa-eye
+ %span= @merge_request.subscribed?(current_user) ? "Unsubscribe" : "Subscribe"
+ - subscribtion_status = @merge_request.subscribed?(current_user) ? "subscribed" : "unsubscribed"
+ .subscription-status{"data-status" => subscribtion_status}
+ .description-block.unsubscribed{class: ( "hidden" if @merge_request.subscribed?(current_user) )}
+ You're not receiving notifications from this thread.
+ .description-block.subscribed{class: ( "hidden" unless @merge_request.subscribed?(current_user) )}
+ You're receiving notifications because you're subscribed to this thread.
:coffeescript
$ ->
diff --git a/app/views/projects/merge_requests/show/_mr_ci.html.haml b/app/views/projects/merge_requests/show/_mr_ci.html.haml
index 85a7103f3bc..ffa3f7b0e36 100644
--- a/app/views/projects/merge_requests/show/_mr_ci.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_ci.html.haml
@@ -23,6 +23,12 @@
%i.fa.fa-spinner
Checking for CI status for #{@merge_request.last_commit_short_sha}
+ .ci_widget.ci-canceled{style: "display:none"}
+ %i.fa.fa-times
+ %span CI build canceled
+ for #{@merge_request.last_commit_short_sha}.
+ = link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
+
.ci_widget.ci-error{style: "display:none"}
%i.fa.fa-times
%span Cannot connect to the CI server. Please check your settings and try again.
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 7fc612c0c7d..173a3080b31 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -21,64 +21,65 @@
= f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'select2', tabindex: 2}
%hr
- .js-toggle-container
+
+ .project-import.js-toggle-container
.form-group
- .col-sm-2
+ %label.control-label Import project from
.col-sm-10
- = link_to "#", class: 'js-toggle-button' do
- %i.fa.fa-upload
- %span Import existing repository by URL
- .js-toggle-content.hide
- .form-group.import-url-data
- = f.label :import_url, class: 'control-label' do
- %span Import existing git repo
- .col-sm-10
- = f.text_field :import_url, class: 'form-control', placeholder: 'https://github.com/randx/six.git'
- .alert.alert-info.prepend-top-10
- This URL must be publicly accessible or you can add a username and password like this: https://username:password@gitlab.com/company/project.git.
- %br
- The import will time out after 4 minutes. For big repositories, use a clone/push combination.
- For SVN repositories, check #{link_to "this migrating from SVN doc.", "http://doc.gitlab.com/ce/workflow/migrating_from_svn.html"}
+ - if github_import_enabled?
+ = link_to status_import_github_path, class: 'btn' do
+ %i.fa.fa-github
+ GitHub
+ - else
+ = link_to '#', class: 'how_to_import_link light btn' do
+ %i.fa.fa-github
+ GitHub
+ = render 'github_import_modal'
- .project-import.form-group
- %label.control-label Import projects from
- .col-sm-10
- - if github_import_enabled?
- = link_to status_import_github_path, class: 'btn' do
- %i.fa.fa-github
- GitHub
- - else
- = link_to '#', class: 'how_to_import_link light btn' do
- %i.fa.fa-github
- GitHub
- = render 'github_import_modal'
-
-
- - if bitbucket_import_enabled?
- = link_to status_import_bitbucket_path, class: 'btn' do
- %i.fa.fa-bitbucket
- Bitbucket
- - else
- = link_to '#', class: 'how_to_import_link light btn' do
- %i.fa.fa-bitbucket
- Bitbucket
- = render 'bitbucket_import_modal'
-
- - unless request.host == 'gitlab.com'
- - if gitlab_import_enabled?
- = link_to status_import_gitlab_path, class: 'btn' do
- %i.fa.fa-heart
- GitLab.com
+ - if bitbucket_import_enabled?
+ = link_to status_import_bitbucket_path, class: 'btn' do
+ %i.fa.fa-bitbucket
+ Bitbucket
- else
= link_to '#', class: 'how_to_import_link light btn' do
- %i.fa.fa-heart
- GitLab.com
- = render 'gitlab_import_modal'
+ %i.fa.fa-bitbucket
+ Bitbucket
+ = render 'bitbucket_import_modal'
- = link_to new_import_gitorious_path, class: 'btn' do
- %i.icon-gitorious.icon-gitorious-small
- Gitorious.org
+ - unless request.host == 'gitlab.com'
+ - if gitlab_import_enabled?
+ = link_to status_import_gitlab_path, class: 'btn' do
+ %i.fa.fa-heart
+ GitLab.com
+ - else
+ = link_to '#', class: 'how_to_import_link light btn' do
+ %i.fa.fa-heart
+ GitLab.com
+ = render 'gitlab_import_modal'
+
+ = link_to new_import_gitorious_path, class: 'btn' do
+ %i.icon-gitorious.icon-gitorious-small
+ Gitorious.org
+
+ = link_to "#", class: 'btn js-toggle-button' do
+ %i.fa.fa-git
+ %span Any repo by URL
+
+ .js-toggle-content.hide
+ .form-group.import-url-data
+ = f.label :import_url, class: 'control-label' do
+ %span Git repository URL
+ .col-sm-10
+ = f.text_field :import_url, class: 'form-control', placeholder: 'https://username:password@gitlab.company.com/group/project.git'
+ .alert.alert-info.prepend-top-10
+ %ul
+ %li
+ The repository must be accessible over HTTP(S). If it is not publicly accessible, you can add authentication information to the URL: <code>https://username:password@gitlab.company.com/group/project.git</code>.
+ %li
+ The import will time out after 4 minutes. For big repositories, use a clone/push combination.
+ %li
+ To migrate an SVN repository, check out #{link_to "this document", "http://doc.gitlab.com/ce/workflow/migrating_from_svn.html"}.
%hr.prepend-botton-10
diff --git a/app/views/projects/project_members/_project_member.html.haml b/app/views/projects/project_members/_project_member.html.haml
index 1f31d84dd1d..a07d0762334 100644
--- a/app/views/projects/project_members/_project_member.html.haml
+++ b/app/views/projects/project_members/_project_member.html.haml
@@ -29,7 +29,9 @@
%i.fa.fa-minus.fa-inverse
.edit-member.hide.js-toggle-content
+ %br
= form_for member, as: :project_member, url: namespace_project_project_member_path(@project.namespace, @project, member.user), remote: true do |f|
- .alert.prepend-top-20
- = f.select :access_level, options_for_select(ProjectMember.access_roles, member.access_level)
- = f.submit 'Save', class: 'btn btn-save btn-sm'
+ .prepend-top-10
+ = f.select :access_level, options_for_select(ProjectMember.access_roles, member.access_level), {}, class: 'form-control'
+ .prepend-top-10
+ = f.submit 'Save', class: 'btn btn-save'
diff --git a/app/views/projects/protected_branches/index.html.haml b/app/views/projects/protected_branches/index.html.haml
index cfe28084170..4db71ce8ff9 100644
--- a/app/views/projects/protected_branches/index.html.haml
+++ b/app/views/projects/protected_branches/index.html.haml
@@ -23,12 +23,12 @@
.col-sm-10
= f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "select2"})
.form-group
- = f.label :developers_can_push, class: 'control-label' do
- Developers can push
- .col-sm-10
+ .col-sm-offset-2.col-sm-10
.checkbox
- = f.check_box :developers_can_push
- %span.descr Allow developers to push to this branch
+ = f.label :developers_can_push do
+ = f.check_box :developers_can_push
+ %strong Developers can push
+ .help-block Allow developers to push to this branch
.form-actions
= f.submit 'Protect', class: "btn-create btn"
= render 'branches_list'
diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml
index bb983229b1c..32e97a754cb 100644
--- a/app/views/projects/services/_form.html.haml
+++ b/app/views/projects/services/_form.html.haml
@@ -101,5 +101,6 @@
.form-actions
= f.submit 'Save', class: 'btn btn-save'
&nbsp;
- - if @service.valid? && @service.activated? && @service.can_test?
- = link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service.to_param), class: 'btn'
+ - if @service.valid? && @service.activated?
+ - disabled = @service.can_test? ? '':'disabled'
+ = link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service.to_param), class: "btn #{disabled}"
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 74b07395650..cfa6f558dd6 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -44,25 +44,36 @@
%i.fa.fa-code-fork.project-fork-icon
Forked from:
%br
- = link_to @project.forked_from_project.name_with_namespace, namespace_project_path(@project.namespace, @project.forked_from_project)
+ = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
- unless @project.empty_repo?
= link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-block' do
Compare code
- - if @repository.version
- - version = @repository.version
- = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, version.name)), class: 'btn btn-block' do
+ - if version = @repository.version
+ - detail_url = changelog_url(@project) || version_url(@project)
+ = link_to detail_url, class: 'btn btn-block' do
Version:
%span.count
= @repository.blob_by_oid(version.id).data
+ - elsif @repository.changelog
+ = link_to changelog_url(@project), class: 'btn btn-block' do
+ View changelog
+
+ - if @repository.contribution_guide
+ = link_to contribution_guide_url(@project), class: 'btn btn-block' do
+ View contribution guide
+
+ - if @repository.license
+ = link_to license_url(@project), class: 'btn btn-block' do
+ View license
.prepend-top-10
%p
%span.light Created on
#{@project.created_at.stamp('Aug 22, 2013')}
%p
- %span.light Owned by
+ %span.light Owned by #{@project.group ? "the" : nil}
- if @project.group
#{link_to @project.group.name, @project.group} group
- else
diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml
index b34dd53e3b5..c0a9923348e 100644
--- a/app/views/shared/_group_form.html.haml
+++ b/app/views/shared/_group_form.html.haml
@@ -15,7 +15,7 @@
= f.text_field :path, placeholder: 'open-source', class: 'form-control',
autofocus: local_assigns[:autofocus] || false
- if @group.persisted?
- .alert.alert-danger
+ .alert.alert-warning.prepend-top-10
%ul
%li Changing group path can have unintended side effects.
%li Renaming group path will rename directory for all related projects
diff --git a/app/views/users/_profile.html.haml b/app/views/users/_profile.html.haml
index 0a70b738071..bca71444956 100644
--- a/app/views/users/_profile.html.haml
+++ b/app/views/users/_profile.html.haml
@@ -21,7 +21,7 @@
%li
%span.light Website:
%strong= link_to user.short_website_url, user.full_website_url
- - unless user.bio.blank?
+ - unless user.location.blank?
%li
- %span.light Bio:
- %span= user.bio
+ %span.light Location:
+ %strong= user.location
diff --git a/app/views/users/calendar.html.haml b/app/views/users/calendar.html.haml
index 1d1c974da24..d113ceeb753 100644
--- a/app/views/users/calendar.html.haml
+++ b/app/views/users/calendar.html.haml
@@ -4,5 +4,6 @@
new calendar(
#{@timestamps.to_json},
#{@starting_year},
- #{@starting_month}
+ #{@starting_month},
+ '#{user_calendar_activities_path}'
);
diff --git a/app/views/users/calendar_activities.html.haml b/app/views/users/calendar_activities.html.haml
new file mode 100644
index 00000000000..7c0cecfadb5
--- /dev/null
+++ b/app/views/users/calendar_activities.html.haml
@@ -0,0 +1,33 @@
+.calendar_commit_activity
+ %hr
+ %h4
+ Commit Activity
+ %strong
+ - if @commit_count == 0
+ no
+ - else
+ = @commit_count
+ %span.calendar_commit_date
+ unique
+ = 'commit'.pluralize(@commit_count)
+ on
+ = @calendar_date.strftime("%b %d, %Y") rescue ''
+ -unless @commit_count == 0
+ %hr
+ - @calendar_activities.each do |project, commits|
+ - next if commits.empty?
+ %div.js-toggle-container
+ %strong
+ = pluralize(commits.count, 'commit')
+ in project
+ = link_to project.name_with_namespace, project_path(project)
+ %a.text-expander.js-toggle-button &hellip;
+ %hr
+ %div.js-toggle-content
+ - commits.each do |commit|
+ %span.monospace
+ = commit.committed_date.strftime("%H:%M")
+ = link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit_short_id"
+ = link_to commit.message, namespace_project_commit_path(project.namespace, project, commit), class: "commit-row-message str-truncated"
+ %br
+ %hr
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index abd6b229782..fd96020d129 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -2,29 +2,34 @@
= link_to '#aside', class: 'show-aside' do
%i.fa.fa-angle-left
%section.col-md-8
- %h3.page-title
+ .header-with-avatar
= image_tag avatar_icon(@user.email, 90), class: "avatar avatar-tile s90", alt: ''
- = @user.name
- - if @user == current_user
- .pull-right
- = link_to profile_path, class: 'btn' do
- %i.fa.fa-pencil-square-o
- Edit Profile settings
- %br
- %span.user-show-username #{@user.username}
- %br
- %small member since #{@user.created_at.stamp("Nov 12, 2031")}
+ %h3
+ = @user.name
+ - if @user == current_user
+ .pull-right
+ = link_to profile_path, class: 'btn btn-sm' do
+ %i.fa.fa-pencil-square-o
+ Edit Profile settings
+ .username
+ @#{@user.username}
+ .description
+ - if @user.bio.present?
+ = @user.bio
+
.clearfix
- if @groups.any?
- %h4 Groups
- = render 'groups', groups: @groups
- %hr
+ .prepend-top-20
+ %h4 Groups
+ = render 'groups', groups: @groups
+ %hr
.hidden-xs
.user-calendar
%h4.center.light
%i.fa.fa-spinner.fa-spin
+ .user-calendar-activities
%hr
%h4
User Activity
diff --git a/app/views/votes/_votes_block.html.haml b/app/views/votes/_votes_block.html.haml
index 788d9065a7b..36ea6742064 100644
--- a/app/views/votes/_votes_block.html.haml
+++ b/app/views/votes/_votes_block.html.haml
@@ -1,6 +1,10 @@
.votes.votes-block
- .progress
- .progress-bar.progress-bar-success{style: "width: #{votable.upvotes_in_percent}%;"}
- .progress-bar.progress-bar-danger{style: "width: #{votable.downvotes_in_percent}%;"}
- .upvotes= "#{votable.upvotes} up"
- .downvotes= "#{votable.downvotes} down"
+ .btn-group
+ - unless votable.upvotes.zero?
+ .btn.btn-sm.disabled.cgreen
+ %i.fa.fa-thumbs-up
+ = votable.upvotes
+ - unless votable.downvotes.zero?
+ .btn.btn-sm.disabled.cred
+ %i.fa.fa-thumbs-down
+ = votable.downvotes
diff --git a/app/views/votes/_votes_inline.html.haml b/app/views/votes/_votes_inline.html.haml
index ee805474830..2cb3ae04e1a 100644
--- a/app/views/votes/_votes_inline.html.haml
+++ b/app/views/votes/_votes_inline.html.haml
@@ -1,9 +1,9 @@
.votes.votes-inline
- unless votable.upvotes.zero?
- .upvotes
+ %span.upvotes.cgreen
+ #{votable.upvotes}
- unless votable.downvotes.zero?
\/
- unless votable.downvotes.zero?
- .downvotes
+ %span.downvotes.cred
\- #{votable.downvotes}
diff --git a/app/workers/irker_worker.rb b/app/workers/irker_worker.rb
index e1a99d9cad8..8b50f423984 100644
--- a/app/workers/irker_worker.rb
+++ b/app/workers/irker_worker.rb
@@ -57,9 +57,9 @@ class IrkerWorker
end
def send_branch_updates(push_data, project, repo_name, committer, branch)
- if push_data['before'] == Gitlab::Git::BLANK_SHA
+ if Gitlab::Git.blank_ref?(push_data['before'])
send_new_branch project, repo_name, committer, branch
- elsif push_data['after'] == Gitlab::Git::BLANK_SHA
+ elsif Gitlab::Git.blank_ref?(push_data['after'])
send_del_branch repo_name, committer, branch
end
end
@@ -83,7 +83,7 @@ class IrkerWorker
return if push_data['total_commits_count'] == 0
# Next message is for number of commit pushed, if any
- if push_data['before'] == Gitlab::Git::BLANK_SHA
+ if Gitlab::Git.blank_ref?(push_data['before'])
# Tweak on push_data["before"] in order to have a nice compare URL
push_data['before'] = before_on_new_branch push_data, project
end