Commit 5b3345a0 authored by Dennis Tang's avatar Dennis Tang

Merge remote-tracking branch 'origin/master' into 43446-new-cluster-page-tabs

# Conflicts:
#	app/views/projects/_merge_request_merge_method_settings.html.haml
parents abad4ff0 f153faa8
...@@ -144,6 +144,9 @@ gem 'truncato', '~> 0.7.9' ...@@ -144,6 +144,9 @@ gem 'truncato', '~> 0.7.9'
gem 'bootstrap_form', '~> 2.7.0' gem 'bootstrap_form', '~> 2.7.0'
gem 'nokogiri', '~> 1.8.2' gem 'nokogiri', '~> 1.8.2'
# Calendar rendering
gem 'icalendar'
# Diffs # Diffs
gem 'diffy', '~> 3.1.0' gem 'diffy', '~> 3.1.0'
......
...@@ -410,6 +410,7 @@ GEM ...@@ -410,6 +410,7 @@ GEM
httpclient (2.8.3) httpclient (2.8.3)
i18n (0.9.5) i18n (0.9.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
icalendar (2.4.1)
ice_nine (0.11.2) ice_nine (0.11.2)
influxdb (0.2.3) influxdb (0.2.3)
cause cause
...@@ -1060,6 +1061,7 @@ DEPENDENCIES ...@@ -1060,6 +1061,7 @@ DEPENDENCIES
html-pipeline (~> 2.7.1) html-pipeline (~> 2.7.1)
html2text html2text
httparty (~> 0.13.3) httparty (~> 0.13.3)
icalendar
influxdb (~> 0.2) influxdb (~> 0.2)
jira-ruby (~> 1.4) jira-ruby (~> 1.4)
jquery-atwho-rails (~> 1.3.2) jquery-atwho-rails (~> 1.3.2)
......
...@@ -126,7 +126,6 @@ export default { ...@@ -126,7 +126,6 @@ export default {
</div> </div>
<form <form
v-if="!isCompact" v-if="!isCompact"
class="form-horizontal"
@submit.prevent.stop="commitChanges" @submit.prevent.stop="commitChanges"
ref="formEl" ref="formEl"
> >
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
ref="form" ref="form"
:action="deleteWikiUrl" :action="deleteWikiUrl"
method="post" method="post"
class="form-horizontal js-requires-input" class="js-requires-input"
> >
<input <input
ref="method" ref="method"
......
...@@ -148,8 +148,14 @@ table { ...@@ -148,8 +148,14 @@ table {
} }
} }
.nav-tabs .nav-link { .nav-tabs {
.nav-link {
border: 0; border: 0;
}
.nav-item {
margin-bottom: 0;
}
} }
pre code { pre code {
......
...@@ -169,13 +169,16 @@ ...@@ -169,13 +169,16 @@
color: $color-800; color: $color-800;
} }
.nav-links li a.active { .nav-links li {
&.active a,
a.active {
border-bottom: 2px solid $color-500; border-bottom: 2px solid $color-500;
.badge.badge-pill { .badge.badge-pill {
font-weight: $gl-font-weight-bold; font-weight: $gl-font-weight-bold;
} }
} }
}
.branch-header-title { .branch-header-title {
color: $color-700; color: $color-700;
......
...@@ -31,8 +31,10 @@ ...@@ -31,8 +31,10 @@
color: $black; color: $black;
} }
} }
}
&.active { &.active a,
a.active {
color: $black; color: $black;
font-weight: $gl-font-weight-bold; font-weight: $gl-font-weight-bold;
...@@ -41,7 +43,6 @@ ...@@ -41,7 +43,6 @@
} }
} }
} }
}
} }
.top-area { .top-area {
......
...@@ -49,26 +49,11 @@ ...@@ -49,26 +49,11 @@
margin-top: 15px; margin-top: 15px;
} }
.snippet-embed-input {
height: 35px;
}
.embed-snippet { .embed-snippet {
padding-right: 0; padding-right: 0;
padding-top: $gl-padding; padding-top: $gl-padding;
.form-control {
cursor: auto;
width: 101%;
margin-left: -1px;
}
.embed-toggle-list li button { .embed-toggle-list li button {
padding: 8px 40px; padding: 8px 40px;
} }
.embed-toggle,
.snippet-clipboard-btn {
height: 35px;
}
} }
...@@ -373,6 +373,7 @@ $dropdown-chevron-size: 10px; ...@@ -373,6 +373,7 @@ $dropdown-chevron-size: 10px;
$dropdown-toggle-active-border-color: darken($border-color, 14%); $dropdown-toggle-active-border-color: darken($border-color, 14%);
$dropdown-item-hover-bg: $gray-darker; $dropdown-item-hover-bg: $gray-darker;
$dropdown-fade-mask-height: 32px; $dropdown-fade-mask-height: 32px;
$dropdown-member-form-control-width: 163px;
/* /*
* Filtered Search * Filtered Search
......
...@@ -36,13 +36,12 @@ ...@@ -36,13 +36,12 @@
} }
} }
.form-horizontal { .form-group {
margin-top: 20px; margin-bottom: 0;
@include media-breakpoint-up(sm) { @include media-breakpoint-down(sm) {
display: -webkit-flex; display: block;
display: flex; margin-left: 5px;
margin-top: 3px;
} }
} }
...@@ -62,10 +61,15 @@ ...@@ -62,10 +61,15 @@
} }
.member-form-control { .member-form-control {
@include media-breakpoint-down(xs) { @include media-breakpoint-down(sm) {
padding-bottom: 5px; width: $dropdown-member-form-control-width;
margin-left: 0; margin-left: 0;
padding-bottom: 5px;
}
@include media-breakpoint-down(xs) {
margin-right: 0; margin-right: 0;
width: auto;
} }
} }
...@@ -207,10 +211,6 @@ ...@@ -207,10 +211,6 @@
align-self: flex-start; align-self: flex-start;
} }
.form-horizontal ~ .btn {
margin-right: 0;
}
@include media-breakpoint-down(xs) { @include media-breakpoint-down(xs) {
display: block; display: block;
...@@ -220,6 +220,12 @@ ...@@ -220,6 +220,12 @@
display: block; display: block;
} }
.controls > .btn:last-child {
margin-left: 5px;
margin-right: 5px;
width: auto;
}
.form-control { .form-control {
width: 100%; width: 100%;
} }
...@@ -232,10 +238,6 @@ ...@@ -232,10 +238,6 @@
.member-controls { .member-controls {
margin-top: 5px; margin-top: 5px;
} }
.form-horizontal {
margin-top: 10px;
}
} }
} }
...@@ -259,10 +261,6 @@ ...@@ -259,10 +261,6 @@
margin-top: 0; margin-top: 0;
} }
.form-horizontal {
display: block;
}
.member-form-control { .member-form-control {
margin: 5px 0; margin: 5px 0;
} }
......
...@@ -17,10 +17,23 @@ module IssuesAction ...@@ -17,10 +17,23 @@ module IssuesAction
end end
# rubocop:enable Gitlab/ModuleWithInstanceVariables # rubocop:enable Gitlab/ModuleWithInstanceVariables
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def issues_calendar
@issues = issuables_collection
.non_archived
.with_due_date
.limit(100)
respond_to do |format|
format.ics { response.headers['Content-Disposition'] = 'inline' }
end
end
# rubocop:enable Gitlab/ModuleWithInstanceVariables
private private
def finder_type def finder_type
(super if defined?(super)) || (super if defined?(super)) ||
(IssuesFinder if action_name == 'issues') (IssuesFinder if %w(issues issues_calendar).include?(action_name))
end end
end end
...@@ -34,12 +34,12 @@ class ProfilesController < Profiles::ApplicationController ...@@ -34,12 +34,12 @@ class ProfilesController < Profiles::ApplicationController
redirect_to profile_personal_access_tokens_path redirect_to profile_personal_access_tokens_path
end end
def reset_rss_token def reset_feed_token
Users::UpdateService.new(current_user, user: @user).execute! do |user| Users::UpdateService.new(current_user, user: @user).execute! do |user|
user.reset_rss_token! user.reset_feed_token!
end end
flash[:notice] = "RSS token was successfully reset" flash[:notice] = 'Feed token was successfully reset'
redirect_to profile_personal_access_tokens_path redirect_to profile_personal_access_tokens_path
end end
......
...@@ -10,8 +10,8 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -10,8 +10,8 @@ class Projects::IssuesController < Projects::ApplicationController
before_action :whitelist_query_limiting, only: [:create, :create_merge_request, :move, :bulk_update] before_action :whitelist_query_limiting, only: [:create, :create_merge_request, :move, :bulk_update]
before_action :check_issues_available! before_action :check_issues_available!
before_action :issue, except: [:index, :new, :create, :bulk_update] before_action :issue, except: [:index, :calendar, :new, :create, :bulk_update]
before_action :set_issuables_index, only: [:index] before_action :set_issuables_index, only: [:index, :calendar]
# Allow write(create) issue # Allow write(create) issue
before_action :authorize_create_issue!, only: [:new, :create] before_action :authorize_create_issue!, only: [:new, :create]
...@@ -39,6 +39,17 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -39,6 +39,17 @@ class Projects::IssuesController < Projects::ApplicationController
end end
end end
def calendar
@issues = @issuables
.non_archived
.with_due_date
.limit(100)
respond_to do |format|
format.ics { response.headers['Content-Disposition'] = 'inline' }
end
end
def new def new
params[:issue] ||= ActionController::Parameters.new( params[:issue] ||= ActionController::Parameters.new(
assignee_ids: "" assignee_ids: ""
......
...@@ -75,6 +75,8 @@ class IssuesFinder < IssuableFinder ...@@ -75,6 +75,8 @@ class IssuesFinder < IssuableFinder
items = items.due_between(Date.today.beginning_of_week, Date.today.end_of_week) items = items.due_between(Date.today.beginning_of_week, Date.today.end_of_week)
elsif filter_by_due_this_month? elsif filter_by_due_this_month?
items = items.due_between(Date.today.beginning_of_month, Date.today.end_of_month) items = items.due_between(Date.today.beginning_of_month, Date.today.end_of_month)
elsif filter_by_due_next_month_and_previous_two_weeks?
items = items.due_between(Date.today - 2.weeks, (Date.today + 1.month).end_of_month)
end end
end end
...@@ -97,6 +99,10 @@ class IssuesFinder < IssuableFinder ...@@ -97,6 +99,10 @@ class IssuesFinder < IssuableFinder
due_date? && params[:due_date] == Issue::DueThisMonth.name due_date? && params[:due_date] == Issue::DueThisMonth.name
end end
def filter_by_due_next_month_and_previous_two_weeks?
due_date? && params[:due_date] == Issue::DueNextMonthAndPreviousTwoWeeks.name
end
def due_date? def due_date?
params[:due_date].present? params[:due_date].present?
end end
......
module CalendarHelper
def calendar_url_options
{ format: :ics,
feed_token: current_user.try(:feed_token),
due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name,
sort: 'closest_future_date' }
end
end
module RssHelper module RssHelper
def rss_url_options def rss_url_options
{ format: :atom, rss_token: current_user.try(:rss_token) } { format: :atom, feed_token: current_user.try(:feed_token) }
end end
end end
...@@ -97,8 +97,6 @@ module Issuable ...@@ -97,8 +97,6 @@ module Issuable
strip_attributes :title strip_attributes :title
after_save :ensure_metrics, unless: :imported?
# We want to use optimistic lock for cases when only title or description are involved # We want to use optimistic lock for cases when only title or description are involved
# http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html # http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html
def locking_enabled? def locking_enabled?
......
...@@ -20,6 +20,7 @@ class Issue < ActiveRecord::Base ...@@ -20,6 +20,7 @@ class Issue < ActiveRecord::Base
Overdue = DueDateStruct.new('Overdue', 'overdue').freeze Overdue = DueDateStruct.new('Overdue', 'overdue').freeze
DueThisWeek = DueDateStruct.new('Due This Week', 'week').freeze DueThisWeek = DueDateStruct.new('Due This Week', 'week').freeze
DueThisMonth = DueDateStruct.new('Due This Month', 'month').freeze DueThisMonth = DueDateStruct.new('Due This Month', 'month').freeze
DueNextMonthAndPreviousTwoWeeks = DueDateStruct.new('Due Next Month And Previous Two Weeks', 'next_month_and_previous_two_weeks').freeze
belongs_to :project belongs_to :project
belongs_to :moved_to, class_name: 'Issue' belongs_to :moved_to, class_name: 'Issue'
...@@ -46,6 +47,7 @@ class Issue < ActiveRecord::Base ...@@ -46,6 +47,7 @@ class Issue < ActiveRecord::Base
scope :unassigned, -> { where('NOT EXISTS (SELECT TRUE FROM issue_assignees WHERE issue_id = issues.id)') } scope :unassigned, -> { where('NOT EXISTS (SELECT TRUE FROM issue_assignees WHERE issue_id = issues.id)') }
scope :assigned_to, ->(u) { where('EXISTS (SELECT TRUE FROM issue_assignees WHERE user_id = ? AND issue_id = issues.id)', u.id)} scope :assigned_to, ->(u) { where('EXISTS (SELECT TRUE FROM issue_assignees WHERE user_id = ? AND issue_id = issues.id)', u.id)}
scope :with_due_date, -> { where('due_date IS NOT NULL') }
scope :without_due_date, -> { where(due_date: nil) } scope :without_due_date, -> { where(due_date: nil) }
scope :due_before, ->(date) { where('issues.due_date < ?', date) } scope :due_before, ->(date) { where('issues.due_date < ?', date) }
scope :due_between, ->(from_date, to_date) { where('issues.due_date >= ?', from_date).where('issues.due_date <= ?', to_date) } scope :due_between, ->(from_date, to_date) { where('issues.due_date >= ?', from_date).where('issues.due_date <= ?', to_date) }
...@@ -53,12 +55,14 @@ class Issue < ActiveRecord::Base ...@@ -53,12 +55,14 @@ class Issue < ActiveRecord::Base
scope :order_due_date_asc, -> { reorder('issues.due_date IS NULL, issues.due_date ASC') } scope :order_due_date_asc, -> { reorder('issues.due_date IS NULL, issues.due_date ASC') }
scope :order_due_date_desc, -> { reorder('issues.due_date IS NULL, issues.due_date DESC') } scope :order_due_date_desc, -> { reorder('issues.due_date IS NULL, issues.due_date DESC') }
scope :order_closest_future_date, -> { reorder('CASE WHEN due_date >= CURRENT_DATE THEN 0 ELSE 1 END ASC, ABS(CURRENT_DATE - due_date) ASC') }
scope :preload_associations, -> { preload(:labels, project: :namespace) } scope :preload_associations, -> { preload(:labels, project: :namespace) }
scope :public_only, -> { where(confidential: false) } scope :public_only, -> { where(confidential: false) }
after_save :expire_etag_cache after_save :expire_etag_cache
after_save :ensure_metrics, unless: :imported?
attr_spammable :title, spam_title: true attr_spammable :title, spam_title: true
attr_spammable :description, spam_description: true attr_spammable :description, spam_description: true
...@@ -119,6 +123,7 @@ class Issue < ActiveRecord::Base ...@@ -119,6 +123,7 @@ class Issue < ActiveRecord::Base
def self.sort_by_attribute(method, excluded_labels: []) def self.sort_by_attribute(method, excluded_labels: [])
case method.to_s case method.to_s
when 'closest_future_date' then order_closest_future_date
when 'due_date' then order_due_date_asc when 'due_date' then order_due_date_asc
when 'due_date_asc' then order_due_date_asc when 'due_date_asc' then order_due_date_asc
when 'due_date_desc' then order_due_date_desc when 'due_date_desc' then order_due_date_desc
......
...@@ -58,6 +58,7 @@ class MergeRequest < ActiveRecord::Base ...@@ -58,6 +58,7 @@ class MergeRequest < ActiveRecord::Base
after_create :ensure_merge_request_diff, unless: :importing? after_create :ensure_merge_request_diff, unless: :importing?
after_update :clear_memoized_shas after_update :clear_memoized_shas
after_update :reload_diff_if_branch_changed after_update :reload_diff_if_branch_changed
after_save :ensure_metrics
# When this attribute is true some MR validation is ignored # When this attribute is true some MR validation is ignored
# It allows us to close or modify broken merge requests # It allows us to close or modify broken merge requests
......
...@@ -26,7 +26,7 @@ class User < ActiveRecord::Base ...@@ -26,7 +26,7 @@ class User < ActiveRecord::Base
ignore_column :authentication_token ignore_column :authentication_token
add_authentication_token_field :incoming_email_token add_authentication_token_field :incoming_email_token
add_authentication_token_field :rss_token add_authentication_token_field :feed_token
default_value_for :admin, false default_value_for :admin, false
default_value_for(:external) { Gitlab::CurrentSettings.user_default_external } default_value_for(:external) { Gitlab::CurrentSettings.user_default_external }
...@@ -1167,11 +1167,11 @@ class User < ActiveRecord::Base ...@@ -1167,11 +1167,11 @@ class User < ActiveRecord::Base
save save
end end
# each existing user needs to have an `rss_token`. # each existing user needs to have an `feed_token`.
# we do this on read since migrating all existing users is not a feasible # we do this on read since migrating all existing users is not a feasible
# solution. # solution.
def rss_token def feed_token
ensure_rss_token! ensure_feed_token!
end end
def sync_attribute?(attribute) def sync_attribute?(attribute)
......
class CommitStatusPresenter < Gitlab::View::Presenter::Delegated class CommitStatusPresenter < Gitlab::View::Presenter::Delegated
CALLOUT_FAILURE_MESSAGES = { CALLOUT_FAILURE_MESSAGES = {
unknown_failure: 'There is an unknown failure, please try again', unknown_failure: 'There is an unknown failure, please try again',
script_failure: 'There has been a script failure. Check the job log for more information',
api_failure: 'There has been an API failure, please try again', api_failure: 'There has been an API failure, please try again',
stuck_or_timeout_failure: 'There has been a timeout failure or the job got stuck. Check your timeout limits or try again', stuck_or_timeout_failure: 'There has been a timeout failure or the job got stuck. Check your timeout limits or try again',
runner_system_failure: 'There has been a runner system failure, please try again', runner_system_failure: 'There has been a runner system failure, please try again',
missing_dependency_failure: 'There has been a missing dependency failure, check the job log for more information' missing_dependency_failure: 'There has been a missing dependency failure'
}.freeze }.freeze
presents :build presents :build
......
...@@ -26,7 +26,7 @@ class JobEntity < Grape::Entity ...@@ -26,7 +26,7 @@ class JobEntity < Grape::Entity
expose :created_at expose :created_at
expose :updated_at expose :updated_at
expose :detailed_status, as: :status, with: StatusEntity expose :detailed_status, as: :status, with: StatusEntity
expose :callout_message, if: -> (*) { failed? } expose :callout_message, if: -> (*) { failed? && !build.script_failure? }
expose :recoverable, if: -> (*) { failed? } expose :recoverable, if: -> (*) { failed? }
private private
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :gravatar_enabled do = f.check_box :gravatar_enabled, class: 'form-check-input'
= f.check_box :gravatar_enabled = f.label :gravatar_enabled, class: 'form-check-label' do
Gravatar enabled Gravatar enabled
.form-group.row .form-group.row
= f.label :default_projects_limit, class: 'col-form-label col-sm-2' = f.label :default_projects_limit, class: 'col-form-label col-sm-2'
...@@ -25,15 +25,15 @@ ...@@ -25,15 +25,15 @@
= f.label :user_oauth_applications, 'User OAuth applications', class: 'col-form-label col-sm-2' = f.label :user_oauth_applications, 'User OAuth applications', class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.form-check .form-check
= f.label :user_oauth_applications do = f.check_box :user_oauth_applications, class: 'form-check-input'
= f.check_box :user_oauth_applications = f.label :user_oauth_applications, class: 'form-check-label' do
Allow users to register any application to use GitLab as an OAuth provider Allow users to register any application to use GitLab as an OAuth provider
.form-group.row .form-group.row
= f.label :user_default_external, 'New users set to external', class: 'col-form-label col-sm-2' = f.label :user_default_external, 'New users set to external', class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.form-check .form-check
= f.label :user_default_external do = f.check_box :user_default_external, class: 'form-check-input'
= f.check_box :user_default_external = f.label :user_default_external, class: 'form-check-label' do
Newly registered users will by default be external Newly registered users will by default be external
= f.submit 'Save changes', class: 'btn btn-success' = f.submit 'Save changes', class: 'btn btn-success'
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :sidekiq_throttling_enabled do = f.check_box :sidekiq_throttling_enabled, class: 'form-check-input'
= f.check_box :sidekiq_throttling_enabled = f.label :sidekiq_throttling_enabled, class: 'form-check-label' do
Enable Sidekiq Job Throttling Enable Sidekiq Job Throttling
.form-text.text-muted .form-text.text-muted
Limit the amount of resources slow running jobs are assigned. Limit the amount of resources slow running jobs are assigned.
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :auto_devops_enabled do = f.check_box :auto_devops_enabled, class: 'form-check-input'
= f.check_box :auto_devops_enabled = f.label :auto_devops_enabled, class: 'form-check-label' do
Enabled Auto DevOps for projects by default Enabled Auto DevOps for projects by default
.form-text.text-muted .form-text.text-muted
It will automatically build, test, and deploy applications based on a predefined CI/CD configuration It will automatically build, test, and deploy applications based on a predefined CI/CD configuration
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :shared_runners_enabled do = f.check_box :shared_runners_enabled, class: 'form-check-input'
= f.check_box :shared_runners_enabled = f.label :shared_runners_enabled, class: 'form-check-label' do
Enable shared runners for new projects Enable shared runners for new projects
.form-group.row .form-group.row
= f.label :shared_runners_text, class: 'col-form-label col-sm-2' = f.label :shared_runners_text, class: 'col-form-label col-sm-2'
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :email_author_in_body do = f.check_box :email_author_in_body, class: 'form-check-input'
= f.check_box :email_author_in_body = f.label :email_author_in_body, class: 'form-check-label' do
Include author name in notification email body Include author name in notification email body
.form-text.text-muted .form-text.text-muted
Some email servers do not support overriding the email sender name. Some email servers do not support overriding the email sender name.
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :html_emails_enabled do = f.check_box :html_emails_enabled, class: 'form-check-input'
= f.check_box :html_emails_enabled = f.label :html_emails_enabled, class: 'form-check-label' do
Enable HTML emails Enable HTML emails
.form-text.text-muted .form-text.text-muted
By default GitLab sends emails in HTML and plain text formats so mail By default GitLab sends emails in HTML and plain text formats so mail
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :help_page_hide_commercial_content do = f.check_box :help_page_hide_commercial_content, class: 'form-check-input'
= f.check_box :help_page_hide_commercial_content = f.label :help_page_hide_commercial_content, class: 'form-check-label' do
Hide marketing-related entries from help Hide marketing-related entries from help
.form-group.row .form-group.row
= f.label :help_page_support_url, 'Support page URL', class: 'col-form-label col-sm-2' = f.label :help_page_support_url, 'Support page URL', class: 'col-form-label col-sm-2'
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :metrics_enabled do = f.check_box :metrics_enabled, class: 'form-check-input'
= f.check_box :metrics_enabled = f.label :metrics_enabled, class: 'form-check-label' do
Enable InfluxDB Metrics Enable InfluxDB Metrics
.form-group.row .form-group.row
= f.label :metrics_host, 'InfluxDB host', class: 'col-form-label col-sm-2' = f.label :metrics_host, 'InfluxDB host', class: 'col-form-label col-sm-2'
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :throttle_unauthenticated_enabled do = f.check_box :throttle_unauthenticated_enabled, class: 'form-check-input'
= f.check_box :throttle_unauthenticated_enabled = f.label :throttle_unauthenticated_enabled, class: 'form-check-label' do
Enable unauthenticated request rate limit Enable unauthenticated request rate limit
%span.form-text.text-muted %span.form-text.text-muted
Helps reduce request volume (e.g. from crawlers or abusive bots) Helps reduce request volume (e.g. from crawlers or abusive bots)
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :throttle_authenticated_api_enabled do = f.check_box :throttle_authenticated_api_enabled, class: 'form-check-input'
= f.check_box :throttle_authenticated_api_enabled = f.label :throttle_authenticated_api_enabled, class: 'form-check-label' do
Enable authenticated API request rate limit Enable authenticated API request rate limit
%span.form-text.text-muted %span.form-text.text-muted
Helps reduce request volume (e.g. from crawlers or abusive bots) Helps reduce request volume (e.g. from crawlers or abusive bots)
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :throttle_authenticated_web_enabled do = f.check_box :throttle_authenticated_web_enabled, class: 'form-check-input'
= f.check_box :throttle_authenticated_web_enabled = f.label :throttle_authenticated_web_enabled, class: 'form-check-label' do
Enable authenticated web request rate limit Enable authenticated web request rate limit
%span.form-text.text-muted %span.form-text.text-muted
Helps reduce request volume (e.g. from crawlers or abusive bots) Helps reduce request volume (e.g. from crawlers or abusive bots)
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :koding_enabled do = f.check_box :koding_enabled, class: 'form-check-input'
= f.check_box :koding_enabled = f.label :koding_enabled, class: 'form-check-label' do
Enable Koding Enable Koding
.form-text.text-muted .form-text.text-muted
Koding integration has been deprecated since GitLab 10.0. If you disable your Koding integration, you will not be able to enable it again. Koding integration has been deprecated since GitLab 10.0. If you disable your Koding integration, you will not be able to enable it again.
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :sentry_enabled do = f.check_box :sentry_enabled, class: 'form-check-input'
= f.check_box :sentry_enabled = f.label :sentry_enabled, class: 'form-check-label' do
Enable Sentry Enable Sentry
.form-text.text-muted .form-text.text-muted
%p This setting requires a restart to take effect. %p This setting requires a restart to take effect.
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :clientside_sentry_enabled do = f.check_box :clientside_sentry_enabled, class: 'form-check-input'
= f.check_box :clientside_sentry_enabled = f.label :clientside_sentry_enabled, class: 'form-check-label' do
Enable Clientside Sentry Enable Clientside Sentry
.form-text.text-muted .form-text.text-muted
Sentry can also be used for reporting and logging clientside exceptions. Sentry can also be used for reporting and logging clientside exceptions.
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :allow_local_requests_from_hooks_and_services do = f.check_box :allow_local_requests_from_hooks_and_services, class: 'form-check-input'
= f.check_box :allow_local_requests_from_hooks_and_services = f.label :allow_local_requests_from_hooks_and_services, class: 'form-check-label' do
Allow requests to the local network from hooks and services Allow requests to the local network from hooks and services
= f.submit 'Save changes', class: "btn btn-success" = f.submit 'Save changes', class: "btn btn-success"
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :pages_domain_verification_enabled do = f.check_box :pages_domain_verification_enabled, class: 'form-check-input'
= f.check_box :pages_domain_verification_enabled = f.label :pages_domain_verification_enabled, class: 'form-check-label' do
Require users to prove ownership of custom domains Require users to prove ownership of custom domains
.form-text.text-muted .form-text.text-muted
Domain verification is an essential security measure for public GitLab Domain verification is an essential security measure for public GitLab
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :authorized_keys_enabled do = f.check_box :authorized_keys_enabled, class: 'form-check-input'
= f.check_box :authorized_keys_enabled = f.label :authorized_keys_enabled, class: 'form-check-label' do
Write to "authorized_keys" file Write to "authorized_keys" file
.form-text.text-muted .form-text.text-muted
By default, we write to the "authorized_keys" file to support Git By default, we write to the "authorized_keys" file to support Git
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :performance_bar_enabled do = f.check_box :performance_bar_enabled, class: 'form-check-input'
= f.check_box :performance_bar_enabled = f.label :performance_bar_enabled, class: 'form-check-label' do
Enable the Performance Bar Enable the Performance Bar
.form-group.row .form-group.row
= f.label :performance_bar_allowed_group_path, 'Allowed group', class: 'col-form-label col-sm-2' = f.label :performance_bar_allowed_group_path, 'Allowed group', class: 'col-form-label col-sm-2'
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :plantuml_enabled do = f.check_box :plantuml_enabled, class: 'form-check-input'
= f.check_box :plantuml_enabled = f.label :plantuml_enabled, class: 'form-check-label' do
Enable PlantUML Enable PlantUML
.form-group.row .form-group.row
= f.label :plantuml_url, 'PlantUML URL', class: 'col-form-label col-sm-2' = f.label :plantuml_url, 'PlantUML URL', class: 'col-form-label col-sm-2'
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :prometheus_metrics_enabled do = f.check_box :prometheus_metrics_enabled, class: 'form-check-input'
= f.check_box :prometheus_metrics_enabled = f.label :prometheus_metrics_enabled, class: 'form-check-label' do
Enable Prometheus Metrics Enable Prometheus Metrics
- unless Gitlab::Metrics.metrics_folder_present? - unless Gitlab::Metrics.metrics_folder_present?
.form-text.text-muted .form-text.text-muted
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :repository_checks_enabled do = f.check_box :repository_checks_enabled, class: 'form-check-input'
= f.check_box :repository_checks_enabled = f.label :repository_checks_enabled, class: 'form-check-label' do
Enable Repository Checks Enable Repository Checks
.form-text.text-muted .form-text.text-muted
GitLab will periodically run GitLab will periodically run
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :housekeeping_enabled do = f.check_box :housekeeping_enabled, class: 'form-check-input'
= f.check_box :housekeeping_enabled = f.label :housekeeping_enabled, class: 'form-check-label' do
Enable automatic repository housekeeping (git repack, git gc) Enable automatic repository housekeeping (git repack, git gc)
.form-text.text-muted .form-text.text-muted
If you keep automatic housekeeping disabled for a long time Git If you keep automatic housekeeping disabled for a long time Git
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
repositories will use more disk space. We recommend to always leave repositories will use more disk space. We recommend to always leave
this enabled. this enabled.
.form-check .form-check
= f.label :housekeeping_bitmaps_enabled do = f.check_box :housekeeping_bitmaps_enabled, class: 'form-check-input'
= f.check_box :housekeeping_bitmaps_enabled = f.label :housekeeping_bitmaps_enabled, class: 'form-check-label' do
Enable Git pack file bitmap creation Enable Git pack file bitmap creation
.form-text.text-muted .form-text.text-muted
Creating pack file bitmaps makes housekeeping take a little longer but Creating pack file bitmaps makes housekeeping take a little longer but
......
= form_for @application_setting, url: admin_application_settings_path, html: { class: 'form-horizontal fieldset-form' } do |f| = form_for @application_setting, url: admin_application_settings_path do |f|
= form_errors(@application_setting) = form_errors(@application_setting)
%fieldset %fieldset
.form-group .form-group.row
= f.label :mirror_available, 'Enable mirror configuration', class: 'control-label col-sm-2' = f.label :mirror_available, 'Enable mirror configuration', class: 'control-label col-sm-4'
.col-sm-10 .col-sm-8
.form-check .form-check
= f.label :mirror_available do = f.check_box :mirror_available, class: 'form-check-input'
= f.check_box :mirror_available = f.label :mirror_available, class: 'form-check-label' do
Allow mirrors to be setup for projects Allow mirrors to be setup for projects
%span.form-text.text-muted %span.form-text.text-muted
If disabled, only admins will be able to setup mirrors in projects. If disabled, only admins will be able to setup mirrors in projects.
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :hashed_storage_enabled do = f.check_box :hashed_storage_enabled, class: 'form-check-input'
= f.check_box :hashed_storage_enabled = f.label :hashed_storage_enabled, class: 'form-check-label' do
Create new projects using hashed storage paths Create new projects using hashed storage paths
.form-text.text-muted .form-text.text-muted
Enable immutable, hash-based paths and repository names to store repositories on disk. This prevents Enable immutable, hash-based paths and repository names to store repositories on disk. This prevents
......
...@@ -5,16 +5,16 @@ ...@@ -5,16 +5,16 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :password_authentication_enabled_for_web do = f.check_box :password_authentication_enabled_for_web, class: 'form-check-input'
= f.check_box :password_authentication_enabled_for_web = f.label :password_authentication_enabled_for_web, class: 'form-check-label' do
Password authentication enabled for web interface Password authentication enabled for web interface
.form-text.text-muted .form-text.text-muted
When disabled, an external authentication provider must be used. When disabled, an external authentication provider must be used.
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :password_authentication_enabled_for_git do = f.check_box :password_authentication_enabled_for_git, class: 'form-check-input'
= f.check_box :password_authentication_enabled_for_git = f.label :password_authentication_enabled_for_git, class: 'form-check-label' do
Password authentication enabled for Git over HTTP(S) Password authentication enabled for Git over HTTP(S)
.form-text.text-muted .form-text.text-muted
When disabled, a Personal Access Token When disabled, a Personal Access Token
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
= f.label :two_factor_authentication, 'Two-factor authentication', class: 'col-form-label col-sm-2' = f.label :two_factor_authentication, 'Two-factor authentication', class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.form-check .form-check
= f.label :require_two_factor_authentication do = f.check_box :require_two_factor_authentication, class: 'form-check-input'
= f.check_box :require_two_factor_authentication = f.label :require_two_factor_authentication, class: 'form-check-label' do
Require all users to setup Two-factor authentication Require all users to setup Two-factor authentication
.form-group.row .form-group.row
= f.label :two_factor_authentication, 'Two-factor grace period (hours)', class: 'col-form-label col-sm-2' = f.label :two_factor_authentication, 'Two-factor grace period (hours)', class: 'col-form-label col-sm-2'
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :signup_enabled do = f.check_box :signup_enabled, class: 'form-check-input'
= f.check_box :signup_enabled = f.label :signup_enabled, class: 'form-check-label' do
Sign-up enabled Sign-up enabled
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :send_user_confirmation_email do = f.check_box :send_user_confirmation_email, class: 'form-check-input'
= f.check_box :send_user_confirmation_email = f.label :send_user_confirmation_email, class: 'form-check-label' do
Send confirmation email on sign-up Send confirmation email on sign-up
.form-group.row .form-group.row
= f.label :domain_whitelist, 'Whitelisted domains for sign-ups', class: 'col-form-label col-sm-2' = f.label :domain_whitelist, 'Whitelisted domains for sign-ups', class: 'col-form-label col-sm-2'
...@@ -23,19 +23,19 @@ ...@@ -23,19 +23,19 @@
= f.label :domain_blacklist_enabled, 'Domain Blacklist', class: 'col-form-label col-sm-2' = f.label :domain_blacklist_enabled, 'Domain Blacklist', class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.form-check .form-check
= f.label :domain_blacklist_enabled do = f.check_box :domain_blacklist_enabled, class: 'form-check-input'
= f.check_box :domain_blacklist_enabled = f.label :domain_blacklist_enabled, class: 'form-check-label' do
Enable domain blacklist for sign ups Enable domain blacklist for sign ups
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= label_tag :blacklist_type_file do = radio_button_tag :blacklist_type, :file, class: 'form-check-input'
= radio_button_tag :blacklist_type, :file = label_tag :blacklist_type_file, class: 'form-check-label' do
.option-title .option-title
Upload blacklist file Upload blacklist file
.form-check .form-check
= label_tag :blacklist_type_raw do = radio_button_tag :blacklist_type, :raw, @application_setting.domain_blacklist.present? || @application_setting.domain_blacklist.blank?, class: 'form-check-input'
= radio_button_tag :blacklist_type, :raw, @application_setting.domain_blacklist.present? || @application_setting.domain_blacklist.blank? = label_tag :blacklist_type_raw, class: 'form-check-label' do
.option-title .option-title
Enter blacklist manually Enter blacklist manually
.form-group.row.blacklist-file .form-group.row.blacklist-file
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :recaptcha_enabled do = f.check_box :recaptcha_enabled, class: 'form-check-input'
= f.check_box :recaptcha_enabled = f.label :recaptcha_enabled, class: 'form-check-label' do
Enable reCAPTCHA Enable reCAPTCHA
%span.form-text.text-muted#recaptcha_help_block Helps prevent bots from creating accounts %span.form-text.text-muted#recaptcha_help_block Helps prevent bots from creating accounts
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :akismet_enabled do = f.check_box :akismet_enabled, class: 'form-check-input'
= f.check_box :akismet_enabled = f.label :akismet_enabled, class: 'form-check-label' do
Enable Akismet Enable Akismet
%span.form-text.text-muted#akismet_help_block Helps prevent bots from creating issues %span.form-text.text-muted#akismet_help_block Helps prevent bots from creating issues
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :unique_ips_limit_enabled do = f.check_box :unique_ips_limit_enabled, class: 'form-check-input'
= f.check_box :unique_ips_limit_enabled = f.label :unique_ips_limit_enabled, class: 'form-check-label' do
Limit sign in from multiple ips Limit sign in from multiple ips
%span.form-text.text-muted#unique_ip_help_block %span.form-text.text-muted#unique_ip_help_block
Helps prevent malicious users hide their activity Helps prevent malicious users hide their activity
......
= form_for @application_setting, url: admin_application_settings_path, html: { class: 'form-horizontal fieldset-form' } do |f| = form_for @application_setting, url: admin_application_settings_path do |f|
= form_errors(@application_setting) = form_errors(@application_setting)
%fieldset %fieldset
.form-group .form-group.row
.col-sm-12 .col-sm-12
.form-check .form-check
= f.label :enforce_terms do = f.check_box :enforce_terms, class: 'form-check-input'
= f.check_box :enforce_terms = f.label :enforce_terms, class: 'form-check-label' do
= _("Require all users to accept Terms of Service when they access GitLab.") = _("Require all users to accept Terms of Service when they access GitLab.")
.form-text.text-muted .form-text.text-muted
= _("When enabled, users cannot use GitLab until the terms have been accepted.") = _("When enabled, users cannot use GitLab until the terms have been accepted.")
.form-group .form-group.row
.col-sm-12 .col-sm-12
= f.label :terms do = f.label :terms do
= _("Terms of Service Agreement") = _("Terms of Service Agreement")
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :version_check_enabled do = f.check_box :version_check_enabled, class: 'form-check-input'
= f.check_box :version_check_enabled = f.label :version_check_enabled, class: 'form-check-label' do
Enable version check Enable version check
.form-text.text-muted .form-text.text-muted
GitLab will inform you if a new version is available. GitLab will inform you if a new version is available.
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
- can_be_configured = @application_setting.usage_ping_can_be_configured? - can_be_configured = @application_setting.usage_ping_can_be_configured?
.form-check .form-check
= f.label :usage_ping_enabled do = f.check_box :usage_ping_enabled, disabled: !can_be_configured, class: 'form-check-input'
= f.check_box :usage_ping_enabled, disabled: !can_be_configured = f.label :usage_ping_enabled, class: 'form-check-label' do
Enable usage ping Enable usage ping
.form-text.text-muted .form-text.text-muted
- if can_be_configured - if can_be_configured
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= f.label :project_export_enabled do = f.check_box :project_export_enabled, class: 'form-check-input'
= f.check_box :project_export_enabled = f.label :project_export_enabled, class: 'form-check-label' do
Project export enabled Project export enabled
.form-group.row .form-group.row
......
...@@ -47,6 +47,6 @@ ...@@ -47,6 +47,6 @@
.form-group .form-group
= form.label :enable_ssl_verification, 'SSL verification', class: 'label-light checkbox' = form.label :enable_ssl_verification, 'SSL verification', class: 'label-light checkbox'
.form-check .form-check
= form.label :enable_ssl_verification do = form.check_box :enable_ssl_verification, class: 'form-check-input'
= form.check_box :enable_ssl_verification = form.label :enable_ssl_verification, class: 'form-check-label' do
%strong Enable SSL verification %strong Enable SSL verification
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
.top-area .top-area
= render 'shared/issuable/nav', type: :issues, display_count: !@no_filters_set = render 'shared/issuable/nav', type: :issues, display_count: !@no_filters_set
.nav-controls .nav-controls
= link_to safe_params.merge(rss_url_options), class: 'btn has-tooltip', data: { container: 'body' }, title: 'Subscribe' do = render 'shared/issuable/feed_buttons'
= icon('rss')
= render 'shared/new_project_item_select', path: 'issues/new', label: "New issue", with_feature_enabled: 'issues', type: :issues = render 'shared/new_project_item_select', path: 'issues/new', label: "New issue", with_feature_enabled: 'issues', type: :issues
= render 'shared/issuable/filter', type: :issues = render 'shared/issuable/filter', type: :issues
......
= render 'issues/issues_calendar', issues: @issues
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
Mattermost Mattermost
.col-sm-10 .col-sm-10
.form-check.js-toggle-container .form-check.js-toggle-container
= f.label :create_chat_team do .js-toggle-button.form-check-input= f.check_box(:create_chat_team, { checked: true }, true, false)
.js-toggle-button= f.check_box(:create_chat_team, { checked: true }, true, false) = f.label :create_chat_team, class: 'form-check-label' do
Create a Mattermost team for this group Create a Mattermost team for this group
%br %br
%small.light.js-toggle-content %small.light.js-toggle-content
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
= f.label :lfs_enabled, 'Large File Storage', class: 'col-form-label col-sm-2' = f.label :lfs_enabled, 'Large File Storage', class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.form-check .form-check
= f.label :lfs_enabled do = f.check_box :lfs_enabled, checked: @group.lfs_enabled?, class: 'form-check-input'
= f.check_box :lfs_enabled, checked: @group.lfs_enabled? = f.label :lfs_enabled, class: 'form-check-label' do
%strong %strong
Allow projects within this group to use Git LFS Allow projects within this group to use Git LFS
= link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs') = link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs')
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
= f.label :require_two_factor_authentication, 'Two-factor authentication', class: 'col-form-label col-sm-2' = f.label :require_two_factor_authentication, 'Two-factor authentication', class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.form-check .form-check
= f.label :require_two_factor_authentication do = f.check_box :require_two_factor_authentication, class: 'form-check-input'
= f.check_box :require_two_factor_authentication = f.label :require_two_factor_authentication, class: 'form-check-label' do
%strong %strong
Require all users in this group to setup Two-factor authentication Require all users in this group to setup Two-factor authentication
= link_to icon('question-circle'), help_page_path('security/two_factor_authentication', anchor: 'enforcing-2fa-for-all-users-in-a-group') = link_to icon('question-circle'), help_page_path('security/two_factor_authentication', anchor: 'enforcing-2fa-for-all-users-in-a-group')
......
...@@ -8,10 +8,7 @@ ...@@ -8,10 +8,7 @@
.top-area .top-area
= render 'shared/issuable/nav', type: :issues = render 'shared/issuable/nav', type: :issues
.nav-controls .nav-controls
= link_to safe_params.merge(rss_url_options), class: 'btn' do = render 'shared/issuable/feed_buttons'
= icon('rss')
%span.icon-label
Subscribe
= render 'shared/new_project_item_select', path: 'issues/new', label: "New issue", type: :issues = render 'shared/new_project_item_select', path: 'issues/new', label: "New issue", type: :issues
= render 'shared/issuable/search_bar', type: :issues = render 'shared/issuable/search_bar', type: :issues
......
= render 'issues/issues_calendar', issues: @issues
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
= s_('GroupSettings|Share with group lock') = s_('GroupSettings|Share with group lock')
.col-sm-10 .col-sm-10
.form-check .form-check
= f.label :share_with_group_lock do = f.check_box :share_with_group_lock, disabled: !can_change_share_with_group_lock?(@group), class: 'form-check-input'
= f.check_box :share_with_group_lock, disabled: !can_change_share_with_group_lock?(@group) = f.label :share_with_group_lock, class: 'form-check-label' do
%strong %strong
- group_link = link_to @group.name, group_path(@group) - group_link = link_to @group.name, group_path(@group)
= s_('GroupSettings|Prevent sharing a project within %{group} with other groups').html_safe % { group: group_link } = s_('GroupSettings|Prevent sharing a project within %{group} with other groups').html_safe % { group: group_link }
......
...@@ -472,8 +472,8 @@ ...@@ -472,8 +472,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
%label %input.form-check-input{ :type => "checkbox" }/
%input{ :type => "checkbox" }/ %label.form-check-label
Remember me Remember me
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
...@@ -492,8 +492,8 @@ ...@@ -492,8 +492,8 @@
%label{ :for => "exampleInputPassword1" } Password %label{ :for => "exampleInputPassword1" } Password
%input#exampleInputPassword1.form-control{ :placeholder => "Password", :type => "password" }/ %input#exampleInputPassword1.form-control{ :placeholder => "Password", :type => "password" }/
.form-check .form-check
%label %input.form-check-input{ :type => "checkbox" }/
%input{ :type => "checkbox" }/ %label.form-check-label
Remember me Remember me
%button.btn.btn-default{ :type => "submit" } Sign in %button.btn.btn-default{ :type => "submit" } Sign in
......
cal = Icalendar::Calendar.new
cal.prodid = '-//GitLab//NONSGML GitLab//EN'
cal.x_wr_calname = 'GitLab Issues'
@issues.includes(project: :namespace).each do |issue|
cal.event do |event|
event.dtstart = Icalendar::Values::Date.new(issue.due_date)
event.summary = "#{issue.title} (in #{issue.project.full_path})"
event.description = "Find out more at #{issue_url(issue)}"
event.url = issue_url(issue)
event.transp = 'TRANSPARENT'
end
end
cal.to_ical
...@@ -34,18 +34,18 @@ ...@@ -34,18 +34,18 @@
.row.prepend-top-default .row.prepend-top-default
.col-lg-4.profile-settings-sidebar .col-lg-4.profile-settings-sidebar
%h4.prepend-top-0 %h4.prepend-top-0
RSS token Feed token
%p %p
Your RSS token is used to authenticate you when your RSS reader loads a personalized RSS feed, and is included in your personal RSS feed URLs. Your feed token is used to authenticate you when your RSS reader loads a personalized RSS feed or when when your calendar application loads a personalized calendar, and is included in those feed URLs.
%p %p
It cannot be used to access any other data. It cannot be used to access any other data.
.col-lg-8.rss-token-reset .col-lg-8.feed-token-reset
= label_tag :rss_token, 'RSS token', class: "label-light" = label_tag :feed_token, 'Feed token', class: "label-light"
= text_field_tag :rss_token, current_user.rss_token, class: 'form-control', readonly: true, onclick: 'this.select()' = text_field_tag :feed_token, current_user.feed_token, class: 'form-control', readonly: true, onclick: 'this.select()'
%p.form-text.text-muted %p.form-text.text-muted
Keep this token secret. Anyone who gets ahold of it can read activity and issue RSS feeds as if they were you. Keep this token secret. Anyone who gets ahold of it can read activity and issue RSS feeds or your calendar feed as if they were you.
You should You should
= link_to 'reset it', [:reset, :rss_token, :profile], method: :put, data: { confirm: 'Are you sure? Any RSS URLs currently in use will stop working.' } = link_to 'reset it', [:reset, :feed_token, :profile], method: :put, data: { confirm: 'Are you sure? Any RSS or calendar URLs currently in use will stop working.' }
if that ever happens. if that ever happens.
- if incoming_email_token_enabled? - if incoming_email_token_enabled?
......
...@@ -5,16 +5,16 @@ ...@@ -5,16 +5,16 @@
= label_tag :merge_method_merge, class: 'label-light' do = label_tag :merge_method_merge, class: 'label-light' do
Merge method Merge method
.form-check .form-check
= label_tag :project_merge_method_merge do = form.radio_button :merge_method, :merge, class: "js-merge-method-radio form-check-input"
= form.radio_button :merge_method, :merge, class: "js-merge-method-radio" = label_tag :project_merge_method_merge, class: 'form-check-label' do
%strong Merge commit %strong Merge commit
%br %br
%span.descr %span.descr
A merge commit is created for every merge, and merging is allowed as long as there are no conflicts. A merge commit is created for every merge, and merging is allowed as long as there are no conflicts.
.form-check .form-check
= label_tag :project_merge_method_rebase_merge do = form.radio_button :merge_method, :rebase_merge, class: "js-merge-method-radio form-check-input"
= form.radio_button :merge_method, :rebase_merge, class: "js-merge-method-radio" = label_tag :project_merge_method_rebase_merge, class: 'form-check-label' do
%strong Merge commit with semi-linear history %strong Merge commit with semi-linear history
%br %br
%span.descr %span.descr
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
When fast-forward merge is not possible, the user is given the option to rebase. When fast-forward merge is not possible, the user is given the option to rebase.
.form-check .form-check
= label_tag :project_merge_method_ff do = form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff form-check-input"
= form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff" = label_tag :project_merge_method_ff, class: 'form-check-label' do
%strong Fast-forward merge %strong Fast-forward merge
%br %br
%span.descr %span.descr
......
...@@ -2,22 +2,22 @@ ...@@ -2,22 +2,22 @@
.form-group .form-group
.form-check.builds-feature{ class: ("hidden" if @project && @project.project_feature.send(:builds_access_level) == 0) } .form-check.builds-feature{ class: ("hidden" if @project && @project.project_feature.send(:builds_access_level) == 0) }
= form.label :only_allow_merge_if_pipeline_succeeds do = form.check_box :only_allow_merge_if_pipeline_succeeds, class: 'form-check-input'
= form.check_box :only_allow_merge_if_pipeline_succeeds = form.label :only_allow_merge_if_pipeline_succeeds, class: 'form-check-label' do
%strong Only allow merge requests to be merged if the pipeline succeeds %strong Only allow merge requests to be merged if the pipeline succeeds
%br %br
%span.descr %span.descr
Pipelines need to be configured to enable this feature. Pipelines need to be configured to enable this feature.
= link_to icon('question-circle'), help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds'), target: '_blank' = link_to icon('question-circle'), help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds'), target: '_blank'
.form-check .form-check
= form.label :only_allow_merge_if_all_discussions_are_resolved do = form.check_box :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-input'
= form.check_box :only_allow_merge_if_all_discussions_are_resolved = form.label :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-label' do
%strong Only allow merge requests to be merged if all discussions are resolved %strong Only allow merge requests to be merged if all discussions are resolved
.form-check .form-check
= form.label :resolve_outdated_diff_discussions do = form.check_box :resolve_outdated_diff_discussions, class: 'form-check-input'
= form.check_box :resolve_outdated_diff_discussions = form.label :resolve_outdated_diff_discussions, class: 'form-check-label' do
%strong Automatically resolve merge request diff discussions when they become outdated %strong Automatically resolve merge request diff discussions when they become outdated
.form-check .form-check
= form.label :printing_merge_request_link_enabled do = form.check_box :printing_merge_request_link_enabled, class: 'form-check-input'
= form.check_box :printing_merge_request_link_enabled = form.label :printing_merge_request_link_enabled, class: 'form-check-label' do
%strong Show link to create/view merge request when pushing from the command line %strong Show link to create/view merge request when pushing from the command line
= link_to safe_params.merge(rss_url_options), class: 'btn btn-default append-right-10 has-tooltip', title: 'Subscribe' do = render 'shared/issuable/feed_buttons'
= icon('rss')
- if @can_bulk_update - if @can_bulk_update
= button_tag "Edit issues", class: "btn btn-default append-right-10 js-bulk-update-toggle" = button_tag "Edit issues", class: "btn btn-default append-right-10 js-bulk-update-toggle"
- if show_new_issue_link?(@project) - if show_new_issue_link?(@project)
......
= render 'issues/issues_calendar', issues: @issues
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
= icon('search') = icon('search')
.inline.prepend-left-20 .inline.prepend-left-20
.form-check.light .form-check.light
= label_tag :filter_ref do = check_box_tag :filter_ref, 1, @options[:filter_ref], class: 'form-check-input'
= check_box_tag :filter_ref, 1, @options[:filter_ref] = label_tag :filter_ref, class: 'form-check-label' do
%span= _("Begin with the selected commit") %span= _("Begin with the selected commit")
- if @commit - if @commit
......
...@@ -11,22 +11,22 @@ ...@@ -11,22 +11,22 @@
= message.html_safe = message.html_safe
= f.fields_for :auto_devops_attributes, @auto_devops do |form| = f.fields_for :auto_devops_attributes, @auto_devops do |form|
.form-check .form-check
= form.label :enabled_true do = form.radio_button :enabled, 'true', class: 'form-check-input'
= form.radio_button :enabled, 'true' = form.label :enabled_true, class: 'form-check-label' do
%strong= s_('CICD|Enable Auto DevOps') %strong= s_('CICD|Enable Auto DevOps')
%br %br
= s_('CICD|The Auto DevOps pipeline configuration will be used when there is no %{ci_file} in the project.').html_safe % { ci_file: ci_file_formatted } = s_('CICD|The Auto DevOps pipeline configuration will be used when there is no %{ci_file} in the project.').html_safe % { ci_file: ci_file_formatted }
.form-check .form-check
= form.label :enabled_false do = form.radio_button :enabled, 'false', class: 'form-check-input'
= form.radio_button :enabled, 'false' = form.label :enabled_false, class: 'form-check-label' do
%strong= s_('CICD|Disable Auto DevOps') %strong= s_('CICD|Disable Auto DevOps')
%br %br
= s_('CICD|An explicit %{ci_file} needs to be specified before you can begin using Continuous Integration and Delivery.').html_safe % { ci_file: ci_file_formatted } = s_('CICD|An explicit %{ci_file} needs to be specified before you can begin using Continuous Integration and Delivery.').html_safe % { ci_file: ci_file_formatted }
.form-check .form-check
= form.label :enabled_ do = form.radio_button :enabled, '', class: 'form-check-input'
= form.radio_button :enabled, '' = form.label :enabled_, class: 'form-check-label' do
%strong= s_('CICD|Instance default (%{state})') % { state: "#{Gitlab::CurrentSettings.auto_devops_enabled? ? _('enabled') : _('disabled')}" } %strong= s_('CICD|Instance default (%{state})') % { state: "#{Gitlab::CurrentSettings.auto_devops_enabled? ? _('enabled') : _('disabled')}" }
%br %br
= s_('CICD|Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific %{ci_file}.').html_safe % { ci_file: ci_file_formatted } = s_('CICD|Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific %{ci_file}.').html_safe % { ci_file: ci_file_formatted }
......
...@@ -20,15 +20,15 @@ ...@@ -20,15 +20,15 @@
Choose between <code>clone</code> or <code>fetch</code> to get the recent application code Choose between <code>clone</code> or <code>fetch</code> to get the recent application code
= link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'git-strategy'), target: '_blank' = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'git-strategy'), target: '_blank'
.form-check .form-check
= f.label :build_allow_git_fetch_false do = f.radio_button :build_allow_git_fetch, 'false', { class: 'form-check-input' }
= f.radio_button :build_allow_git_fetch, 'false' = f.label :build_allow_git_fetch_false, class: 'form-check-label' do
%strong git clone %strong git clone
%br %br
%span.descr %span.descr
Slower but makes sure the project workspace is pristine as it clones the repository from scratch for every job Slower but makes sure the project workspace is pristine as it clones the repository from scratch for every job
.form-check .form-check
= f.label :build_allow_git_fetch_true do = f.radio_button :build_allow_git_fetch, 'true', { class: 'form-check-input' }
= f.radio_button :build_allow_git_fetch, 'true' = f.label :build_allow_git_fetch_true, class: 'form-check-label' do
%strong git fetch %strong git fetch
%br %br
%span.descr %span.descr
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
%hr %hr
.form-group .form-group
.form-check .form-check
= f.label :public_builds do = f.check_box :public_builds, { class: 'form-check-input' }
= f.check_box :public_builds = f.label :public_builds, class: 'form-check-label' do
%strong Public pipelines %strong Public pipelines
.form-text.text-muted .form-text.text-muted
Allow public access to pipelines and job details, including output logs and artifacts Allow public access to pipelines and job details, including output logs and artifacts
...@@ -75,8 +75,8 @@ ...@@ -75,8 +75,8 @@
%hr %hr
.form-group .form-group
.form-check .form-check
= f.label :auto_cancel_pending_pipelines do = f.check_box :auto_cancel_pending_pipelines, { class: 'form-check-input' }, 'enabled', 'disabled'
= f.check_box :auto_cancel_pending_pipelines, {}, 'enabled', 'disabled' = f.label :auto_cancel_pending_pipelines, class: 'form-check-label' do
%strong Auto-cancel redundant, pending pipelines %strong Auto-cancel redundant, pending pipelines
.form-text.text-muted .form-text.text-muted
New pipelines will cancel older, pending pipelines on the same branch New pipelines will cancel older, pending pipelines on the same branch
......
.form-check .form-check
= form.label :request_access_enabled do = form.check_box :request_access_enabled, class: 'form-check-input'
= form.check_box :request_access_enabled = form.label :request_access_enabled, class: 'form-check-label' do
%strong Allow users to request access %strong Allow users to request access
%br %br
%span.descr Allow users to request access if visibility is public or internal. %span.descr Allow users to request access if visibility is public or internal.
.form-check .form-check
- nonce = SecureRandom.hex - nonce = SecureRandom.hex
= label_tag "create_merge_request-#{nonce}" do = check_box_tag 'create_merge_request', 1, true, class: 'js-create-merge-request form-check-input', id: "create_merge_request-#{nonce}"
= check_box_tag 'create_merge_request', 1, true, class: 'js-create-merge-request', id: "create_merge_request-#{nonce}" = label_tag "create_merge_request-#{nonce}", class: 'form-check-label' do
- translation_variables = { new_merge_request: "<strong>#{_('new merge request')}</strong>" } - translation_variables = { new_merge_request: "<strong>#{_('new merge request')}</strong>" }
- translation = _('Start a %{new_merge_request} with these changes') % translation_variables - translation = _('Start a %{new_merge_request} with these changes') % translation_variables
#{ translation.html_safe } #{ translation.html_safe }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
- disallowed = disallowed_visibility_level?(form_model, level) - disallowed = disallowed_visibility_level?(form_model, level)
- restricted = restricted_visibility_levels.include?(level) - restricted = restricted_visibility_levels.include?(level)
- disabled = disallowed || restricted - disabled = disallowed || restricted
.form-check.pl-0{ class: [('disabled' if disabled), ('restricted' if restricted)] } .form-check{ class: [('disabled' if disabled), ('restricted' if restricted)] }
= form.label "#{model_method}_#{level}" do = form.radio_button model_method, level, checked: (selected_level == level), disabled: disabled, class: 'form-check-input'
= form.radio_button model_method, level, checked: (selected_level == level), disabled: disabled = form.label "#{model_method}_#{level}", class: 'form-check-label' do
= visibility_level_icon(level) = visibility_level_icon(level)
.option-title .option-title
= visibility_level_label(level) = visibility_level_label(level)
......
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M15 5v7a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3V5a2 2 0 0 1 2-2h1V2a1 1 0 1 1 2 0v1h4V2a1 1 0 1 1 2 0v1h1a2 2 0 0 1 2 2zM3 6v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6H3zm2 2h2a1 1 0 1 1 0 2H5a1 1 0 1 1 0-2z" fill="#000" fill-rule="evenodd"/></svg>
\ No newline at end of file
= link_to safe_params.merge(rss_url_options), class: 'btn has-tooltip', data: { container: 'body' }, title: 'Subscribe to RSS feed' do
= icon('rss')
= link_to safe_params.merge(calendar_url_options), class: 'btn has-tooltip', data: { container: 'body' }, title: 'Subscribe to calendar' do
= custom_icon('icon_calendar')
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
.form-check .form-check
= form.label :confidential do = form.check_box :confidential, class: 'form-check-input'
= form.check_box :confidential = form.label :confidential, class: 'form-check-label' do
This issue is confidential and should only be visible to team members with at least Reporter access. This issue is confidential and should only be visible to team members with at least Reporter access.
= render 'shared/issuable/form/metadata', issuable: issuable, form: form = render 'shared/issuable/form/metadata', issuable: issuable, form: form
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
= _('Contribution') = _('Contribution')
.col-sm-10 .col-sm-10
.form-check .form-check
= form.label :allow_maintainer_to_push do = form.check_box :allow_maintainer_to_push, disabled: !issuable.can_allow_maintainer_to_push?(current_user), class: 'form-check-input'
= form.check_box :allow_maintainer_to_push, disabled: !issuable.can_allow_maintainer_to_push?(current_user) = form.label :allow_maintainer_to_push, class: 'form-check-label' do
= _('Allow edits from maintainers.') = _('Allow edits from maintainers.')
= link_to 'About this feature', help_page_path('user/project/merge_requests/maintainer_access') = link_to 'About this feature', help_page_path('user/project/merge_requests/maintainer_access')
.form-text.text-muted .form-text.text-muted
......
...@@ -11,16 +11,16 @@ ...@@ -11,16 +11,16 @@
.col-sm-10.offset-sm-2 .col-sm-10.offset-sm-2
- if issuable.can_remove_source_branch?(current_user) - if issuable.can_remove_source_branch?(current_user)
.form-check .form-check
= label_tag 'merge_request[force_remove_source_branch]' do
= hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil = hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil
= check_box_tag 'merge_request[force_remove_source_branch]', '1', issuable.force_remove_source_branch? = check_box_tag 'merge_request[force_remove_source_branch]', '1', issuable.force_remove_source_branch?, class: 'form-check-input'
= label_tag 'merge_request[force_remove_source_branch]', class: 'form-check-label' do
Remove source branch when merge request is accepted. Remove source branch when merge request is accepted.
.form-group .form-group
.col-sm-10.col-sm-offset-2 .col-sm-10.col-sm-offset-2
.checkbox .form-check
= label_tag 'merge_request[squash]' do
= hidden_field_tag 'merge_request[squash]', '0', id: nil = hidden_field_tag 'merge_request[squash]', '0', id: nil
= check_box_tag 'merge_request[squash]', '1', issuable.squash = check_box_tag 'merge_request[squash]', '1', issuable.squash, class: 'form-check-input'
= label_tag 'merge_request[squash]', class: 'form-check-label' do
Squash commits when merge request is accepted. Squash commits when merge request is accepted.
= link_to 'About this feature', help_page_path('user/project/merge_requests/squash_and_merge') = link_to 'About this feature', help_page_path('user/project/merge_requests/squash_and_merge')
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
title: 'Resend invite' title: 'Resend invite'
- if user != current_user && member.can_update? - if user != current_user && member.can_update?
= form_for member, remote: true, html: { class: 'js-edit-member-form form-horizontal' } do |f| = form_for member, remote: true, html: { class: 'js-edit-member-form form-group row append-right-5' } do |f|
= f.hidden_field :access_level = f.hidden_field :access_level
.member-form-control.dropdown.append-right-5 .member-form-control.dropdown.append-right-5
%button.dropdown-menu-toggle.js-member-permissions-dropdown{ type: "button", %button.dropdown-menu-toggle.js-member-permissions-dropdown{ type: "button",
......
...@@ -5,25 +5,25 @@ ...@@ -5,25 +5,25 @@
.fade-right= icon('angle-right') .fade-right= icon('angle-right')
%ul.nav-links.scrolling-tabs.js-milestone-tabs.nav.nav-tabs %ul.nav-links.scrolling-tabs.js-milestone-tabs.nav.nav-tabs
- if issues_accessible - if issues_accessible
%li.active %li.nav-item
= link_to '#tab-issues', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do = link_to '#tab-issues', class: 'nav-link active', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do
Issues Issues
%span.badge.badge-pill= milestone.issues_visible_to_user(current_user).size %span.badge.badge-pill= milestone.issues_visible_to_user(current_user).size
%li %li.nav-item
= link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do = link_to '#tab-merge-requests', class: 'nav-link', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do
Merge Requests Merge Requests
%span.badge.badge-pill= milestone.merge_requests.size %span.badge.badge-pill= milestone.merge_requests.size
- else - else
%li.active %li.nav-item
= link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do = link_to '#tab-merge-requests', class: 'nav-link active', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do
Merge Requests Merge Requests
%span.badge.badge-pill= milestone.merge_requests.size %span.badge.badge-pill= milestone.merge_requests.size
%li %li.nav-item
= link_to '#tab-participants', 'data-toggle' => 'tab', 'data-endpoint': milestone_participants_tab_path(milestone) do = link_to '#tab-participants', class: 'nav-link', 'data-toggle' => 'tab', 'data-endpoint': milestone_participants_tab_path(milestone) do
Participants Participants
%span.badge.badge-pill= milestone.participants.count %span.badge.badge-pill= milestone.participants.count
%li %li.nav-item
= link_to '#tab-labels', 'data-toggle' => 'tab', 'data-endpoint': milestone_labels_tab_path(milestone) do = link_to '#tab-labels', class: 'nav-link', 'data-toggle' => 'tab', 'data-endpoint': milestone_labels_tab_path(milestone) do
Labels Labels
%span.badge.badge-pill= milestone.labels.count %span.badge.badge-pill= milestone.labels.count
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
- field_id = "#{notifications_menu_identifier("modal", notification_setting)}_notification_setting[#{event}]" - field_id = "#{notifications_menu_identifier("modal", notification_setting)}_notification_setting[#{event}]"
.form-group .form-group
.form-check{ class: ("prepend-top-0" if index == 0) } .form-check{ class: ("prepend-top-0" if index == 0) }
%label{ for: field_id } = check_box("notification_setting", event, id: field_id, class: "js-custom-notification-event form-check-input", checked: notification_setting.public_send(event))
= check_box("notification_setting", event, id: field_id, class: "js-custom-notification-event", checked: notification_setting.public_send(event)) %label.form-check-label{ for: field_id }
%strong %strong
= notification_event_name(event) = notification_event_name(event)
= icon("spinner spin", class: "custom-notification-event-loading") = icon("spinner spin", class: "custom-notification-event-loading")
...@@ -4,26 +4,26 @@ ...@@ -4,26 +4,26 @@
= label :active, "Active", class: 'col-form-label col-sm-2' = label :active, "Active", class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.form-check .form-check
= f.check_box :active = f.check_box :active, { class: 'form-check-input' }
%span.light Paused Runners don't accept new jobs %span.light Paused Runners don't accept new jobs
.form-group.row .form-group.row
= label :protected, "Protected", class: 'col-form-label col-sm-2' = label :protected, "Protected", class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.form-check .form-check
= f.check_box :access_level, {}, 'ref_protected', 'not_protected' = f.check_box :access_level, { class: 'form-check-input' }, 'ref_protected', 'not_protected'
%span.light This runner will only run on pipelines triggered on protected branches %span.light This runner will only run on pipelines triggered on protected branches
.form-group.row .form-group.row
= label :run_untagged, 'Run untagged jobs', class: 'col-form-label col-sm-2' = label :run_untagged, 'Run untagged jobs', class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.form-check .form-check
= f.check_box :run_untagged = f.check_box :run_untagged, { class: 'form-check-input' }
%span.light Indicates whether this runner can pick jobs without tags %span.light Indicates whether this runner can pick jobs without tags
- unless runner.group_type? - unless runner.group_type?
.form-group.row .form-group.row
= label :locked, _('Lock to current projects'), class: 'col-form-label col-sm-2' = label :locked, _('Lock to current projects'), class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.form-check .form-check
= f.check_box :locked = f.check_box :locked, { class: 'form-check-input' }
%span.light= _('When a runner is locked, it cannot be assigned to other projects') %span.light= _('When a runner is locked, it cannot be assigned to other projects')
.form-group.row .form-group.row
= label_tag :token, class: 'col-form-label col-sm-2' do = label_tag :token, class: 'col-form-label col-sm-2' do
......
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
- if public_snippet? - if public_snippet?
.embed-snippet .embed-snippet
.input-group .input-group
.input-group-btn .input-group-prepend
%button.btn.embed-toggle{ 'data-toggle': 'dropdown', type: 'button' } %button.btn.btn-svg.embed-toggle.input-group-text{ 'data-toggle': 'dropdown', type: 'button' }
%span.js-embed-action= _("Embed") %span.js-embed-action= _("Embed")
= sprite_icon('angle-down', size: 12) = sprite_icon('angle-down', size: 12, css_class: 'caret-down')
%ul.dropdown-menu.dropdown-menu-selectable.embed-toggle-list %ul.dropdown-menu.dropdown-menu-selectable.embed-toggle-list
%li %li
%button.js-embed-btn.btn.btn-transparent.is-active{ type: 'button' } %button.js-embed-btn.btn.btn-transparent.is-active{ type: 'button' }
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
%button.js-share-btn.btn.btn-transparent{ type: 'button' } %button.js-share-btn.btn.btn-transparent{ type: 'button' }
%strong.embed-toggle-list-item= _("Share") %strong.embed-toggle-list-item= _("Share")
%input.js-snippet-url-area.snippet-embed-input.form-control{ type: "text", autocomplete: 'off', value: snippet_embed } %input.js-snippet-url-area.snippet-embed-input.form-control{ type: "text", autocomplete: 'off', value: snippet_embed }
.input-group-btn .input-group-append
%button.js-clipboard-btn.snippet-clipboard-btn.btn.btn-default.has-tooltip{ title: "Copy to clipboard", 'data-clipboard-target': '.js-snippet-url-area' } = clipboard_button(title: s_('Copy to clipboard'), class: 'js-clipboard-btn snippet-clipboard-btn btn btn-default', target: '.js-snippet-url-area')
= sprite_icon('duplicate', size: 16)
.clearfix .clearfix
...@@ -10,80 +10,70 @@ ...@@ -10,80 +10,70 @@
Use this token to validate received payloads. It will be sent with the request in the X-Gitlab-Token HTTP header. Use this token to validate received payloads. It will be sent with the request in the X-Gitlab-Token HTTP header.
.form-group .form-group
= form.label :url, 'Trigger', class: 'label-light' = form.label :url, 'Trigger', class: 'label-light'
%ul.list-unstyled %ul.list-unstyled.prepend-left-20
%li %li
= form.check_box :push_events, class: 'float-left' = form.check_box :push_events, class: 'form-check-input'
.prepend-left-20 = form.label :push_events, class: 'list-label form-check-label ml-1' do
= form.label :push_events, class: 'list-label' do
%strong Push events %strong Push events
%p.light %p.light.ml-1
This URL will be triggered by a push to the repository This URL will be triggered by a push to the repository
%li %li
= form.check_box :tag_push_events, class: 'float-left' = form.check_box :tag_push_events, class: 'form-check-input'
.prepend-left-20 = form.label :tag_push_events, class: 'list-label form-check-label ml-1' do
= form.label :tag_push_events, class: 'list-label' do
%strong Tag push events %strong Tag push events
%p.light %p.light.ml-1
This URL will be triggered when a new tag is pushed to the repository This URL will be triggered when a new tag is pushed to the repository
%li %li
= form.check_box :note_events, class: 'float-left' = form.check_box :note_events, class: 'form-check-input'
.prepend-left-20 = form.label :note_events, class: 'list-label form-check-label ml-1' do
= form.label :note_events, class: 'list-label' do
%strong Comments %strong Comments
%p.light %p.light.ml-1
This URL will be triggered when someone adds a comment This URL will be triggered when someone adds a comment
%li %li
= form.check_box :confidential_note_events, class: 'float-left' = form.check_box :confidential_note_events, class: 'form-check-input'
.prepend-left-20 = form.label :confidential_note_events, class: 'list-label form-check-label ml-1' do
= form.label :confidential_note_events, class: 'list-label' do
%strong Confidential Comments %strong Confidential Comments
%p.light %p.light.ml-1
This URL will be triggered when someone adds a comment on a confidential issue This URL will be triggered when someone adds a comment on a confidential issue
%li %li
= form.check_box :issues_events, class: 'float-left' = form.check_box :issues_events, class: 'form-check-input'
.prepend-left-20 = form.label :issues_events, class: 'list-label form-check-label ml-1' do
= form.label :issues_events, class: 'list-label' do
%strong Issues events %strong Issues events
%p.light %p.light.ml-1
This URL will be triggered when an issue is created/updated/merged This URL will be triggered when an issue is created/updated/merged
%li %li
= form.check_box :confidential_issues_events, class: 'float-left' = form.check_box :confidential_issues_events, class: 'form-check-input'
.prepend-left-20 = form.label :confidential_issues_events, class: 'list-label form-check-label ml-1' do
= form.label :confidential_issues_events, class: 'list-label' do
%strong Confidential Issues events %strong Confidential Issues events
%p.light %p.light.ml-1
This URL will be triggered when a confidential issue is created/updated/merged This URL will be triggered when a confidential issue is created/updated/merged
%li %li
= form.check_box :merge_requests_events, class: 'float-left' = form.check_box :merge_requests_events, class: 'form-check-input'
.prepend-left-20 = form.label :merge_requests_events, class: 'list-label form-check-label ml-1' do
= form.label :merge_requests_events, class: 'list-label' do
%strong Merge request events %strong Merge request events
%p.light %p.light.ml-1
This URL will be triggered when a merge request is created/updated/merged This URL will be triggered when a merge request is created/updated/merged
%li %li
= form.check_box :job_events, class: 'float-left' = form.check_box :job_events, class: 'form-check-input'
.prepend-left-20 = form.label :job_events, class: 'list-label form-check-label ml-1' do
= form.label :job_events, class: 'list-label' do
%strong Job events %strong Job events
%p.light %p.light.ml-1
This URL will be triggered when the job status changes This URL will be triggered when the job status changes
%li %li
= form.check_box :pipeline_events, class: 'float-left' = form.check_box :pipeline_events, class: 'form-check-input'
.prepend-left-20 = form.label :pipeline_events, class: 'list-label form-check-label ml-1' do
= form.label :pipeline_events, class: 'list-label' do
%strong Pipeline events %strong Pipeline events
%p.light %p.light.ml-1
This URL will be triggered when the pipeline status changes This URL will be triggered when the pipeline status changes
%li %li
= form.check_box :wiki_page_events, class: 'float-left' = form.check_box :wiki_page_events, class: 'form-check-input'
.prepend-left-20 = form.label :wiki_page_events, class: 'list-label form-check-label ml-1' do
= form.label :wiki_page_events, class: 'list-label' do
%strong Wiki Page events %strong Wiki Page events
%p.light %p.light.ml-1
This URL will be triggered when a wiki page is created/updated This URL will be triggered when a wiki page is created/updated
.form-group .form-group
= form.label :enable_ssl_verification, 'SSL verification', class: 'label-light checkbox' = form.label :enable_ssl_verification, 'SSL verification', class: 'label-light checkbox'
.form-check .form-check
= form.label :enable_ssl_verification do = form.check_box :enable_ssl_verification, class: 'form-check-input'
= form.check_box :enable_ssl_verification = form.label :enable_ssl_verification, class: 'form-check-label ml-1' do
%strong Enable SSL verification %strong Enable SSL verification
---
title: Take two for MR metrics population background migration
merge_request: 19097
author:
type: other
---
title: Export assigned issues in iCalendar feed
merge_request: 17783
author: Imre Farkas
type: added
---
title: Removes redundant script failure message from Job page
merge_request: 19138
author:
type: changed
---
title: Add merge requests list endpoint for groups
merge_request:
author:
type: other
---
title: Make ActiveRecordSubscriber rails 5 compatible
merge_request:
author:
type: other
---
title: Eliminate cached N+1 queries for projects in Issue API
merge_request:
author:
type: performance
resource :dashboard, controller: 'dashboard', only: [] do resource :dashboard, controller: 'dashboard', only: [] do
get :issues, action: :issues_calendar, constraints: lambda { |req| req.format == :ics }
get :issues get :issues
get :merge_requests get :merge_requests
get :activity get :activity
......
...@@ -5,9 +5,10 @@ end ...@@ -5,9 +5,10 @@ end
constraints(::Constraints::GroupUrlConstrainer.new) do constraints(::Constraints::GroupUrlConstrainer.new) do
scope(path: 'groups/*id', scope(path: 'groups/*id',
controller: :groups, controller: :groups,
constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom)/ }) do constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom|ics)/ }) do
scope(path: '-') do scope(path: '-') do
get :edit, as: :edit_group get :edit, as: :edit_group
get :issues, as: :issues_group_calendar, action: :issues_calendar, constraints: lambda { |req| req.format == :ics }
get :issues, as: :issues_group get :issues, as: :issues_group
get :merge_requests, as: :merge_requests_group get :merge_requests, as: :merge_requests_group
get :projects, as: :projects_group get :projects, as: :projects_group
......
...@@ -7,7 +7,7 @@ resource :profile, only: [:show, :update] do ...@@ -7,7 +7,7 @@ resource :profile, only: [:show, :update] do
get :applications, to: 'oauth/applications#index' get :applications, to: 'oauth/applications#index'
put :reset_incoming_email_token put :reset_incoming_email_token
put :reset_rss_token put :reset_feed_token
put :update_username put :update_username
end end
......
...@@ -342,6 +342,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -342,6 +342,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end end
end end
get :issues, to: 'issues#calendar', constraints: lambda { |req| req.format == :ics }
resources :issues, concerns: :awardable, constraints: { id: /\d+/ } do resources :issues, concerns: :awardable, constraints: { id: /\d+/ } do
member do member do
post :toggle_subscription post :toggle_subscription
......
class RenameUsersRssTokenToFeedToken < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
rename_column_concurrently :users, :rss_token, :feed_token
end
def down
cleanup_concurrent_column_rename :users, :feed_token, :rss_token
end
end
class CleanupUsersRssTokenRename < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
def up
cleanup_concurrent_column_rename :users, :rss_token, :feed_token
end
def down
rename_column_concurrently :users, :feed_token, :rss_token
end
end
class MigrateRemainingMrMetricsPopulatingBackgroundMigration < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
BATCH_SIZE = 5_000
MIGRATION = 'PopulateMergeRequestMetricsWithEventsData'
DELAY_INTERVAL = 10.minutes
disable_ddl_transaction!
class MergeRequest < ActiveRecord::Base
self.table_name = 'merge_requests'
include ::EachBatch
end
def up
# Perform any ongoing background migration that might still be running. This
# avoids scheduling way too many of the same jobs on self-hosted instances
# if they're updating GitLab across multiple versions. The "Take one"
# migration was executed on 10.4 on
# SchedulePopulateMergeRequestMetricsWithEventsData.
Gitlab::BackgroundMigration.steal(MIGRATION)
metrics_not_exists_clause = <<~SQL
NOT EXISTS (SELECT 1 FROM merge_request_metrics
WHERE merge_request_metrics.merge_request_id = merge_requests.id)
SQL
relation = MergeRequest.where(metrics_not_exists_clause)
# We currently have ~400_000 MR records without metrics on GitLab.com.
# This means it'll schedule ~80 jobs (5000 MRs each) with a 10 minutes gap,
# so this should take ~14 hours for all background migrations to complete.
#
queue_background_migration_jobs_by_range_at_intervals(relation,
MIGRATION,
DELAY_INTERVAL,
batch_size: BATCH_SIZE)
end
def down
end
end
...@@ -2082,9 +2082,9 @@ ActiveRecord::Schema.define(version: 20180529093006) do ...@@ -2082,9 +2082,9 @@ ActiveRecord::Schema.define(version: 20180529093006) do
t.date "last_activity_on" t.date "last_activity_on"
t.boolean "notified_of_own_activity" t.boolean "notified_of_own_activity"
t.string "preferred_language" t.string "preferred_language"
t.string "rss_token"
t.integer "theme_id", limit: 2 t.integer "theme_id", limit: 2
t.integer "accepted_term_id" t.integer "accepted_term_id"
t.string "feed_token"
end end
add_index "users", ["admin"], name: "index_users_on_admin", using: :btree add_index "users", ["admin"], name: "index_users_on_admin", using: :btree
...@@ -2092,12 +2092,12 @@ ActiveRecord::Schema.define(version: 20180529093006) do ...@@ -2092,12 +2092,12 @@ ActiveRecord::Schema.define(version: 20180529093006) do
add_index "users", ["created_at"], name: "index_users_on_created_at", using: :btree add_index "users", ["created_at"], name: "index_users_on_created_at", using: :btree
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
add_index "users", ["email"], name: "index_users_on_email_trigram", using: :gin, opclasses: {"email"=>"gin_trgm_ops"} add_index "users", ["email"], name: "index_users_on_email_trigram", using: :gin, opclasses: {"email"=>"gin_trgm_ops"}
add_index "users", ["feed_token"], name: "index_users_on_feed_token", using: :btree
add_index "users", ["ghost"], name: "index_users_on_ghost", using: :btree add_index "users", ["ghost"], name: "index_users_on_ghost", using: :btree
add_index "users", ["incoming_email_token"], name: "index_users_on_incoming_email_token", using: :btree add_index "users", ["incoming_email_token"], name: "index_users_on_incoming_email_token", using: :btree
add_index "users", ["name"], name: "index_users_on_name", using: :btree add_index "users", ["name"], name: "index_users_on_name", using: :btree
add_index "users", ["name"], name: "index_users_on_name_trigram", using: :gin, opclasses: {"name"=>"gin_trgm_ops"} add_index "users", ["name"], name: "index_users_on_name_trigram", using: :gin, opclasses: {"name"=>"gin_trgm_ops"}
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
add_index "users", ["rss_token"], name: "index_users_on_rss_token", using: :btree
add_index "users", ["state"], name: "index_users_on_state", using: :btree add_index "users", ["state"], name: "index_users_on_state", using: :btree
add_index "users", ["username"], name: "index_users_on_username", using: :btree add_index "users", ["username"], name: "index_users_on_username", using: :btree
add_index "users", ["username"], name: "index_users_on_username_trigram", using: :gin, opclasses: {"username"=>"gin_trgm_ops"} add_index "users", ["username"], name: "index_users_on_username_trigram", using: :gin, opclasses: {"username"=>"gin_trgm_ops"}
......
...@@ -240,6 +240,112 @@ Parameters: ...@@ -240,6 +240,112 @@ Parameters:
] ]
``` ```
## List group merge requests
Get all merge requests for this group and its subgroups.
The `state` parameter can be used to get only merge requests with a given state (`opened`, `closed`, or `merged`) or all of them (`all`).
The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests.
```
GET /groups/:id/merge_requests
GET /groups/:id/merge_requests?state=opened
GET /groups/:id/merge_requests?state=all
GET /groups/:id/merge_requests?milestone=release
GET /groups/:id/merge_requests?labels=bug,reproduced
GET /groups/:id/merge_requests?my_reaction_emoji=star
```
`group_id` represents the ID of the group which contains the project where the MR resides.
Parameters:
| Attribute | Type | Required | Description |
| ------------------- | -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `id` | integer | yes | The ID of a group |
| `state` | string | no | Return all merge requests or just those that are `opened`, `closed`, or `merged` |
| `order_by` | string | no | Return merge requests ordered by `created_at` or `updated_at` fields. Default is `created_at` |
| `sort` | string | no | Return merge requests sorted in `asc` or `desc` order. Default is `desc` |
| `milestone` | string | no | Return merge requests for a specific milestone |
| `view` | string | no | If `simple`, returns the `iid`, URL, title, description, and basic state of merge request |
| `labels` | string | no | Return merge requests matching a comma separated list of labels |
| `created_after` | datetime | no | Return merge requests created on or after the given time |
| `created_before` | datetime | no | Return merge requests created on or before the given time |
| `updated_after` | datetime | no | Return merge requests updated on or after the given time |
| `updated_before` | datetime | no | Return merge requests updated on or before the given time |
| `scope` | string | no | Return merge requests for the given scope: `created_by_me`, `assigned_to_me` or `all`.<br> |
| `author_id` | integer | no | Returns merge requests created by the given user `id` _([Introduced][ce-13060] in GitLab 9.5)_ |
| `assignee_id` | integer | no | Returns merge requests assigned to the given user `id` _([Introduced][ce-13060] in GitLab 9.5)_ |
| `my_reaction_emoji` | string | no | Return merge requests reacted by the authenticated user by the given `emoji` _([Introduced][ce-14016] in GitLab 10.0)_ |
| `source_branch` | string | no | Return merge requests with the given source branch |
| `target_branch` | string | no | Return merge requests with the given target branch |
| `search` | string | no | Search merge requests against their `title` and `description` |
```json
[
{
"id": 1,
"iid": 1,
"target_branch": "master",
"source_branch": "test1",
"project_id": 3,
"title": "test1",
"state": "opened",
"created_at": "2017-04-29T08:46:00Z",
"updated_at": "2017-04-29T08:46:00Z",
"upvotes": 0,
"downvotes": 0,
"author": {
"id": 1,
"username": "admin",
"email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
},
"assignee": {
"id": 1,
"username": "admin",
"email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
},
"source_project_id": 2,
"target_project_id": 3,
"labels": [ ],
"description": "fixed login page css paddings",
"work_in_progress": false,
"milestone": {
"id": 5,
"iid": 1,
"project_id": 3,
"title": "v2.0",
"description": "Assumenda aut placeat expedita exercitationem labore sunt enim earum.",
"state": "closed",
"created_at": "2015-02-02T19:49:26.013Z",
"updated_at": "2015-02-02T19:49:26.013Z",
"due_date": null
},
"merge_when_pipeline_succeeds": true,
"merge_status": "can_be_merged",
"sha": "8888888888888888888888888888888888888888",
"merge_commit_sha": null,
"user_notes_count": 1,
"changes_count": "1",
"should_remove_source_branch": true,
"force_remove_source_branch": false,
"web_url": "http://example.com/example/example/merge_requests/1",
"discussion_locked": false,
"time_stats": {
"time_estimate": 0,
"total_time_spent": 0,
"human_time_estimate": null,
"human_total_time_spent": null
}
}
]
```
## Get single MR ## Get single MR
Shows information about a single merge request. Shows information about a single merge request.
......
# Tips # Tips
> TODO: Add tips ## Clearing production compiled assets
To clear production compiled assets created with `yarn webpack-prod` you can run:
```
yarn clean
```
...@@ -120,6 +120,10 @@ Add `screenshot_and_save_page` in a `:js` spec to screenshot what Capybara ...@@ -120,6 +120,10 @@ Add `screenshot_and_save_page` in a `:js` spec to screenshot what Capybara
Add `screenshot_and_open_image` in a `:js` spec to screenshot what Capybara Add `screenshot_and_open_image` in a `:js` spec to screenshot what Capybara
"sees", and automatically open the image. "sees", and automatically open the image.
The HTML dumps created by this are missing CSS.
This results in them looking very different from the actual application.
There is a [small hack](https://gitlab.com/gitlab-org/gitlab-ce/snippets/1718469) to add CSS which makes debugging easier.
### Fast unit tests ### Fast unit tests
Some classes are well-isolated from Rails and you should be able to test them Some classes are well-isolated from Rails and you should be able to test them
......
...@@ -39,5 +39,13 @@ The day before an open issue is due, an email will be sent to all participants ...@@ -39,5 +39,13 @@ The day before an open issue is due, an email will be sent to all participants
of the issue. Both the due date and the day before are calculated using the of the issue. Both the due date and the day before are calculated using the
server's timezone. server's timezone.
Issues with due dates can also be exported as an iCalendar feed. The URL of the
feed can be added to calendar applications. The feed is accessible by clicking
on the _Subscribe to calendar_ button on the following pages:
- on the **Assigned Issues** page that is linked on the right-hand side of the
GitLab header
- on the **Project Issues** page
- on the **Group Issues** page
[ce-3614]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3614 [ce-3614]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3614
[permissions]: ../../permissions.md#project [permissions]: ../../permissions.md#project
...@@ -16,7 +16,7 @@ module API ...@@ -16,7 +16,7 @@ module API
args[:scope] = args[:scope].underscore if args[:scope] args[:scope] = args[:scope].underscore if args[:scope]
issues = IssuesFinder.new(current_user, args).execute issues = IssuesFinder.new(current_user, args).execute
.preload(:assignees, :labels, :notes, :timelogs) .preload(:assignees, :labels, :notes, :timelogs, :project)
issues.reorder(args[:order_by] => args[:sort]) issues.reorder(args[:order_by] => args[:sort])
end end
......
...@@ -59,6 +59,18 @@ module API ...@@ -59,6 +59,18 @@ module API
end end
end end
def serializer_options_for(merge_requests)
options = { with: Entities::MergeRequestBasic, current_user: current_user }
if params[:view] == 'simple'
options[:with] = Entities::MergeRequestSimple
else
options[:issuable_metadata] = issuable_meta_data(merge_requests, 'MergeRequest')
end
options
end
params :merge_requests_params do params :merge_requests_params do
optional :state, type: String, values: %w[opened closed merged all], default: 'all', optional :state, type: String, values: %w[opened closed merged all], default: 'all',
desc: 'Return opened, closed, merged, or all merge requests' desc: 'Return opened, closed, merged, or all merge requests'
...@@ -98,16 +110,26 @@ module API ...@@ -98,16 +110,26 @@ module API
authenticate! unless params[:scope] == 'all' authenticate! unless params[:scope] == 'all'
merge_requests = find_merge_requests merge_requests = find_merge_requests
options = { with: Entities::MergeRequestBasic, present merge_requests, serializer_options_for(merge_requests)
current_user: current_user } end
end
if params[:view] == 'simple' params do
options[:with] = Entities::MergeRequestSimple requires :id, type: String, desc: 'The ID of a group'
else end
options[:issuable_metadata] = issuable_meta_data(merge_requests, 'MergeRequest') resource :groups, requirements: API::PROJECT_ENDPOINT_REQUIREMENTS do
desc 'Get a list of group merge requests' do
success Entities::MergeRequestBasic
end
params do
use :merge_requests_params
end end
get ":id/merge_requests" do
group = find_group!(params[:id])
present merge_requests, options merge_requests = find_merge_requests(group_id: group.id, include_subgroups: true)
present merge_requests, serializer_options_for(merge_requests)
end end
end end
...@@ -159,15 +181,8 @@ module API ...@@ -159,15 +181,8 @@ module API
merge_requests = find_merge_requests(project_id: user_project.id) merge_requests = find_merge_requests(project_id: user_project.id)
options = { with: Entities::MergeRequestBasic, options = serializer_options_for(merge_requests)
current_user: current_user, options[:project] = user_project
project: user_project }
if params[:view] == 'simple'
options[:with] = Entities::MergeRequestSimple
else
options[:issuable_metadata] = issuable_meta_data(merge_requests, 'MergeRequest')
end
present merge_requests, options present merge_requests, options
end end
......
...@@ -16,7 +16,7 @@ module Gitlab ...@@ -16,7 +16,7 @@ module Gitlab
end end
def find_sessionless_user def find_sessionless_user
find_user_from_access_token || find_user_from_rss_token find_user_from_access_token || find_user_from_feed_token
rescue Gitlab::Auth::AuthenticationError rescue Gitlab::Auth::AuthenticationError
nil nil
end end
......
...@@ -25,13 +25,15 @@ module Gitlab ...@@ -25,13 +25,15 @@ module Gitlab
current_request.env['warden']&.authenticate if verified_request? current_request.env['warden']&.authenticate if verified_request?
end end
def find_user_from_rss_token def find_user_from_feed_token
return unless current_request.path.ends_with?('.atom') || current_request.format.atom? return unless rss_request? || ics_request?
token = current_request.params[:rss_token].presence # NOTE: feed_token was renamed from rss_token but both needs to be supported because
# users might have already added the feed to their RSS reader before the rename
token = current_request.params[:feed_token].presence || current_request.params[:rss_token].presence
return unless token return unless token
User.find_by_rss_token(token) || raise(UnauthorizedError) User.find_by_feed_token(token) || raise(UnauthorizedError)
end end
def find_user_from_access_token def find_user_from_access_token
...@@ -104,6 +106,14 @@ module Gitlab ...@@ -104,6 +106,14 @@ module Gitlab
def current_request def current_request
@current_request ||= ensure_action_dispatch_request(request) @current_request ||= ensure_action_dispatch_request(request)
end end
def rss_request?
current_request.path.ends_with?('.atom') || current_request.format.atom?
end
def ics_request?
current_request.path.ends_with?('.ics') || current_request.format.ics?
end
end end
end end
end 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.
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