Commit 02a29d1d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch '4-0-stable' into stable

parents 319f0c30 6a932d0a
No related merge requests found
......@@ -23,3 +23,4 @@ db/data.yml
.idea
.DS_Store
.chef
vendor/bundle/*
......@@ -19,8 +19,7 @@ services:
before_script:
- "cp config/database.yml.$DB config/database.yml"
- "cp config/gitlab.yml.example config/gitlab.yml"
- "bundle exec rake db:create RAILS_ENV=test"
- "bundle exec rake db:migrate RAILS_ENV=test"
- "bundle exec rake db:setup RAILS_ENV=test"
- "bundle exec rake db:seed_fu RAILS_ENV=test"
- "sh -e /etc/init.d/xvfb start"
script: "bundle exec rake travis --trace"
v 4.0.0
- Remove project code and path from API. Use id instead
- Return valid clonable url to repo for web hook
- Fixed backup issue
- Reorganized settings
- Fixed commits compare
- Refactored scss
- Improve status checks
- Validates presence of User#name
- Fixed postgres support
- Removed sqlite support
- Modified post-receive hook
- Milestones can be closed now
- Show comment events on dashboard
- Quick add team members via group#people page
- [API] expose created date for hooks and SSH keys
- [API] list, create issue notes
- [API] list, create snippet notes
- [API] list, create wall notes
- Remove project code - use path instead
- added username field to user
- rake task to fill usernames based on emails create namespaces for users
- STI Group < Namespace
- Project has namespace_id
- Projects with namespaces also namespaced in gitolite and stored in subdir
- Moving project to group will move it under group namespace
- Ability to move project from namespaces to another
- Fixes commit patches getting escaped (see #2036)
- Support diff and patch generation for commits and merge request
- MergeReqest doesn't generate a temporary file for the patch any more
- Update the UI to allow downloading Patch or Diff
v 3.1.0
- Updated gems
- Services: Gitlab CI integration
......@@ -34,7 +66,7 @@ v 3.0.0
- Fixed bug with gitolite keys
- UI improved
- Increased perfomance of application
- Show user avatar in last commit when browsing Files
- Show user avatar in last commit when browsing Files
- Refactored Gitlab::Merge
- Use Font Awsome for icons
- Separate observing of Note and MergeRequestsa
......
## Contribute to GitLab
# Contact & support
If you want to contribute to GitLab, follow this process:
If you want quick help, head over to our [Support Forum](https://groups.google.com/forum/#!forum/gitlabhq).
Otherwise you can follow our [Issue Submission Guide](https://github.com/gitlabhq/gitlabhq/wiki/Issue-Submission-Guide) for a more systematic and thorough guide to solving your issues.
1. Fork the project
2. Create a feature branch
3. Code
4. Create a pull request
We will only accept pull requests if:
* Your code has proper tests and all tests pass
* Your code can be merged w/o problems
* It won't break existing functionality
* It's quality code
* We like it :)
# Contribute to GitLab
For examples of feedback on pull requests please look at the [closed pull requests](https://github.com/gitlabhq/gitlabhq/pulls?direction=desc&page=1&sort=created&state=closed).
## Recipes
## Installation
We collect user submitted installation scripts and config file templates for platforms we don't support officially.
We believe there is merit in allowing a certain amount of diversity.
You can get and submit your solution to running/configuring GitLab with your favorite OS/distro, database, web server, cloud hoster, configuration management tool, etc.
Install the Gitlab development in a virtual machine with the [Gitlab Vagrant virtual machine](https://github.com/gitlabhq/gitlab-vagrant-vm). Installing it in a virtual machine makes it much easier to set up all the dependencies for integration testing.
Help us improve the collection of [GitLab Recipes](https://github.com/gitlabhq/gitlab-recipes/)
## Running tests
For more information on running the tests please read the [development tips](https://github.com/gitlabhq/gitlabhq/blob/master/doc/development.md)
## Feature suggestions
Follow the [Issue Submission Guide](https://github.com/gitlabhq/gitlabhq/wiki/Issue-Submission-Guide) and support other peoples ideas or propose your own.
## Code
Follow our [Developer Guide](https://github.com/gitlabhq/gitlabhq/wiki/Developer-Guide) to set you up for hacking on GitLab.
......@@ -11,7 +11,6 @@ end
gem "rails", "3.2.9"
# Supported DBs
gem "sqlite3", group: :sqlite
gem "mysql2", group: :mysql
gem "pg", group: :postgres
......@@ -27,13 +26,13 @@ gem "grit", git: "https://github.com/gitlabhq/grit.git", ref:
gem "omniauth-ldap", git: "https://github.com/gitlabhq/omniauth-ldap.git", ref: 'f038dd852d7bd473a557e385d5d7c2fd5dc1dc2e'
gem 'yaml_db', git: "https://github.com/gitlabhq/yaml_db.git", ref: '98e9a5dca43e3fedd3268c76a73af40d1bdf1dfd'
gem 'grack', git: "https://github.com/gitlabhq/grack.git", ref: 'ba46f3b0845c6a09d488ae6abdce6ede37e227e8'
gem 'grit_ext', git: "https://github.com/gitlabhq/grit_ext.git", ref: '212fd40bea61f3c6a167223768e7295dc32bbc10'
gem 'grit_ext', git: "https://github.com/gitlabhq/grit_ext.git", ref: '8e6afc2da821354774aa4d1ee8a1aa2082f84a3e'
# Gitolite client (for work with gitolite-admin repo)
gem "gitolite", '1.1.0'
# Syntax highlighter
gem "pygments.rb", git: "https://github.com/gitlabhq/pygments.rb.git", ref: '4db80c599067e2d5f23c5c243bf85b8ca0368ad4'
gem "pygments.rb", git: "https://github.com/gitlabhq/pygments.rb.git", branch: "master"
# Language detection
gem "github-linguist", "~> 2.3.4" , require: "linguist"
......@@ -101,11 +100,11 @@ group :assets do
gem "therubyracer"
gem 'chosen-rails', "0.9.8"
gem 'jquery-atwho-rails', "0.1.6"
gem 'jquery-atwho-rails', "0.1.7"
gem "jquery-rails", "2.1.3"
gem "jquery-ui-rails", "2.0.2"
gem "modernizr", "2.6.2"
gem "raphael-rails", "2.1.0"
gem "raphael-rails", "1.5.2"
gem 'bootstrap-sass', "2.2.1.1"
gem "font-awesome-sass-rails", "~> 2.0.0"
gem "gemoji", "~> 1.2.1", require: 'emoji/railtie'
......@@ -125,7 +124,7 @@ group :development, :test do
gem "capybara"
gem "pry"
gem "awesome_print"
gem "database_cleaner"
gem "database_cleaner", ref: "f89c34300e114be99532f14c115b2799a3380ac6", git: "https://github.com/bmabey/database_cleaner.git"
gem "launchy"
gem 'factory_girl_rails'
......@@ -139,7 +138,7 @@ group :development, :test do
gem 'rb-inotify', require: linux_only('rb-inotify')
# PhantomJS driver for Capybara
gem 'poltergeist'
gem 'poltergeist', git: 'https://github.com/jonleighton/poltergeist.git', ref: '5c2e092001074a8cf09f332d3714e9ba150bc8ca'
end
group :test do
......@@ -152,5 +151,5 @@ group :test do
end
group :production do
gem "gitlab_meta", '3.1'
gem "gitlab_meta", '4.0'
end
GIT
remote: https://github.com/bmabey/database_cleaner.git
revision: f89c34300e114be99532f14c115b2799a3380ac6
ref: f89c34300e114be99532f14c115b2799a3380ac6
specs:
database_cleaner (0.9.1)
GIT
remote: https://github.com/ctran/annotate_models.git
revision: be4e26825b521f0b2d86b181e2dff89901aa9b1e
......@@ -26,10 +33,10 @@ GIT
GIT
remote: https://github.com/gitlabhq/grit_ext.git
revision: 212fd40bea61f3c6a167223768e7295dc32bbc10
ref: 212fd40bea61f3c6a167223768e7295dc32bbc10
revision: 8e6afc2da821354774aa4d1ee8a1aa2082f84a3e
ref: 8e6afc2da821354774aa4d1ee8a1aa2082f84a3e
specs:
grit_ext (0.6.0)
grit_ext (0.6.1)
charlock_holmes (~> 0.6.9)
GIT
......@@ -45,8 +52,8 @@ GIT
GIT
remote: https://github.com/gitlabhq/pygments.rb.git
revision: 4db80c599067e2d5f23c5c243bf85b8ca0368ad4
ref: 4db80c599067e2d5f23c5c243bf85b8ca0368ad4
revision: db1da0343adf86b49bdc3add04d02d2e80438d38
branch: master
specs:
pygments.rb (0.3.2)
posix-spawn (~> 0.3.6)
......@@ -59,6 +66,18 @@ GIT
specs:
yaml_db (0.2.2)
GIT
remote: https://github.com/jonleighton/poltergeist.git
revision: 5c2e092001074a8cf09f332d3714e9ba150bc8ca
ref: 5c2e092001074a8cf09f332d3714e9ba150bc8ca
specs:
poltergeist (1.0.2)
capybara (~> 1.1)
childprocess (~> 0.3)
faye-websocket (~> 0.4, >= 0.4.4)
http_parser.rb (~> 0.5.3)
multi_json (~> 1.0)
GEM
remote: http://rubygems.org/
specs:
......@@ -128,7 +147,6 @@ GEM
colorize (0.5.8)
crack (0.3.1)
daemons (1.1.9)
database_cleaner (0.9.1)
devise (2.1.2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
......@@ -171,7 +189,7 @@ GEM
mime-types (~> 1.19)
pygments.rb (>= 0.2.13)
github-markup (0.7.4)
gitlab_meta (3.1)
gitlab_meta (4.0)
gitolite (1.1.0)
gratr19 (~> 0.4.4.1)
grit (~> 2.5.0)
......@@ -215,7 +233,7 @@ GEM
httpauth (0.2.0)
i18n (0.6.1)
journey (1.0.4)
jquery-atwho-rails (0.1.6)
jquery-atwho-rails (0.1.7)
jquery-rails (2.1.3)
railties (>= 3.1.0, < 5.0)
thor (~> 0.14)
......@@ -279,12 +297,6 @@ GEM
omniauth-oauth (~> 1.0)
orm_adapter (0.4.0)
pg (0.14.1)
poltergeist (1.0.2)
capybara (~> 1.1)
childprocess (~> 0.3)
faye-websocket (~> 0.4, >= 0.4.4)
http_parser.rb (~> 0.5.3)
multi_json (~> 1.0)
polyglot (0.3.3)
posix-spawn (0.3.6)
pry (0.9.10)
......@@ -329,7 +341,7 @@ GEM
thor (>= 0.14.6, < 2.0)
raindrops (0.10.0)
rake (10.0.1)
raphael-rails (2.1.0)
raphael-rails (1.5.2)
rb-fsevent (0.9.2)
rb-inotify (0.8.8)
ffi (>= 0.5.0)
......@@ -404,7 +416,6 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
stamp (0.3.0)
test_after_commit (0.0.1)
therubyracer (0.10.2)
......@@ -453,7 +464,7 @@ DEPENDENCIES
chosen-rails (= 0.9.8)
coffee-rails (~> 3.2.2)
colored
database_cleaner
database_cleaner!
devise (~> 2.1.0)
draper (~> 0.18.0)
email_spec
......@@ -465,7 +476,7 @@ DEPENDENCIES
git
github-linguist (~> 2.3.4)
github-markup (~> 0.7.4)
gitlab_meta (= 3.1)
gitlab_meta (= 4.0)
gitolite (= 1.1.0)
grack!
grape (~> 0.2.1)
......@@ -476,7 +487,7 @@ DEPENDENCIES
guard-spinach
haml-rails (~> 0.3.5)
httparty
jquery-atwho-rails (= 0.1.6)
jquery-atwho-rails (= 0.1.7)
jquery-rails (= 2.1.3)
jquery-ui-rails (= 2.0.2)
kaminari (~> 0.14.1)
......@@ -490,14 +501,14 @@ DEPENDENCIES
omniauth-ldap!
omniauth-twitter
pg
poltergeist
poltergeist!
pry
pygments.rb!
quiet_assets (~> 1.0.1)
rack-mini-profiler
rails (= 3.2.9)
rails-dev-tweaks
raphael-rails (= 2.1.0)
raphael-rails (= 1.5.2)
rb-fsevent
rb-inotify
redcarpet (~> 2.2.2)
......@@ -512,7 +523,6 @@ DEPENDENCIES
simplecov
six
spinach-rails
sqlite3
stamp
test_after_commit
therubyracer
......
# Welcome to GitLab [![build status](https://secure.travis-ci.org/gitlabhq/gitlabhq.png)](https://secure.travis-ci.org/gitlabhq/gitlabhq) [![build status](https://secure.travis-ci.org/gitlabhq/grit.png)](https://secure.travis-ci.org/gitlabhq/grit) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/gitlabhq/gitlabhq)
# Welcome to GitLab [![build status](https://secure.travis-ci.org/gitlabhq/gitlabhq.png)](https://travis-ci.org/gitlabhq/gitlabhq) [![build status](https://secure.travis-ci.org/gitlabhq/grit.png)](https://travis-ci.org/gitlabhq/grit) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/gitlabhq/gitlabhq) [![Dependency Status](https://gemnasium.com/gitlabhq/gitlabhq.png)](https://gemnasium.com/gitlabhq/gitlabhq)
GitLab is a free project and repository management application
......
3.1.0
4.0.0
No preview for this file type
app/assets/images/ajax_loader_gray.gif

8.17 KB

app/assets/images/logo.png

2.93 KB

app/assets/images/logo_basic.png

3.2 KB

app/assets/images/logo_text.png

4.49 KB

app/assets/images/logo_text_tr.png

3.21 KB

app/assets/images/logo_white.png

1.48 KB | W: 0px | H: 0px

app/assets/images/logo_white.png

1.88 KB | W: 0px | H: 0px

  • 2-up
  • Swipe
  • Onion skin
app/assets/images/service-disabled-gitlab-ci.png

2.13 KB

app/assets/images/service-gitlab-ci.png

2.34 KB

app/assets/images/switch_icon.png

1.17 KB

......@@ -10,3 +10,8 @@ $ ->
$('.log-tabs a').click (e) ->
e.preventDefault()
$(this).tab('show')
$('.log-bottom').click (e) ->
e.preventDefault()
visible_log = $(".file_content:visible")
visible_log.animate({ scrollTop: visible_log.find('ol').height() }, "fast")
# Creates the variables for setting up GFM auto-completion
window.GitLab ?= {}
GitLab.GfmAutoComplete ?= {}
# Emoji
data = []
template = "<li data-value='${insert}'>${name} <img alt='${name}' height='20' src='${image}' width='20' /></li>"
GitLab.GfmAutoComplete.Emoji = {data, template}
# Team Members
data = []
url = '';
params = {private_token: '', page: 1}
GitLab.GfmAutoComplete.Members = {data, url, params}
# Add GFM auto-completion to all input fields, that accept GFM input.
GitLab.GfmAutoComplete.setup = ->
input = $('.js-gfm-input')
GitLab.GfmAutoComplete =
# Emoji
input.atWho ':',
data: GitLab.GfmAutoComplete.Emoji.data,
tpl: GitLab.GfmAutoComplete.Emoji.template
Emoji:
data: []
template: '<li data-value="${insert}">${name} <img alt="${name}" height="20" src="${image}" width="20" /></li>'
# Team Members
input.atWho '@', (query, callback) ->
(getMoreMembers = ->
$.getJSON(GitLab.GfmAutoComplete.Members.url, GitLab.GfmAutoComplete.Members.params)
.success (members) ->
# pick the data we need
newMembersData = $.map(members, (m) -> m.name )
# add the new page of data to the rest
$.merge(GitLab.GfmAutoComplete.Members.data, newMembersData)
# show the pop-up with a copy of the current data
callback(GitLab.GfmAutoComplete.Members.data[..])
# are we past the last page?
if newMembersData.length is 0
# set static data and stop callbacks
input.atWho '@',
data: GitLab.GfmAutoComplete.Members.data
callback: null
else
# get next page
getMoreMembers()
Members:
data: []
url: ''
params:
private_token: ''
template: '<li data-value="${username}">${username} <small>${name}</small></li>'
# Add GFM auto-completion to all input fields, that accept GFM input.
setup: ->
input = $('.js-gfm-input')
# Emoji
input.atWho ':',
data: @Emoji.data
tpl: @Emoji.template
# Team Members
input.atWho '@',
tpl: @Members.template
callback: (query, callback) =>
request_params = $.extend({}, @Members.params, query: query)
$.getJSON(@Members.url, request_params).done (members) =>
new_members_data = $.map(members, (m) ->
username: m.username,
name: m.name
)
callback(new_members_data)
# so the next request gets the next page
GitLab.GfmAutoComplete.Members.params.page += 1
).call()
function switchToNewIssue(){
$(".issues_content").hide("fade", { direction: "left" }, 150, function(){
$('select#issue_assignee_id').chosen();
$('select#issue_milestone_id').chosen();
$("#new_issue_dialog").show("fade", { direction: "right" }, 150);
$('.top-tabs .add_new').hide();
disableButtonIfEmptyField("#issue_title", ".save-btn");
GitLab.GfmAutoComplete.setup();
});
}
function switchToEditIssue(){
$(".issues_content").hide("fade", { direction: "left" }, 150, function(){
$('select#issue_assignee_id').chosen();
$('select#issue_milestone_id').chosen();
$("#edit_issue_dialog").show("fade", { direction: "right" }, 150);
$('.add_new').hide();
disableButtonIfEmptyField("#issue_title", ".save-btn");
GitLab.GfmAutoComplete.setup();
});
}
function switchFromNewIssue(){
backToIssues();
}
function switchFromEditIssue(){
backToIssues();
}
function backToIssues(){
$("#edit_issue_dialog, #new_issue_dialog").hide("fade", { direction: "right" }, 150, function(){
$(".issues_content").show("fade", { direction: "left" }, 150, function() {
$("#edit_issue_dialog").html("");
$("#new_issue_dialog").html("");
$('.add_new').show();
});
});
}
function initIssuesSearch() {
var href = $('#issue_search_form').attr('action');
var last_terms = '';
......@@ -76,23 +36,15 @@ function issuesPage(){
$(this).closest("form").submit();
});
$("#new_issue_link").click(function(){
updateNewIssueURL();
});
$('body').on('ajax:success', '.close_issue, .reopen_issue, #new_issue', function(){
$('body').on('ajax:success', '.close_issue, .reopen_issue', function(){
var t = $(this),
totalIssues,
reopen = t.hasClass('reopen_issue'),
newIssue = false;
if( this.id == 'new_issue' ){
newIssue = true;
}
$('.issue_counter, #new_issue').each(function(){
reopen = t.hasClass('reopen_issue');
$('.issue_counter').each(function(){
var issue = $(this);
totalIssues = parseInt( $(this).html(), 10 );
if( newIssue || ( reopen && issue.closest('.main_menu').length ) ){
if( reopen && issue.closest('.main_menu').length ){
$(this).html( totalIssues+1 );
}else {
$(this).html( totalIssues-1 );
......@@ -126,20 +78,3 @@ function issuesCheckChanged() {
$('.issues_filters').show();
}
}
function updateNewIssueURL(){
var new_issue_link = $("#new_issue_link");
var milestone_id = $("#milestone_id").val();
var assignee_id = $("#assignee_id").val();
var new_href = "";
if(milestone_id){
new_href = "issue[milestone_id]=" + milestone_id + "&";
}
if(assignee_id){
new_href = new_href + "issue[assignee_id]=" + assignee_id;
}
if(new_href.length){
new_href = new_issue_link.attr("href") + "?" + new_href;
new_issue_link.attr("href", new_href);
}
};
......@@ -7,6 +7,18 @@ window.slugify = (text) ->
window.ajaxGet = (url) ->
$.ajax({type: "GET", url: url, dataType: "script"})
window.errorMessage = (message) ->
ehtml = $("<p>")
ehtml.addClass("error_message")
ehtml.html(message)
ehtml
window.split = (val) ->
return val.split( /,\s*/ )
window.extractLast = (term) ->
return split( term ).pop()
# Disable button if text field is empty
window.disableButtonIfEmptyField = (field_selector, button_selector) ->
field = $(field_selector)
......@@ -33,6 +45,11 @@ $ ->
# Bottom tooltip
$('.has_bottom_tooltip').tooltip(placement: 'bottom')
# Flash
if (flash = $("#flash-container")).length > 0
flash.click -> $(@).slideUp("slow")
flash.slideDown "slow"
setTimeout (-> flash.slideUp("slow")), 3000
# Disable form buttons while a form is submitting
$('body').on 'ajax:complete, ajax:beforeSend, submit', 'form', (e) ->
......
......@@ -14,14 +14,6 @@ var MergeRequest = {
$(".mr_show_all_commits").bind("click", function() {
self.showAllCommits();
});
$(".line_note_link, .line_note_reply_link").live("click", function(e) {
var form = $(".per_line_form");
$(this).parent().parent().after(form);
form.find("#note_line_code").val($(this).attr("line_code"));
form.show();
return false;
});
},
initMergeWidget:
......@@ -34,6 +26,12 @@ var MergeRequest = {
self.showState(data.state);
}, "json");
}
if(self.opts.ci_enable){
$.get(self.opts.url_to_ci_check, function(data){
self.showCiState(data.status);
}, "json");
}
},
initTabs:
......@@ -87,6 +85,11 @@ var MergeRequest = {
$(".automerge_widget." + state).show();
},
showCiState:
function(state){
$(".ci_widget").hide();
$(".ci_widget.ci-" + state).show();
},
loadDiff:
function() {
......
......@@ -8,3 +8,13 @@ $ ->
# Go up the hierarchy and show the corresponding submission feedback element
$(@).closest('fieldset').find('.update-feedback').show('highlight', {color: '#DFF0D8'}, 500)
$('.update-username form').on 'ajax:before', ->
$('.loading-gif').show()
$(this).find('.update-success').hide()
$(this).find('.update-failed').hide()
$('.update-username form').on 'ajax:complete', ->
$(this).find('.save-btn').removeAttr('disabled')
$(this).find('.save-btn').removeClass('disabled')
$(this).find('.loading-gif').hide()
window.Projects = ->
$('#project_name').on 'change', ->
slug = slugify $(@).val()
$('#project_code, #project_path').val slug
$('.new_project, .edit_project').on 'ajax:before', ->
$('.project_new_holder, .project_edit_holder').hide()
$('.save-project-loader').show()
......@@ -22,10 +18,3 @@ $ ->
# Ref switcher
$('.project-refs-select').on 'change', ->
$(@).parents('form').submit()
class @GraphNav
@init: ->
$('.graph svg').css 'position', 'relative'
$('body').bind 'keyup', (e) ->
$('.graph svg').animate(left: '+=400') if e.keyCode is 37 # left
$('.graph svg').animate(left: '-=400') if e.keyCode is 39 # right
......@@ -28,7 +28,7 @@ $ ->
return false
$('#tree-slider .tree-item-file-name a, .breadcrumb li > a').live 'click', (e) ->
History.pushState(null, null, $(@).attr('href'))
History.pushState(null, null, decodeURIComponent($(@).attr('href')))
return false
History.Adapter.bind window, 'statechange', ->
......
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require jquery.ui.all
*= require jquery.ui.aristo
*= require jquery.atwho
*= require chosen
*= require_self
*= require main
*/
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require jquery.ui.gitlab
*= require jquery.atwho
*= require chosen
*= require_self
*/
/**
* GitLab bootstrap:
*/
@import "gitlab_bootstrap.scss";
@import "common.scss";
@import "ref_select.scss";
@import "sections/header.scss";
@import "sections/nav.scss";
@import "sections/commits.scss";
@import "sections/issues.scss";
@import "sections/projects.scss";
@import "sections/snippets.scss";
@import "sections/votes.scss";
@import "sections/merge_requests.scss";
@import "sections/graph.scss";
@import "sections/events.scss";
@import "sections/themes.scss";
@import "sections/tree.scss";
@import "sections/notes.scss";
@import "sections/profile.scss";
@import "sections/login.scss";
@import "sections/editor.scss";
@import "highlight/white.scss";
@import "highlight/dark.scss";
/**
* UI themes:
*/
@import "themes/ui_basic.scss";
@import "themes/ui_mars.scss";
@import "themes/ui_modern.scss";
@import "themes/ui_gray.scss";
@import "themes/ui_color.scss";
This diff is collapsed.
/** Override bootstrap variables **/
$baseFontSize: 13px !default;
$baseLineHeight: 18px !default;
// BOOTSTRAP
@import "bootstrap";
@import "bootstrap/responsive-utilities";
@import "bootstrap/responsive-1200px-min";
@import "font-awesome";
/**
* GitLab bootstrap.
* Overrides some styles of twitter bootstrap.
* Also give some common classes for GitLab app
*/
@import "gitlab_bootstrap/variables.scss";
@import "gitlab_bootstrap/fonts.scss";
@import "gitlab_bootstrap/mixins.scss";
@import "gitlab_bootstrap/common.scss";
@import "gitlab_bootstrap/typography.scss";
@import "gitlab_bootstrap/buttons.scss";
@import "gitlab_bootstrap/blocks.scss";
@import "gitlab_bootstrap/files.scss";
@import "gitlab_bootstrap/tables.scss";
@import "gitlab_bootstrap/lists.scss";
......@@ -15,8 +15,8 @@
@extend .borders;
@extend .prepend-top-20;
@extend .append-bottom-20;
border-width:1px;
@include solid_shade;
border-width: 1px;
@include solid-shade;
img { max-width: 100%; }
......@@ -30,27 +30,37 @@
.top_box_content,
.middle_box_content,
.bottom_box_content {
padding:15px;
padding: 15px;
word-wrap: break-word;
pre {
background: none !important;
margin:0;
border:none;
padding:0;
margin: 0;
border: none;
padding: 0;
}
}
.top_box_content {
.box-title {
color: $style_color;
font-size: 18px;
font-weight: normal;
line-height: 28px;
}
}
.middle_box_content {
border-radius:0;
border:none;
font-size:12px;
background-color:#f5f5f5;
border:none;
border-top:1px solid #eee;
@include border-radius(0);
border: none;
font-size: 12px;
background-color: #f5f5f5;
border: none;
border-top: 1px solid #eee;
}
.bottom_box_content {
border-top:1px solid #eee;
border-top: 1px solid #eee;
}
}
......@@ -59,44 +69,52 @@
*
*/
.ui-box {
background:#F9F9F9;
background: #F9F9F9;
margin-bottom: 25px;
@include round-borders-all(4px);
border: 1px solid #eaeaea;
@include border-radius(4px);
border-color: #CCC;
@include solid_shade;
@include solid-shade;
&.white {
background:#fff;
background: #fff;
}
ul {
margin:0;
margin: 0;
}
h5, .title {
padding: 0 10px;
@include round-borders-top(4px);
@include border-radius(4px 4px 0 0);
@include bg-gray-gradient;
border-top: 1px solid #eaeaea;
border-bottom: 1px solid #bbb;
> a {
text-shadow: 0 1px 1px #fff;
}
&.small {
line-height: 28px;
font-size: 14px;
line-height:28px;
line-height: 28px;
text-shadow: 0 1px 1px white;
}
form {
padding:9px 0;
margin:0px;
padding: 9px 0;
margin: 0px;
}
.nav-pills {
li {
padding:3px 0;
&.active a { background-color:$style_color; }
padding: 3px 0;
&.active a { background-color: $style_color; }
a {
border-radius:7px;
@include border-radius(7px);
}
}
}
......@@ -104,8 +122,8 @@
.bottom {
@include bg-gray-gradient;
@include round-borders-bottom(4px);
border-bottom:none;
@include border-radius(0 0 4px 4px);
border-bottom: none;
border-top: 1px solid #bbb;
}
......@@ -116,38 +134,25 @@
padding: 5px 20px;
}
.middle_title {
background:#f5f5f5;
background: #f5f5f5;
margin:20px -20px;
padding: 0 20px;
border-top:1px solid #eee;
border-bottom:1px solid #eee;
font-size:14px;
color:#777;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
font-size: 14px;
color: #777;
}
}
.row_title {
font-weight:bold;
color:#444;
font-weight: bold;
color: #444;
&:hover {
color:#444;
text-decoration:underline;
}
}
li, .wll {
padding:10px;
&:first-child {
@include round-borders-top(4px);
border-top:none;
}
&:last-child {
@include round-borders-bottom(4px);
border:none;
color: #444;
text-decoration: underline;
}
}
.ui-box-body {
padding:10px;
padding: 10px;
}
}
.btn {
@include bg-gradient(#f7f7f7, #d5d5d5);
border-color:#aaa;
@include linear-gradient(#f7f7f7, #d5d5d5);
border-color: #aaa;
&:hover {
@include bg-gray-gradient;
border-color:#bbb;
color:#333;
border-color: #bbb;
color: #333;
}
&.primary {
background:#2a79A3;
@include bg-gradient(#47A7b7, #2585b5);
background: #2a79A3;
@include linear-gradient(#47A7b7, #2585b5);
border-color: #2A79A3;
color:#fff;
color: #fff;
text-shadow: 0 1px 1px #268;
&:hover {
background:$blue_link;
color:#fff;
background: $primary_color;
color: #fff;
}
&.disabled {
color:#fff;
background:#29B;
color: #fff;
background: #29B;
}
}
&.btn-info {
background:#5aB9C3;
border-color: $blue_link;
color:#fff;
background: #5aB9C3;
border-color: $primary_color;
color: #fff;
text-shadow: 0 1px 1px #268;
&:hover {
background:$blue_link;
color:#fff;
background: $primary_color;
color: #fff;
}
&.disabled {
color:#fff;
background:#29B;
color: #fff;
background: #29B;
}
}
......@@ -49,8 +49,8 @@
}
&.disabled {
color:#fff;
background:#2b2;
color: #fff;
background: #2b2;
}
}
......@@ -60,12 +60,12 @@
}
&.cancel-btn {
float:right;
float: right;
}
&.wide {
padding-left:30px;
padding-right:30px;
padding-left: 30px;
padding-right: 30px;
}
&.danger {
......@@ -73,7 +73,7 @@
border-color: #BD362F;
&:hover {
color:#fff;
color: #fff;
background: #EE4E49;
}
}
......@@ -87,24 +87,24 @@
}
&.active {
border-color:#aaa;
background-color:#ccc;
border-color: #aaa;
background-color: #ccc;
}
&.very_small {
font-size:11px;
padding:2px 6px;
font-size: 11px;
padding: 2px 6px;
line-height: 16px;
margin:2px;
margin: 2px;
}
&.grouped {
margin-right:7px;
float:left;
margin-right: 7px;
float: left;
}
&.padded {
margin-right:3px;
padding:4px 10px 4px;
margin-right: 3px;
padding: 4px 10px 4px;
}
}
......@@ -10,11 +10,6 @@
/** COMMON CLASSES **/
.left { float:left }
.right { float:right!important }
.width-50p { width:50% }
.width-49p { width:49% }
.width-30p { width:30% }
.width-65p { width:65% }
.width-100p { width:100% }
.append-bottom-10 { margin-bottom:10px }
.append-bottom-20 { margin-bottom:20px }
.prepend-top-10 { margin-top:10px }
......@@ -24,40 +19,42 @@
.lborder { border-left:1px solid #eee }
.no-padding { padding:0 !important; }
.underlined { border-bottom: 1px solid #CCC; }
.no-borders { border:none; }
.no-borders { border: none; }
.vlink { color: $link_color !important; }
.underlined_link { text-decoration: underline; }
.borders { border: 1px solid #ccc; @include shade; }
.hint { font-style: italic; color: #999; }
.light { color: #888 }
.tiny { font-weight: normal }
/** PILLS & TABS**/
.nav-pills a:hover { background-color:#888; }
.nav-pills a:hover { background-color: #888; }
.nav-pills .active a { background-color: $style_color; }
.nav-tabs > li > a, .nav-pills > li > a { color:$style_color; }
.nav-pills > .active > a > i[class^="icon-"] { background: inherit; }
.nav-tabs > li > a, .nav-pills > li > a { color: $style_color; }
.nav.nav-tabs {
li {
> a {
padding:8px 20px;
padding: 8px 20px;
margin-right: 7px;
line-height: 19px;
border-color: #EEE;
color:#888;
color: #888;
border-bottom: 1px solid #ddd;
.badge {
background-color: #eee;
color:#888;
text-shadow:0 1px 1px #fff;
color: #888;
text-shadow: 0 1px 1px #fff;
}
i[class^="icon-"] {
line-height:14px;
line-height: 14px;
}
}
&.active {
> a {
border-color: #CCC;
border-bottom: 1px solid #fff;
color:#333;
color: #333;
}
}
}
......@@ -69,25 +66,50 @@
.alert-message.error { @extend .alert-error; }
/** AVATARS **/
img.avatar { float:left; margin-right:12px; width:40px; border:1px solid #ddd; padding:1px; }
img.avatar.s16 { width:16px; height:16px; margin-right:6px; }
img.avatar.s24 { width:24px; height:24px; margin-right:8px; }
img.avatar.s32 { width:32px; height:32px; margin-right:10px; }
img.lil_av { padding-left: 4px; padding-right:3px; }
img.avatar { float: left; margin-right: 12px; width: 40px; border: 1px solid #ddd; padding: 1px; }
img.avatar.s16 { width: 16px; height: 16px; margin-right: 6px; }
img.avatar.s24 { width: 24px; height: 24px; margin-right: 8px; }
img.avatar.s32 { width: 32px; height: 32px; margin-right: 10px; }
img.lil_av { padding-left: 4px; padding-right: 3px; }
img.small { width: 80px; }
/** HELPERS **/
.nothing_here_message { text-align:center; padding:20px; color:#777; }
p.slead { color:#456; font-size:16px; margin-bottom: 12px; font-weight: 200; line-height: 24px; }
.nothing_here_message {
text-align: center;
padding: 20px;
color: #666;
font-weight: normal;
font-size: 16px;
line-height: 36px;
}
p.slead { color: #456; font-size: 16px; margin-bottom: 12px; font-weight: 200; line-height: 24px; }
/** FORMS **/
input[type='search'].search-text-input {
background-image: url("icon-search.png");
background-repeat: no-repeat;
background-position: 10px;
padding-left:25px;
padding-left: 25px;
@include border-radius(4px);
border:1px solid #ccc;
border: 1px solid #ccc;
}
input[type='text'].danger {
background: #F2DEDE!important;
border-color: #D66;
text-shadow: 0 1px 1px #fff
}
fieldset legend { font-size: 17px; }
/** PAGINATION **/
.gitlab_pagination {
span a { color: $link_color; }
.prev, .next, .current, .page a {
padding: 10px;
}
.current {
border-bottom: 2px solid $style_color;
}
}
......@@ -3,9 +3,9 @@
*
*/
.file_holder {
border:1px solid #BBB;
margin-bottom:1em;
@include solid_shade;
border: 1px solid #BBB;
margin-bottom: 1em;
@include solid-shade;
.file_title {
border-bottom: 1px solid #bbb;
......@@ -16,47 +16,51 @@
text-align: left;
color: #666;
padding: 9px 10px;
height:18px;
height: 18px;
.options {
float:right;
float: right;
margin-top: -5px;
}
.file_name {
color:$style_color;
font-size:14px;
color: $style_color;
font-size: 14px;
text-shadow: 0 1px 1px #fff;
small {
color:#999;
font-size:13px;
color: #999;
font-size: 13px;
}
}
}
.file_content {
background:#fff;
background: #fff;
font-size: 11px;
&.wiki {
font-size: 13px;
code {
padding:0 4px;
padding: 0 4px;
}
padding:20px;
h1, h2 {
line-height: 46px;
}
h3, h4 {
line-height: 40px;
padding: 20px;
h1 { font-size: 26px; line-height: 46px; }
h2 { font-size: 22px; line-height: 42px; }
h3 { font-size: 20px; line-height: 40px; }
h4 { font-size: 18px; line-height: 32px; }
h5 { font-size: 16px; line-height: 26px; }
.white .highlight pre {
background: #f5f5f5;
}
}
&.image_file {
background:#eee;
text-align:center;
background: #eee;
text-align: center;
img {
padding:100px;
max-width:300px;
padding: 100px;
max-width: 300px;
}
}
......@@ -69,60 +73,60 @@
*/
&.blame {
table {
border:none;
box-shadow:none;
margin:0;
border: none;
box-shadow: none;
margin: 0;
}
tr {
border-bottom: 1px solid #eee;
}
td {
&:first-child {
border-left:none;
border-left: none;
}
&:last-child {
border-right:none;
border-right: none;
}
background:#fff;
padding:5px;
background: #fff;
padding: 5px;
}
.author,
.blame_commit {
background:#f5f5f5;
vertical-align:top;
background: #f5f5f5;
vertical-align: top;
}
.lines {
pre {
padding:0;
margin:0;
background:none;
border:none;
padding: 0;
margin: 0;
background: none;
border: none;
}
}
}
&.logs {
background:#eee;
background: #eee;
max-height: 700px;
overflow-y: auto;
ol {
margin-left:40px;
margin-left: 40px;
padding: 10px 0;
border-left: 1px solid #CCC;
margin-bottom:0;
margin-bottom: 0;
background: white;
li {
color:#888;
color: #888;
p {
margin:0;
color:#333;
line-height:24px;
margin: 0;
color: #333;
line-height: 24px;
padding-left: 10px;
}
&:hover {
background:$hover;
background: $hover;
}
}
}
......@@ -142,8 +146,8 @@
table-layout: fixed;
pre {
background: none;
border: none;
border-radius: 0;
font-family: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace;
font-size: 12px !important;
line-height: 16px !important;
......
@font-face{
font-family: Korolev;
src: font-url('korolev-medium-compressed.otf');
}
/** Typo **/
$monospace: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono', 'lucida console', monospace;
\ No newline at end of file
/** LISTS **/
ul {
/**
* List li block element #1
*
*/
.wll {
/**
* Well styled list
*
*/
.well-list {
margin: 0;
list-style: none;
li {
background-color: #FFF;
padding: 10px 5px;
padding: 10px;
min-height: 20px;
border-bottom: 1px solid #eee;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
&.smoke { background-color:#f5f5f5; }
&.disabled {
color: #888;
}
&.smoke { background-color: #f5f5f5; }
&:hover {
background:$hover;
border-bottom:1px solid #ADF;
background: $hover;
border-bottom: 1px solid #ADF;
}
&:last-child { border:none }
&:first-child {
@include border-radius(4px 4px 0 0);
border-top: none;
}
&:last-child {
@include border-radius(0 0 4px 4px);
border: none;
}
.author { color: #999; }
p {
padding-top: 1px;
margin:0;
color:#222;
margin: 0;
color: #222;
img {
position:relative;
top:3px;
position: relative;
top: 3px;
}
}
.well-title {
font-size: 14px;
line-height: 18px;
}
}
}
ol, ul {
&.styled {
li {
padding:2px;
padding: 2px;
}
}
}
/** 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 }
}
}
/**
* Generic mixins
*/
@mixin box-shadow($shadow) {
-webkit-box-shadow: $shadow;
-moz-box-shadow: $shadow;
-ms-box-shadow: $shadow;
-o-box-shadow: $shadow;
box-shadow: $shadow;
}
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
-o-border-radius: $radius;
border-radius: $radius;
}
@mixin linear-gradient($from, $to) {
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($from), to($to));
background-image: -webkit-linear-gradient($from, $to);
background-image: -moz-linear-gradient($from, $to);
background-image: -o-linear-gradient($from, $to);
}
/**
* Prefilled mixins
* Mixins with fixed values
*/
@mixin bg-light-gray-gradient {
background: #f1f1f1;
background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #f5f5f5), to(#e1e1e1));
background-image: -webkit-linear-gradient(#f5f5f5 6.6%, #e1e1e1);
background-image: -moz-linear-gradient(#f5f5f5 6.6%, #e1e1e1);
background-image: -o-linear-gradient(#f5f5f5 6.6%, #e1e1e1);
}
@mixin bg-gray-gradient {
background: #eee;
background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf));
background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf);
background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf);
background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf);
}
@mixin bg-dark-gray-gradient {
background: #eee;
background-image: -webkit-linear-gradient(#e9e9e9, #d7d7d7);
background-image: -moz-linear-gradient(#e9e9e9, #d7d7d7);
background-image: -o-linear-gradient(#e9e9e9, #d7d7d7);
}
@mixin shade {
@include box-shadow(0 0 3px #ddd);
}
@mixin solid-shade {
@include box-shadow(0 0 0 3px #f1f1f1);
}
@mixin header-font {
color: $style_color;
text-shadow: 0 1px 1px #FFF;
font-family: 'Korolev', sans-serif;
font-size: 28px;
line-height: 48px;
font-weight: normal;
}
table {
@extend .table;
@extend .table-striped;
@include solid_shade;
border:1px solid #bbb;
width:100%;
@include solid-shade;
border: 1px solid #bbb;
width: 100%;
&.low {
td {
line-height:18px;
line-height: 18px;
}
}
......@@ -31,8 +31,8 @@ table {
}
td {
border-color:#f1f1f1;
line-height:28px;
border-color: #f1f1f1;
line-height: 28px;
.s16 {
margin-top: 5px;
......@@ -40,11 +40,11 @@ table {
}
&:first-child {
border-left:1px solid #bbb;
border-left: 1px solid #bbb;
}
&:last-child {
border-right:1px solid #bbb;
border-right: 1px solid #bbb;
}
}
......@@ -53,10 +53,10 @@ table {
}
&.lite {
border:none;
box-shadow:none;
border: none;
box-shadow: none;
tr, td {
border:none;
border: none;
background:none !important;
}
}
......
......@@ -5,11 +5,11 @@
h1, h2, h3, h4, h5, h6 { margin: 0; }
h3, h4, h5, h6 { line-height: 36px; }
h5 { font-size:14px; }
h5 { font-size: 14px; }
h3.page_title {
color:#456;
font-size:20px;
color: #456;
font-size: 20px;
font-weight: normal;
line-height: 28px;
}
......@@ -25,7 +25,7 @@ pre {
&.dark {
background: #333;
color:#f5f5f5;
color: #f5f5f5;
}
}
......@@ -37,8 +37,8 @@ a {
outline: none;
color: $link_color;
&:hover {
text-decoration:none;
color: $blue_link;
text-decoration: none;
color: $primary_color;
}
&.btn {
......@@ -53,27 +53,31 @@ a {
}
&.lined {
text-decoration:underline;
&:hover { text-decoration:underline; }
text-decoration: underline;
&:hover { text-decoration: underline; }
}
&.gray {
color:gray;
color: gray;
}
&.supp_diff_link {
text-align:center;
padding:20px 0;
background:#f1f1f1;
width:100%;
float:left;
text-align: center;
padding: 20px 0;
background: #f1f1f1;
width: 100%;
float: left;
}
&.neib {
margin-right:15px;
margin-right: 15px;
}
}
a:focus {
outline: none;
}
.monospace {
font-family: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace;
}
/** Colors **/
$primary_color: #2FA0BB;
$link_color: #3A89A3;
$style_color: #474D57;
$hover: #D9EDF7;
.black .lines .highlight {
background: #333;
pre { color: #eee; }
.black .highlight {
background-color: #333;
pre {
color: #eee;
background: inherit;
}
.hll { display: block; background-color: darken($hover, 65%) }
.c { color: #888888; font-style: italic } /* Comment */
......@@ -21,43 +24,43 @@
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #606060 } /* Generic.Subheading */
.gt { color: #aa0000 } /* Generic.Traceback */
.kc{font-weight:bold;} /* Keyword.Constant */
.kd{font-weight:bold;} /* Keyword.Declaration */
.kn{font-weight:bold;} /* Keyword.Namespace */
.kp{font-weight:bold;} /* Keyword.Pseudo */
.kr{font-weight:bold;} /* Keyword.Reserved */
.kt{color:#458;font-weight:bold;} /* Keyword.Type */
.kc{font-weight: bold;} /* Keyword.Constant */
.kd{font-weight: bold;} /* Keyword.Declaration */
.kn{font-weight: bold;} /* Keyword.Namespace */
.kp{font-weight: bold;} /* Keyword.Pseudo */
.kr{font-weight: bold;} /* Keyword.Reserved */
.kt{color: #458;font-weight: bold;} /* Keyword.Type */
.m { color: #0000DD; font-weight: bold } /* Literal.Number */
.p { color: #eee; }
.s { color: #0AD; background-color: transparent } /* Literal.String */
.na{color:#008080;} /* Name.Attribute */
.nb{color:#0086B3;} /* Name.Builtin */
.nc{color:#ccc;font-weight:bold;} /* Name.Class */
.no{color:turquoise;} /* Name.Constant */
.ni{color:#800080;}
.ne{color:#900;font-weight:bold;} /* Name.Exception */
.nf{color:#ccc;font-weight:bold;} /* Name.Function */
.nn{color:#79C3E0;font-weight:bold;} /* Name.Namespace */
.nt{color:#fc5;} /* Name.Tag */
.nv{color:#FA4;} /* Name.Variable */
.na{color: #008080;} /* Name.Attribute */
.nb{color: #0086B3;} /* Name.Builtin */
.nc{color: #ccc;font-weight: bold;} /* Name.Class */
.no{color: turquoise;} /* Name.Constant */
.ni{color: #800080;}
.ne{color: #900;font-weight: bold;} /* Name.Exception */
.nf{color: #ccc;font-weight: bold;} /* Name.Function */
.nn{color: #79C3E0;font-weight: bold;} /* Name.Namespace */
.nt{color: #fc5;} /* Name.Tag */
.nv{color: #FA4;} /* Name.Variable */
.py { color: #336699; font-weight: bold } /* Name.Property */
.ow { color: #008800 } /* Operator.Word */
.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: #7AC; font-weight: bold } /* Literal.Number.Float */
.mh { color: #7AC; font-weight: bold } /* Literal.Number.Hex */
.mi {color:#099;} /* Literal.Number.Integer */
.mi {color: #099;} /* Literal.Number.Integer */
.mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.sb { color: #dd2200; background-color: transparent; } /* Literal.String.Backtick */
.sc{color:#d14;} /* Literal.String.Char */
.sc{color: #d14;} /* Literal.String.Char */
.sd { color: #dd2200; background-color: transparent; } /* Literal.String.Doc */
.s2{color:orange;} /* Literal.String.Double */
.se{color:orange;} /* Literal.String.Escape */
.sh{color:orange;} /* Literal.String.Heredoc */
.si{color:orange;} /* Literal.String.Interpol */
.sx{color:orange;} /* Literal.String.Other */
.sr{color:orange;} /* Literal.String.Regex */
.s1{color:orange;} /* Literal.String.Single */
.ss{color:orange;} /* Literal.String.Symbol */
.s2{color: orange;} /* Literal.String.Double */
.se{color: orange;} /* Literal.String.Escape */
.sh{color: orange;} /* Literal.String.Heredoc */
.si{color: orange;} /* Literal.String.Interpol */
.sx{color: orange;} /* Literal.String.Other */
.sr{color: orange;} /* Literal.String.Regex */
.s1{color: orange;} /* Literal.String.Single */
.ss{color: orange;} /* Literal.String.Symbol */
.bp { color: #D58 } /* Name.Builtin.Pseudo */
.vc { color: #336699 } /* Name.Variable.Class */
.vg { color: #dd7700 } /* Name.Variable.Global */
......
.white .lines .highlight {
background: white;
pre { color: #333; }
.white .highlight {
pre {
background-color: #fff;
color: #333;
}
.hll { display: block; background-color: $hover }
.c { color: #888888; font-style: italic } /* Comment */
......@@ -20,42 +22,42 @@
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #606060 } /* Generic.Subheading */
.gt { color: #aa0000 } /* Generic.Traceback */
.kc{font-weight:bold;} /* Keyword.Constant */
.kd{font-weight:bold;} /* Keyword.Declaration */
.kn{font-weight:bold;} /* Keyword.Namespace */
.kp{font-weight:bold;} /* Keyword.Pseudo */
.kr{font-weight:bold;} /* Keyword.Reserved */
.kt{color:#458;font-weight:bold;} /* Keyword.Type */
.kc{font-weight: bold;} /* Keyword.Constant */
.kd{font-weight: bold;} /* Keyword.Declaration */
.kn{font-weight: bold;} /* Keyword.Namespace */
.kp{font-weight: bold;} /* Keyword.Pseudo */
.kr{font-weight: bold;} /* Keyword.Reserved */
.kt{color: #458;font-weight: bold;} /* Keyword.Type */
.m { color: #0000DD; font-weight: bold } /* Literal.Number */
.s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.na{color:#008080;} /* Name.Attribute */
.nb{color:#0086B3;} /* Name.Builtin */
.nc{color:#458;font-weight:bold;} /* Name.Class */
.no{color:#008080;} /* Name.Constant */
.ni{color:#800080;}
.ne{color:#900;font-weight:bold;} /* Name.Exception */
.nf{color:#900;font-weight:bold;} /* Name.Function */
.nn{color:#005;font-weight:bold;} /* Name.Namespace */
.nt{color:#000080;} /* Name.Tag */
.nv{color:#008080;} /* Name.Variable */
.na{color: #008080;} /* Name.Attribute */
.nb{color: #0086B3;} /* Name.Builtin */
.nc{color: #458;font-weight: bold;} /* Name.Class */
.no{color: #008080;} /* Name.Constant */
.ni{color: #800080;}
.ne{color: #900;font-weight: bold;} /* Name.Exception */
.nf{color: #900;font-weight: bold;} /* Name.Function */
.nn{color: #005;font-weight: bold;} /* Name.Namespace */
.nt{color: #000080;} /* Name.Tag */
.nv{color: #008080;} /* Name.Variable */
.py { color: #336699; font-weight: bold } /* Name.Property */
.ow { color: #008800 } /* Operator.Word */
.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.mi {color:#099;} /* Literal.Number.Integer */
.mi {color: #099;} /* Literal.Number.Integer */
.mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.sc{color:#d14;} /* Literal.String.Char */
.sc{color: #d14;} /* Literal.String.Char */
.sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.s2{color:#d14;} /* Literal.String.Double */
.se{color:#d14;} /* Literal.String.Escape */
.sh{color:#d14;} /* Literal.String.Heredoc */
.si{color:#d14;} /* Literal.String.Interpol */
.sx{color:#d14;} /* Literal.String.Other */
.sr{color:#d14;} /* Literal.String.Regex */
.s1{color:#d14;} /* Literal.String.Single */
.ss{color:#d14;} /* Literal.String.Symbol */
.s2{color: #d14;} /* Literal.String.Double */
.se{color: #d14;} /* Literal.String.Escape */
.sh{color: #d14;} /* Literal.String.Heredoc */
.si{color: #d14;} /* Literal.String.Interpol */
.sx{color: #d14;} /* Literal.String.Other */
.sr{color: #d14;} /* Literal.String.Regex */
.s1{color: #d14;} /* Literal.String.Single */
.ss{color: #d14;} /* Literal.String.Symbol */
.bp { color: #003388 } /* Name.Builtin.Pseudo */
.vc { color: #336699 } /* Name.Variable.Class */
.vg { color: #dd7700 } /* Name.Variable.Global */
......@@ -63,7 +65,5 @@
}
.shadow {
-webkit-box-shadow:0 5px 15px #000;
-moz-box-shadow:0 5px 15px #000;
box-shadow:0 5px 15px #000;
@include box-shadow(0 5px 15px #000);
}
This diff is collapsed.
/** Override bootstrap variables **/
$baseFontSize: 13px !default;
$baseLineHeight: 18px !default;
@import "bootstrap";
@import "bootstrap-responsive";
@import 'font-awesome';
/** GitLab colors **/
$link_color: #3A89A3;
$blue_link: #2FA0BB;
$style_color: #474D57;
$hover: #D9EDF7;
$hover_border: #ADF;
/** GitLab Fonts **/
@font-face { font-family: Korolev; src: font-url('korolev-medium-compressed.otf'); }
$monospace: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono', 'lucida console', monospace;
/** MIXINS **/
@mixin shade {
-moz-box-shadow: 0 0 3px #ddd;
-webkit-box-shadow: 0 0 3px #ddd;
box-shadow: 0 0 3px #ddd;
}
@mixin solid_shade {
-moz-box-shadow: 0 0 0 3px #f1f1f1;
-webkit-box-shadow: 0 0 0 3px #f1f1f1;
box-shadow: 0 0 0 3px #f1f1f1;
}
@mixin border-radius($radius) {
-moz-border-radius: $radius;
-webkit-border-radius: $radius;
border-radius: $radius;
}
@mixin round-borders-bottom($radius) {
border-top: 1px solid #eaeaea;
-moz-border-radius-bottomright: $radius;
-moz-border-radius-bottomleft: $radius;
border-bottom-right-radius: $radius;
border-bottom-left-radius: $radius;
-webkit-border-bottom-left-radius: $radius;
-webkit-border-bottom-right-radius: $radius;
}
@mixin round-borders-top($radius) {
border-top: 1px solid #eaeaea;
-moz-border-radius-topright: $radius;
-moz-border-radius-topleft: $radius;
border-top-right-radius: $radius;
border-top-left-radius: $radius;
-webkit-border-top-left-radius: $radius;
-webkit-border-top-right-radius: $radius;
}
@mixin round-borders-all($radius) {
border: 1px solid #eaeaea;
-moz-border-radius: $radius;
-webkit-border-radius: $radius;
border-radius: $radius;
}
@mixin bg-gradient($from, $to) {
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($from), to($to));
background-image: -webkit-linear-gradient($from, $to);
background-image: -moz-linear-gradient($from, $to);
background-image: -o-linear-gradient($from, $to);
}
@mixin bg-light-gray-gradient {
background:#f1f1f1;
background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #f5f5f5), to(#e1e1e1));
background-image: -webkit-linear-gradient(#f5f5f5 6.6%, #e1e1e1);
background-image: -moz-linear-gradient(#f5f5f5 6.6%, #e1e1e1);
background-image: -o-linear-gradient(#f5f5f5 6.6%, #e1e1e1);
}
@mixin bg-gray-gradient {
background:#eee;
background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf));
background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf);
background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf);
background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf);
}
@mixin bg-dark-gray-gradient {
background:#eee;
background-image: -webkit-linear-gradient(#e9e9e9, #d7d7d7);
background-image: -moz-linear-gradient(#e9e9e9, #d7d7d7);
background-image: -o-linear-gradient(#e9e9e9, #d7d7d7);
}
/**
* Header of application.
* Contain application logo, search panel, profile icon
*/
@import "sections/header.scss";
/**
* Navigation menu of application.
* Panel with links to pages depends on project, profile or admin area
*/
@import "sections/nav.scss";
/**
* This file represent some UI that can be changed
* during web app restyle or theme select.
*
* Next items should be placed there
* - link, button colors
* - header restyles
* - main menu restyles
*
*/
@import "themes/ui_basic.scss";
/**
* UI themes:
*/
@import "themes/ui_mars.scss";
@import "themes/ui_modern.scss";
@import "themes/ui_gray.scss";
@import "themes/ui_color.scss";
/**
* GitLab bootstrap.
* Overrides some styles of twitter bootstrap.
* Also give some common classes for GitLab app
*/
@import "gitlab_bootstrap/common.scss";
@import "gitlab_bootstrap/typography.scss";
@import "gitlab_bootstrap/buttons.scss";
@import "gitlab_bootstrap/blocks.scss";
@import "gitlab_bootstrap/files.scss";
@import "gitlab_bootstrap/tables.scss";
@import "gitlab_bootstrap/lists.scss";
/**
* Most of application styles placed here.
* This file represent common UI that should not be changed between themes
* or project restyling like form width or user avatar class or commit title
*
* TODO: clean it
*/
@import "common.scss";
/**
* Styles related to specific part of app
*/
@import "sections/commits.scss";
@import "sections/issues.scss";
@import "sections/projects.scss";
@import "sections/merge_requests.scss";
@import "sections/graph.scss";
@import "sections/events.scss";
@import "sections/themes.scss";
/**
* This scss file redefine chozen selectbox styles for
* project Branch/Tag select element
*/
@import "ref_select.scss";
/**
* Code (files list) styles. Browsing project files there
*/
@import "sections/tree.scss";
/**
* This file represent notes(comments) styles
*/
@import "sections/notes.scss";
/**
* This file represent profile styles
*/
@import "sections/profile.scss";
/**
* Devise styles
*/
@import "sections/login.scss";
/**
* CODE HIGHTLIGHT BASE
*
*/
@import "highlight/white.scss";
/**
* CODE HIGHTLIGHT DARK schema
*
*/
@import "highlight/dark.scss";
/**
* File Editor styles
*
*/
@import "sections/editor.scss";
/** Branch/tag selector **/
.project-refs-form {
margin:0;
margin: 0;
span {
background:none !important;
position:static !important;
......@@ -9,7 +9,7 @@
}
}
.project-refs-select {
width:120px;
width: 120px;
}
.project-refs-form .chzn-container {
......@@ -21,10 +21,10 @@
.chzn-drop {
min-width: 400px;
.chzn-results {
max-height:300px;
max-height: 300px;
}
.chzn-search input {
min-width:365px;
min-width: 365px;
}
}
}
......@@ -33,21 +33,19 @@
.chzn-container {
.chzn-search {
input:focus {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
@include box-shadow(none);
}
}
.chzn-drop {
margin:7px 0;
margin: 7px 0;
min-width: 200px;
border: 1px solid #bbb;
border-radius:0;
@include border-radius(0);
.chzn-results {
margin-top: 5px;
max-height:300px;
max-height: 300px;
.group-result {
color: $style_color;
......@@ -55,7 +53,7 @@
padding: 8px;
}
.active-result {
border-radius: 0;
@include border-radius(0);
&.highlighted {
background: $hover;
......@@ -71,7 +69,7 @@
.chzn-search {
@include bg-gray-gradient;
input {
min-width:165px;
min-width: 165px;
border-color: #CCC;
}
}
......@@ -81,8 +79,8 @@
@include bg-light-gray-gradient;
div {
background:transparent;
border-left:none;
background: transparent;
border-left: none;
}
span {
......
......@@ -6,14 +6,14 @@
.commit-title {
line-height: 26px;
margin:0;
margin: 0;
}
.commit-description {
font-size: 14px;
border: none;
background-color: white;
padding-top:10px;
padding-top: 10px;
}
.browse-button {
......@@ -28,9 +28,9 @@
@extend .clearfix;
.sha-block {
text-align:right;
text-align: right;
&:first-child {
padding-bottom:6px;
padding-bottom: 6px;
}
a {
......@@ -49,10 +49,10 @@
.author a,
.committer a {
font-size:14px;
line-height:22px;
text-shadow:0 1px 1px #fff;
color:#777;
font-size: 14px;
line-height: 22px;
text-shadow: 0 1px 1px #fff;
color: #777;
&:hover {
color: #999;
}
......@@ -70,15 +70,16 @@
*
*/
.diff_file {
border:1px solid #CCC;
margin-bottom:1em;
border: 1px solid #CCC;
margin-bottom: 1em;
.diff_file_header {
@extend .clearfix;
padding: 5px 5px 5px 10px;
color: #555;
border-bottom:1px solid #CCC;
border-bottom: 1px solid #CCC;
background: #eee;
// TODO Replace with linear-gradient mixin
background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf));
background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf);
background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf);
......@@ -86,7 +87,7 @@
> span {
font-family: $monospace;
font-size:14px;
font-size: 14px;
line-height: 30px;
}
......@@ -104,36 +105,36 @@
}
}
.diff_file_content {
overflow:auto;
overflow-y:hidden;
background:#fff;
color:#333;
overflow: auto;
overflow-y: hidden;
background: #fff;
color: #333;
font-size: 12px;
font-family: $monospace;
.old{
span.idiff{
background-color:#FAA;
background-color: #FAA;
}
}
.new{
span.idiff{
background-color:#AFA;
background-color: #AFA;
}
}
table {
td {
line-height:18px;
line-height: 18px;
}
}
}
.diff_file_content_image {
background:#eee;
text-align:center;
background: #eee;
text-align: center;
.image {
display: inline-block;
margin:50px;
max-width:400px;
margin: 50px;
max-width: 400px;
img{
background: url('trans_bg.gif');
......@@ -158,7 +159,7 @@
&.img_compared {
.image {
max-width:300px;
max-width: 300px;
}
}
}
......@@ -166,46 +167,46 @@
.diff_file_content{
table {
border:none;
margin:0px;
padding:0px;
border: none;
margin: 0px;
padding: 0px;
tr {
td {
font-size:12px;
font-size: 12px;
}
}
}
.old_line, .new_line {
margin:0px;
padding:0px;
border:none;
background:#EEE;
color:#666;
margin: 0px;
padding: 0px;
border: none;
background: #EEE;
color: #666;
padding: 0px 5px;
border-right: 1px solid #ccc;
text-align:right;
min-width:35px;
max-width:35px;
width:35px;
text-align: right;
min-width: 35px;
max-width: 35px;
width: 35px;
moz-user-select: none;
-khtml-user-select: none;
user-select: none;
a {
float:left;
width:35px;
font-weight:normal;
color:#666;
float: left;
width: 35px;
font-weight: normal;
color: #666;
&:hover {
text-decoration:underline;
text-decoration: underline;
}
}
}
.line_content {
white-space:pre;
height:14px;
margin:0px;
padding:0px;
border:none;
white-space: pre;
height: 14px;
margin: 0px;
padding: 0px;
border: none;
&.new {
background: #CFD;
}
......@@ -213,8 +214,8 @@
background: #FDD;
}
&.matched {
color:#ccc;
background:#fafafa;
color: #ccc;
background: #fafafa;
}
}
}
......@@ -228,32 +229,30 @@
/** COMMIT ROW **/
.commit {
@extend .wll;
.browse_code_link_holder {
@extend .span2;
float:right;
float: right;
}
.committed_ago {
float:right;
float: right;
@extend .cgray;
}
.notes_count {
float:right;
float: right;
margin: -6px 8px 6px;
}
code {
background:#FCEEC1;
color:$style_color;
background: #FCEEC1;
color: $style_color;
}
.commit_short_id {
float:left;
float: left;
@extend .lined;
min-width:65px;
min-width: 65px;
font-family: $monospace;
}
......@@ -294,11 +293,24 @@
}
.label_commit {
@include round-borders-all(4px);
padding:2px 4px;
border:none;
font-size:13px;
@include border-radius(4px);
padding: 2px 4px;
font-size: 13px;
background: #474D57;
color:#fff;
color: #fff;
font-family: $monospace;
}
.commits-compare-switch{
background: url("switch_icon.png") no-repeat center center;
width: 16px;
height: 18px;
text-indent: -9999px;
float: left;
margin-right: 9px;
border: 1px solid #DDD;
@include border-radius(4px);
padding: 4px;
background-color: #EEE;
}
.file-editor {
#editor{
border: none;
border-radius: 0;
@include border-radius(0);
height: 500px;
margin: 0;
padding: 0;
......
......@@ -4,25 +4,25 @@
*/
.event_label {
&.pushed {
padding:0 2px;
padding: 0 2px;
}
&.opened {
padding:0 2px;
padding: 0 2px;
}
&.closed {
padding:0 2px;
padding: 0 2px;
}
&.merged {
padding:0 2px;
padding: 0 2px;
}
&.left,
&.joined {
padding:0 2px;
float:none;
padding: 0 2px;
float: none;
}
}
......@@ -31,49 +31,51 @@
*
*/
.event-item {
min-height:40px;
border-bottom:1px solid #eee;
border-bottom: 1px solid #eee;
.event-title {
color:#333;
color: #333;
font-weight: bold;
.author_name {
color:#333;
color: #333;
}
}
.event-body {
p {
color:#555;
color: #555;
padding-top: 5px;
}
.event-info {
color:#666;
color: #666;
}
}
.avatar {
width:32px;
position: relative;
top: -3px;
}
.event_icon {
position: relative;
float: right;
border: 1px solid #EEE;
padding: 5px;
@include border-radius(5px);
background: #F9F9F9;
margin-left: 10px;
top: -6px;
img {
width:20px;
width: 20px;
}
}
ul {
margin-left:50px;
margin-bottom:5px;
margin-left: 50px;
margin-bottom: 5px;
.avatar {
width:18px;
margin-top:3px;
width: 18px;
margin-top: 3px;
}
}
padding: 15px 5px;
padding: 16px 5px;
&:last-child { border:none }
.wll:hover { background:none }
.event_commits {
margin-top: 5px;
......@@ -81,9 +83,9 @@
li {
&.commit {
background: transparent;
padding:3px;
border:none;
font-size:12px;
padding: 3px;
border: none;
font-size: 12px;
}
&.commits-stat {
display: block;
......@@ -98,15 +100,15 @@
*
*/
.event_lp {
color:#777;
padding:10px;
min-height:22px;
color: #777;
padding: 10px;
min-height: 22px;
border-left: 5px solid #5AB9C3;
margin-bottom:20px;
background:#f9f9f9;
margin-bottom: 20px;
background: #f9f9f9;
.avatar {
width:24px;
width: 24px;
}
.btn-new-mr {
......@@ -133,7 +135,7 @@
background: #f9f9f9;
margin-bottom: 10px;
img {
width:20px;
width: 20px;
}
&.inactive {
......
.graph_holder {
border: 1px solid #aaa;
padding:1px;
padding: 1px;
h4 {
padding:0 10px;
padding: 0 10px;
border-bottom: 1px solid #bbb;
@include bg-gray-gradient;
}
......
......@@ -5,7 +5,7 @@
header {
&.navbar-gitlab {
.navbar-inner {
height:45px;
height: 45px;
padding: 5px;
background: #F1F1F1;
......@@ -24,8 +24,8 @@ header {
}
}
z-index:10;
/*height:60px;*/
z-index: 10;
/*height: 60px;*/
/**
*
......@@ -33,25 +33,20 @@ header {
*
*/
.app_logo {
width:170px;
float:left;
width: 170px;
float: left;
a {
float:left;
float: left;
padding: 0px;
h1 {
width:90px;
width: 90px;
background: url('logo_dark.png') no-repeat 0px 2px;
float:left;
margin-left:2px;
font-size:30px;
line-height:48px;
font-weight:normal;
color:$style_color;
text-shadow: 0 1px 1px #FFF;
padding-left:45px;
height:40px;
font-family: 'Korolev', sans-serif;
float: left;
margin-left: 2px;
padding-left: 45px;
height: 40px;
@include header-font;
}
}
}
......@@ -62,16 +57,11 @@ header {
*
*/
.project_name {
position:relative;
float:left;
margin:0;
margin-right:30px;
font-size:30px;
line-height:48px;
font-weight:normal;
color:$style_color;
text-shadow: 0 1px 1px #FFF;
font-family: 'Korolev', sans-serif;
position: relative;
float: left;
margin: 0;
margin-right: 30px;
@include header-font;
}
/**
......@@ -81,7 +71,7 @@ header {
*/
.search {
margin-right: 45px;
margin-left:10px;
margin-left: 10px;
margin-top: 2px;
.search-input {
......@@ -89,11 +79,11 @@ header {
background-image: url("icon-search.png");
background-repeat: no-repeat;
background-position: 10px;
padding-left:25px;
padding-left: 25px;
font-size: 13px;
@include border-radius(3px);
border:1px solid #c6c6c6;
box-shadow:none;
border: 1px solid #c6c6c6;
box-shadow: none;
&:focus {
@extend .span3;
}
......@@ -122,7 +112,7 @@ header {
width: 28px;
height: 28px;
display: block;
top:1px;
top: 1px;
&:after {
content: " ";
display: block;
......@@ -132,12 +122,15 @@ header {
left: 0;
bottom: 0;
float: right;
border-radius: 5px;
@include border-radius(5px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-bottom: 0;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, 0.15)), to(rgba(0, 0, 0, 0.25))), -webkit-gradient(linear, left top, right bottom, color-stop(0, rgba(255, 255, 255, 0)), color-stop(0.5, rgba(255, 255, 255, 0.1)), color-stop(0.501, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0)));
background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)), -moz-linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0));
background: linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)), linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0));
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, 0.15)), to(rgba(0, 0, 0, 0.25))),
-webkit-gradient(linear, left top, right bottom, color-stop(0, rgba(255, 255, 255, 0)), color-stop(0.5, rgba(255, 255, 255, 0.1)), color-stop(0.501, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0)));
background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)),
-moz-linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0));
background: linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)),
linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0));
-webkit-background-origin: border-box;
-moz-background-origin: border;
background-origin: border-box; } } }
......@@ -149,7 +142,7 @@ header {
display: block; } }
.account-links {
border-radius: 5px;
@include border-radius(5px);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
position: relative;
&:before {
......@@ -169,7 +162,7 @@ header {
display: none;
z-index: 100000;
@include border-radius(4px);
width: 100px;
width: 130px;
position: absolute;
right: 5px;
top: 38px;
......@@ -178,13 +171,13 @@ header {
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
a {
color: #fff;
padding: 7px 10px;
padding: 12px 15px;
display: block;
text-shadow: none;
border-bottom: 1px solid #666;
font-size: 12px;
&:hover {
color:#fff;
color: #fff;
background: #333;
}
}
......@@ -197,20 +190,13 @@ header {
.account-links a {
&:first-child {
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px; }
@include border-radius(5px 5px 0 0);
}
&:last-child {
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomright: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom: 0; } }
@include border-radius(0 0 5px 5px);
border-bottom: 0;
}
}
......@@ -248,13 +234,13 @@ header {
a {
h1 {
background: url('logo_white.png') no-repeat 0px 2px;
color:#fff;
color: #fff;
text-shadow: 0 1px 1px #111;
}
}
}
.project_name {
color:#fff;
color: #fff;
text-shadow: 0 1px 1px #111;
}
}
......
......@@ -3,7 +3,7 @@
.issue_title {
@extend .top_box_content;
.clearfix {
margin-bottom:0px;
margin-bottom: 0px;
input {
@extend .span8;
}
......@@ -11,14 +11,14 @@
}
.issue_middle_block {
@extend .middle_box_content;
height:30px;
height: 30px;
.issue_assignee {
@extend .span6;
float:left;
float: left;
}
.issue_milestone {
@extend .span4;
float:left;
float: left;
}
}
.issue_description {
......@@ -28,31 +28,31 @@
.issues_table {
.issue {
padding:7px 10px;
padding: 7px 10px;
.issue_check {
float:left;
float: left;
padding: 8px 0;
padding-right: 8px;
min-width: 15px;
}
p {
padding-top:0;
padding-bottom:2px;
padding-top: 0;
padding-bottom: 2px;
}
img.avatar {
width:32px;
margin-top:1px;
width: 32px;
margin-top: 1px;
}
}
}
input.check_all_issues {
float:left;
float: left;
padding: 0;
margin:0;
margin: 0;
margin-right: 10px;
position: relative;
top: 8px;
......@@ -82,16 +82,16 @@ input.check_all_issues {
}
}
@media (min-width: 800px) { .issues_filters select { width:160px; } }
@media (min-width: 1000px) { .issues_filters select { width:200px; } }
@media (min-width: 1200px) { .issues_filters select { width:220px; } }
@media (min-width: 800px) { .issues_filters select { width: 160px; } }
@media (min-width: 1000px) { .issues_filters select { width: 200px; } }
@media (min-width: 1200px) { .issues_filters select { width: 220px; } }
#issues-table-holder {
.issues_filters {
form {
padding:0;
margin:0;
padding: 0;
margin: 0;
margin-top:7px
}
}
......@@ -99,48 +99,25 @@ input.check_all_issues {
.issues_bulk_update {
margin: 0;
form {
padding:0;
margin:0;
padding: 0;
margin: 0;
margin-top:7px
}
.update_selected_issues {
position:relative;
position: relative;
top:-2px;
margin-left:4px;
float:left;
margin-left: 4px;
float: left;
}
.update_issues_text {
padding:3px;
padding: 3px;
line-height: 18px;
float:left;
float: left;
}
}
}
#update_status {
width:100px;
}
/**
* Milestones list
*
*/
.milestone {
@extend .wll;
}
/**
* Fix milestone calendar
*/
.ui-datepicker {
border:none;
box-shadow:none;
.ui-datepicker-header {
@include solid_shade;
margin-bottom:10px;
border:1px solid #bbb;
}
width: 100px;
}
/* Login Page */
body.login-page{
padding-top: 10%;
background:#f1f1f1;
background: #f1f1f1;
}
.login-box{
width: 304px;
position: relative;
border-radius: 5px;
@include border-radius(5px);
margin: auto;
padding: 20px;
background: white;
......@@ -18,25 +18,15 @@ body.login-page{
display: block;
}
.login-box input.text{background-color: #f1f1f1; font-size: 16px; border-radius: 0; padding: 14px 10px; width: 280px}
.login-box input.text{background-color: #f1f1f1; font-size: 16px; @include border-radius(0); padding: 14px 10px; width: 280px}
.login-box input.text.top{
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
margin-bottom:0px;
@include border-radius(5px 5px 0 0);
margin-bottom: 0px;
}
.login-box input.text.bottom{
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomright: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
@include border-radius(0 0 5px 5px);
border-top: 0;
margin-bottom: 20px;
}
......
......@@ -5,10 +5,10 @@
.mr_branch_box {
@extend .ui-box;
margin-bottom:20px;
margin-bottom: 20px;
.body {
background:#f1f1f1;
background: #f1f1f1;
}
}
......@@ -23,31 +23,30 @@
}
form {
margin-bottom:0;
margin-bottom: 0;
.clearfix {
margin-bottom:0;
margin-bottom: 0;
}
}
.accept_group {
float:left;
float: left;
border: 1px solid #ADA;
padding: 2px;
@include border-radius(5px);
border-radius: 5px;
background: #CEB;
.accept_merge_request {
font-size:13px;
float:left;
font-size: 13px;
float: left;
}
.remove_branch_holder {
margin-left:20px;
margin-right:10px;
float:left;
margin-left: 20px;
margin-right: 10px;
float: left;
}
label {
color:#444;
color: #444;
}
}
......@@ -60,15 +59,15 @@
.mr_nav_tabs {
li {
a {
font-weight:bold;
padding:8px 20px;
text-align:center;
font-weight: bold;
padding: 8px 20px;
text-align: center;
}
}
}
li.merge_request {
padding:7px 10px;
padding: 7px 10px;
img.avatar {
width: 32px;
margin-top: 1px;
......@@ -85,35 +84,35 @@ li.merge_request {
}
.label_branch {
@include round-borders-all(4px);
padding:2px 4px;
border:none;
font-size:14px;
@include border-radius(4px);
padding: 2px 4px;
border: none;
font-size: 14px;
background: #474D57;
color:#fff;
color: #fff;
font-family: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace;
}
.mr_source_commit,
.mr_target_commit {
.commit {
margin:0;
padding:0;
margin: 0;
padding: 0;
padding: 5px;
margin-bottom: 5px;
.avatar { position:relative }
.row_title {
color:#444;
color: #444;
}
.commit-author-name,
.dash,
.committed_ago,
.browse_code_link_holder {
display:none;
display: none;
}
list-style:none;
list-style: none;
&:hover {
background:none;
background: none;
}
}
}
......@@ -126,20 +125,14 @@ li.merge_request {
@extend .main_box;
.merge_requests_middle_box {
@extend .middle_box_content;
height:30px;
height: 30px;
.merge_requests_assignee {
@extend .span6;
float:left;
float: left;
}
.merge_requests_milestone {
@extend .span4;
float:left;
float: left;
}
}
}
.status-badge {
height: 32px;
width: 100%;
@include border-radius(5px);
}
......@@ -3,64 +3,40 @@
*
*/
ul.main_menu {
border-radius: 4px;
margin: auto;
margin:30px 0;
border:1px solid #BBB;
height:37px;
@include bg-gray-gradient;
position:relative;
overflow:hidden;
@include shade;
margin: 30px 0;
margin-top: 10px;
border-bottom: 1px solid #DDD;
height: 37px;
position: relative;
overflow: hidden;
.count {
position: relative;
top: -1px;
display: inline-block;
height: 15px;
margin: 0 0 0 5px;
padding: 0 8px 1px 8px;
height: auto;
font-size: 0.82em;
line-height: 14px;
text-align: center;
color: #777;
background: #f2f2f2;
border-top: 1px solid #CCC;
border-radius: 8px;
-moz-border-radius: 8px;
top: -1px;
display: inline-block;
height: 15px;
margin: 0 0 0 5px;
padding: 0 8px 1px 8px;
height: auto;
font-size: 0.82em;
line-height: 14px;
text-align: center;
color: #777;
}
.label {
background:$hover;
text-shadow:none;
color:$style_color;
background: $hover;
text-shadow: none;
color: $style_color;
}
li {
list-style-type: none;
margin: 0;
display: table-cell;
width: 1%;
border-right: 1px solid #DDD;
border-left: 1px solid #EEE;
border-bottom:2px solid #CFCFCF;
&:first-child{
-webkit-border-top-left-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-topleft: 4px;
-moz-border-radius-bottomleft: 4px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
border-left: 0;
}
&.active {
background-color:#D5D5D5;
border-right: 1px solid #BBB;
border-left: 1px solid #BBB;
border-radius: 0 0 1px 1px;
&:first-child{
border-bottom:none;
border-left:none;
border-bottom: 2px solid #474D57;
a {
color: $style_color;
}
}
......@@ -68,10 +44,10 @@ ul.main_menu {
a {
background: url(home_icon.PNG) no-repeat center center;
text-indent:-9999px;
min-width:20px;
min-width: 20px;
img {
position:relative;
top:4px;
position: relative;
top: 4px;
}
}
}
......@@ -79,12 +55,12 @@ ul.main_menu {
a {
display: block;
text-align: center;
font-weight:bold;
height:35px;
line-height:36px;
color: $style_color;
text-shadow:0 1px 1px white;
padding:0 10px;
font-weight: normal;
height: 35px;
line-height: 36px;
color: #777;
text-shadow: 0 1px 1px white;
padding: 0 10px;
}
}
/*
......
......@@ -4,30 +4,30 @@
*/
#notes-list,
#new-notes-list {
display:block;
list-style:none;
margin:0px;
padding:0px;
display: block;
list-style: none;
margin: 0px;
padding: 0px;
}
.issue_notes,
.wiki_notes {
.note_content {
float:left;
width:400px;
float: left;
width: 400px;
}
}
/* Note textare */
#note_note {
height:80px;
width:99%;
font-size:14px;
height: 80px;
width: 99%;
font-size: 14px;
}
#new_note {
.attach_holder {
display:none;
display: none;
}
}
......@@ -36,34 +36,34 @@
border: 1px solid #ddd;
padding: 10px;
min-height: 60px;
background:#f5f5f5;
background: #f5f5f5;
}
.note {
padding: 8px 0;
overflow: hidden;
display: block;
position:relative;
position: relative;
img {float: left; margin-right: 10px;}
img.emoji {float:none;margin:0;}
img.emoji {float: none;margin: 0;}
.note-author cite{font-style: italic;}
p { color:$style_color; }
p { color: $style_color; }
.note-author { color: $style_color;}
.note-title { margin-left:45px; padding-top: 5px;}
.note-title { margin-left: 45px; padding-top: 5px;}
.avatar {
margin-top:3px;
margin-top: 3px;
}
.delete-note {
display:none;
position:absolute;
right:0;
top:0;
display: none;
position: absolute;
right: 0;
top: 0;
}
&:hover {
.delete-note { display:block; }
.delete-note { display: block; }
}
}
#notes-list:not(.reversed) .note,
......@@ -94,30 +94,31 @@ p.notify_controls span{
}
tr.line_notes_row {
border-bottom:1px solid #DDD;
border-bottom: 1px solid #DDD;
border-left: 7px solid #2A79A3;
&.reply {
background:#eee;
background: #eee;
border-left: 7px solid #2A79A3;
border-top:1px solid #ddd;
border-top: 1px solid #ddd;
td {
padding:7px 10px;
padding: 7px 10px;
}
a.line_note_reply_link {
@include round-borders-all(4px);
border: 1px solid #eaeaea;
@include border-radius(4px);
padding: 3px 10px;
margin-left:5px;
margin-left: 5px;
color: white;
background: #2A79A3;
border-color: #2A79A3;
}
}
ul {
margin:0;
margin: 0;
li {
padding:0;
border:none;
padding: 0;
border: none;
}
}
}
......@@ -125,28 +126,28 @@ tr.line_notes_row {
.line_notes_row, .per_line_form { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.per_line_form {
background:#f5f5f5;
border-top:1px solid #eee;
background: #f5f5f5;
border-top: 1px solid #eee;
form { margin: 0; }
td {
border-bottom:1px solid #ddd;
border-bottom: 1px solid #ddd;
}
.note_actions {
margin:0;
margin: 0;
padding-top: 10px;
.buttons {
float:left;
width:300px;
float: left;
width: 300px;
}
.options {
.labels {
float:left;
padding-left:10px;
float: left;
padding-left: 10px;
label {
padding: 6px 0;
margin: 0;
width:120px;
width: 120px;
}
}
}
......@@ -154,13 +155,13 @@ tr.line_notes_row {
}
td .line_note_link {
position:absolute;
position: absolute;
margin-left:-70px;
margin-top:-10px;
z-index:10;
z-index: 10;
background: url("comment_add.png") no-repeat left 0;
width:32px;
height:32px;
width: 32px;
height: 32px;
opacity: 0.0;
filter: alpha(opacity=0);
......@@ -180,13 +181,13 @@ td .line_note_link {
.new_note {
.input-file {
font: 500px monospace;
opacity:0;
opacity: 0;
filter: alpha(opacity=0);
position: absolute;
z-index: 1;
top:0;
right:0;
padding:0;
top: 0;
right: 0;
padding: 0;
margin: 0;
}
......@@ -198,24 +199,24 @@ td .line_note_link {
}
.attachments {
position:relative;
position: relative;
width: 350px;
height: 50px;
overflow:hidden;
overflow: hidden;
margin:0 0 5px !important;
.input_file {
.file_upload {
position: absolute;
right:14px;
top:7px;
right: 14px;
top: 7px;
}
.file_name {
line-height:30px;
width:240px;
height:28px;
overflow:hidden;
line-height: 30px;
width: 240px;
height: 28px;
overflow: hidden;
}
.input-file {
width: 260px;
......@@ -228,5 +229,5 @@ td .line_note_link {
.note-text {
border: 1px solid #aaa;
box-shadow:none;
box-shadow: none;
}
.profile_history {
.event_feed {
min-height:20px;
min-height: 20px;
.avatar {
width:20px;
width: 20px;
}
}
}
.profile_avatar_holder {
float:left;
width:60px;
height:60px;
margin-right:20px;
float: left;
width: 60px;
height: 60px;
margin-right: 20px;
img {
width:60px;
height:60px;
background:#fff;
width: 60px;
height: 60px;
background: #fff;
padding: 1px;
border: 1px solid #ddd;
}
......
......@@ -4,50 +4,34 @@
}
.side {
@extend .span4;
@extend .right;
.groups_box,
.projects_box {
h5 {
color:$style_color;
font-size:16px;
> h5 {
color: $style_color;
font-size: 16px;
text-shadow: 0 1px 1px #fff;
padding: 2px 10px;
line-height:32px;
font-size:14px;
line-height: 32px;
font-size: 14px;
}
ul {
li {
padding:0;
a {
display:block;
.group_name {
font-size:14px;
line-height:18px;
}
.project_name {
color:#4fa2bd;
font-size:14px;
line-height:18px;
}
.arrow {
float:right;
padding:10px;
margin:0;
}
.last_activity {
padding-top:5px;
display:block;
span, strong {
font-size:12px;
color:#666;
}
}
.nav-projects-tabs li { padding: 0; }
.well-list {
.arrow {
float: right;
padding: 10px;
margin: 0;
}
.last_activity {
padding-top: 5px;
display: block;
span, strong {
font-size: 12px;
color: #666;
}
}
}
@extend .leftbar;
@extend .ui-box;
}
}
......@@ -58,21 +42,27 @@
.project_name_holder {
input,
label {
font-size:16px;
line-height:20px;
padding:8px;
font-size: 16px;
line-height: 20px;
padding: 8px;
}
label {
color:#888;
color: #888;
}
.btn {
padding:6px 10px;
margin-left:10px;
margin-bottom:8px;
padding: 6px 10px;
margin-left: 10px;
margin-bottom: 8px;
}
}
.adv_settings {
h6 { margin-left:40px; }
h6 { margin-left: 40px; }
}
fieldset.features {
.control-label {
font-weight: bold;
}
}
}
......@@ -81,19 +71,20 @@
@include bg-gray-gradient;
padding: 4px 7px;
border: 1px solid #CCC;
margin-bottom:20px;
margin-bottom: 20px;
}
.project_clone_holder {
input[type="text"],
.btn {
font-size:12px;
font-size: 12px;
line-height: 18px;
margin: 0;
padding: 3px 10px;
}
input[type="text"] {
@extend .monospace;
border: 1px solid #BBB;
box-shadow: none;
margin-left: -1px;
......@@ -102,11 +93,33 @@
.save-project-loader {
img {
margin-top:50px;
margin-bottom:50px;
margin-top: 50px;
margin-bottom: 50px;
}
h3 {
@extend .page_title;
}
}
ul.nav.nav-projects-tabs {
@extend .nav-tabs;
padding-left: 8px;
li {
a {
padding: 4px 20px;
margin-top: 2px;
border-color: #DDD;
background-color: #EEE;
text-shadow: 0 1px 1px white;
color: #555;
}
&.active {
a {
font-weight: bold;
}
}
}
}
.snippet.file_holder {
.file_title {
.snippet-file-name {
position: relative;
top: -4px;
left: -4px;
}
}
}
......@@ -6,17 +6,17 @@
}
.themes_opts {
padding-left:20px;
padding-left: 20px;
label {
width:175px;
margin-right:40px;
width: 175px;
margin-right: 40px;
.prev {
@extend .thumbnail;
height:30px;
width:175px;
margin-bottom:10px;
height: 30px;
width: 175px;
margin-bottom: 10px;
&.classic {
background: #31363e;
......@@ -42,17 +42,17 @@
}
.code_highlight_opts {
padding-left:20px;
padding-left: 20px;
label {
width:220px;
margin-right:40px;
width: 220px;
margin-right: 40px;
.prev {
@extend .thumbnail;
height:151px;
width:220px;
margin-bottom:10px;
height: 151px;
width: 220px;
margin-bottom: 10px;
}
}
}
......
.tree-holder {
.tree-content-holder {
float:left;
width:100%;
float: left;
width: 100%;
}
.tree_progress {
display:none;
margin:20px;
display: none;
margin: 20px;
&.loading {
display:block;
display: block;
}
}
......@@ -18,20 +18,20 @@
&:hover {
td {
background: $hover;
border-top:1px solid #ADF;
border-bottom:1px solid #ADF;
border-top: 1px solid #ADF;
border-bottom: 1px solid #ADF;
}
cursor:pointer;
cursor: pointer;
}
}
}
.tree-item {
.tree-item-file-name {
vertical-align:middle;
vertical-align: middle;
a {
&:hover {
color:$blue_link;
color: $primary_color;
}
}
......@@ -48,8 +48,8 @@
padding: 2px 10px;
}
td {
line-height:20px;
background:#fafafa;
line-height: 20px;
background: #fafafa;
}
}
......@@ -86,7 +86,7 @@
.tree-btn-group {
.btn {
margin-right:-3px;
padding:2px 10px;
padding: 2px 10px;
}
}
.votes {
font-size: 13px;
line-height: 15px;
.progress {
height: 4px;
margin: 0;
.bar {
float: left;
height: 100%;
}
.bar-success {
@include linear-gradient(#62C462, #51A351);
background-color: #468847;
}
.bar-danger {
@include linear-gradient(#EE5F5B, #BD362F);
background-color: #B94A48;
}
}
.upvotes {
display: inline-block;
color: #468847;
}
.downvotes {
display: inline-block;
color: #B94A48;
}
}
.votes-block {
margin: 14px 6px 6px 0;
.downvotes {
float: right;
}
}
.votes-inline {
display: inline-block;
margin: 0 8px;
.progress {
display: inline-block;
padding: 0 0 2px;
width: 45px;
}
}
......@@ -4,18 +4,6 @@
*
*/
.ui_basic {
/*
* Common styles
*
*/
a {
color: $link_color;
&:hover {
text-decoration:none;
color: $blue_link;
}
}
.app_logo {
.separator {
margin-left: 0;
......
......@@ -47,17 +47,17 @@
a {
h1 {
background: url('logo_white.png') no-repeat 0px 2px;
color:#eee;
color: #eee;
text-shadow: 0 1px 1px #111;
}
}
.separator {
display:none;
display: none;
}
}
.project_name {
color:#eee;
color: #eee;
text-shadow: 0 1px 1px #111;
}
}
......
......@@ -19,8 +19,6 @@ module Notes
when "wall"
# this is the only case, where the order is DESC
project.common_notes.order("created_at DESC, id DESC").limit(50)
when "wiki"
project.wiki_notes.limit(20)
end
@notes = if after_id
......
class ProjectUpdateContext < BaseContext
def execute(role = :default)
namespace_id = params[:project].delete(:namespace_id)
allowed_transfer = can?(current_user, :change_namespace, project) || role == :admin
if allowed_transfer && namespace_id.present?
if namespace_id == Namespace.global_id
if project.namespace.present?
# Transfer to global namespace from anyone
project.transfer(nil)
end
elsif namespace_id.to_i != project.namespace_id
# Transfer to someone namespace
namespace = Namespace.find(namespace_id)
project.transfer(namespace)
end
end
project.update_attributes(params[:project], as: role)
end
end
......@@ -2,7 +2,7 @@ class Admin::GroupsController < AdminController
before_filter :group, only: [:edit, :show, :update, :destroy, :project_update]
def index
@groups = Group.scoped
@groups = Group.order('name ASC')
@groups = @groups.search(params[:name]) if params[:name].present?
@groups = @groups.page(params[:page]).per(20)
end
......@@ -11,6 +11,7 @@ class Admin::GroupsController < AdminController
@projects = Project.scoped
@projects = @projects.not_in_group(@group) if @group.projects.present?
@projects = @projects.all
@projects.reject!(&:empty_repo?)
end
def new
......@@ -22,6 +23,7 @@ class Admin::GroupsController < AdminController
def create
@group = Group.new(params[:group])
@group.path = @group.name.dup.parameterize if @group.name
@group.owner = current_user
if @group.save
......@@ -48,15 +50,17 @@ class Admin::GroupsController < AdminController
def project_update
project_ids = params[:project_ids]
Project.where(id: project_ids).update_all(group_id: @group.id)
Project.where(id: project_ids).each do |project|
project.transfer(@group)
end
redirect_to :back, notice: 'Group was successfully updated.'
end
def remove_project
@project = Project.find(params[:project_id])
@project.group_id = nil
@project.save
@project.transfer(nil)
redirect_to :back, notice: 'Group was successfully updated.'
end
......@@ -70,6 +74,6 @@ class Admin::GroupsController < AdminController
private
def group
@group = Group.find_by_code(params[:id])
@group = Group.find_by_path(params[:id])
end
end
class Admin::ProjectsController < AdminController
before_filter :admin_project, only: [:edit, :show, :update, :destroy, :team_update]
before_filter :project, only: [:edit, :show, :update, :destroy, :team_update]
def index
@admin_projects = Project.scoped
@admin_projects = @admin_projects.search(params[:name]) if params[:name].present?
@admin_projects = @admin_projects.order("name ASC").page(params[:page]).per(20)
@projects = Project.scoped
@projects = @projects.where(namespace_id: params[:namespace_id]) if params[:namespace_id].present?
@projects = @projects.where(namespace_id: nil) if params[:namespace_id] == Namespace.global_id
@projects = @projects.search(params[:name]) if params[:name].present?
@projects = @projects.includes(:namespace).order("namespaces.path, projects.name ASC").page(params[:page]).per(20)
end
def show
@users = User.scoped
@users = @users.not_in_project(@admin_project) if @admin_project.users.present?
@users = User.active
@users = @users.not_in_project(@project) if @project.users.present?
@users = @users.all
end
def new
@admin_project = Project.new
end
def edit
end
def team_update
@admin_project.add_users_ids_to_team(params[:user_ids], params[:project_access])
redirect_to [:admin, @admin_project], notice: 'Project was successfully updated.'
end
def create
@admin_project = Project.new(params[:project])
@admin_project.owner = current_user
@project.add_users_ids_to_team(params[:user_ids], params[:project_access])
if @admin_project.save
redirect_to [:admin, @admin_project], notice: 'Project was successfully created.'
else
render action: "new"
end
redirect_to [:admin, @project], notice: 'Project was successfully updated.'
end
def update
owner_id = params[:project].delete(:owner_id)
status = ProjectUpdateContext.new(project, current_user, params).execute(:admin)
if owner_id
@admin_project.owner = User.find(owner_id)
end
if @admin_project.update_attributes(params[:project])
redirect_to [:admin, @admin_project], notice: 'Project was successfully updated.'
if status
redirect_to [:admin, @project], notice: 'Project was successfully updated.'
else
render action: "edit"
end
end
def destroy
@admin_project.destroy
@project.destroy
redirect_to admin_projects_url, notice: 'Project was successfully deleted.'
redirect_to admin_projects_path, notice: 'Project was successfully deleted.'
end
private
protected
def project
id = params[:project_id] || params[:id]
def admin_project
@admin_project = Project.find_by_code(params[:id])
@project = Project.find_with_namespace(id)
@project || render_404
end
end
......@@ -3,7 +3,7 @@ class Admin::UsersController < AdminController
@admin_users = User.scoped
@admin_users = @admin_users.filter(params[:filter])
@admin_users = @admin_users.search(params[:name]) if params[:name].present?
@admin_users = @admin_users.order("updated_at DESC").page(params[:page])
@admin_users = @admin_users.order("name ASC").page(params[:page])
end
def show
......@@ -30,7 +30,7 @@ class Admin::UsersController < AdminController
def new
@admin_user = User.new({ projects_limit: Gitlab.config.default_projects_limit }, as: :admin)
@admin_user = User.new({ projects_limit: Gitlab.config.gitlab.default_projects_limit }, as: :admin)
end
def edit
......
......@@ -2,6 +2,7 @@ class ApplicationController < ActionController::Base
before_filter :authenticate_user!
before_filter :reject_blocked!
before_filter :set_current_user_for_observers
before_filter :add_abilities
before_filter :dev_tools if Rails.env == 'development'
protect_from_forgery
......@@ -34,7 +35,7 @@ class ApplicationController < ActionController::Base
def reject_blocked!
if current_user && current_user.blocked
sign_out current_user
flash[:alert] = "Your account was blocked"
flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
redirect_to new_user_session_path
end
end
......@@ -42,7 +43,7 @@ class ApplicationController < ActionController::Base
def after_sign_in_path_for resource
if resource.is_a?(User) && resource.respond_to?(:blocked) && resource.blocked
sign_out resource
flash[:alert] = "Your account was blocked"
flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
new_user_session_path
else
super
......@@ -63,11 +64,19 @@ class ApplicationController < ActionController::Base
end
def project
@project ||= current_user.projects.find_by_code(params[:project_id] || params[:id])
@project || render_404
id = params[:project_id] || params[:id]
@project = Project.find_with_namespace(id)
if @project and can?(current_user, :read_project, @project)
@project
else
@project = nil
render_404
end
end
def add_project_abilities
def add_abilities
abilities << Ability
end
......@@ -103,6 +112,10 @@ class ApplicationController < ActionController::Base
render file: Rails.root.join("public", "404"), layout: false, status: "404"
end
def render_403
render file: Rails.root.join("public", "403"), layout: false, status: "403"
end
def require_non_empty_project
redirect_to @project if @project.empty_repo?
end
......
......@@ -26,7 +26,8 @@ class CommitController < ProjectResourceController
end
end
format.patch
format.diff { render text: @commit.to_diff }
format.patch { render text: @commit.to_patch }
end
end
end
This diff is collapsed.
......@@ -5,6 +5,9 @@ class GroupsController < ApplicationController
before_filter :group
before_filter :projects
# Authorize
before_filter :authorize_read_group!
def show
@events = Event.in_projects(project_ids).limit(20).offset(params[:offset] || 0)
@last_push = current_user.recent_push
......@@ -18,7 +21,7 @@ class GroupsController < ApplicationController
# Get authored or assigned open merge requests
def merge_requests
@merge_requests = current_user.cared_merge_requests
@merge_requests = current_user.cared_merge_requests.opened
@merge_requests = @merge_requests.of_group(@group).recent.page(params[:page]).per(20)
end
......@@ -44,20 +47,33 @@ class GroupsController < ApplicationController
end
def people
@users = group.users.all
@project = group.projects.find(params[:project_id]) if params[:project_id]
@users = @project ? @project.users : group.users
@users.sort_by!(&:name)
if @project
@team_member = @project.users_projects.new
end
end
protected
def group
@group ||= Group.find_by_code(params[:id])
@group ||= Group.find_by_path(params[:id])
end
def projects
@projects ||= current_user.projects_sorted_by_activity.where(group_id: @group.id)
@projects ||= group.projects.authorized_for(current_user).sorted_by_activity
end
def project_ids
projects.map(&:id)
end
# Dont allow unauthorized access to group
def authorize_read_group!
unless projects.present? or can?(current_user, :manage_group, @group)
return render_404
end
end
end
This diff is collapsed.
This diff is collapsed.
class ProjectResourceController < ApplicationController
before_filter :project
# Authorize
before_filter :add_project_abilities
end
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.
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