Skip to content
Snippets Groups Projects
Commit 264d25da authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Merge remote-tracking branch 'origin/master' into add-filter-sort-dropdown-to-dashboard-group-pages

parents c79c441c 22772871
No related branches found
No related tags found
No related merge requests found
Showing
with 130 additions and 75 deletions
Loading
Loading
@@ -33,12 +33,12 @@ table {
background-color: $background-color;
font-weight: normal;
font-size: 15px;
border-bottom: 1px solid $border-color !important;
border-bottom: 1px solid $border-color;
}
 
td {
border-color: $table-border-color !important;
border-bottom: 1px solid;
border-color: $table-border-color;
border-bottom: 1px solid $border-color;
}
}
}
Loading
Loading
Loading
Loading
@@ -114,22 +114,9 @@
*
*/
 
.container-blank .panel .panel-heading {
font-size: 17px;
line-height: 38px;
}
.panel {
box-shadow: none;
 
.panel-heading {
.panel-head-actions {
position: relative;
top: -5px;
float: right;
}
}
.panel-body {
form, pre {
margin: 0;
Loading
Loading
Loading
Loading
@@ -22,9 +22,9 @@ $brand-info: $gl-info;
$brand-warning: $gl-warning;
$brand-danger: $gl-danger;
 
$border-radius-base: 2px !default;
$border-radius-large: 2px !default;
$border-radius-small: 2px !default;
$border-radius-base: 3px !default;
$border-radius-large: 3px !default;
$border-radius-small: 3px !default;
 
 
//== Scaffolding
Loading
Loading
Loading
Loading
@@ -87,8 +87,8 @@
}
 
p {
color:#5c5d5e;
margin:6px 0 0 0;
color: #5c5d5e;
margin: 6px 0 0 0;
}
 
table {
Loading
Loading
@@ -102,11 +102,10 @@
}
 
pre {
margin: 12px 0 12px 0 !important;
background-color: #f8fafc;
font-size: 13px !important;
color: #5b6169;
line-height: 1.6em !important;
margin: 12px 0 12px 0;
font-size: 13px;
line-height: 1.6em;
overflow-x: auto;
@include border-radius(2px);
}
 
Loading
Loading
@@ -116,7 +115,7 @@
 
ul, ol {
padding: 0;
margin: 6px 0 6px 18px !important;
margin: 6px 0 6px 28px !important;
}
 
li {
Loading
Loading
@@ -204,11 +203,6 @@ h1, h2, h3, h4, h5, h6 {
pre {
font-family: $monospace_font;
 
&.dark {
background: #333;
color: $background-color;
}
&.plain-readme {
background: none;
border: none;
Loading
Loading
Loading
Loading
@@ -10,8 +10,8 @@
}
 
// Code itself
pre.code {
border-left: 1px solid #666;
pre.code, .diff-line-num {
border-color: #666;
}
 
&, pre.code, .line_holder .line_content {
Loading
Loading
@@ -22,11 +22,11 @@
// Diff line
.line_holder {
.diff-line-num.new, .line_content.new {
@include diff_background(rgba(51, 255, 51, 0.1), rgba(51, 255, 51, 0.3), #808080);
@include diff_background(rgba(51, 255, 51, 0.1), rgba(51, 255, 51, 0.2), #808080);
}
 
.diff-line-num.old, .line_content.old {
@include diff_background(rgba(255, 51, 51, 0.2), rgba(255, 51, 51, 0.3), #808080);
@include diff_background(rgba(255, 51, 51, 0.2), rgba(255, 51, 51, 0.25), #808080);
}
 
.line_content.match {
Loading
Loading
Loading
Loading
@@ -10,8 +10,8 @@
}
 
// Code itself
pre.code {
border-left: 1px solid #555;
pre.code, .diff-line-num {
border-color: #555;
}
 
&, pre.code, .line_holder .line_content {
Loading
Loading
@@ -22,11 +22,11 @@
// Diff line
.line_holder {
.diff-line-num.new, .line_content.new {
@include diff_background(rgba(166, 226, 46, 0.2), rgba(166, 226, 46, 0.3), #808080);
@include diff_background(rgba(166, 226, 46, 0.1), rgba(166, 226, 46, 0.15), #808080);
}
 
.diff-line-num.old, .line_content.old {
@include diff_background(rgba(254, 147, 140, 0.2), rgba(254, 147, 140, 0.3), #808080);
@include diff_background(rgba(254, 147, 140, 0.15), rgba(254, 147, 140, 0.2), #808080);
}
 
.line_content.match {
Loading
Loading
Loading
Loading
@@ -10,8 +10,8 @@
}
 
// Code itself
pre.code {
border-left: 1px solid #113b46;
pre.code, .diff-line-num {
border-color: #113b46;
}
 
&, pre.code, .line_holder .line_content {
Loading
Loading
@@ -22,11 +22,11 @@
// Diff line
.line_holder {
.diff-line-num.new, .line_content.new {
@include diff_background(rgba(133, 153, 0, 0.2), rgba(133, 153, 0, 0.3), #808080);
@include diff_background(rgba(133, 153, 0, 0.15), rgba(133, 153, 0, 0.25), #113b46);
}
 
.diff-line-num.old, .line_content.old {
@include diff_background(rgba(220, 50, 47, 0.2), rgba(220, 50, 47, 0.3), #808080);
@include diff_background(rgba(220, 50, 47, 0.3), rgba(220, 50, 47, 0.25), #113b46);
}
 
.line_content.match {
Loading
Loading
Loading
Loading
@@ -10,8 +10,8 @@
}
 
// Code itself
pre.code {
border-left: 1px solid #c5d0d4;
pre.code, .diff-line-num {
border-color: #c5d0d4;
}
 
&, pre.code, .line_holder .line_content {
Loading
Loading
@@ -22,11 +22,11 @@
// Diff line
.line_holder {
.diff-line-num.new, .line_content.new {
@include diff_background(rgba(133, 153, 0, 0.2), rgba(133, 153, 0, 0.3), #FAF3DD);
@include diff_background(rgba(133, 153, 0, 0.2), rgba(133, 153, 0, 0.25), #c5d0d4);
}
 
.diff-line-num.old, .line_content.old {
@include diff_background(rgba(220, 50, 47, 0.2), rgba(220, 50, 47, 0.3), #FAF3DD);
@include diff_background(rgba(220, 50, 47, 0.2), rgba(220, 50, 47, 0.25), #c5d0d4);
}
 
.line_content.match {
Loading
Loading
Loading
Loading
@@ -10,8 +10,8 @@
}
 
// Code itself
pre.code {
border-left: 1px solid $border-color;
pre.code, .diff-line-num {
border-color: $border-color;
}
 
&, pre.code, .line_holder .line_content {
Loading
Loading
Loading
Loading
@@ -79,10 +79,8 @@
margin: 0px;
padding: 0px;
border: none;
background: $background-color;
color: rgba(0, 0, 0, 0.3);
padding: 0px 5px;
border-right: 1px solid $border-color;
border-right: 1px solid;
text-align: right;
min-width: 35px;
max-width: 50px;
Loading
Loading
@@ -92,7 +90,6 @@
float: left;
width: 35px;
font-weight: normal;
color: rgba(0, 0, 0, 0.3);
&:hover {
text-decoration: underline;
}
Loading
Loading
.member-search-form {
float: left;
input[type='search'] {
width: 225px;
vertical-align: bottom;
@media (max-width: $screen-xs-max) {
width: 100px;
vertical-align: bottom;
}
}
}
 
.milestone-row {
Loading
Loading
Loading
Loading
@@ -49,11 +49,6 @@
.issue-search-form {
margin: 0;
height: 24px;
.issue_search {
border: 1px solid #DDD !important;
background-color: #f4f4f4;
}
}
 
form.edit-issue {
Loading
Loading
Loading
Loading
@@ -154,6 +154,7 @@ ul.notes {
text-align: center;
padding: 10px 0;
background: #FFF;
color: $text-color;
}
&.notes_line2 {
text-align: center;
Loading
Loading
Loading
Loading
@@ -526,3 +526,53 @@ pre.light-well {
color: #E62958;
margin-top: 2px;
}
/*
* Forks list rendered on Project's forks page
*/
.forks-top-block {
padding: 16px 0;
}
.projects-search-form {
.dropdown-toggle.btn {
margin-top: -3px;
}
&.fork-search-form {
margin: 0;
margin-top: -$gl-padding;
padding-bottom: 0;
input {
/* Small devices (tablets, 768px and up) */
@media (min-width: $screen-sm-min) { width: 180px; }
/* Medium devices (desktops, 992px and up) */
@media (min-width: $screen-md-min) { width: 350px; }
/* Large devices (large desktops, 1200px and up) */
@media (min-width: $screen-lg-min) { width: 400px; }
}
.sort-forks {
width: 160px;
}
.fork-link {
float: right;
margin-left: $gl-padding;
}
}
}
.private-forks-notice .private-fork-icon {
i:nth-child(1) {
color: #2AA056;
}
i:nth-child(2) {
color: #FFFFFF;
}
}
Loading
Loading
@@ -22,8 +22,6 @@
&:hover {
td {
background: $hover;
border-top: 1px solid #ADF;
border-bottom: 1px solid #ADF;
}
cursor: pointer;
}
Loading
Loading
Loading
Loading
@@ -74,8 +74,6 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:metrics_timeout,
:metrics_method_call_threshold,
:metrics_sample_interval,
:ip_blocking_enabled,
:dnsbl_servers_list,
:recaptcha_enabled,
:recaptcha_site_key,
:recaptcha_private_key,
Loading
Loading
Loading
Loading
@@ -298,7 +298,8 @@ class ApplicationController < ActionController::Base
end
 
def set_filters_params
params[:sort] ||= 'id_desc'
set_default_sort
params[:scope] = 'all' if params[:scope].blank?
params[:state] = 'opened' if params[:state].blank?
 
Loading
Loading
@@ -405,4 +406,24 @@ class ApplicationController < ActionController::Base
 
current_user.nil? && root_path == request.path
end
private
def set_default_sort
key = if is_a_listing_page_for?('issues') || is_a_listing_page_for?('merge_requests')
'issuable_sort'
end
cookies[key] = params[:sort] if key && params[:sort].present?
params[:sort] = cookies[key] if key
params[:sort] ||= 'id_desc'
end
def is_a_listing_page_for?(page_type)
controller_name, action_name = params.values_at(:controller, :action)
(controller_name == "projects/#{page_type}" && action_name == 'index') ||
(controller_name == 'groups' && action_name == page_type) ||
(controller_name == 'dashboard' && action_name == page_type)
end
end
Loading
Loading
@@ -23,14 +23,14 @@ class DashboardController < Dashboard::ApplicationController
protected
 
def load_events
project_ids =
projects =
if params[:filter] == "starred"
current_user.starred_projects
else
current_user.authorized_projects
end.pluck(:id)
end
 
@events = Event.in_projects(project_ids)
@events = Event.in_projects(projects)
@events = @event_filter.apply_filter(@events).with_associations
@events = @events.limit(20).offset(params[:offset] || 0)
end
Loading
Loading
Loading
Loading
@@ -2,8 +2,9 @@ class GroupsController < Groups::ApplicationController
include IssuesAction
include MergeRequestsAction
 
skip_before_action :authenticate_user!, only: [:index, :show, :activity, :issues, :merge_requests]
respond_to :html
skip_before_action :authenticate_user!, only: [:index, :show, :activity, :issues, :merge_requests]
before_action :find_group, except: [:index, :new, :create]
 
# Authorize
Loading
Loading
@@ -11,6 +12,7 @@ class GroupsController < Groups::ApplicationController
before_action :authorize_admin_group!, only: [:edit, :update, :destroy]
before_action :authorize_create_group!, only: [:new, :create]
 
# Load group projects
before_action :find_projects, only: [:activity, :issues, :merge_requests]
before_action :event_filter, only: :activity
 
Loading
Loading
@@ -79,6 +81,7 @@ class GroupsController < Groups::ApplicationController
 
def find_group
@group ||= Group.find_by(path: params[:id])
@group || render_404
end
 
# Dont allow unauthorized access to group
Loading
Loading
Loading
Loading
@@ -21,15 +21,16 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
# We only find ourselves here
# if the authentication to LDAP was successful.
def ldap
@user = Gitlab::LDAP::User.new(oauth)
@user.save if @user.changed? # will also save new users
gl_user = @user.gl_user
gl_user.remember_me = params[:remember_me] if @user.persisted?
ldap_user = Gitlab::LDAP::User.new(oauth)
ldap_user.save if ldap_user.changed? # will also save new users
@user = ldap_user.gl_user
@user.remember_me = params[:remember_me] if ldap_user.persisted?
 
# Do additional LDAP checks for the user filter and EE features
if @user.allowed?
log_audit_event(gl_user, with: :ldap)
sign_in_and_redirect(gl_user)
if ldap_user.allowed?
log_audit_event(@user, with: :ldap)
sign_in_and_redirect(@user)
else
flash[:alert] = "Access denied for your LDAP account."
redirect_to new_user_session_path
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment