Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee

Conflicts:
	Gemfile.lock
	app/controllers/uploads_controller.rb
	app/models/application_setting.rb
	app/models/project_services/issue_tracker_service.rb
	app/views/projects/services/_form.html.haml
	db/schema.rb
	doc/integration/README.md
	features/steps/groups.rb
This commit is contained in:
Dmitriy Zaporozhets
2015-03-11 18:41:41 -07:00
305 changed files with 5423 additions and 2107 deletions
+52 -4
View File
@@ -1,8 +1,13 @@
Please view this file on the master branch, on stable branches it's out of date.
v 7.9.0 (unreleased)
- Fix mass SQL statements on initial push (Hannes Rosenögger)
- Add tag push notifications and normalize HipChat and Slack messages to be consistent (Stan Hu)
- Add comment notification events to HipChat and Slack services (Stan Hu)
- Add issue and merge request events to HipChat and Slack services (Stan Hu)
- Fix merge request URL passed to Webhooks. (Stan Hu)
- Fix bug that caused a server error when editing a comment to "+1" or "-1" (Stan Hu)
- Fix code preview theme setting for comments, issues, merge requests, and snippets (Stan Hu)
- Move labels/milestones tabs to sidebar
- Upgrade Rails gem to version 4.1.9.
- Improve error messages for file edit failures
@@ -13,6 +18,7 @@ v 7.9.0 (unreleased)
- Fix ordering of imported but unchanged projects (Marco Wessel)
- Mobile UI improvements: make aside content expandable
- Expose avatar_url in projects API
- Fix checkbox alignment on the application settings page.
- Generalize image upload in drag and drop in markdown to all files (Hannes Rosenögger)
- Fix mass-unassignment of issues (Robert Speicher)
- Allow user confirmation to be skipped for new users via API
@@ -20,6 +26,50 @@ v 7.9.0 (unreleased)
- Ignore case of LDAP user DN when checking group membership.
- Add brakeman (security scanner for Ruby on Rails)
- Slack username and channel options
- Add grouped milestones from all projects to dashboard.
- Web hook sends pusher email as well as commiter
- Add Bitbucket omniauth provider.
- Add Bitbucket importer.
- Support referencing issues to a project whose name starts with a digit
- Condense commits already in target branch when updating merge request source branch.
- Send notifications and leave system comments when bulk updating issues.
- Automatically link commit ranges to compare page: sha1...sha4 or sha1..sha4 (includes sha1 in comparison)
- Move groups page from profile to dashboard
- Starred projects page at dashboard
- Blocking user does not remove him/her from project/groups but show blocked label
- Change subject of EmailsOnPush emails to include namespace, project and branch.
- Change subject of EmailsOnPush emails to include first commit message when multiple were pushed.
- Remove confusing footer from EmailsOnPush mail body.
- Add list of changed files to EmailsOnPush emails.
- Add option to send EmailsOnPush emails from committer email if domain matches.
- Add option to disable code diffs in EmailOnPush emails.
- Wrap commit message in EmailsOnPush email.
- Send EmailsOnPush emails when deleting commits using force push.
- Fix EmailsOnPush email comparison link to include first commit.
- Fix highliht of selected lines in file
- Reject access to group/project avatar if the user doesn't have access.
- Add database migration to clean group duplicates with same path and name (Make sure you have a backup before update)
- Add GitLab active users count to rake gitlab:check
- Starred projects page at dashboard
- Make email display name configurable
- Improve json validation in hook data
v 7.8.4
- Fix issue_tracker_id substitution in custom issue trackers
- Fix path and name duplication in namespaces
v 7.8.3
- Bump version of gitlab_git fixing annotated tags without message
v 7.8.2
- Fix service migration issue when upgrading from versions prior to 7.3
- Fix setting of the default use project limit via admin UI
- Fix showing of already imported projects for GitLab and Gitorious importers
- Fix response of push to repository to return "Not found" if user doesn't have access
- Fix check if user is allowed to view the file attachment
- Fix import check for case sensetive namespaces
- Increase timeout for Git-over-HTTP requests to 1 hour since large pulls/pushes can take a long time.
- Properly handle autosave local storage exceptions.
- Escape wildcards when searching LDAP by username.
v 7.8.1
- Fix run of custom post receive hooks
@@ -27,9 +77,6 @@ v 7.8.1
- Fix the warning for LDAP users about need to set password
- Fix avatars which were not shown for non logged in users
- Fix urls for the issues when relative url was enabled
- Add Bitbucket omniauth provider.
- Add Bitbucket importer.
- Support referencing issues to a project whose name starts with a digit
v 7.8.0
- Fix access control and protection against XSS for note attachments and other uploads.
@@ -48,7 +95,8 @@ v 7.8.0
- Add notes for label changes in issue and merge requests
- Show tags in commit view (Hannes Rosenögger)
- Only count a user's vote once on a merge request or issue (Michael Clarke)
- Increate font size when browse source files and diffs
- Increase font size when browse source files and diffs
- Service Templates now let you set default values for all services
- Create new file in empty repository using GitLab UI
- Ability to clone project using oauth2 token
- Upgrade Sidekiq gem to version 3.3.0
+9
View File
@@ -20,6 +20,13 @@ Please treat our volunteers with courtesy and respect, it will go a long way tow
Issues and merge requests should be in English and contain appropriate language for audiences of all ages.
## Helping others
Please help other GitLab users when you can.
The channnels people will reach out on can be found on the [getting help page](https://about.gitlab.com/getting-help/).
Sign up for the mailinglist, answer GitLab questions on StackOverflow or respond in the irc channel.
You can also sign up on [CodeTriage](http://www.codetriage.com/gitlabhq/gitlabhq) to help with one issue every day.
## Issue tracker
To get support for your particular problem please use the channels as detailed in the [getting help section of the readme](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md#getting-help). Professional [support subscriptions](http://about.gitlab.com/subscription/) and [consulting services](http://about.gitlab.com/consultancy/) are available from [GitLab.com](http://about.gitlab.com/).
@@ -56,6 +63,8 @@ Merge requests can be filed either at [gitlab.com](https://gitlab.com/gitlab-org
If you are new to GitLab development (or web development in general), search for the label `easyfix` ([gitlab.com](https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name=easyfix), [github](https://github.com/gitlabhq/gitlabhq/labels/easyfix)). Those are issues easy to fix, marked by the GitLab core-team. If you are unsure how to proceed but want to help, mention one of the core-team members to give you a hint.
To start with GitLab download the [GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit) and see [Development section](doc/development/README.md) in the help file.
### Merge request guidelines
If you can, please submit a merge request with the fix or improvements including tests. If you don't know how to fix the issue but can write a test that exposes the issue we will accept that as well. In general bug fixes that include a regression test are merged quickly while new features without proper tests are least likely to receive timely feedback. The workflow to make a merge request is as follows:
+5 -2
View File
@@ -39,7 +39,7 @@ gem "browser"
# Extracting information from a git repository
# Provide access to Gitlab::Git library
gem "gitlab_git", '7.0.0.rc14'
gem "gitlab_git", '7.1.0'
# Ruby/Rack Git Smart-HTTP Server Handler
gem 'gitlab-grack', '~> 2.0.0.rc2', require: 'grack'
@@ -179,6 +179,9 @@ gem 'ace-rails-ap'
# Keyboard shortcuts
gem 'mousetrap-rails'
# Shutting down requests that take too long
gem "slowpoke"
gem "sass-rails", '~> 4.0.2'
gem "coffee-rails"
gem "uglifier"
@@ -252,7 +255,7 @@ group :development, :test do
gem 'jasmine', '2.0.2'
gem "spring", '1.3.1'
gem "spring", '~> 1.3.1'
gem "spring-commands-rspec", '1.0.4'
gem "spring-commands-spinach", '1.0.0'
end
+11 -3
View File
@@ -149,6 +149,7 @@ GEM
enumerize (0.7.0)
activesupport (>= 3.2)
equalizer (0.0.8)
errbase (0.0.2)
erubis (2.7.0)
escape_utils (0.2.4)
eventmachine (1.0.4)
@@ -212,7 +213,7 @@ GEM
mime-types (~> 1.19)
gitlab_emoji (0.0.1.1)
emoji (~> 1.0.1)
gitlab_git (7.0.0.rc14)
gitlab_git (7.1.0)
activesupport (~> 4.0)
charlock_holmes (~> 0.6)
gitlab-linguist (~> 3.0)
@@ -429,6 +430,7 @@ GEM
rack
rack-test (0.6.3)
rack (>= 1.0)
rack-timeout (0.2.0)
rails (4.1.9)
actionmailer (= 4.1.9)
actionpack (= 4.1.9)
@@ -482,6 +484,8 @@ GEM
rest-client (1.6.7)
mime-types (>= 1.16)
rinku (1.7.3)
robustly (0.0.3)
errbase
rouge (1.7.4)
rspec (2.99.0)
rspec-core (~> 2.99.0)
@@ -568,6 +572,9 @@ GEM
temple (~> 0.6.6)
tilt (>= 1.3.3, < 2.1)
slop (3.4.7)
slowpoke (0.0.5)
rack-timeout (>= 0.1.0)
robustly
spinach (0.8.7)
colorize (= 0.5.8)
gherkin-ruby (>= 0.3.1)
@@ -706,7 +713,7 @@ DEPENDENCIES
gitlab-grack (~> 2.0.0.rc2)
gitlab-linguist (~> 3.0.1)
gitlab_emoji (~> 0.0.1.1)
gitlab_git (= 7.0.0.rc14)
gitlab_git (= 7.1.0)
gitlab_meta (= 7.0)
gitlab_omniauth-ldap (= 1.2.0)
gollum-lib (~> 4.0.0)
@@ -779,8 +786,9 @@ DEPENDENCIES
six
slack-notifier (~> 1.0.0)
slim
slowpoke
spinach-rails
spring (= 1.3.1)
spring (~> 1.3.1)
spring-commands-rspec (= 1.0.4)
spring-commands-spinach (= 1.0.0)
stamp
-2
View File
@@ -57,8 +57,6 @@ To get access to the EE and support please [become a subscriber](https://about.g
- [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq?branch=master)
- [![PullReview stats](https://www.pullreview.com/gitlab/gitlab-org/gitlab-ce/badges/master.svg?)](https://www.pullreview.com/gitlab.gitlab.com/gitlab-org/gitlab-ce/reviews/master)
## Website
On [about.gitlab.com](https://about.gitlab.com/) you can find more information about:
+9 -3
View File
@@ -14,7 +14,11 @@ class @Autosave
restore: ->
return unless window.localStorage?
text = window.localStorage.getItem @key
try
text = window.localStorage.getItem @key
catch
return
@field.val text if text?.length > 0
@field.trigger "input"
@@ -23,11 +27,13 @@ class @Autosave
text = @field.val()
if text?.length > 0
window.localStorage.setItem @key, text
try
window.localStorage.setItem @key, text
else
@reset()
reset: ->
return unless window.localStorage?
window.localStorage.removeItem @key
try
window.localStorage.removeItem @key
+1 -1
View File
@@ -26,7 +26,7 @@ class @BlobView
unless isNaN first_line
$("#tree-content-holder .highlight .line").removeClass("hll")
$("#LC#{line}").addClass("hll") for line in [first_line..last_line]
$.scrollTo("#L#{first_line}") unless e?
$.scrollTo("#L#{first_line}", offset: -50) unless e?
# parse selected lines from hash
# always return first and last line (initialized to NaN)
@@ -15,7 +15,7 @@ class @EditBlob
$(".js-commit-button").click ->
$("#file-content").val editor.getValue()
$(".file-editor form").submit()
return
return false
editModePanes = $(".js-edit-mode-pane")
editModeLinks = $(".js-edit-mode a")
@@ -15,7 +15,7 @@ class @NewBlob
$(".js-commit-button").click ->
$("#file-content").val editor.getValue()
$(".file-editor form").submit()
return
return false
editor: ->
return @editor
+1 -28
View File
@@ -1,30 +1,3 @@
class @Dashboard
constructor: ->
@initSidebarTab()
$(".dash-filter").keyup ->
terms = $(this).val()
uiBox = $(this).parents('.panel').first()
if terms == "" || terms == undefined
uiBox.find(".dash-list li").show()
else
uiBox.find(".dash-list li").each (index) ->
name = $(this).find(".filter-title").text()
if name.toLowerCase().search(terms.toLowerCase()) == -1
$(this).hide()
else
$(this).show()
initSidebarTab: ->
key = "dashboard_sidebar_filter"
# store selection in cookie
$('.dash-sidebar-tabs a').on 'click', (e) ->
$.cookie(key, $(e.target).attr('id'))
# show tab from cookie
sidebar_filter = $.cookie(key)
$("#" + sidebar_filter).tab('show') if sidebar_filter
new ProjectsList()
+12 -1
View File
@@ -33,12 +33,16 @@ class Dispatcher
shortcut_handler = new ShortcutsNavigation()
new ZenMode()
new DropzoneInput($('.issue-form'))
if page == 'projects:issues:new'
new IssuableForm($('.issue-form'))
when 'projects:merge_requests:new', 'projects:merge_requests:edit'
GitLab.GfmAutoComplete.setup()
new Diff()
shortcut_handler = new ShortcutsNavigation()
new ZenMode()
new DropzoneInput($('.merge-request-form'))
if page == 'projects:merge_requests:new'
new IssuableForm($('.merge-request-form'))
when 'projects:merge_requests:show'
new Diff()
shortcut_handler = new ShortcutsIssueable()
@@ -51,6 +55,9 @@ class Dispatcher
when 'dashboard:show'
new Dashboard()
new Activities()
when 'dashboard:projects:starred'
new Activities()
new ProjectsList()
when 'projects:commit:show'
new Commit()
new Diff()
@@ -58,9 +65,13 @@ class Dispatcher
shortcut_handler = new ShortcutsNavigation()
when 'projects:commits:show'
shortcut_handler = new ShortcutsNavigation()
when 'groups:show', 'projects:show'
when 'projects:show'
new Activities()
shortcut_handler = new ShortcutsNavigation()
when 'groups:show'
new Activities()
shortcut_handler = new ShortcutsNavigation()
new ProjectsList()
when 'groups:members'
new GroupMembers()
new UsersSelect()
@@ -0,0 +1,28 @@
class @IssuableForm
constructor: (@form) ->
@titleField = @form.find("input[name*='[title]']")
@descriptionField = @form.find("textarea[name*='[description]']")
return unless @titleField.length && @descriptionField.length
@initAutosave()
@form.on "submit", @resetAutosave
@form.on "click", ".btn-cancel", @resetAutosave
initAutosave: ->
new Autosave @titleField, [
document.location.pathname,
document.location.search,
"title"
]
new Autosave @descriptionField, [
document.location.pathname,
document.location.search,
"description"
]
resetAutosave: =>
@titleField.data("autosave").reset()
@descriptionField.data("autosave").reset()
@@ -49,6 +49,13 @@ class @Milestone
data: data
success: (data) ->
if data.saved == true
if data.assignee_avatar_url
img_tag = $('<img/>')
img_tag.attr('src', data.assignee_avatar_url)
img_tag.addClass('avatar s16')
$(li).find('.assignee-icon').html(img_tag)
else
$(li).find('.assignee-icon').html('')
$(li).effect 'highlight'
else
new Flash("Issue update failed", 'alert')
@@ -6,7 +6,7 @@ class @ProjectShow
new Flash('Star toggle failed. Try again later.', 'alert')
$("a[data-toggle='tab']").on "shown.bs.tab", (e) ->
$.cookie "default_view", $(e.target).attr("href"), { expires: 30 }
$.cookie "default_view", $(e.target).attr("href"), { expires: 30, path: '/' }
defaultView = $.cookie("default_view")
if defaultView
@@ -0,0 +1,24 @@
class @ProjectsList
constructor: ->
$(".projects-list .js-expand").on 'click', (e) ->
e.preventDefault()
list = $(this).closest('.projects-list')
list.find("li").show()
list.find("li.bottom").hide()
$(".projects-list-filter").keyup ->
terms = $(this).val()
uiBox = $(this).closest('.panel')
if terms == "" || terms == undefined
uiBox.find(".projects-list li").show()
else
uiBox.find(".projects-list li").each (index) ->
name = $(this).find(".filter-title").text()
if name.toLowerCase().search(terms.toLowerCase()) == -1
$(this).hide()
else
$(this).show()
uiBox.find(".projects-list li.bottom").hide()
+1
View File
@@ -1,3 +1,4 @@
class @User
constructor: ->
$('.profile-groups-avatars').tooltip("placement": "top")
new ProjectsList()
+8 -3
View File
@@ -11,12 +11,17 @@
*= require cal-heatmap
*/
@import "main/*";
@import "base/variables";
@import "base/mixins";
@import "base/layout";
/**
* Customized Twitter bootstrap
*/
@import 'gl_bootstrap';
@import 'base/gl_variables';
@import 'base/gl_bootstrap';
/**
* NProgress load bar css
@@ -39,7 +44,7 @@
* Page specific styles (issues, projects etc):
*/
@import "sections/*";
@import "pages/*";
/**
* Code highlight
@@ -3,11 +3,6 @@
*
*/
$font-size-base: 13px !default;
$nav-pills-active-link-hover-bg: $bg_primary;
$pagination-active-bg: $bg_primary;
$list-group-active-bg: $bg_primary;
// Core variables and mixins
@import "bootstrap/variables";
@import "bootstrap/mixins";
@@ -23,6 +18,7 @@ $list-group-active-bg: $bg_primary;
@import "bootstrap/grid";
@import "bootstrap/tables";
@import "bootstrap/forms";
@import "bootstrap/buttons";
// Components
@import "bootstrap/component-animations";
@@ -134,10 +130,6 @@ $list-group-active-bg: $bg_primary;
}
}
}
&.nav-small-tabs > li > a {
padding: 6px 9px;
}
}
.nav-tabs > li > a,
@@ -145,61 +137,6 @@ $list-group-active-bg: $bg_primary;
color: #666;
}
.nav-compact > li > a {
padding: 6px 12px;
}
.nav-small > li > a {
padding: 3px 5px;
font-size: 12px;
}
/*
* Callouts from Bootstrap3 docs
*
* Not quite alerts, but custom and helpful notes for folks reading the docs.
* Requires a base and modifier class.
*/
/* Common styles for all types */
.bs-callout {
margin: 20px 0;
padding: 20px;
border-left: 3px solid #eee;
color: #666;
background: #f9f9f9;
}
.bs-callout h4 {
margin-top: 0;
margin-bottom: 5px;
}
.bs-callout p:last-child {
margin-bottom: 0;
}
/* Variations */
.bs-callout-danger {
background-color: #fdf7f7;
border-color: #eed3d7;
color: #b94a48;
}
.bs-callout-warning {
background-color: #faf8f0;
border-color: #faebcc;
color: #8a6d3b;
}
.bs-callout-info {
background-color: #f4f8fa;
border-color: #bce8f1;
color: #34789a;
}
.bs-callout-success {
background-color: #dff0d8;
border-color: #5cA64d;
color: #3c763d;
}
/**
* fix to keep tooltips position in top navigation bar
*
@@ -214,16 +151,13 @@ $list-group-active-bg: $bg_primary;
*
*/
.panel {
@include border-radius(0px);
.panel-heading {
@include border-radius(0px);
font-size: 14px;
line-height: 18px;
.panel-head-actions {
position: relative;
top: -7px;
top: -6px;
float: right;
}
}
@@ -256,40 +190,10 @@ $list-group-active-bg: $bg_primary;
}
}
.panel-default {
.panel-heading {
background-color: #EEE;
}
}
.panel-danger {
@include panel-colored;
.panel-heading {
color: $border_danger;
border-color: $border_danger;
}
}
.panel-success {
@include panel-colored;
.panel-heading {
color: $border_success;
border-color: $border_success;
}
}
.panel-primary {
@include panel-colored;
.panel-heading {
color: $border_primary;
border-color: $border_primary;
}
}
.panel-warning {
@include panel-colored;
.panel-heading {
color: $border_warning;
border-color: $border_warning;
.alert {
a {
@extend .alert-link;
color: #fff;
text-decoration: underline;
}
}
@@ -0,0 +1,870 @@
// Override Bootstrap variables here (defaults from bootstrap-sass v3.3.3):
//
// Variables
// --------------------------------------------------
//== Colors
//
//## Gray and brand colors for use across Bootstrap.
// $gray-base: #000
// $gray-darker: lighten($gray-base, 13.5%) // #222
// $gray-dark: lighten($gray-base, 20%) // #333
// $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;
$brand-info: $gl-info;
$brand-warning: $gl-warning;
$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.
$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"
//== Components
//
//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
$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-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
//
//##
$pagination-color: #fff;
$pagination-bg: $brand-success;
$pagination-border: transparent;
$pagination-hover-color: #fff;
$pagination-hover-bg: darken($brand-success, 15%);
$pagination-hover-border: transparent;
$pagination-active-color: #fff;
$pagination-active-bg: darken($brand-success, 15%);
$pagination-active-border: transparent;
$pagination-disabled-color: #b4bcc2;
$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;
$state-info-text: #fff;
$state-info-bg: $brand-info;
$state-info-border: $brand-info;
$state-warning-text: #fff;
$state-warning-bg: $brand-warning;
$state-warning-border: $brand-warning;
$state-danger-text: #fff;
$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: #ddd
// $panel-default-heading-bg: #f5f5f5
// $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
//
//##
$code-color: #c7254e;
$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
@@ -4,7 +4,7 @@ html {
&.touch .tooltip { display: none !important; }
body {
padding-top: 47px;
padding-top: 46px;
}
}
@@ -121,14 +121,6 @@
}
}
@mixin page-title {
color: #333;
line-height: 1.5;
font-weight: normal;
margin-top: 0px;
margin-bottom: 10px;
}
@mixin str-truncated($max_width: 82%) {
display: inline-block;
overflow: hidden;
@@ -137,14 +129,3 @@
white-space: nowrap;
max-width: $max_width;
}
@mixin panel-colored {
border: 1px solid #EEE;
background: $box_bg;
@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.09));
.panel-heading {
font-weight: bold;
background-color: $box_bg;
}
}
@@ -0,0 +1,37 @@
$style_color: #474D57;
$hover: #FFF3EB;
$box_bg: #F9F9F9;
$gl-link-color: #446e9b;
$nprogress-color: #c0392b;
$gl-font-size: 14px;
$list-font-size: 15px;
$sidebar_width: 230px;
$avatar_radius: 50%;
$code_font_size: 13px;
$code_line_height: 1.5;
/*
* State colors:
*/
$gl-success: #019875;
$gl-danger: #d9534f;
$gl-primary: #446e9b;
$gl-info: #029ACF;
$gl-warning: #EB9532;
$gl-primary: #2C3E50;
$gl-success: #18BC9C;
$gl-info: #3498DB;
$gl-warning: #F39C12;
$gl-danger: #E74C3C;
/*
* Commit Diff Colors
*/
$added: #63c363;
$deleted: #f77;
/*
* Fonts
*/
$monospace_font: 'Menlo', 'Liberation Mono', 'Consolas', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;
$regular_font: "Helvetica Neue", Helvetica, Arial, sans-serif;
+11 -125
View File
@@ -1,127 +1,15 @@
.btn {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: $btn-border;
white-space: nowrap;
padding: 6px 12px;
font-size: 13px;
line-height: 18px;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
color: #444444;
background-color: #fff;
text-shadow: none;
&.hover,
&:hover {
color: #444444;
text-decoration: none;
background-color: #ebebeb;
border-color: #adadad;
}
&.focus,
&:focus {
color: #444444;
text-decoration: none;
outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
&.active,
&:active {
outline: 0;
background-image: none;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
&.disabled,
&[disabled] {
cursor: not-allowed;
pointer-events: none;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
}
&.btn-primary {
color: #ffffff;
background-color: $bg_primary;
border-color: $border_primary;
&.hover,
&:hover,
&.disabled,
&[disabled] {
color: #ffffff;
}
}
&.btn-success {
color: #ffffff;
background-color: $bg_success;
border-color: $border_success;
&.hover,
&:hover,
&.disabled,
&[disabled] {
color: #ffffff;
}
}
&.btn-danger {
color: #ffffff;
background-color: $bg_danger;
border-color: $border_danger;
&.hover,
&:hover,
&.disabled,
&[disabled] {
color: #ffffff;
}
}
&.btn-warning {
color: #ffffff;
background-color: $bg_warning;
border-color: $border_warning;
&.hover,
&:hover,
&.disabled,
&[disabled] {
color: #ffffff;
}
}
@extend .btn-default;
&.btn-new {
@extend .btn-success;
}
&.btn-create {
@extend .wide;
@extend .btn-success;
}
&.btn-save {
@extend .wide;
@extend .btn-primary;
}
@@ -133,11 +21,6 @@
float: right;
}
&.wide {
padding-left: 20px;
padding-right: 20px;
}
&.btn-small {
padding: 2px 10px;
font-size: 12px;
@@ -151,16 +34,16 @@
}
&.btn-close {
color: $bg_danger;
border-color: $border_danger;
color: $gl-danger;
border-color: $gl-danger;
&:hover {
color: #B94A48;
}
}
&.btn-reopen {
color: $bg_success;
border-color: $border_success;
color: $gl-success;
border-color: $gl-success;
&:hover {
color: #468847;
}
@@ -174,9 +57,12 @@
}
}
&.btn-lg {
font-size: 15px;
line-height: 1.4;
&.btn-save {
@extend .btn-primary;
}
&.btn-new, &.btn-create {
@extend .btn-success;
}
}
+9 -18
View File
@@ -24,7 +24,7 @@
.slead {
color: #666;
font-size: 14px;
font-size: 15px;
margin-bottom: 12px;
font-weight: normal;
line-height: 24px;
@@ -61,7 +61,7 @@ pre {
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
background: $bg_primary;
background: $gl-primary;
color: #FFF
}
@@ -71,7 +71,7 @@ pre {
/** FLASH message **/
.author_link {
color: $link_color;
color: $gl-link-color;
}
.help li { color:$style_color; }
@@ -315,20 +315,8 @@ table {
width: 100%;
}
.broadcast-message {
padding: 10px;
text-align: center;
background: #555;
color: #BBB;
}
.broadcast-message-preview {
@extend .broadcast-message;
margin-bottom: 20px;
}
.btn-sign-in {
margin-top: 7px;
margin-top: 5px;
text-shadow: none;
}
@@ -346,8 +334,11 @@ table {
overflow-x: auto;
}
.footer-links a {
margin-right: 15px;
.footer-links {
margin-bottom: 20px;
a {
margin-right: 15px;
}
}
.search_box {
+1 -1
View File
@@ -29,7 +29,7 @@ fieldset legend {
padding: 17px 20px 18px;
margin-top: 18px;
margin-bottom: 18px;
background-color: whitesmoke;
background-color: #ecf0f1;
border-top: 1px solid #e5e5e5;
}
+1 -1
View File
@@ -3,7 +3,7 @@
*/
.issue-form, .merge-request-form, .wiki-form {
.description {
height: 20em;
height: 16em;
border-top-left-radius: 0;
}
}
@@ -11,17 +11,17 @@
margin-right: 5px;
&.issue-box-closed {
background-color: $bg_danger;
background-color: $gl-danger;
color: #FFF;
}
&.issue-box-merged {
background-color: $bg_primary;
background-color: $gl-primary;
color: #FFF;
}
&.issue-box-open {
background-color: $bg_success;
background-color: $gl-success;
color: #FFF;
}
+2 -2
View File
@@ -41,8 +41,8 @@
}
.ui-state-active {
border: 1px solid $bg_primary;
background: $bg_primary;
border: 1px solid $gl-primary;
background: $gl-primary;
color: #FFF;
}
@@ -57,7 +57,6 @@
border: 1px solid #ddd;
min-height: 100px;
padding: 5px;
font-size: 14px;
box-shadow: none;
}
@@ -77,3 +76,12 @@
}
}
}
.markdown-area {
background: #FFF;
border: 1px solid #ddd;
min-height: 100px;
padding: 5px;
box-shadow: none;
width: 100%;
}
+4 -2
View File
@@ -43,8 +43,10 @@
}
}
.page-title .new-issue-link {
display: none;
.page-title {
.note_created_ago, .new-issue-link {
display: none;
}
}
.issue_edited_ago, .note_edited_ago {
@@ -154,9 +154,10 @@
.collapse-nav a {
position: fixed;
top: 47px;
top: 46px;
padding: 5px 13px 3px 13px;
left: 197px;
font-size: 13px;
background: #EEE;
color: black;
border: 1px solid rgba(0,0,0,0.035);
+4 -5
View File
@@ -3,9 +3,8 @@
.select2-choice {
background: #FFF;
border-color: #BBB;
padding: 6px 12px;
font-size: 13px;
line-height: 18px;
padding: 6px 14px;
line-height: 1.42857143;
height: auto;
.select2-arrow {
@@ -20,7 +19,7 @@
}
.select2-container-multi .select2-choices .select2-search-field input {
padding: 6px 12px;
padding: 8px 14px;
font-size: 13px;
line-height: 18px;
height: auto;
@@ -42,7 +41,7 @@
.select2-results {
max-height: 350px;
.select2-highlighted {
background: $bg_primary;
background: $gl-primary;
}
}
}
+5 -67
View File
@@ -2,28 +2,12 @@
* Headers
*
*/
h1.page-title {
@include page-title;
font-size: 28px;
}
h2.page-title {
@include page-title;
font-size: 24px;
}
h3.page-title {
@include page-title;
font-size: 22px;
}
h4.page-title {
.page-title {
margin-top: 0px;
}
h6 {
color: #888;
text-transform: uppercase;
color: #333;
line-height: 1.5;
font-weight: normal;
margin-bottom: 5px;
}
/** CODE **/
@@ -36,52 +20,6 @@ pre {
}
}
/**
* Links
*
*/
a {
outline: none;
color: $link_color;
&:hover {
text-decoration: underline;
color: $link_hover_color;
}
&:focus {
text-decoration: underline;
}
&.darken {
color: $style_color;
}
&.lined {
text-decoration: underline;
&:hover { text-decoration: underline; }
}
&.gray {
color: gray;
}
&.supp_diff_link {
text-align: center;
padding: 20px 0;
background: #f1f1f1;
width: 100%;
float: left;
}
&.neib {
margin-right: 15px;
}
}
a:focus {
outline: none;
}
.monospace {
font-family: $monospace_font;
}
+6 -2
View File
@@ -1,6 +1,10 @@
/* https://github.com/MozMorris/tomorrow-pygments */
pre.code.highlight.dark,
.code.dark {
background-color: #1d1f21;
color: #c5c8c6;
pre.code,
.line-numbers,
.line-numbers a {
@@ -13,8 +17,8 @@
}
// highlight line via anchor
pre.hll {
background-color: #fff !important;
pre .hll {
background-color: #557 !important;
}
.hll { background-color: #373b41 }
@@ -1,6 +1,10 @@
/* https://github.com/richleland/pygments-css/blob/master/monokai.css */
pre.code.monokai,
.code.monokai {
background: #272822;
color: #f8f8f2;
pre.highlight,
.line-numbers,
.line-numbers a {
@@ -13,7 +17,7 @@
}
// highlight line via anchor
pre.hll {
pre .hll {
background-color: #49483e !important;
}
@@ -1,6 +1,10 @@
/* https://gist.github.com/qguv/7936275 */
pre.code.highlight.solarized-dark,
.code.solarized-dark {
background-color: #002b36;
color: #93a1a1;
pre.code,
.line-numbers,
.line-numbers a {
@@ -13,8 +17,8 @@
}
// highlight line via anchor
pre.hll {
background-color: #073642 !important;
pre .hll {
background-color: #174652 !important;
}
/* Solarized Dark
@@ -1,6 +1,10 @@
/* https://gist.github.com/qguv/7936275 */
pre.code.highlight.solarized-light,
.code.solarized-light {
background-color: #fdf6e3;
color: #586e75;
pre.code,
.line-numbers,
.line-numbers a {
@@ -13,8 +17,8 @@
}
// highlight line via anchor
pre.hll {
background-color: #eee8d5 !important;
pre .hll {
background-color: #ddd8c5 !important;
}
/* Solarized Light
+5 -1
View File
@@ -1,6 +1,10 @@
/* https://github.com/aahan/pygments-github-style */
pre.code.highlight.white,
.code.white {
background-color: #fff;
color: #333;
pre.highlight,
.line-numbers,
.line-numbers a {
@@ -13,7 +17,7 @@
}
// highlight line via anchor
pre.hll {
pre .hll {
background-color: #f8eec7 !important;
}
-3
View File
@@ -1,3 +0,0 @@
/** Typo **/
$monospace_font: 'Menlo', 'Liberation Mono', 'Consolas', 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;
$regular_font: "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -1,63 +0,0 @@
/*
* General Colors
*/
$style_color: #474D57;
$hover: #FFF3EB;
$box_bg: #F9F9F9;
/*
* Link colors
*/
$link_color: #446e9b;
$link_hover_color: darken($link-color, 10%);
$btn-border: 1px solid #ccc;
/*
* Success colors (green)
*/
$border_success: #019875;
$bg_success: #019875;
/*
* Danger colors (red)
*/
$border_danger: #d43f3a;
$bg_danger: #d9534f;
/*
* Primary colors (blue)
*/
$border_primary: #446e9b;
$bg_primary: #446e9b;
/*
* Warning colors (yellow)
*/
$bg_warning: #EB9532;
$border_warning: #EB9532;
/**
* Commit Diff Colors
*/
$added: #63c363;
$deleted: #f77;
/**
* NProgress customize
*/
$nprogress-color: #c0392b;
/**
* Font sizes
*/
$list-font-size: 15px;
/**
* Sidebar navigation width
*/
$sidebar_width: 230px;
$avatar_radius: 50%;
$code_font_size: 13px;
$code_line_height: 1.5;
@@ -50,3 +50,14 @@
line-height: 2;
}
}
.broadcast-message {
@extend .alert-warning;
padding: 10px;
text-align: center;
}
.broadcast-message-preview {
@extend .broadcast-message;
margin-bottom: 20px;
}
@@ -45,15 +45,6 @@
}
}
.commit-committer-link,
.commit-author-link {
font-size: 13px;
color: #555;
&:hover {
color: #999;
}
}
.commit-box {
margin: 10px 0;
border-top: 1px solid #ddd;
@@ -100,6 +100,7 @@ li.commit {
.commit-row-info {
color: #777;
line-height: 24px;
font-size: 13px;
a {
color: #777;
@@ -23,28 +23,6 @@
}
}
.dash-sidebar-tabs {
margin-bottom: 2px;
border: none;
margin: 0 !important;
li {
&.active {
a {
background-color: #EEE;
border-bottom: 1px solid #EEE !important;
&:hover {
background: #eee;
}
}
}
a {
border-color: #DDD !important;
}
}
}
.project-row, .group-row {
padding: 0 !important;
font-size: 14px;
@@ -111,17 +89,8 @@
}
.dash-new-project {
background: $bg_success;
border: 1px solid $border_success;
a {
color: #FFF;
}
}
.dash-new-group {
background: $bg_success;
border: 1px solid $border_success;
background: $gl-success;
border: 1px solid $gl-success;
a {
color: #FFF;
@@ -46,7 +46,6 @@
border-bottom: 1px solid #eee;
.event-title {
@include str-truncated(72%);
color: #333;
font-weight: 500;
font-size: 14px;
.author_name {
@@ -54,6 +53,7 @@
}
}
.event-body {
font-size: 13px;
margin-left: 35px;
margin-right: 80px;
color: #777;
@@ -185,11 +185,10 @@
}
.event_filter {
li a {
font-size: 13px;
padding: 5px 10px;
background: rgba(0,0,0,0.045);
margin-left: 4px;
}
}
@@ -12,7 +12,6 @@
color: #888;
a {
font-size: 14px;
margin-right: 3px;
}
}
@@ -29,7 +28,6 @@
th {
padding-top: 15px;
font-size: 14px;
line-height: 1.5;
color: #333;
text-align: left
@@ -11,6 +11,7 @@
.issue-info {
color: #999;
font-size: 13px;
}
.issue-check {
@@ -40,7 +41,7 @@
}
.check-all-holder {
height: 32px;
height: 36px;
float: left;
margin-right: 12px;
padding: 6px 15px;
@@ -96,6 +96,7 @@
.merge-request-info {
color: #999;
font-size: 13px;
.merge-request-labels {
display: inline-block;
@@ -136,8 +137,8 @@
background-color: #F5F5F5;
&.ci-success {
color: $bg_success;
border-color: $border_success;
color: $gl-success;
border-color: $gl-success;
background-color: #F1FAF1;
}
@@ -148,20 +149,20 @@
}
&.ci-running {
color: $bg_warning;
border-color: $border_warning;
color: $gl-warning;
border-color: $gl-warning;
background-color: #FAF5F1;
}
&.ci-failed {
color: $bg_danger;
border-color: $border_danger;
color: $gl-danger;
border-color: $gl-danger;
background-color: #FAF1F1;
}
&.ci-error {
color: $bg_danger;
border-color: $border_danger;
color: $gl-danger;
border-color: $gl-danger;
background-color: #FAF1F1;
}
}
@@ -0,0 +1,9 @@
.issues-sortable-list .str-truncated {
max-width: 90%;
}
li.milestone {
h4 {
font-weight: bold;
}
}
@@ -38,13 +38,11 @@ ul.notes {
.author {
color: #333;
font-weight: bold;
font-size: 14px;
&:hover {
color: $link_color;
color: $gl-link-color;
}
}
.author-username {
font-size: 14px;
}
}
@@ -57,9 +55,6 @@ ul.notes {
.note {
display: block;
position:relative;
.attachment {
font-size: 14px;
}
.note-body {
overflow: auto;
.note-text {
@@ -70,7 +65,7 @@ ul.notes {
a[href*="/uploads/"] {
&:before {
margin-right: 4px;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
@@ -153,7 +148,6 @@ ul.notes {
@extend .cgray;
&:hover {
color: $link_hover_color;
&.danger { @extend .cred; }
}
}
@@ -181,10 +175,11 @@ ul.notes {
background: #FFF;
padding: 4px;
font-size: 16px;
color: $link_color;
color: $gl-link-color;
margin-left: -60px;
position: absolute;
z-index: 10;
width: 32px;
transition: all 0.2s ease;
@@ -193,8 +188,9 @@ ul.notes {
filter: alpha(opacity=0);
&:hover {
font-size: 24px;
background: $bg_primary;
width: 38px;
font-size: 20px;
background: $gl-info;
color: #FFF;
@include show-add-diff-note;
}
@@ -10,13 +10,13 @@
}
.ns-part {
color: $bg_primary;
color: $gl-primary;
}
.ns-watch {
color: $bg_success;
color: $gl-success;
}
.ns-mute {
color: $bg_danger;
color: $gl-danger;
}
@@ -99,25 +99,6 @@
margin-right: 45px;
}
.btn,
.form-control {
border: 1px solid #E1E1E1;
box-shadow: none;
padding: 6px 9px;
}
.btn {
background: none;
color: $link_color;
&.active {
background-color: #f5f5f5;
border: 1px solid rgba(0,0,0,0.195);
color: #333;
font-weight: bold;
}
}
.form-control {
cursor: auto;
@extend .monospace;
@@ -267,15 +248,15 @@ ul.nav.nav-projects-tabs {
}
.vs-public {
color: $bg_primary;
color: $gl-primary;
}
.vs-internal {
color: $bg_warning;
color: $gl-warning;
}
.vs-private {
color: $bg_success;
color: $gl-success;
}
.breadcrumb.repo-breadcrumb {
@@ -39,14 +39,9 @@
.tree-item-file-name {
max-width: 320px;
vertical-align: middle;
a {
&:hover {
color: $link_hover_color;
}
}
i {
color: $bg_primary;
i, a {
color: $gl-link-color;
}
img {
@@ -66,13 +61,18 @@
.tree_author {
padding-right: 8px;
.commit-author-name {
color: gray;
}
}
.tree_commit {
color: gray;
.tree-commit-link {
color: #444;
color: gray;
&:hover {
text-decoration: underline;
}
@@ -0,0 +1,9 @@
.gitlab-ui-dev-kit {
> h2 {
font-size: 27px;
border-bottom: 1px solid #CCC;
color: #666;
margin: 30px 0;
font-weight: bold;
}
}
@@ -1,9 +0,0 @@
.markdown-area {
background: #FFF;
border: 1px solid #ddd;
min-height: 100px;
padding: 5px;
font-size: 14px;
box-shadow: none;
width: 100%;
}
@@ -1,3 +0,0 @@
.issues-sortable-list .str-truncated {
max-width: 70%;
}
+2 -1
View File
@@ -45,7 +45,8 @@ class Admin::ServicesController < Admin::ApplicationController
:room, :recipients, :project_url, :webhook,
:user_key, :device, :priority, :sound, :bamboo_url, :username, :password,
:build_key, :server, :teamcity_url, :build_type,
:description, :issues_url, :new_issue_url, :restrict_to_branch
:description, :issues_url, :new_issue_url, :restrict_to_branch,
:send_from_committer_email, :disable_diffs
])
end
end
+2 -2
View File
@@ -24,7 +24,7 @@ class Admin::UsersController < Admin::ApplicationController
def block
if user.block
redirect_to :back, alert: "Successfully blocked"
redirect_to :back, notice: "Successfully blocked"
else
redirect_to :back, alert: "Error occurred. User was not blocked"
end
@@ -32,7 +32,7 @@ class Admin::UsersController < Admin::ApplicationController
def unblock
if user.activate
redirect_to :back, alert: "Successfully unblocked"
redirect_to :back, notice: "Successfully unblocked"
else
redirect_to :back, alert: "Error occurred. User was not unblocked"
end
@@ -1,6 +1,4 @@
class Profiles::GroupsController < ApplicationController
layout "profile"
class Dashboard::GroupsController < ApplicationController
def index
@user_groups = current_user.group_members.page(params[:page]).per(20)
end
@@ -9,7 +7,7 @@ class Profiles::GroupsController < ApplicationController
@users_group = group.group_members.where(user_id: current_user.id).first
if can?(current_user, :destroy, @users_group)
@users_group.destroy
redirect_to(profile_groups_path, info: "You left #{group.name} group.")
redirect_to(dashboard_groups_path, info: "You left #{group.name} group.")
else
return render_403
end
@@ -0,0 +1,34 @@
class Dashboard::MilestonesController < ApplicationController
before_filter :load_projects
def index
project_milestones = case params[:state]
when 'all'; state
when 'closed'; state('closed')
else state('active')
end
@dashboard_milestones = Milestones::GroupService.new(project_milestones).execute
@dashboard_milestones = Kaminari.paginate_array(@dashboard_milestones).page(params[:page]).per(30)
end
def show
project_milestones = Milestone.where(project_id: @projects).order("due_date ASC")
@dashboard_milestone = Milestones::GroupService.new(project_milestones).milestone(title)
end
private
def load_projects
@projects = current_user.authorized_projects.sorted_by_activity.non_archived
end
def title
params[:title]
end
def state(state = nil)
conditions = { project_id: @projects }
conditions.reverse_merge!(state: state) if state
Milestone.where(conditions).order("title ASC")
end
end
@@ -0,0 +1,27 @@
class Dashboard::ProjectsController < ApplicationController
before_filter :event_filter
def starred
@projects = current_user.starred_projects
@projects = @projects.includes(:namespace, :forked_from_project, :tags)
@projects = @projects.sort(@sort = params[:sort])
@groups = []
respond_to do |format|
format.html
format.json do
load_events
pager_json("events/_events", @events.count)
end
end
end
private
def load_events
@events = Event.in_projects(@projects.pluck(:id))
@events = @event_filter.apply_filter(@events).with_associations
@events = @events.limit(20).offset(params[:offset] || 0)
end
end
+1 -34
View File
@@ -5,19 +5,9 @@ class DashboardController < ApplicationController
before_filter :event_filter, only: :show
def show
# Fetch only 30 projects.
# If user needs more - point to Dashboard#projects page
@projects_limit = 30
@groups = current_user.authorized_groups.order_name_asc
@has_authorized_projects = @projects.count > 0
@projects_count = @projects.count
@projects = @projects.includes(:namespace).limit(@projects_limit)
@projects = @projects.includes(:namespace)
@last_push = current_user.recent_push
@publicish_project_count = Project.publicish(current_user).count
respond_to do |format|
format.html
@@ -33,29 +23,6 @@ class DashboardController < ApplicationController
end
end
def projects
@projects = case params[:scope]
when 'personal' then
current_user.namespace.projects
when 'joined' then
current_user.authorized_projects.joined(current_user)
when 'owned' then
current_user.owned_projects
else
current_user.authorized_projects
end
@projects = @projects.where(namespace_id: Group.find_by(name: params[:group])) if params[:group].present?
@projects = @projects.where(visibility_level: params[:visibility_level]) if params[:visibility_level].present?
@projects = @projects.includes(:namespace, :forked_from_project, :tags)
@projects = @projects.tagged_with(params[:tag]) if params[:tag].present?
@projects = @projects.sort(@sort = params[:sort])
@projects = @projects.page(params[:page]).per(30)
@tags = current_user.authorized_projects.tags_on(:tags)
@groups = current_user.authorized_groups
end
def merge_requests
@merge_requests = get_merge_requests_collection
@merge_requests = @merge_requests.page(params[:page]).per(20)
@@ -6,6 +6,9 @@ class Explore::ProjectsController < ApplicationController
def index
@projects = ProjectsFinder.new.execute(current_user)
@tags = @projects.tags_on(:tags)
@projects = @projects.tagged_with(params[:tag]) if params[:tag].present?
@projects = @projects.where(visibility_level: params[:visibility_level]) if params[:visibility_level].present?
@projects = @projects.search(params[:search]) if params[:search].present?
@projects = @projects.sort(@sort = params[:sort])
@projects = @projects.includes(:namespace).page(params[:page]).per(20)
@@ -4,10 +4,10 @@ class Groups::MilestonesController < ApplicationController
before_filter :authorize_group_milestone!, only: :update
def index
project_milestones = case params[:status]
when 'all'; status
when 'closed'; status('closed')
else status('active')
project_milestones = case params[:state]
when 'all'; state
when 'closed'; state('closed')
else state('active')
end
@group_milestones = Milestones::GroupService.new(project_milestones).execute
@group_milestones = Kaminari.paginate_array(@group_milestones).page(params[:page]).per(30)
@@ -44,7 +44,7 @@ class Groups::MilestonesController < ApplicationController
params[:title]
end
def status(state = nil)
def state(state = nil)
conditions = { project_id: group.projects }
conditions.reverse_merge!(state: state) if state
Milestone.where(conditions).order("title ASC")
+3
View File
@@ -19,4 +19,7 @@ class HelpController < ApplicationController
def shortcuts
end
def ui
end
end
+8 -10
View File
@@ -3,19 +3,17 @@ class Import::BaseController < ApplicationController
private
def get_or_create_namespace
existing_namespace = Namespace.find_by_path_or_name(@target_namespace)
if existing_namespace
if existing_namespace.owner == current_user
namespace = existing_namespace
else
begin
namespace = Group.create!(name: @target_namespace, path: @target_namespace, owner: current_user)
namespace.add_owner(current_user)
rescue ActiveRecord::RecordNotUnique, ActiveRecord::RecordInvalid
namespace = Namespace.find_by_path_or_name(@target_namespace)
unless namespace.owner == current_user
@already_been_taken = true
return false
end
else
namespace = Group.create(name: @target_namespace, path: @target_namespace, owner: current_user)
namespace.add_owner(current_user)
namespace
end
namespace
end
end
@@ -37,7 +37,7 @@ class Projects::ImportsController < Projects::ApplicationController
private
def require_no_repo
if @project.repository_exists?
if @project.repository_exists? && !@project.import_in_progress?
redirect_to(namespace_project_path(@project.namespace, @project)) and return
end
end
+10 -1
View File
@@ -93,7 +93,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
def bulk_update
result = Issues::BulkUpdateService.new(project, current_user, params).execute
result = Issues::BulkUpdateService.new(project, current_user, bulk_update_params).execute
redirect_to :back, notice: "#{result[:count]} issues updated"
end
@@ -141,4 +141,13 @@ class Projects::IssuesController < Projects::ApplicationController
:milestone_id, :state_event, :task_num, label_ids: []
)
end
def bulk_update_params
params.require(:update).permit(
:issues_ids,
:assignee_id,
:milestone_id,
:state_event
)
end
end
@@ -78,10 +78,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request = MergeRequests::CreateService.new(project, current_user, merge_request_params).execute
if @merge_request.valid?
redirect_to(
merge_request_path(@merge_request),
notice: 'Merge request was successfully created.'
)
redirect_to(merge_request_path(@merge_request))
else
@source_project = @merge_request.source_project
@target_project = @merge_request.target_project
@@ -97,8 +94,13 @@ class Projects::MergeRequestsController < Projects::ApplicationController
format.js
format.html do
redirect_to([@merge_request.target_project.namespace.becomes(Namespace),
@merge_request.target_project, @merge_request],
notice: 'Merge request was successfully updated.')
@merge_request.target_project, @merge_request])
end
format.json do
render json: {
saved: @merge_request.valid?,
assignee_avatar_url: @merge_request.assignee.try(:avatar_url)
}
end
end
else
@@ -51,7 +51,9 @@ class Projects::ServicesController < Projects::ApplicationController
:user_key, :device, :priority, :sound, :bamboo_url, :username, :password,
:build_key, :server, :teamcity_url, :build_type,
:description, :issues_url, :new_issue_url, :restrict_to_branch, :channel,
:colorize_messages, :channels
:colorize_messages, :channels,
:push_events, :issues_events, :merge_requests_events, :tag_push_events,
:note_events, :send_from_committer_email, :disable_diffs
)
end
end
+1 -1
View File
@@ -27,7 +27,7 @@ class Projects::TagsController < Projects::ApplicationController
tag = @repository.find_tag(params[:id])
if tag && @repository.rm_tag(tag.name)
EventCreateService.new.push_ref(@project, current_user, tag, 'rm', 'refs/tags')
EventCreateService.new.push_ref(@project, current_user, tag, 'rm', Gitlab::Git::TAG_REF_PREFIX)
end
respond_to do |format|
+1 -1
View File
@@ -105,7 +105,7 @@ class ProjectsController < ApplicationController
if request.referer.include?('/admin')
redirect_to admin_namespaces_projects_path
else
redirect_to projects_dashboard_path
redirect_to dashboard_path
end
end
end
+32 -16
View File
@@ -1,24 +1,15 @@
class UploadsController < ApplicationController
skip_before_filter :authenticate_user!, :reject_blocked!
before_filter :authorize_access
skip_before_filter :authenticate_user!
before_filter :find_model, :authorize_access!
def show
unless upload_model && upload_mount
return not_found!
end
model = upload_model.find(params[:id])
uploader = model.send(upload_mount)
if model.respond_to?(:project) && !can?(current_user, :read_project, model.project)
return not_found!
end
uploader = @model.send(upload_mount)
unless uploader.file_storage?
return redirect_to uploader.url
end
unless uploader.file.exists?
unless uploader.file && uploader.file.exists?
return not_found!
end
@@ -28,9 +19,34 @@ class UploadsController < ApplicationController
private
def authorize_access
unless %w(avatar logo light_logo).include?(params[:mounted_as])
authenticate_user! && reject_blocked!
def find_model
unless upload_model && upload_mount
return not_found!
end
@model = upload_model.find(params[:id])
end
def authorize_access!
authorized =
case @model
when Project
can?(current_user, :read_project, @model)
when Group
can?(current_user, :read_group, @model)
when Note
can?(current_user, :read_project, @model.project)
else
# No authentication required for user avatars.
true
end
return if authorized
if current_user
not_found!
else
authenticate_user!
end
end
-16
View File
@@ -1,20 +1,4 @@
module DashboardHelper
def projects_dashboard_filter_path(options={})
exist_opts = {
sort: params[:sort],
scope: params[:scope],
group: params[:group],
tag: params[:tag],
visibility_level: params[:visibility_level],
}
options = exist_opts.merge(options)
path = request.path
path << "?#{options.to_param}"
path
end
def assigned_issues_dashboard_path
issues_dashboard_path(assignee_id: current_user.id)
end
+1 -1
View File
@@ -166,7 +166,7 @@ module EventsHelper
def event_note(text)
text = first_line_in_markdown(text, 150)
sanitize(text, tags: %w(a img b pre code p))
sanitize(text, tags: %w(a img b pre code p span))
end
def event_commit_title(message)
+17
View File
@@ -0,0 +1,17 @@
module ExploreHelper
def explore_projects_filter_path(options={})
exist_opts = {
sort: params[:sort],
scope: params[:scope],
group: params[:group],
tag: params[:tag],
visibility_level: params[:visibility_level],
}
options = exist_opts.merge(options)
path = request.path
path << "?#{options.to_param}"
path
end
end
+3 -1
View File
@@ -31,7 +31,9 @@ module GitlabMarkdownHelper
def markdown(text, options={})
unless (@markdown and options == @options)
@options = options
gitlab_renderer = Redcarpet::Render::GitlabHTML.new(self, {
gitlab_renderer = Redcarpet::Render::GitlabHTML.new(self,
user_color_scheme_class,
{
# see https://github.com/vmg/redcarpet#darling-i-packed-you-a-couple-renderers-for-lunch-
filter_html: true,
with_toc_data: true,
+4
View File
@@ -44,4 +44,8 @@ module GitlabRoutingHelper
def merge_request_url(entity, *args)
namespace_project_merge_request_url(entity.project.namespace, entity.project, entity, *args)
end
def snippet_url(entity, *args)
namespace_project_snippet_url(entity.project.namespace, entity.project, entity, *args)
end
end
+13
View File
@@ -4,6 +4,19 @@ module MilestonesHelper
namespace_project_milestones_path(@project.namespace, @project, opts)
elsif @group
group_milestones_path(@group, opts)
else
dashboard_milestones_path(opts)
end
end
def milestone_progress_bar(milestone)
options = {
class: 'progress-bar progress-bar-success',
style: "width: #{milestone.percent_complete}%;"
}
content_tag :div, class: 'progress' do
content_tag :div, nil, options
end
end
end
+18 -8
View File
@@ -16,28 +16,38 @@ module Emails
subject: subject("Project was moved"))
end
def repository_push_email(project_id, recipient, author_id, branch, compare)
def repository_push_email(project_id, recipient, author_id, branch, compare, reverse_compare = false, send_from_committer_email = false, disable_diffs = false)
@project = Project.find(project_id)
@author = User.find(author_id)
@reverse_compare = reverse_compare
@compare = compare
@commits = Commit.decorate(compare.commits)
@diffs = compare.diffs
@branch = branch
@branch = Gitlab::Git.ref_name(branch)
@disable_diffs = disable_diffs
@subject = "[#{@project.path_with_namespace}][#{@branch}] "
if @commits.length > 1
@target_url = namespace_project_compare_url(@project.namespace,
@project,
from: @commits.first,
to: @commits.last)
@subject = "#{@commits.length} new commits pushed to repository"
from: Commit.new(@compare.base),
to: Commit.new(@compare.head))
@subject << "Deleted " if @reverse_compare
@subject << "#{@commits.length} commits: #{@commits.first.title}"
else
@target_url = namespace_project_commit_url(@project.namespace,
@project, @commits.first)
@subject = @commits.first.title
@subject << "Deleted 1 commit: " if @reverse_compare
@subject << @commits.first.title
end
mail(from: sender(author_id),
@disable_footer = true
mail(from: sender(author_id, send_from_committer_email),
to: recipient,
subject: subject(@subject))
subject: @subject)
end
end
end
+22 -2
View File
@@ -35,21 +35,41 @@ class Notify < ActionMailer::Base
)
end
# Splits "gitlab.corp.company.com" up into "gitlab.corp.company.com",
# "corp.company.com" and "company.com".
# Respects set tld length so "company.co.uk" won't match "somethingelse.uk"
def self.allowed_email_domains
domain_parts = Gitlab.config.gitlab.host.split(".")
allowed_domains = []
begin
allowed_domains << domain_parts.join(".")
domain_parts.shift
end while domain_parts.length > ActionDispatch::Http::URL.tld_length
allowed_domains
end
private
# The default email address to send emails from
def default_sender_address
address = Mail::Address.new(Gitlab.config.gitlab.email_from)
address.display_name = "GitLab"
address.display_name = Gitlab.config.gitlab.email_display_name
address
end
# Return an email address that displays the name of the sender.
# Only the displayed name changes; the actual email address is always the same.
def sender(sender_id)
def sender(sender_id, send_from_user_email = false)
if sender = User.find(sender_id)
address = default_sender_address
address.display_name = sender.name
sender_domain = sender.email.split("@").last
if send_from_user_email && self.class.allowed_email_domains.include?(sender_domain)
address.address = sender.email
end
address.format
end
end

Some files were not shown because too many files have changed in this diff Show More