Commit 0b5d627c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'master' into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g

parents 90c338a4 0d610270
Please view this file on the master branch, on stable branches it's out of date.
v 8.0.0 (unreleased)
- Fix URL construction for merge requests, issues, notes, and commits for relative URL config (Stan Hu)
- Omit filename in Content-Disposition header in raw file download to avoid RFC 6266 encoding issues (Stan HU)
- Fix broken Wiki Page History (Stan Hu)
- Prevent anchors from being hidden by header (Stan Hu)
- Fix bug where only the first 15 Bitbucket issues would be imported (Stan Hu)
- Sort issues by creation date in Bitbucket importer (Stan Hu)
- Upgrade gitlab_git to 7.2.15 to fix `git blame` errors with ISO-encoded files (Stan Hu)
- Prevent too many redirects upon login when home page URL is set to external_url (Stan Hu)
- Improve dropdown positioning on the project home page (Hannes Rosenögger)
- Upgrade browser gem to 1.0.0 to avoid warning in IE11 compatibilty mode (Stan Hu)
......@@ -16,9 +23,24 @@ v 8.0.0 (unreleased)
- Create cross-reference for closing references on commits pushed to non-default branches (Maël Valais)
- Ability to search milestones
- Gracefully handle SMTP user input errors (e.g. incorrect email addresses) to prevent Sidekiq retries (Stan Hu)
- Move dashboard activity to separate page
- Move dashboard activity to separate page (for your projects and starred projects)
- Improve performance of git blame
- Limit content width to 1200px for most of pages to improve readability on big screens
- Fix 500 error when submit project snippet without body
- Improve search page usability
- Bring more UI consistency in way how projects, snippets and groups lists are rendered
- Make all profiles public
- Fixed login failure when extern_uid changes (Joel Koglin)
- Don't notify users without access to the project when they are (accidentally) mentioned in a note.
- Retrieving oauth token with LDAP credentials
- Load Application settings from running database unless env var USE_DB=false
- Added Drone CI integration (Kirill Zaitsev)
- Refactored service API and added automatically service docs generator (Kirill Zaitsev)
- Added web_url key project hook_attrs (Kirill Zaitsev)
- Add ability to get user information by ID of an SSH key via the API
- Fix bug which IE cannot show image at markdown when the image is raw file of gitlab
- Add support for Crowd
- Global Labels that are available to all projects
v 7.14.1
- Improve abuse reports management from admin area
......@@ -26,6 +48,7 @@ v 7.14.1
- Only include base URL in OmniAuth full_host parameter (Stan Hu)
- Fix Error 500 in API when accessing a group that has an avatar (Stan Hu)
- Ability to enable SSL verification for Webhooks
- Add FogBugz project import (Jared Szechy)
v 7.14.0
- Fix bug where non-project members of the target project could set labels on new merge requests.
......
......@@ -34,6 +34,7 @@ gem 'omniauth-gitlab', '~> 1.0.0'
gem 'omniauth-bitbucket', '~> 0.0.2'
gem 'omniauth-saml', '~> 1.4.0'
gem 'doorkeeper', '~> 2.1.3'
gem 'omniauth_crowd'
gem "rack-oauth2", "~> 1.0.5"
# Two-factor authentication
......@@ -46,12 +47,7 @@ gem "browser", '~> 1.0.0'
# Extracting information from a git repository
# Provide access to Gitlab::Git library
gem "gitlab_git", '~> 7.2.14'
# Ruby/Rack Git Smart-HTTP Server Handler
# GitLab fork with a lot of changes (improved thread-safety, better memory usage etc)
# For full list of changes see https://github.com/SaitoWu/grack/compare/master...gitlabhq:master
gem 'gitlab-grack', '~> 2.0.2', require: 'grack'
gem "gitlab_git", '~> 7.2.15'
# LDAP Auth
# GitLab fork with several improvements to original library. For full list of changes
......@@ -169,6 +165,9 @@ gem "slack-notifier", "~> 1.0.0"
# Asana integration
gem 'asana', '~> 0.0.6'
# FogBugz integration
gem 'ruby-fogbugz'
# d3
gem 'd3_rails', '~> 3.5.5'
......@@ -275,6 +274,7 @@ group :test do
gem 'email_spec', '~> 1.6.0'
gem 'webmock', '~> 1.21.0'
gem 'test_after_commit', '~> 0.2.2'
gem 'sham_rack'
end
group :production do
......@@ -285,7 +285,7 @@ gem "newrelic_rpm", '~> 3.9.4.245'
gem 'octokit', '~> 3.7.0'
gem "mail_room", "~> 0.4.1"
gem "mail_room", "~> 0.4.2"
gem 'email_reply_parser', '~> 0.5.8'
......
......@@ -265,8 +265,6 @@ GEM
flowdock (~> 0.7)
gitlab-grit (>= 2.4.1)
multi_json
gitlab-grack (2.0.2)
rack (~> 1.5.1)
gitlab-grit (2.7.3)
charlock_holmes (~> 0.6)
diff-lcs (~> 1.1)
......@@ -279,7 +277,7 @@ GEM
gitlab_ci_meta (4.0)
gitlab_emoji (0.1.0)
gemojione (~> 2.0)
gitlab_git (7.2.14)
gitlab_git (7.2.15)
activesupport (~> 4.0)
charlock_holmes (~> 0.6)
gitlab-linguist (~> 3.0)
......@@ -387,7 +385,7 @@ GEM
systemu (~> 2.6.2)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mail_room (0.4.1)
mail_room (0.4.2)
method_source (0.8.2)
mime-types (1.25.1)
mimemagic (0.3.0)
......@@ -456,6 +454,10 @@ GEM
omniauth-twitter (1.0.1)
multi_json (~> 1.3)
omniauth-oauth (~> 1.0)
omniauth_crowd (2.2.3)
activesupport
nokogiri (>= 1.4.4)
omniauth (~> 1.0)
opennebula (4.12.1)
json
nokogiri
......@@ -595,6 +597,8 @@ GEM
powerpack (~> 0.0.6)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-fogbugz (0.1.1)
crack
ruby-progressbar (1.7.5)
ruby-saml (1.0.0)
nokogiri (>= 1.5.10)
......@@ -629,6 +633,8 @@ GEM
thor (~> 0.14)
settingslogic (2.0.9)
sexp_processor (4.6.0)
sham_rack (1.3.6)
rack
shellany (0.0.1)
shoulda-matchers (2.8.0)
activesupport (>= 3.0.0)
......@@ -818,11 +824,10 @@ DEPENDENCIES
gemnasium-gitlab-service (~> 0.2)
github-markup (~> 1.3.1)
gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-grack (~> 2.0.2)
gitlab-linguist (~> 3.0.1)
gitlab_ci_meta (~> 4.0)
gitlab_emoji (~> 0.1)
gitlab_git (~> 7.2.14)
gitlab_git (~> 7.2.15)
gitlab_meta (= 7.0)
gitlab_omniauth-ldap (~> 1.2.1)
gollum-lib (~> 4.0.2)
......@@ -842,7 +847,7 @@ DEPENDENCIES
jquery-ui-rails (~> 4.2.1)
kaminari (~> 0.15.1)
letter_opener (~> 1.1.2)
mail_room (~> 0.4.1)
mail_room (~> 0.4.2)
minitest (~> 5.7.0)
mousetrap-rails (~> 1.4.6)
mysql2 (~> 0.3.16)
......@@ -860,6 +865,7 @@ DEPENDENCIES
omniauth-saml (~> 1.4.0)
omniauth-shibboleth (~> 1.1.1)
omniauth-twitter (~> 1.0.1)
omniauth_crowd
org-ruby (~> 0.9.12)
paranoia (~> 2.0)
pg (~> 0.18.2)
......@@ -882,12 +888,14 @@ DEPENDENCIES
rqrcode-rails3 (~> 0.1.7)
rspec-rails (~> 3.3.0)
rubocop (~> 0.28.0)
ruby-fogbugz
sanitize (~> 2.0)
sass-rails (~> 4.0.5)
sdoc (~> 0.3.20)
seed-fu (~> 2.3.5)
select2-rails (~> 3.5.9)
settingslogic (~> 2.0.9)
sham_rack
shoulda-matchers (~> 2.8.0)
sidekiq (~> 3.3)
sidetiq (~> 0.6.3)
......
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
class @Activities
constructor: ->
Pager.init 20, true
$(".event_filter_link").bind "click", (event) =>
$(".event-filter .btn").bind "click", (event) =>
event.preventDefault()
@toggleFilter($(event.currentTarget))
@reloadActivities()
......@@ -12,7 +12,7 @@ class @Activities
toggleFilter: (sender) ->
sender.parent().toggleClass "active"
sender.toggleClass "active"
event_filters = $.cookie("event_filter")
filter = sender.attr("id").split("_")[0]
if event_filters
......
......@@ -94,16 +94,18 @@ window.unbindEvents = ->
$(document).off('scroll')
window.shiftWindow = ->
scrollBy 0, -50
scrollBy 0, -100
document.addEventListener("page:fetch", unbindEvents)
# Scroll the window to avoid the topnav bar
# https://github.com/twitter/bootstrap/issues/1768
if location.hash
setTimeout shiftWindow, 1
window.addEventListener "hashchange", shiftWindow
window.onload = ->
# Scroll the window to avoid the topnav bar
# https://github.com/twitter/bootstrap/issues/1768
if location.hash
setTimeout shiftWindow, 100
$ ->
$(".nicescroll").niceScroll(cursoropacitymax: '0.4', cursorcolor: '#FFF', cursorborder: "1px solid #FFF")
......
......@@ -55,7 +55,6 @@ class Dispatcher
new Activities()
when 'dashboard:projects:starred'
new Activities()
new ProjectsList()
when 'projects:commit:show'
new Commit()
new Diff()
......@@ -70,7 +69,6 @@ class Dispatcher
when 'groups:show'
new Activities()
shortcut_handler = new ShortcutsNavigation()
new ProjectsList()
when 'groups:group_members:index'
new GroupMembers()
new UsersSelect()
......@@ -96,8 +94,6 @@ class Dispatcher
when 'users:show'
new User()
new Activities()
when 'admin:users:show'
new ProjectsList()
switch path.first()
when 'admin'
......
......@@ -123,6 +123,7 @@ class @Notes
if @isNewNote(note)
@note_ids.push(note.id)
$('ul.main-notes-list').append(note.html)
$('.js-syntax-highlight').syntaxHighlight()
@initTaskList()
###
......
# Applies a syntax highlighting color scheme CSS class to any element with the
# `js-syntax-highlight` class
#
# ### Example Markup
#
# <div class="js-syntax-highlight"></div>
#
$.fn.syntaxHighlight = ->
$(this).addClass(gon.user_color_scheme)
$(document).on 'ready page:load', ->
$('.js-syntax-highlight').syntaxHighlight()
......@@ -38,6 +38,8 @@ class @ZenMode
@active_checkbox = $(checkbox)
@active_checkbox.prop('checked', true)
@active_zen_area = @active_checkbox.parent().find('textarea')
# Prevent a user-resized textarea from persisting to fullscreen
@active_zen_area.removeAttr('style')
@active_zen_area.focus()
exitZenMode: =>
......
......@@ -12,6 +12,7 @@
*/
@import "base/fonts";
@import "base/variables";
@import "base/mixins";
@import "base/layout";
......
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), font-url('SourceSansPro-Light.ttf');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local('Source Sans Pro'), local('SourceSansPro-Regular'), font-url('SourceSansPro-Regular.ttf');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 600;
src: local('Source Sans Pro Semibold'), local('SourceSansPro-Semibold'), font-url('SourceSansPro-Semibold.ttf');
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), font-url('SourceSansPro-Bold.ttf');
}
......@@ -85,14 +85,14 @@
// Labels
.label {
padding: 2px 4px;
font-size: 12px;
font-size: 13px;
font-style: normal;
font-weight: normal;
display: inline-block;
&.label-gray {
background-color: #eee;
color: #999;
background-color: #f8fafc;
color: $gl-gray;
text-shadow: none;
}
......
......@@ -22,6 +22,10 @@ $brand-info: $gl-info;
$brand-warning: $gl-warning;
$brand-danger: $gl-danger;
$border-radius-base: 3px !default;
$border-radius-large: 5px !default;
$border-radius-small: 2px !default;
//== Scaffolding
//
......@@ -42,17 +46,18 @@ $font-size-base: $gl-font-size;
//
//## 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-base-vertical: 9px;
$padding-base-horizontal: $gl-padding;
$component-active-color: #fff;
$component-active-bg: $brand-info;
//== Forms
//
//##
$input-color: $text-color;
$input-border: #DDD;
$input-border-focus: $brand-info;
$input-border: #e7e9ed;
$input-border-focus: #7F8FA4;
$legend-color: $text-color;
......@@ -111,8 +116,8 @@ $alert-border-radius: 0;
$panel-border-radius: 0;
$panel-default-text: $text-color;
$panel-default-border: $border-color;
$panel-default-heading-bg: $background-color;
$panel-default-border: #E7E9ED;
$panel-default-heading-bg: #F8FAFC;
//== Wells
......@@ -131,3 +136,22 @@ $code-bg: #f9f2f4;
$kbd-color: #fff;
$kbd-bg: #333;
//== Buttons
//
//##
$btn-default-color: $gl-text-color;
$btn-default-bg: #fff;
$btn-default-border: #e7e9ed;
//== Nav
//
//##
$nav-link-padding: 13px $gl-padding;
//== Code
//
//##
$pre-bg: #f8fafc !default;
$pre-color: $gl-gray !default;
$pre-border-color: #e7e9ed;
......@@ -21,7 +21,6 @@ html {
margin-top: 30px;
}
.container-limited {
max-width: $fixed-layout-width;
}
......@@ -55,8 +55,11 @@
}
@mixin md-typography {
font-size: 15px;
line-height: 1.5;
color: #444;
a {
color: #3084bb;
}
img {
max-width: 100%;
......@@ -157,3 +160,94 @@
white-space: nowrap;
max-width: $max_width;
}
/*
* Base mixin for lists in GitLab
*/
@mixin basic-list {
margin: 5px 0px;
padding: 0px;
list-style: none;
> li {
padding: 10px 0;
border-bottom: 1px solid #EEE;
overflow: hidden;
display: block;
margin: 0px;
&:last-child {
border-bottom: none;
}
&.active {
background: #f9f9f9;
a {
font-weight: bold;
}
}
&.hide {
display: none;
}
&.light {
a {
color: $gl-gray;
}
}
}
}
@mixin input-big {
height: 36px;
padding: 5px 10px;
font-size: 16px;
line-height: 24px;
color: #7f8fa4;
background-color: #fff;
border-color: #e7e9ed;
}
@mixin btn-big {
height: 36px;
padding: 5px 10px;
font-size: 16px;
line-height: 24px;
}
@mixin nav-menu {
padding: 0;
margin: 0;
list-style: none;
margin-top: 5px;
height: 56px;
li {
display: inline-block;
a {
padding: 14px;
font-size: 17px;
line-height: 28px;
color: #7f8fa4;
border-bottom: 2px solid transparent;
&:hover, &:active, &:focus {
text-decoration: none;
}
}
&.active a {
color: #4c4e54;
border-bottom: 2px solid #1cacfc;
}
.badge {
font-weight: normal;
background-color: #fff;
background-color: #eee;
color: #78a;
}
}
}
$style_color: #474D57;
$hover: #FFFAF1;
$gl-text-color: #222222;
$gl-link-color: #446e9b;
$gl-text-color: #54565b;
$gl-header-color: #4c4e54;
$gl-link-color: #333c48;
$nprogress-color: #c0392b;
$gl-font-size: 14px;
$gl-font-size: 15px;
$list-font-size: 15px;
$sidebar_collapsed_width: 52px;
$sidebar_collapsed_width: 62px;
$sidebar_width: 230px;
$avatar_radius: 50%;
$code_font_size: 13px;
$code_line_height: 1.5;
$border-color: #E5E5E5;
$background-color: #f5f5f5;
$header-height: 50px;
$border-color: #E7E9ED;
$background-color: #F8FAFC;
$header-height: 58px;
$fixed-layout-width: 1200px;
$gl-gray: #7f8fa4;
$gl-padding: 16px;
$gl-avatar-size: 46px;
/*
* State colors:
*/
$gl-primary: #446e9b;
$gl-success: #019875;
$gl-info: #029ACF;
$gl-success: #44c679;
$gl-info: #00aaff;
$gl-warning: #EB9532;
$gl-danger: #d9534f;
......@@ -35,4 +38,4 @@ $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;
$regular_font: 'Source Sans Pro', "Helvetica Neue", Helvetica, Arial, sans-serif;
......@@ -23,8 +23,12 @@
&.s24 { width: 24px; height: 24px; margin-right: 8px; }
&.s26 { width: 26px; height: 26px; margin-right: 8px; }
&.s32 { width: 32px; height: 32px; margin-right: 10px; }
&.s36 { width: 36px; height: 36px; margin-right: 10px; }
&.s46 { width: 46px; height: 46px; margin-right: 15px; }
&.s48 { width: 48px; height: 48px; margin-right: 10px; }
&.s60 { width: 60px; height: 60px; margin-right: 12px; }
&.s90 { width: 90px; height: 90px; margin-right: 15px; }
&.s140 { width: 140px; height: 140px; margin-right: 20px; }
&.s160 { width: 160px; height: 160px; margin-right: 20px; }
}
......@@ -38,5 +42,6 @@
&.s32 { font-size: 22px; line-height: 32px; }
&.s60 { font-size: 32px; line-height: 60px; }
&.s90 { font-size: 36px; line-height: 90px; }
&.s160 { font-size: 96px; line-height: 1.33; }
&.s140 { font-size: 72px; line-height: 140px; }
&.s160 { font-size: 96px; line-height: 160px; }
}
.light-well {
background: #f9f9f9;
background-color: #f8fafc;
padding: 15px;
}
.centered-light-block {
text-align: center;
color: #888;
color: $gl-gray;
margin: 20px;
}
.nothing-here-block {
text-align: center;
padding: 20px;
color: #666;
color: $gl-gray;
font-weight: normal;
font-size: 16px;
line-height: 36px;
}
.gray-content-block {
margin: -$gl-padding;
background-color: #f8fafc;
padding: $gl-padding;
margin-bottom: 0px;
border-top: 1px solid #e7e9ed;
border-bottom: 1px solid #e7e9ed;
color: $gl-gray;
&.middle-block {
margin-top: 0;
margin-bottom: 0;
}
&.second-block {
margin-top: -1px;
margin-bottom: 0;
}
&.footer-block {
margin-top: 0;
margin-bottom: -$gl-padding;
}
.title {
color: $gl-text-color;
}
.oneline {
line-height: 44px;
}
}
......@@ -72,3 +72,19 @@
}
}
}
.btn-group-next {
.btn {
padding: 9px 0px;
font-size: 15px;
color: #7f8fa4;
border-color: #e7e9ed;
width: 140px;
&.active {
border-color: $gl-info;
background: $gl-info;
color: #fff;
}
}
}
/** COLORS **/
.cgray { color: gray }
.cgray { color: $gl-gray; }
.clgray { color: #BBB }
.cred { color: #D12F19 }
.cgreen { color: #4a2 }
......@@ -7,6 +7,7 @@
/** COMMON CLASSES **/
.prepend-top-10 { margin-top:10px }
.prepend-top-default { margin-top: $gl-padding; }
.prepend-top-20 { margin-top:20px }
.prepend-left-10 { margin-left:10px }
.prepend-left-20 { margin-left:20px }
......@@ -20,10 +21,10 @@
.underlined-link { text-decoration: underline; }
.hint { font-style: italic; color: #999; }
.light { color: #888 }
.light { color: $gl-gray; }
.slead {
color: #666;
color: $gl-gray;
font-size: 15px;
margin-bottom: 12px;
font-weight: normal;
......@@ -74,8 +75,6 @@ pre {
color: $gl-link-color;
}
.help li { color:$style_color; }
.back-link {
font-size: 14px;
}
......@@ -132,10 +131,6 @@ p.time {
text-shadow: none;
}
.highlight_word {
background: #fafe3d;
}
.thin_area{
height: 150px;
}
......@@ -307,7 +302,7 @@ table {
}
.btn-sign-in {
margin-top: 7px;
margin-top: 15px;
text-shadow: none;
}
......@@ -359,14 +354,14 @@ table {
}
.description {
font-size: 16px;
font-size: $gl-font-size;
color: #666;
margin-top: 8px;
}
}
.profiler-results {
top: 50px !important;
top: 73px !important;
.profiler-button,
.profiler-controls {
......@@ -375,21 +370,11 @@ table {
}
.center-top-menu {
border-bottom: 1px solid #EEE;
list-style: none;
@include nav-menu;
text-align: center;
padding-bottom: 15px;
margin-bottom: 15px;
li {
display: inline-block;
a {
padding: 10px;
}
&.active a {
color: #666;
}
}
margin-top: 5px;
margin-bottom: $gl-padding;
height: 56px;
margin-top: -$gl-padding;
padding-top: $gl-padding;
}
......@@ -2,31 +2,6 @@
margin-right: 15px;
}
.issues-state-filters {
li.active a {
border-color: #DDD !important;
&, &:hover, &:active, &.active {
background: #f5f5f5 !important;
border-bottom: 1px solid #f5f5f5 !important;
}
}
}
.issues-details-filters {
font-size: 13px;
background: #f5f5f5;
margin: -10px 0;
padding: 10px 15px;
margin-top: -15px;
border-left: 1px solid #DDD;
border-right: 1px solid #DDD;
.btn {
font-size: 13px;
}
}
@media (min-width: 800px) {
.issues-filters,
.issues_bulk_update {
......
......@@ -24,29 +24,28 @@ header {
z-index: 100;
margin-bottom: 0;
min-height: $header-height;
background-color: #fff;
border: none;
border-bottom: 1px solid #EEE;
.container-fluid {
background: #FFF;
width: 100% !important;
filter: none;
padding: 0;
.nav > li > a {
color: #888;
font-size: 14px;
color: #7f8fa4;
font-size: 18px;
padding: 0;
background-color: #f5f5f5;
margin: ($header-height - 28) / 2 0;
margin-left: 10px;
border-radius: 40px;
height: 28px;
width: 28px;
line-height: 28px;
text-align: center;
&:hover, &:focus, &:active {
background-color: #EEE;
background-color: #FFF;
}
}
......@@ -56,6 +55,7 @@ header {
border-radius: 0;
position: absolute;
right: 2px;
top: 15px;
&:hover {
background-color: #EEE;
......@@ -70,16 +70,16 @@ header {
.title {
margin: 0;
overflow: hidden;
font-size: 18px;
font-size: 19px;
line-height: $header-height;
font-weight: bold;
color: #444;
font-weight: normal;
color: #4c4e54;
text-overflow: ellipsis;
vertical-align: top;
white-space: nowrap;
a {
color: #444;
color: #4c4e54;
&:hover {
text-decoration: underline;
}
......@@ -94,7 +94,7 @@ header {
.search {
margin-right: 10px;
margin-left: 10px;
margin-top: ($header-height - 28) / 2;
margin-top: ($header-height - 36) / 2;
form {
margin: 0;
......@@ -105,13 +105,8 @@ header {
width: 220px;
background-image: image-url("icon-search.png");
background-repeat: no-repeat;
background-position: 10px;
height: inherit;
padding: 4px 6px;
padding-left: 25px;
font-size: 13px;
background-color: #f5f5f5;
border-color: #f5f5f5;
background-position: 195px;
@include input-big;
&:focus {
@include box-shadow(none);
......
......@@ -5,10 +5,13 @@
*/
.issue-box {
@include border-radius(3px);
display: inline-block;
padding: 4px 13px;
padding: 10px $gl-padding;
font-weight: normal;
margin-right: 5px;
margin-right: 10px;
font-size: $gl-font-size;
&.issue-box-closed {
background-color: $gl-danger;
......@@ -21,7 +24,7 @@
}
&.issue-box-open {
background-color: $gl-success;
background-color: #019875;
color: #FFF;
}
......
......@@ -49,8 +49,6 @@
}
}
.author { color: #999; }
.list-item-name {
float: left;
position: relative;
......@@ -71,15 +69,6 @@
font-size: $list-font-size;
line-height: 18px;
}
.row_title {
color: $gray-dark;
&:hover {
color: $text-color;
text-decoration: underline;
}
}
}
}
......@@ -93,28 +82,12 @@ ol, ul {
/** light list with border-bottom between li **/
ul.bordered-list {
margin: 5px 0px;
padding: 0px;
li {
padding: 5px 0;
border-bottom: 1px solid #EEE;
overflow: hidden;
display: block;
margin: 0px;
&:last-child { border:none }
&.active {
background: #f9f9f9;
a { font-weight: bold; }
}
&.light {
a { color: #777; }
}
}
@include basic-list;
&.top-list {
li:first-child {
padding-top: 0;
h4, h5 {
margin-top: 0;
}
......@@ -125,3 +98,28 @@ ul.bordered-list {
li.task-list-item {
list-style-type: none;
}
ul.content-list {
@include basic-list;
margin: 0;
padding: 0;
> li {
padding: $gl-padding;
border-color: #f1f2f4;
margin-left: -$gl-padding;
margin-right: -$gl-padding;
color: $gl-gray;
.avatar {
margin-right: 15px;
}
.controls {
padding-top: 10px;
float: right;
}
}
}
......@@ -65,8 +65,11 @@
position: relative;
}
.md-header ul {
.md-header {
ul {
float: left;
margin-bottom: 1px;
}
}
.referenced-users {
......@@ -80,7 +83,7 @@
.md-preview-holder {
background: #FFF;
border: 1px solid #ddd;
min-height: 100px;
min-height: 169px;
padding: 5px;
box-shadow: none;
}
......@@ -105,7 +108,7 @@
.markdown-area {
background: #FFF;
border: 1px solid #ddd;
min-height: 100px;
min-height: 140px;
padding: 5px;
box-shadow: none;
width: 100%;
......
......@@ -80,6 +80,23 @@
%ul.notes .note-role, .note-actions {
display: none;
}
.center-top-menu {
height: 45px;
li a {
font-size: 14px;
padding: 19px 10px;
}
}
.projects-search-form {
margin: 0 -5px !important;
.btn {
display: none;
}
}
}
@media (max-width: $screen-sm-max) {
......
......@@ -3,9 +3,9 @@
.select2-choice {
background: #FFF;
border-color: #DDD;
height: 34px;
padding: 6px 14px;
font-size: 14px;
height: 42px;
padding: 8px $gl-padding;
font-size: $gl-font-size;
line-height: 1.42857143;
@include border-radius(4px);
......@@ -13,7 +13,7 @@
.select2-arrow {
background: #FFF;
border-left: none;
padding-top: 3px;
padding-top: 5px;
}
}
}
......
......@@ -18,13 +18,21 @@
}
.content-wrapper {
min-height: 100vh;
width: 100%;
padding: 20px;
background: #f1f4f8;
.container-fluid {
background: #FFF;
padding: $gl-padding;
border: 1px solid #e7e9ed;
min-height: 90vh;
}
}
.nav-sidebar {
margin-top: 29 + $header-height;
margin-top: 14 + $header-height;
margin-bottom: 50px;
transition-duration: .3s;
list-style: none;
......@@ -43,13 +51,14 @@
}
a {
padding: 8px 15px;
font-size: 13px;
line-height: 18px;
padding: 7px 15px;
font-size: $gl-font-size;
line-height: 24px;
color: $gray;
display: block;
text-decoration: none;
padding-left: 16px;
padding-left: 22px;
font-weight: normal;
&:hover {
text-decoration: none;
......@@ -60,9 +69,9 @@
}
i {
width: 20px;
width: 16px;
color: $gray-light;
margin-right: 23px;
margin-right: 13px;
}
.count {
......@@ -108,17 +117,31 @@
}
@mixin folded-sidebar {
padding-left: 50px;
padding-left: 60px;
transition-duration: .3s;
.sidebar-wrapper {
width: $sidebar_collapsed_width;
.header-logo {
width: $sidebar_collapsed_width;
a {
padding-left: 12px;
.gitlab-text-container {
display: none;
}
}
}
.nav-sidebar {
width: $sidebar_collapsed_width;
li a {
padding-left: 16px;
span {
display: none;
}
}
}
......@@ -128,21 +151,25 @@
}
.sidebar-user {
padding-left: 12px;
width: $sidebar_collapsed_width;
.username {
display: none;
}
}
}
}
.collapse-nav a {
width: $sidebar_width;
position: fixed;
top: $header-height;
left: 198px;
bottom: 0;
font-size: 13px;
background: transparent;
width: 32px;
height: 28px;
height: 40px;
text-align: center;
line-height: 28px;
line-height: 40px;
transition-duration: .3s;
}
......@@ -176,16 +203,18 @@
}
.sidebar-user {
padding: 9px 22px;
position: fixed;
bottom: 0;
bottom: 40px;
width: $sidebar_width;
padding: 10px;
overflow: hidden;
transition-duration: .3s;
.username {
margin-top: 5px;
margin-left: 10px;
width: $sidebar_width - 2 * 10px;
font-size: 16px;
line-height: 34px;
}
}
......@@ -202,7 +231,7 @@
float: left;
height: $header-height;
width: 100%;
padding: ($header-height - 36 ) / 2 8px;
padding: 10px 22px;
overflow: hidden;
img {
......@@ -219,8 +248,8 @@
float: left;
margin: 0;
margin-left: 14px;
font-size: 18px;
line-height: $header-height - 14;
font-size: 19px;
line-height: 41px;
font-weight: normal;
}
}
......
.timeline {
list-style: none;
padding: 20px 0 20px;
position: relative;
@include basic-list;
&:before {
top: 0;
bottom: 0;
position: absolute;
content: " ";
width: 3px;
background-color: #eeeeee;
margin-left: 29px;
}
.timeline-entry {
position: relative;
margin-top: 5px;
margin-left: 30px;
margin-bottom: 10px;
clear: both;
&:target {
.timeline-entry-inner .timeline-content {
-webkit-animation:target-note 2s linear;
background: $hover;
}
}
.timeline-entry-inner {
position: relative;
margin-left: -20px;
&:before, &:after {
content: " ";
display: table;
}
.timeline-icon {
margin-top: 2px;
background: #fff;
color: #737881;
float: left;
@include border-radius($avatar_radius);
@include box-shadow(0 0 0 3px #EEE);
overflow: hidden;
.avatar {
margin: 0;
padding: 0;
}
}
.timeline-content {
position: relative;
background: $background-color;
padding: 10px 15px;
margin-left: 60px;
.timeline-entry {
padding: $gl-padding;
border-color: #f1f2f4;
margin-left: -$gl-padding;
margin-right: -$gl-padding;
color: $gl-gray;
border-bottom: 1px solid #f1f2f4;
border-right: 1px solid #f1f2f4;
img {
max-width: 100%;
&:last-child {
border-bottom: none;
}
&:after {
content: '';
display: block;
position: absolute;
width: 0;
height: 0;
border-style: solid;
border-width: 9px 9px 9px 0;
border-color: transparent $background-color transparent transparent;
left: 0;
top: 10px;
margin-left: -9px;
}
}
}
.avatar {
margin-right: 15px;
}
.system-note .timeline-entry-inner {
.timeline-icon {
background: none;
margin-left: 12px;
margin-top: 0;
@include box-shadow(none);
span {
margin: 0 2px;
font-size: 16px;
color: #eeeeee;
.controls {
padding-top: 10px;
float: right;
}
}
.timeline-content {
background: none;
margin-left: 45px;
padding: 0px 15px;
&:after { border: 0; }
.note-header {
span { font-size: 12px; }
.avatar {
margin-right: 5px;
.note-text {
p:last-child {
margin-bottom: 0;
}
}
.system-note {
.note-text {
font-size: 12px;
margin-left: 20px;
color: $gl-gray !important;
}
}
.diff-file {
border: 1px solid $border-color;
border-bottom: none;
margin-left: 0;
margin-right: 0;
}
}
......@@ -132,3 +63,8 @@
}
}
}
.discussion .timeline-entry {
margin: 0;
border-right: none;
}
......@@ -9,6 +9,11 @@
margin-bottom: 5px;
}
h1, h2, h3, h4, h5, h6 {
color: $gl-header-color;
font-weight: 500;
}
/** CODE **/
pre {
font-family: $monospace_font;
......
......@@ -4,7 +4,7 @@
}
.zen-enter-link {
color: #888;
color: $gl-gray;
position: absolute;
top: 0px;
right: 4px;
......@@ -13,7 +13,7 @@
.zen-leave-link {
display: none;
color: #888;
color: $gl-text-color;
position: absolute;
top: 10px;
right: 10px;
......
......@@ -21,6 +21,12 @@ pre.code.highlight.dark,
background-color: #557 !important;
}
// Search result highlight
span.highlight_word {
background: #ffe792;
color: #000000;
}
.hll { background-color: #373b41 }
.c { color: #969896 } /* Comment */
.err { color: #cc6666 } /* Error */
......
......@@ -21,6 +21,12 @@ pre.code.monokai,
background-color: #49483e !important;
}
// Search result highlight
span.highlight_word {
background: #ffe792;
color: #000000;
}
.hll { background-color: #49483e }
.c { color: #75715e } /* Comment */
.err { color: #960050; background-color: #1e0010 } /* Error */
......
......@@ -21,6 +21,11 @@ pre.code.highlight.solarized-dark,
background-color: #174652 !important;
}
// Search result highlight
span.highlight_word {
background: #094554;
}
/* Solarized Dark
For use with Jekyll and Pygments
......
......@@ -21,6 +21,11 @@ pre.code.highlight.solarized-light,
background-color: #ddd8c5 !important;
}
// Search result highlight
span.highlight_word {
background: #eee8d5;
}
/* Solarized Light
For use with Jekyll and Pygments
......
......@@ -21,6 +21,11 @@ pre.code.highlight.white,
background-color: #f8eec7 !important;
}
// Search result highlight
span.highlight_word {
background: #fafe3d;
}
.hll { background-color: #f8f8f8 }
.c { color: #999988; font-style: italic; }
.err { color: #a61717; background-color: #e3d2d2; }
......
......@@ -26,14 +26,6 @@
margin-top: 10px;
}
.commit-stat-summary {
color: #666;
font-size: 14px;
font-weight: normal;
padding: 3px 0;
margin-bottom: 10px;
}
.commit-info-row {
margin-bottom: 10px;
.avatar {
......@@ -47,11 +39,6 @@
}
.commit-box {
margin: 10px 0;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
padding: 20px 0;
.commit-title {
margin: 0;
}
......@@ -61,10 +48,6 @@
}
}
.file-stats a {
color: $style_color;
}
.file-stats {
.new-file {
a {
......
......@@ -52,7 +52,7 @@ li.commit {
}
.commit-row-message {
color: #444;
color: $gl-link-color;
&:hover {
text-decoration: underline;
......@@ -88,12 +88,12 @@ li.commit {
}
.commit-row-info {
color: #777;
color: $gl-gray;
line-height: 24px;
font-size: 13px;
a {
color: #777;
color: $gl-gray;
}
.committed_ago {
......
......@@ -2,7 +2,7 @@
.side {
.panel {
.panel-heading {
background: #EEE;
background: $background-color;
border-top-left-radius: 0;
}
border-top-left-radius: 0;
......@@ -38,11 +38,11 @@
float: left;
.avatar {
@include border-radius(0px);
@include border-radius(50%);
}
.identicon {
line-height: 40px;
line-height: 46px;
}
}
......
.diff-file {
border: 1px solid $border-color;
margin-bottom: 1em;
margin-left: -16px;
margin-right: -16px;
border: none;
border-bottom: 1px solid #E7E9EE;
.diff-header {
position: relative;
......@@ -45,7 +47,7 @@
overflow-y: hidden;
background: #FFF;
color: #333;
font-size: $code_font_size;
.old {
span.idiff {
background-color: #f8cbcb;
......@@ -82,7 +84,7 @@
border: none;
margin: 0px;
padding: 0px;
td {
.line_holder td {
line-height: $code_line_height;
font-size: $code_font_size;
}
......@@ -367,3 +369,7 @@
white-space: pre-wrap;
}
.inline-parallel-buttons {
float: right;
margin-top: -5px;
}
/**
* Events labels
* Dashboard events feed
*
*/
.event_label {
&.pushed {
padding: 0 2px;
}
.event-item {
font-size: $gl-font-size;
padding: $gl-padding;
margin-left: -$gl-padding;
margin-right: -$gl-padding;
border-bottom: 1px solid #f1f2f4;
color: #7f8fa4;
&.opened {
padding: 0 2px;
&.event-inline {
.avatar {
position: relative;
top: -2px;
}
&.closed {
padding: 0 2px;
.event-title {
line-height: 44px;
}
&.merged {
padding: 0 2px;
.event-item-timestamp {
line-height: 44px;
}
&.left,
&.joined {
padding: 0 2px;
float: none;
}
}
/**
* Dashboard events feed
*
*/
.event-item {
&:first-child {
padding-top: 0;
a {
color: #4c4e54;
}
&.event-inline {
.avatar {
position: relative;
top: -2px;
}
margin-right: 15px;
}
padding: 12px 0px;
border-bottom: 1px solid #eee;
.event-title {
max-width: 70%;
@include str-truncated(calc(100% - 174px));
font-weight: 500;
font-size: 14px;
font-weight: 600;
.author_name {
color: #333;
}
}
.event-body {
font-size: 13px;
margin-left: 35px;
margin-left: 63px;
margin-right: 80px;
color: #777;
.event-note {
margin-top: 5px;
word-wrap: break-word;
.md {
font-size: 13px;
color: #7f8fa4;
font-size: $gl-font-size;
iframe.twitter-share-button {
vertical-align: bottom;
......@@ -94,7 +82,7 @@
.event-note-icon {
color: #777;
float: left;
font-size: 16px;
font-size: $gl-font-size;
line-height: 16px;
margin-right: 5px;
}
......@@ -116,7 +104,7 @@
&:last-child { border:none }
.event_commits {
margin-top: 5px;
margin-top: 9px;
li {
&.commit {
......@@ -125,10 +113,12 @@
padding-left: 0;
border: none;
.commit-row-title {
font-size: 12px;
font-size: $gl-font-size;
}
}
&.commits-stat {
margin-top: 3px;
display: block;
padding: 3px;
padding-left: 0;
......@@ -142,7 +132,6 @@
.event-item-timestamp {
float: right;
color: #999;
line-height: 22px;
}
}
......@@ -186,12 +175,3 @@
}
}
}
.event_filter {
li a {
font-size: 13px;
padding: 5px 10px;
background: $background-color;
margin-left: 4px;
}
}
......@@ -25,8 +25,6 @@
}
.issuable-context-title {
font-size: 14px;
line-height: 1.4;
margin-bottom: 5px;
.avatar {
......@@ -34,14 +32,50 @@
}
label {
color: #666;
color: $gl-gray;
font-weight: normal;
margin-right: 4px;
}
}
.issuable-affix .context {
font-size: 13px;
.project-issuable-filter {
.controls {
float: right;
margin-top: 7px;
}
.center-top-menu {
text-align: left;
}
}
.btn { font-size: 13px; }
.issuable-details {
.page-title {
margin-top: -15px;
padding: 10px 0;
margin-bottom: 0;
color: $gl-gray;
font-size: 16px;
.author {
color: $gl-gray;
}
.issue-id {
font-size: 19px;
color: $gl-text-color;
}
}
.issue-title {
margin: 0;
}
.description {
margin-top: 6px;
p:last-child {
margin-bottom: 0;
}
}
}
.issues-list {
.issue {
padding: 10px 15px;
padding: 10px $gl-padding;
position: relative;
.issue-title {
......@@ -10,8 +10,7 @@
}
.issue-info {
color: #999;
font-size: 13px;
color: $gl-gray;
}
.issue-check {
......@@ -47,10 +46,6 @@
}
}
.participants {
margin-bottom: 20px;
}
.issue-search-form {
margin: 0;
height: 24px;
......@@ -137,11 +132,6 @@ form.edit-issue {
}
}
h2.issue-title {
margin-top: 0;
font-weight: bold;
}
.issue-form .select2-container {
width: 250px !important;
}
......@@ -3,10 +3,10 @@
*
*/
.mr-state-widget {
background: #FAFAFA;
background: #f8fafc;
margin-bottom: 20px;
color: #666;
border: 1px solid #e5e5e5;
color: $gl-gray;
border: 1px solid #eef0f2;
@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.05));
@include border-radius(3px);
......@@ -29,6 +29,14 @@
padding: 5px;
line-height: 20px;
&.right {
float: right;
padding-top: 12px;
a {
color: $gl-gray;
}
}
.remove_source_checkbox {
margin: 0;
}
......@@ -36,7 +44,7 @@
}
.ci_widget {
border-bottom: 1px solid #EEE;
border-bottom: 1px solid #eef0f2;
i {
margin-right: 4px;
......@@ -89,20 +97,14 @@
}
}
@media(min-width: $screen-sm-max) {
.merge-request .merge-request-tabs{
li {
a {
padding: 15px 40px;
font-size: 14px;
}
}
}
}
.merge-request .merge-request-tabs{
margin-top: 30px;
margin-bottom: 20px;
@include nav-menu;
margin: -$gl-padding;
padding: $gl-padding;
text-align: center;
border-top: 1px solid #e7e9ed;
margin-top: 18px;
margin-bottom: 3px;
}
.mr_source_commit,
......@@ -136,8 +138,7 @@
}
.merge-request-info {
color: #999;
font-size: 13px;
color: $gl-gray;
}
}
......
......@@ -6,4 +6,8 @@ li.milestone {
h4 {
font-weight: bold;
}
.progress {
height: 6px;
}
}
......@@ -72,9 +72,13 @@
.common-note-form {
margin: 0;
background: #F9F9F9;
padding: 5px;
border: 1px solid #DDD;
background: #f8fafc;
padding: $gl-padding;
margin-left: -$gl-padding;
margin-right: -$gl-padding;
border-right: 1px solid #f1f2f4;
border-top: 1px solid #f1f2f4;
margin-bottom: -$gl-padding;
}
.note-form-actions {
......@@ -142,9 +146,9 @@
}
.discussion-reply-holder {
background: #f9f9f9;
background: $background-color;
padding: 10px 15px;
border-top: 1px solid #DDD;
border-top: 1px solid $border-color;
}
}
......@@ -166,6 +170,6 @@
background: #FFF;
padding: 5px;
margin-top: -11px;
border: 1px solid #DDD;
border: 1px solid $border-color;
font-size: 13px;
}
......@@ -14,6 +14,19 @@ ul.notes {
margin: 0px;
padding: 0px;
.system-note {
font-size: 14px;
padding-top: 10px;
padding-bottom: 10px;
background: #f8fafc;
.timeline-icon {
.avatar {
visibility: hidden;
}
}
}
.discussion-header,
.note-header {
@extend .cgray;
......@@ -34,10 +47,8 @@ ul.notes {
content: "\00b7";
}
font-size: 13px;
a {
@extend .cgray;
color: $gl-gray;
&:hover {
text-decoration: underline;
......@@ -45,8 +56,9 @@ ul.notes {
}
}
.author {
color: #333;
font-weight: bold;
color: #4c4e54;
margin-right: 3px;
&:hover {
color: $gl-link-color;
}
......@@ -59,7 +71,7 @@ ul.notes {
margin-top: 1px;
border: 1px solid #bbb;
background-color: transparent;
color: #999;
color: $gl-gray;
}
}
......@@ -133,8 +145,6 @@ ul.notes {
}
.diff-file .notes_holder {
font-size: 13px;
line-height: 18px;
font-family: $regular_font;
td {
......@@ -176,8 +186,7 @@ ul.notes {
a {
margin-left: 5px;
color: #999;
color: $gl-gray;
i.fa {
font-size: 16px;
......
......@@ -16,6 +16,10 @@
.project-home-panel {
text-align: center;
background: #f7f8fa;
margin: -$gl-padding;
padding: $gl-padding;
padding-top: 40px;
.project-identicon-holder {
margin-bottom: 15px;
......@@ -38,13 +42,12 @@
h1 {
margin: 0;
margin-bottom: 10px;
font-size: 26px;
font-weight: bold;
font-size: 23px;
font-weight: normal;
}
p {
font-size: 18px;
color: #666;
color: #7f8fa4;
display: inline;
}
}
......@@ -52,6 +55,10 @@
.git-clone-holder {
max-width: 600px;
margin: 20px auto;
.form-control {
background: #FFF;
}
}
.visibility-level-label {
......@@ -62,17 +69,18 @@
}
.project-repo-buttons {
margin-top: 25px;
margin-top: $gl-padding;
margin-bottom: 25px;
.btn {
@extend .btn-info;
text-transform: uppercase;
font-size: 15px;
line-height: 20px;
padding: 8px 14px;
border-radius: 3px;
margin-left: 10px;
font-weight: bold;
font-size: 14px;
line-height: 16px;
padding: 8px 12px;
.count {
padding-left: 7px;
......@@ -162,78 +170,6 @@ ul.nav.nav-projects-tabs {
margin: 0px;
}
.my-projects,
.public-projects {
li {
.project-info {
margin-bottom: 10px;
overflow: hidden;
}
.access-icon {
color: #AAA;
margin-left: 10px;
i {
color: #AAA;
}
}
}
}
.public-clone {
background: #EEE;
color: #777;
padding: 6px 10px;
margin: 1px;
font-weight: normal;
}
.public-projects .repo-info {
color: #777;
a {
color: #777;
}
}
.project-side {
.project-fork-icon {
float: left;
font-size: 26px;
margin-right: 10px;
line-height: 1.5;
}
.panel {
@include border-radius(3px);
.panel-heading, .panel-footer {
font-weight: normal;
background-color: transparent;
color: #666;
border-color: #EEE;
}
.actions {
margin-top: 10px;
}
.nav-pills a {
padding: 10px;
font-weight: bold;
color: $gl-link-color;
}
.nav {
margin-bottom: 15px;
}
}
.ci-status-image {
max-height: 22px;
}
}
.transfer-project .select2-container {
min-width: 200px;
}
......@@ -256,10 +192,10 @@ ul.nav.nav-projects-tabs {
.breadcrumb.repo-breadcrumb {
padding: 0;
line-height: 34px;
background: white;
line-height: 42px;
background: transparent;
border: none;
font-size: 16px;
margin: 0;
> li + li:before {
padding: 0 3px;
......@@ -305,10 +241,23 @@ table.table.protected-branches-list tr.no-border {
.project-stats {
text-align: center;
margin-top: 0;
margin-bottom: 0;
padding-top: 5px;
padding-bottom: 0;
ul.nav-pills { display:inline-block; }
li { display:inline; }
a { float:left; }
ul.nav-pills {
display:inline-block;
}
li {
display:inline;
}
a {
float:left;
font-size: 17px;
}
li.missing a {
color: #bbb;
......@@ -325,32 +274,67 @@ pre.light-well {
}
.projects-search-form {
max-width: 600px;
margin: 0 auto;
margin-bottom: 20px;
margin: -$gl-padding;
background-color: #f8fafc;
padding: $gl-padding;
margin-bottom: 0px;
border-top: 1px solid #e7e9ed;
border-bottom: 1px solid #e7e9ed;
}
/*
* Projects list rendered on dashboard and user page
*/
.projects-list {
@include basic-list;
.project-row {
padding: $gl-padding;
border-color: #f1f2f4;
margin-left: -$gl-padding;
margin-right: -$gl-padding;
input {
border-color: #BBB;
&.no-description {
.project {
line-height: 44px;
}
}
}
.project-row {
.project-full-name {
font-weight: bold;
font-size: 15px;
@include str-truncated;
font-weight: 600;
color: #4c4e54;
}
.pull-right.light {
line-height: 45px;
color: #7f8fa4;
}
.project-description {
color: #888;
font-size: 13px;
color: #7f8fa4;
p {
@include str-truncated;
margin-bottom: 0;
color: #888;
color: #7f8fa4;
}
}
}
.bottom {
padding-top: $gl-padding;
padding-bottom: 0;
}
}
.my-projects .project-row {
padding: 10px 0;
.panel .projects-list li {
padding: 10px 15px;
margin: 0;
}
.project-show-activity {
.activity-filter-block {
margin-top: -1px;
}
}
.search-results {
.search-result-row {
border-bottom: 1px solid #EEE;
padding-bottom: 10px;
margin-bottom: 10px;
border-bottom: 1px solid #DDD;
padding-bottom: 15px;
margin-bottom: 15px;
}
}
.search-holder {
max-width: 600px;
margin: 0 auto;
margin-bottom: 20px;
input {
border-color: #BBB;
font-weight: bold;
}
}
......@@ -6,3 +6,27 @@
.snippet-form-holder .file-holder .file-title {
padding: 2px;
}
.snippet-row {
.snippet-title {
font-size: 15px;
font-weight: bold;
line-height: 20px;
margin-bottom: 2px;
.monospace {
font-weight: normal;
}
}
.snippet-info {
color: #888;
font-size: 13px;
line-height: 24px;
a {
color: #888;
}
}
}
......@@ -63,15 +63,15 @@
padding-right: 8px;
.commit-author-name {
color: gray;
color: $gl-gray;
}
}
.tree_commit {
color: gray;
color: $gl-gray;
.tree-commit-link {
color: gray;
color: $gl-gray;
&:hover {
text-decoration: underline;
......
......@@ -9,15 +9,19 @@
@mixin gitlab-theme($color-light, $color, $color-darker, $color-dark) {
.page-with-sidebar {
.header-logo {
background-color: $color-darker;
border-color: $color-darker;
background-color: $color;
border-color: $color;
a {
color: $color-light;
h3 {
color: $color-light;
}
}
&:hover {
background-color: $color-dark;
background-color: $color-darker;
a {
color: #FFF;
}
......@@ -83,7 +87,7 @@
}
$theme-blue: #2980B9;
$theme-charcoal: #474D57;
$theme-charcoal: #333c47;
$theme-graphite: #888888;
$theme-gray: #373737;
$theme-green: #019875;
......@@ -95,7 +99,7 @@ body {
}
&.ui_charcoal {
@include gitlab-theme(#979DA7, $theme-charcoal, #373D47, #24272D);
@include gitlab-theme(#c5d0de, $theme-charcoal, #2b333d, #24272D);
}
&.ui_graphite {
......
class Admin::LabelsController < Admin::ApplicationController
before_action :set_label, only: [:show, :edit, :update, :destroy]
def index
@labels = Label.templates.page(params[:page]).per(PER_PAGE)
end
def show
end
def new
@label = Label.new
end
def edit
end
def create
@label = Label.new(label_params)
@label.template = true
if @label.save
redirect_to admin_labels_url, notice: "Label was created"
else
render :new
end
end
def update
if @label.update(label_params)
redirect_to admin_labels_path, notice: 'label was successfully updated.'
else
render :edit
end
end
def destroy
@label.destroy
@labels = Label.templates
respond_to do |format|
format.html do
redirect_to(admin_labels_path, notice: 'Label was removed')
end
format.js
end
end
private
def set_label
@label = Label.find(params[:id])
end
def label_params
params[:label].permit(:title, :color)
end
end
require 'gon'
require 'fogbugz'
class ApplicationController < ActionController::Base
include Gitlab::CurrentSettings
......@@ -20,7 +21,7 @@ class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
helper_method :abilities, :can?, :current_application_settings
helper_method :import_sources_enabled?, :github_import_enabled?, :github_import_configured?, :gitlab_import_enabled?, :gitlab_import_configured?, :bitbucket_import_enabled?, :bitbucket_import_configured?, :gitorious_import_enabled?, :google_code_import_enabled?, :git_import_enabled?
helper_method :import_sources_enabled?, :github_import_enabled?, :github_import_configured?, :gitlab_import_enabled?, :gitlab_import_configured?, :bitbucket_import_enabled?, :bitbucket_import_configured?, :gitorious_import_enabled?, :google_code_import_enabled?, :fogbugz_import_enabled?, :git_import_enabled?
rescue_from Encoding::CompatibilityError do |exception|
log_exception(exception)
......@@ -189,11 +190,12 @@ class ApplicationController < ActionController::Base
end
def add_gon_variables
gon.default_issues_tracker = Project.new.default_issue_tracker.to_param
gon.api_version = API::API.version
gon.relative_url_root = Gitlab.config.gitlab.relative_url_root
gon.default_avatar_url = URI::join(Gitlab.config.gitlab.url, ActionController::Base.helpers.image_path('no_avatar.png')).to_s
gon.max_file_size = current_application_settings.max_attachment_size;
gon.default_issues_tracker = Project.new.default_issue_tracker.to_param
gon.max_file_size = current_application_settings.max_attachment_size
gon.relative_url_root = Gitlab.config.gitlab.relative_url_root
gon.user_color_scheme = Gitlab::ColorSchemes.for_user(current_user).css_class
if current_user
gon.current_user_id = current_user.id
......@@ -333,6 +335,10 @@ class ApplicationController < ActionController::Base
current_application_settings.import_sources.include?('google_code')
end
def fogbugz_import_enabled?
current_application_settings.import_sources.include?('fogbugz')
end
def git_import_enabled?
current_application_settings.import_sources.include?('git')
end
......
class DashboardController < Dashboard::ApplicationController
before_action :load_projects
before_action :load_projects, except: :activity
before_action :event_filter, only: :activity
respond_to :html
......@@ -55,7 +55,14 @@ class DashboardController < Dashboard::ApplicationController
end
def load_events
@events = Event.in_projects(current_user.authorized_projects.pluck(:id))
project_ids =
if params[:filter] == "starred"
current_user.starred_projects
else
current_user.authorized_projects
end.pluck(:id)
@events = Event.in_projects(project_ids)
@events = @event_filter.apply_filter(@events).with_associations
@events = @events.limit(20).offset(params[:offset] || 0)
end
......
class Import::FogbugzController < Import::BaseController
before_action :verify_fogbugz_import_enabled
before_action :user_map, only: [:new_user_map, :create_user_map]
# Doesn't work yet due to bug in ruby-fogbugz, see below
rescue_from Fogbugz::AuthenticationException, with: :fogbugz_unauthorized
def new
end
def callback
begin
res = Gitlab::FogbugzImport::Client.new(import_params.symbolize_keys)
rescue
# Needed until https://github.com/firmafon/ruby-fogbugz/pull/9 is merged
return redirect_to :back, alert: 'Could not authenticate with FogBugz, check your URL, email, and password'
end
session[:fogbugz_token] = res.get_token
session[:fogbugz_uri] = params[:uri]
redirect_to new_user_map_import_fogbugz_path
end
def new_user_map
end
def create_user_map
user_map = params[:users]
unless user_map.is_a?(Hash) && user_map.all? { |k, v| !v[:name].blank? }
flash.now[:alert] = 'All users must have a name.'
render 'new_user_map' and return
end
session[:fogbugz_user_map] = user_map
flash[:notice] = 'The user map has been saved. Continue by selecting the projects you want to import.'
redirect_to status_import_fogbugz_path
end
def status
unless client.valid?
return redirect_to new_import_fogbugz_path
end
@repos = client.repos
@already_added_projects = current_user.created_projects.where(import_type: 'fogbugz')
already_added_projects_names = @already_added_projects.pluck(:import_source)
@repos.reject! { |repo| already_added_projects_names.include? repo.name }
end
def jobs
jobs = current_user.created_projects.where(import_type: 'fogbugz').to_json(only: [:id, :import_status])
render json: jobs
end
def create
@repo_id = params[:repo_id]
repo = client.repo(@repo_id)
fb_session = { uri: session[:fogbugz_uri], token: session[:fogbugz_token] }
@target_namespace = current_user.namespace
@project_name = repo.name
namespace = @target_namespace
umap = session[:fogbugz_user_map] || client.user_map
@project = Gitlab::FogbugzImport::ProjectCreator.new(repo, fb_session, namespace, current_user, umap).execute
end
private
def client
@client ||= Gitlab::FogbugzImport::Client.new(token: session[:fogbugz_token], uri: session[:fogbugz_uri])
end
def user_map
@user_map ||= begin
user_map = client.user_map
stored_user_map = session[:fogbugz_user_map]
user_map.update(stored_user_map) if stored_user_map
user_map
end
end
def fogbugz_unauthorized(exception)
flash[:alert] = exception.message
redirect_to new_import_fogbugz_path
end
def import_params
params.permit(:uri, :email, :password)
end
def verify_fogbugz_import_enabled
not_found! unless fogbugz_import_enabled?
end
end
......@@ -17,8 +17,7 @@ class Projects::RawController < Projects::ApplicationController
send_data(
@blob.data,
type: type,
disposition: 'inline',
filename: @blob.name
disposition: 'inline'
)
else
not_found!
......@@ -30,6 +29,8 @@ class Projects::RawController < Projects::ApplicationController
def get_blob_type
if @blob.text?
'text/plain; charset=utf-8'
elsif @blob.image?
@blob.content_type
else
'application/octet-stream'
end
......
......@@ -2,7 +2,7 @@ class Projects::ServicesController < Projects::ApplicationController
ALLOWED_PARAMS = [:title, :token, :type, :active, :api_key, :api_version, :subdomain,
:room, :recipients, :project_url, :webhook,
:user_key, :device, :priority, :sound, :bamboo_url, :username, :password,
:build_key, :server, :teamcity_url, :build_type,
:build_key, :server, :teamcity_url, :drone_url, :build_type,
:description, :issues_url, :new_issue_url, :restrict_to_branch, :channel,
:colorize_messages, :channels,
:push_events, :issues_events, :merge_requests_events, :tag_push_events,
......
......@@ -30,9 +30,14 @@ class Projects::SnippetsController < Projects::ApplicationController
def create
@snippet = CreateSnippetService.new(@project, current_user,
snippet_params).execute
if @snippet.valid?
respond_with(@snippet,
location: namespace_project_snippet_path(@project.namespace,
@project, @snippet))
else
render :new
end
end
def edit
......
......@@ -5,7 +5,6 @@ class Projects::WikisController < Projects::ApplicationController
before_action :authorize_create_wiki!, only: [:edit, :create, :history]
before_action :authorize_admin_wiki!, only: :destroy
before_action :load_project_wiki
#include WikiHelper
def pages
@wiki_pages = Kaminari.paginate_array(@project_wiki.pages).page(params[:page]).per(PER_PAGE)
......
......@@ -8,6 +8,8 @@ class SessionsController < Devise::SessionsController
def new
if Gitlab.config.ldap.enabled
@ldap_servers = Gitlab::LDAP::Config.servers
else
@ldap_servers = []
end
super
......
......@@ -51,10 +51,6 @@ class UsersController < ApplicationController
def set_user
@user = User.find_by_username!(params[:username])
unless current_user || @user.public_profile?
return authenticate_user!
end
end
def authorized_projects_ids
......
......@@ -2,13 +2,21 @@ class TrendingProjectsFinder
def execute(current_user, start_date = nil)
start_date ||= Date.today - 1.month
projects = projects_for(current_user)
# Determine trending projects based on comments count
# for period of time - ex. month
projects.joins(:notes).where('notes.created_at > ?', start_date).
select("projects.*, count(notes.id) as ncount").
group("projects.id").reorder("ncount DESC")
trending_project_ids = Note.
select("notes.project_id, count(notes.project_id) as pcount").
where('notes.created_at > ?', start_date).
group("project_id").
reorder("pcount DESC").
map(&:project_id)
sql_order_ids = trending_project_ids.reverse.
map { |project_id| "id = #{project_id}" }.join(", ")
# Get list of projects that user allowed to see
projects = projects_for(current_user)
projects.where(id: trending_project_ids).reorder(sql_order_ids)
end
private
......
# == Schema Information
#
# Table name: abuse_reports
#
# id :integer not null, primary key
# reporter_id :integer
# user_id :integer
# message :text
# created_at :datetime
# updated_at :datetime
#
class AbuseReport < ActiveRecord::Base
belongs_to :reporter, class_name: "User"
belongs_to :user
......
......@@ -83,7 +83,7 @@ class ApplicationSetting < ActiveRecord::Base
default_project_visibility: Settings.gitlab.default_projects_features['visibility_level'],
default_snippet_visibility: Settings.gitlab.default_projects_features['visibility_level'],
restricted_signup_domains: Settings.gitlab['restricted_signup_domains'],
import_sources: ['github','bitbucket','gitlab','gitorious','google_code','git']
import_sources: ['github','bitbucket','gitlab','gitorious','google_code','fogbugz','git']
)
end
......
......@@ -15,6 +15,7 @@
# milestone_id :integer
# state :string(255)
# iid :integer
# updated_by_id :integer
#
require 'carrierwave/orm/activerecord'
......
......@@ -24,7 +24,7 @@ class Label < ActiveRecord::Base
validates :color,
format: { with: /\A#[0-9A-Fa-f]{6}\Z/ },
allow_blank: false
validates :project, presence: true
validates :project, presence: true, unless: Proc.new { |service| service.template? }
# Don't allow '?', '&', and ',' for label titles
validates :title,
......@@ -34,6 +34,8 @@ class Label < ActiveRecord::Base
default_scope { order(title: :asc) }
scope :templates, -> { where(template: true) }
alias_attribute :name, :title
def self.reference_prefix
......@@ -78,4 +80,8 @@ class Label < ActiveRecord::Base
def open_issues_count
issues.opened.count
end
def template?
template
end
end
......@@ -19,6 +19,7 @@
# description :text
# position :integer default(0)
# locked_at :datetime
# updated_by_id :integer
#
require Rails.root.join("app/models/commit")
......
......@@ -15,6 +15,7 @@
# noteable_id :integer
# system :boolean default(FALSE), not null
# st_diff :text
# updated_by_id :integer
#
require 'carrierwave/orm/activerecord'
......
......@@ -43,6 +43,8 @@ class Project < ActiveRecord::Base
extend Gitlab::ConfigHelper
extend Enumerize
UNKNOWN_IMPORT_URL = 'http://unknown.git'
default_value_for :archived, false
default_value_for :visibility_level, gitlab_config_features.visibility_level
default_value_for :issues_enabled, gitlab_config_features.issues
......@@ -73,6 +75,7 @@ class Project < ActiveRecord::Base
has_many :services
has_one :gitlab_ci_service, dependent: :destroy
has_one :campfire_service, dependent: :destroy
has_one :drone_ci_service, dependent: :destroy
has_one :emails_on_push_service, dependent: :destroy
has_one :irker_service, dependent: :destroy
has_one :pivotaltracker_service, dependent: :destroy
......@@ -400,6 +403,15 @@ class Project < ActiveRecord::Base
end
end
def create_labels
Label.templates.each do |label|
label = label.dup
label.template = nil
label.project_id = self.id
label.save
end
end
def find_service(list, name)
list.find { |service| service.to_param == name }
end
......@@ -613,6 +625,7 @@ class Project < ActiveRecord::Base
name: name,
ssh_url: ssh_url_to_repo,
http_url: http_url_to_repo,
web_url: web_url,
namespace: namespace.name,
visibility_level: visibility_level
}
......
......@@ -26,11 +26,23 @@ class CiService < Service
:ci
end
def valid_token?(token)
self.respond_to?(:token) && self.token.present? && self.token == token
end
def supported_events
%w(push)
end
# Return complete url to build page
def merge_request_page(iid, sha, ref)
commit_page(sha, ref)
end
def commit_page(sha, ref)
build_page(sha, ref)
end
# Return complete url to merge_request page
#
# Ex.
# http://jenkins.example.com:8888/job/test1/scm/bySHA1/12d65c
......@@ -45,10 +57,27 @@ class CiService < Service
#
#
# Ex.
# @service.commit_status('13be4ac')
# @service.merge_request_status(9, '13be4ac', 'dev')
# # => 'success'
#
# @service.merge_request_status(10, '2abe4ac', 'dev)
# # => 'running'
#
#
def merge_request_status(iid, sha, ref)
commit_status(sha, ref)
end
# Return string with build status or :error symbol
#
# Allowed states: 'success', 'failed', 'running', 'pending', 'skipped'
#
#
# Ex.
# @service.commit_status('13be4ac', 'master')
# # => 'success'
#
# @service.commit_status('2abe4ac')
# @service.commit_status('2abe4ac', 'dev')
# # => 'running'
#
#
......
# == Schema Information
#
# Table name: services
#
# id :integer not null, primary key
# type :string(255)
# title :string(255)
# project_id :integer
# created_at :datetime
# updated_at :datetime
# active :boolean default(FALSE), not null
# properties :text
# template :boolean default(FALSE)
# push_events :boolean default(TRUE)
# issues_events :boolean default(TRUE)
# merge_requests_events :boolean default(TRUE)
# tag_push_events :boolean default(TRUE)
# note_events :boolean default(TRUE), not null
#
class DroneCiService < CiService
prop_accessor :drone_url, :token, :enable_ssl_verification
validates :drone_url,
presence: true,
format: { with: /\A#{URI.regexp(%w(http https))}\z/, message: "should be a valid url" }, if: :activated?
validates :token,
presence: true,
format: { with: /\A([A-Za-z0-9]+)\z/ }, if: :activated?
after_save :compose_service_hook, if: :activated?
def compose_service_hook
hook = service_hook || build_service_hook
hook.url = [drone_url, "/api/hook", "?owner=#{project.namespace.path}", "&name=#{project.path}", "&access_token=#{token}"].join
hook.enable_ssl_verification = enable_ssl_verification
hook.save
end
def execute(data)
case data[:object_kind]
when 'push'
service_hook.execute(data) if push_valid?(data)
when 'merge_request'
service_hook.execute(data) if merge_request_valid?(data)
when 'tag_push'
service_hook.execute(data) if tag_push_valid?(data)
end
end
def allow_target_ci?
true
end
def supported_events
%w(push merge_request tag_push)
end
def merge_request_status_path(iid, sha = nil, ref = nil)
url = [drone_url,
"gitlab/#{project.namespace.path}/#{project.path}/pulls/#{iid}",
"?access_token=#{token}"]
URI.join(*url).to_s
end
def commit_status_path(sha, ref)
url = [drone_url,
"gitlab/#{project.namespace.path}/#{project.path}/commits/#{sha}",
"?branch=#{URI::encode(ref.to_s)}&access_token=#{token}"]
URI.join(*url).to_s
end
def merge_request_status(iid, sha, ref)
response = HTTParty.get(merge_request_status_path(iid), verify: enable_ssl_verification)
if response.code == 200 and response['status']
case response['status']
when 'killed'
:canceled
when 'failure', 'error'
# Because drone return error if some test env failed
:failed
else
response["status"]
end
else
:error
end
rescue Errno::ECONNREFUSED
:error
end
def commit_status(sha, ref)
response = HTTParty.get(commit_status_path(sha, ref), verify: enable_ssl_verification)
if response.code == 200 and response['status']
case response['status']
when 'killed'
:canceled
when 'failure', 'error'
# Because drone return error if some test env failed
:failed
else
response["status"]
end
else
:error
end
rescue Errno::ECONNREFUSED
:error
end
def merge_request_page(iid, sha, ref)
url = [drone_url,
"gitlab/#{project.namespace.path}/#{project.path}/redirect/pulls/#{iid}"]
URI.join(*url).to_s
end
def commit_page(sha, ref)
url = [drone_url,
"gitlab/#{project.namespace.path}/#{project.path}/redirect/commits/#{sha}",
"?branch=#{URI::encode(ref.to_s)}"]
URI.join(*url).to_s
end
def commit_coverage(sha, ref)
nil
end
def build_page(sha, ref)
commit_page(sha, ref)
end
def builds_path
url = [drone_url, "#{project.namespace.path}/#{project.path}"]
URI.join(*url).to_s
end
def status_img_path
url = [drone_url,
"api/badges/#{project.namespace.path}/#{project.path}/status.svg",
"?branch=#{URI::encode(project.default_branch)}"]
URI.join(*url).to_s
end
def title
'Drone CI'
end
def description
'Drone is a Continuous Integration platform built on Docker, written in Go'
end
def to_param
'drone_ci'
end
def fields
[
{ type: 'text', name: 'token', placeholder: 'Drone CI project specific token' },
{ type: 'text', name: 'drone_url', placeholder: 'http://drone.example.com' },
{ type: 'checkbox', name: 'enable_ssl_verification', title: "Enable SSL verification" }
]
end
private
def tag_push_valid?(data)
data[:total_commits_count] > 0 && !Gitlab::Git.blank_ref?(data[:after])
end
def push_valid?(data)
opened_merge_requests = project.merge_requests.opened.where(source_project_id: project.id,
source_branch: Gitlab::Git.ref_name(data[:ref]))
opened_merge_requests.empty? && data[:total_commits_count] > 0 &&
!Gitlab::Git.blank_ref?(data[:after])
end
def merge_request_valid?(data)
['opened', 'reopened'].include?(data[:object_attributes][:state]) &&
data[:object_attributes][:merge_status] == 'unchecked'
end
end
# == Schema Information
#
# Table name: sent_notifications
#
# id :integer not null, primary key
# project_id :integer
# noteable_id :integer
# noteable_type :string(255)
# recipient_id :integer
# commit_id :string(255)
# reply_key :string(255) not null
#
class SentNotification < ActiveRecord::Base
belongs_to :project
belongs_to :noteable, polymorphic: true
......
......@@ -135,6 +135,7 @@ class Service < ActiveRecord::Base
buildkite
campfire
custom_issue_tracker
drone_ci
emails_on_push
external_wiki
flowdock
......
......@@ -42,13 +42,9 @@
# unconfirmed_email :string(255)
# hide_no_ssh_key :boolean default(FALSE)
# website_url :string(255) default(""), not null
# github_access_token :string(255)
# gitlab_access_token :string(255)
# notification_email :string(255)
# hide_no_password :boolean default(FALSE)
# password_automatically_set :boolean default(FALSE)
# bitbucket_access_token :string(255)
# bitbucket_access_token_secret :string(255)
# location :string(255)
# encrypted_otp_secret :string(255)
# encrypted_otp_secret_iv :string(255)
......@@ -104,7 +100,7 @@ class User < ActiveRecord::Base
# Profile
has_many :keys, dependent: :destroy
has_many :emails, dependent: :destroy
has_many :identities, dependent: :destroy
has_many :identities, dependent: :destroy, autosave: true
# Groups
has_many :members, dependent: :destroy
......@@ -637,10 +633,6 @@ class User < ActiveRecord::Base
email.start_with?('temp-email-for-oauth')
end
def public_profile?
authorized_projects.public_only.any?
end
def avatar_url(size = nil)
if avatar.present?
[gitlab_config.url, avatar.url].join
......
......@@ -107,12 +107,17 @@ class NotificationService
recipients = []
mentioned_users = note.mentioned_users
mentioned_users.select! do |user|
user.can?(:read_project, note.project)
end
# Add all users participating in the thread (author, assignee, comment authors)
participants =
if target.respond_to?(:participants)
target.participants(note.author)
else
note.mentioned_users
mentioned_users
end
recipients = recipients.concat(participants)
......@@ -120,8 +125,8 @@ class NotificationService
recipients = add_project_watchers(recipients, note.project)
# Reject users with Mention notification level, except those mentioned in _this_ note.
recipients = reject_mention_users(recipients - note.mentioned_users, note.project)
recipients = recipients + note.mentioned_users
recipients = reject_mention_users(recipients - mentioned_users, note.project)
recipients = recipients + mentioned_users
recipients = reject_muted_users(recipients, note.project)
......
......@@ -87,6 +87,8 @@ module Projects
@project.build_missing_services
@project.create_labels
event_service.create_project(@project, current_user)
system_hook_service.execute_hooks_for(@project, :create)
......
module Projects
class DownloadService < BaseService
WHITELIST = [
/^[^.]+\.fogbugz.com$/
]
def initialize(project, url)
@project, @url = project, url
end
def execute
return nil unless valid_url?(@url)
uploader = FileUploader.new(@project)
uploader.download!(@url)
uploader.store!
filename = uploader.image? ? uploader.file.basename : uploader.file.filename
{
'alt' => filename,
'url' => uploader.secure_url,
'is_image' => uploader.image?
}
end
private
def valid_url?(url)
url && http?(url) && valid_domain?(url)
end
def http?(url)
url =~ /\A#{URI::regexp(['http', 'https'])}\z/
end
def valid_domain?(url)
host = URI.parse(url).host
WHITELIST.any? { |entry| entry === host }
end
end
end
= form_for [:admin, @label], html: { class: 'form-horizontal label-form js-requires-input' } do |f|
-if @label.errors.any?
.row
.col-sm-offset-2.col-sm-10
.alert.alert-danger
- @label.errors.full_messages.each do |msg|
%span= msg
%br
.form-group
= f.label :title, class: 'control-label'
.col-sm-10
= f.text_field :title, class: "form-control", required: true
.form-group
= f.label :color, "Background Color", class: 'control-label'
.col-sm-10
.input-group
.input-group-addon.label-color-preview &nbsp;
= f.color_field :color, class: "form-control"
.help-block
Choose any color.
%br
Or you can choose one of suggested colors below
.suggest-colors
- suggested_colors.each do |color|
= link_to '#', style: "background-color: #{color}", data: { color: color } do
&nbsp;
.form-actions
= f.submit 'Save', class: 'btn btn-save js-save-button'
= link_to "Cancel", admin_labels_path, class: 'btn btn-cancel'
:coffeescript
new Labels
%li{id: dom_id(label)}
= render_colored_label(label)
.pull-right
= link_to 'Edit', edit_admin_label_path(label), class: 'btn btn-sm'
= link_to 'Remove', admin_label_path(label), class: 'btn btn-sm btn-remove remove-row', method: :delete, remote: true, data: {confirm: "Remove this label? Are you sure?"}
- if @labels.size == 0
$('.labels').load(document.URL + ' .light-well').hide().fadeIn(1000)
- page_title "Edit", @label.name, "Labels"
%h3
Edit label
%span.light #{@label.name}
.back-link
= link_to admin_labels_path do
&larr; To labels list
%hr
= render 'form'
- page_title "Labels"
= link_to new_admin_label_path, class: "pull-right btn btn-new" do
New label
%h3.page-title
Labels
%hr
.labels
- if @labels.present?
%ul.bordered-list.manage-labels-list
= render @labels
= paginate @labels, theme: 'gitlab'
- else
.light-well
.nothing-here-block There are no any labels yet
\ No newline at end of file
- page_title "New Label"
%h3 New label
.back-link
= link_to admin_labels_path do
&larr; To labels list
%hr
= render 'form'
.hidden-xs
= render "events/event_last_push", event: @last_push
.gray-content-block
- if current_user
%ul.nav.nav-pills.event_filter.pull-right
%li.pull-right
= link_to dashboard_path(:atom, { private_token: current_user.private_token }), class: 'rss-btn' do
%i.fa.fa-rss
= render 'shared/event_filter'
%hr
.content_list
= spinner
%ul.center-top-menu
%li{ class: ("active" unless params[:filter]) }
= link_to activity_dashboard_path, class: 'shortcuts-activity', data: {placement: 'right'} do
Your Projects
%li{ class: ("active" if params[:filter] == 'starred') }
= link_to activity_dashboard_path(filter: 'starred'), data: {placement: 'right'} do
Starred Projects
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment