Skip to content
Snippets Groups Projects
Commit 3e991230 authored by James Lopez's avatar James Lopez
Browse files

Fix merge conflicts - squashed commit

# Conflicts:
#	app/models/project.rb
parent 7df495fb
No related branches found
No related tags found
1 merge request!3114Export project functionality
Pipeline #
Showing
with 292 additions and 100 deletions
Loading
Loading
@@ -226,8 +226,7 @@ ul.notes {
}
}
 
.note-action-button,
.discussion-action-button {
.note-action-button {
display: inline-block;
margin-left: 10px;
line-height: 24px;
Loading
Loading
.pipelines {
.stage {
max-width: 100px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.duration, .finished_at {
margin: 4px 0;
}
.commit-title {
margin: 0;
}
.controls {
white-space: nowrap;
}
.btn {
margin: 4px;
}
}
Loading
Loading
@@ -66,12 +66,6 @@
}
}
 
.calendar-hint {
margin-top: -12px;
float: right;
font-size: 12px;
}
.profile-link-holder {
display: inline;
 
Loading
Loading
@@ -134,14 +128,6 @@
}
}
 
.change-username-title {
color: $gl-warning;
}
.remove-account-title {
color: $gl-danger;
}
.provider-btn-group {
display: inline-block;
margin-right: 10px;
Loading
Loading
@@ -218,7 +204,7 @@
 
.btn {
display: inline-block;
width: 48%;
width: 46%;
}
}
}
Loading
Loading
Loading
Loading
@@ -7,10 +7,10 @@
}
.no-ssh-key-message, .project-limit-message {
background-color: #f28d35;
margin-bottom: 16px;
margin-bottom: 0;
}
.new_project,
.edit_project {
.edit-project {
fieldset.features {
.control-label {
font-weight: normal;
Loading
Loading
@@ -26,8 +26,13 @@
}
 
.project-home-panel {
padding-bottom: 40px;
border-bottom: 1px solid $border-color;
background: $white-light;
text-align: left;
padding: 24px 0;
.container-fluid {
position: relative;
}
 
.cover-controls {
.project-settings-dropdown {
Loading
Loading
@@ -43,21 +48,55 @@
}
}
 
.project-identicon-holder {
margin-bottom: 16px;
.cover-title {
margin-bottom: 0;
}
 
.avatar, .identicon {
margin: 0 auto;
float: none;
.project-image-container {
@include make-sm-column(1);
max-width: 86px;
min-width: 86px;
padding-right: 0;
margin: 11px 0;
@media (max-width: $screen-md-max) {
padding-left: 0;
margin: 0 0 10px;
max-width: none;
min-width: none;
.avatar.s70 {
margin: auto;
}
}
}
 
.identicon {
@include border-radius(50%);
.project-info {
@include make-sm-column(10);
h1 {
font-size: 24px;
font-weight: normal;
margin: 0;
}
.project-home-desc {
p {
margin: 0;
}
}
}
 
.identicon {
float: left;
@include border-radius(50%);
}
.avatar {
float: none;
}
.notifications-btn {
margin-top: -28px;
 
.fa-bell {
margin-right: 6px;
Loading
Loading
@@ -69,28 +108,45 @@
}
 
.project-repo-buttons {
margin-top: 20px;
margin-bottom: 0;
font-size: 0;
 
.count-buttons {
display: block;
margin-bottom: 20px;
}
.btn {
@include btn-gray;
padding: 3px 10px;
text-transform: none;
background-color: $background-color;
 
.clone-row {
.split-repo-buttons,
.project-clone-holder {
display: inline-block;
.fa {
color: $layout-link-gray;
}
 
.split-repo-buttons {
margin: 0 12px;
.fa-caret-down {
margin-left: 3px;
}
}
 
.btn {
@include btn-gray;
text-transform: none;
.btn-group:not(:first-child):not(:last-child) > .btn {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
form {
margin-left: 10px;
}
.count-buttons {
display: inline-block;
vertical-align: top;
margin-top: 16px;
}
.project-clone-holder {
display: inline-block;
margin-top: 16px;
input {
height: 29px;
}
}
 
.count-with-arrow {
Loading
Loading
@@ -140,14 +196,18 @@
line-height: 13px;
padding: $gl-vert-padding $gl-padding;
letter-spacing: .4px;
padding: 10px 14px;
padding: 7px 14px;
text-align: center;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
background-image: none;
white-space: nowrap;
margin: 0 11px 0 4px;
margin: 0 10px 0 4px;
a {
color: inherit;
}
 
&:hover {
background: #fff;
Loading
Loading
@@ -155,13 +215,37 @@
}
}
}
.project-right-buttons {
position: absolute;
right: 16px;
bottom: 0;
.btn {
padding: 3px 10px;
background-color: $background-color;
}
@media (max-width: 1304px) {
top: 0;
}
}
@media (max-width: $screen-md-max) {
text-align: center;
.project-info,
.project-image-container {
width: 100%;
}
}
}
 
.split-one {
display: inline-table;
margin-right: 12px;
 
a {
> a {
margin: -1px;
}
}
Loading
Loading
@@ -285,11 +369,11 @@ a.deploy-project-label {
}
 
.project-stats {
text-align: center;
margin-top: $gl-padding;
margin-bottom: 0;
padding-top: 10px;
padding-bottom: 4px;
padding: 16px 0;
background-color: $white-light;
font-size: 0;
 
ul.nav {
display: inline-block;
Loading
Loading
@@ -300,12 +384,11 @@ a.deploy-project-label {
}
 
.nav > li > a {
@include btn-default;
@include btn-gray;
background-color: transparent;
border: 1px solid #f7f8fa;
margin-left: 12px;
margin-right: 12px;
padding: 0 10px;
font-size: 15px;
color: $notes-light-color;
}
 
li {
Loading
Loading
@@ -325,6 +408,10 @@ a.deploy-project-label {
background-color: #f0f2f5;
}
}
&.row-content-block.second-block {
margin-top: 0;
}
}
 
pre.light-well {
Loading
Loading
@@ -442,9 +529,14 @@ pre.light-well {
border-top: 0;
 
.edit-project-readme {
z-index: 100;
z-index: 2;
position: relative;
}
.wiki h1 {
border-bottom: none;
padding: 0;
}
}
 
.git-clone-holder {
Loading
Loading
Loading
Loading
@@ -28,6 +28,7 @@
}
 
.search-input {
padding-right: 20px;
border: none;
font-size: 14px;
outline: none;
Loading
Loading
@@ -47,6 +48,7 @@
display: inline-block;
background-color: $location-badge-bg;
vertical-align: top;
cursor: default;
}
 
.search-input-container {
Loading
Loading
@@ -55,7 +57,7 @@
position: relative;
}
 
.search-location-badge, .search-input-wrap {
.search-input-wrap {
// Fallback if flexbox is not supported
display: inline-block;
}
Loading
Loading
Loading
Loading
@@ -12,3 +12,11 @@
border: 1px solid $warning-message-border;
border-radius: $border-radius-base;
}
.warning-title {
color: $gl-warning;
}
.danger-title {
color: $gl-danger;
}
Loading
Loading
@@ -16,19 +16,6 @@
}
}
 
.snippet-box {
@include border-radius(2px);
display: block;
float: left;
padding: 0 $gl-padding;
font-weight: normal;
margin-right: 10px;
font-size: $gl-font-size;
border: 1px solid;
line-height: 32px;
}
.markdown-snippet-copy {
position: fixed;
top: -10px;
Loading
Loading
@@ -36,3 +23,34 @@
max-height: 0;
max-width: 0;
}
.file-holder.snippet-file-content {
padding-bottom: $gl-padding;
border-bottom: 1px solid $border-color;
.file-title {
padding-top: $gl-padding;
padding-bottom: $gl-padding;
}
.file-actions {
top: 12px;
}
.file-content {
border-left: 1px solid $border-color;
border-right: 1px solid $border-color;
border-bottom: 1px solid $border-color;
}
}
.snippet-title {
font-size: 24px;
font-weight: normal;
}
.snippet-actions {
@media (min-width: $screen-sm-min) {
float: right;
}
}
Loading
Loading
@@ -29,6 +29,17 @@
.todo-item {
.todo-title {
@include str-truncated(calc(100% - 174px));
overflow: visible;
}
.status-box {
margin: 0;
float: none;
display: inline-block;
font-weight: normal;
padding: 0 5px;
line-height: inherit;
font-size: 14px;
}
 
.todo-body {
Loading
Loading
@@ -76,12 +87,11 @@
 
@media (max-width: $screen-xs-max) {
.todo-item {
padding-left: $gl-padding;
.todo-title {
white-space: normal;
overflow: visible;
max-width: 100%;
margin-bottom: 10px;
}
 
.avatar {
Loading
Loading
Loading
Loading
@@ -15,16 +15,23 @@
margin-bottom: 0;
 
tr {
> td, > th {
border-bottom: 1px solid $table-border-gray;
border-top: 1px solid $table-border-gray;
td, th {
line-height: 23px;
}
 
&:hover {
cursor: pointer;
td {
background: $row-hover;
background-color: $row-hover;
border-top: 1px solid $row-hover-border;
border-bottom: 1px solid $row-hover-border;
}
cursor: pointer;
}
&.selected {
td {
background: $gray-dark;
Loading
Loading
Loading
Loading
@@ -9,6 +9,6 @@ class Admin::AbuseReportsController < Admin::ApplicationController
abuse_report.remove_user(deleted_by: current_user) if params[:remove_user]
abuse_report.destroy
 
render nothing: true
head :ok
end
end
Loading
Loading
@@ -19,6 +19,12 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
redirect_to admin_runners_path
end
 
def reset_health_check_token
@application_setting.reset_health_check_access_token!
flash[:notice] = 'New health check access token has been generated!'
redirect_to :back
end
def clear_repository_check_states
RepositoryCheck::ClearWorker.perform_async
 
Loading
Loading
@@ -53,6 +59,12 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
end
end
 
enabled_oauth_sign_in_sources = params[:application_setting].delete(:enabled_oauth_sign_in_sources)
params[:application_setting][:disabled_oauth_sign_in_sources] =
AuthHelper.button_based_providers.map(&:to_s) -
Array(enabled_oauth_sign_in_sources)
params.require(:application_setting).permit(
:default_projects_limit,
:default_branch_protection,
Loading
Loading
@@ -94,8 +106,11 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:email_author_in_body,
:repository_checks_enabled,
:metrics_packet_size,
:send_user_confirmation_email,
:container_registry_token_expire_delay,
restricted_visibility_levels: [],
import_sources: []
import_sources: [],
disabled_oauth_sign_in_sources: []
)
end
end
Loading
Loading
@@ -32,7 +32,7 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController
 
respond_to do |format|
format.html { redirect_back_or_default(default: { action: 'index' }) }
format.js { render nothing: true }
format.js { head :ok }
end
end
 
Loading
Loading
class Admin::HealthCheckController < Admin::ApplicationController
def show
@errors = HealthCheck::Utils.process_checks('standard')
end
end
Loading
Loading
@@ -6,7 +6,7 @@ class Admin::KeysController < Admin::ApplicationController
 
respond_to do |format|
format.html
format.js { render nothing: true }
format.js { head :ok }
end
end
 
Loading
Loading
Loading
Loading
@@ -9,23 +9,18 @@ class Admin::RunnersController < Admin::ApplicationController
end
 
def show
@builds = @runner.builds.order('id DESC').first(30)
@projects =
if params[:search].present?
::Project.search(params[:search])
else
Project.all
end
@projects = @projects.where.not(id: @runner.projects.select(:id)) if @runner.projects.any?
@projects = @projects.page(params[:page]).per(30)
assign_builds_and_projects
end
 
def update
@runner.update_attributes(runner_params)
respond_to do |format|
format.js
format.html { redirect_to admin_runner_path(@runner) }
if @runner.update_attributes(runner_params)
respond_to do |format|
format.js
format.html { redirect_to admin_runner_path(@runner) }
end
else
assign_builds_and_projects
render 'show'
end
end
 
Loading
Loading
@@ -58,6 +53,18 @@ class Admin::RunnersController < Admin::ApplicationController
end
 
def runner_params
params.require(:runner).permit(:token, :description, :tag_list, :active)
params.require(:runner).permit(Ci::Runner::FORM_EDITABLE)
end
def assign_builds_and_projects
@builds = runner.builds.order('id DESC').first(30)
@projects =
if params[:search].present?
::Project.search(params[:search])
else
Project.all
end
@projects = @projects.where.not(id: runner.projects.select(:id)) if runner.projects.any?
@projects = @projects.page(params[:page]).per(30)
end
end
Loading
Loading
@@ -11,7 +11,7 @@ class Admin::SpamLogsController < Admin::ApplicationController
redirect_to admin_spam_logs_path, notice: "User #{spam_log.user.username} was successfully removed."
else
spam_log.destroy
render nothing: true
head :ok
end
end
end
Loading
Loading
@@ -119,6 +119,7 @@ class Admin::UsersController < Admin::ApplicationController
user_params_with_pass.merge!(
password: params[:user][:password],
password_confirmation: params[:user][:password_confirmation],
password_expires_at: Time.now
)
end
 
Loading
Loading
@@ -153,7 +154,7 @@ class Admin::UsersController < Admin::ApplicationController
 
respond_to do |format|
format.html { redirect_back_or_admin_user(notice: "Successfully removed email.") }
format.js { render nothing: true }
format.js { head :ok }
end
end
 
Loading
Loading
Loading
Loading
@@ -176,7 +176,7 @@ class ApplicationController < ActionController::Base
end
 
def check_password_expiration
if current_user && current_user.password_expires_at && current_user.password_expires_at < Time.now && !current_user.ldap_user?
if current_user && current_user.password_expires_at && current_user.password_expires_at < Time.now && !current_user.ldap_user?
redirect_to new_profile_password_path and return
end
end
Loading
Loading
@@ -232,7 +232,7 @@ class ApplicationController < ActionController::Base
end
 
def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:username, :email, :password, :login, :remember_me, :otp_attempt) }
devise_parameter_sanitizer.permit(:sign_in, keys: [:username, :email, :password, :login, :remember_me, :otp_attempt])
end
 
def hexdigest(string)
Loading
Loading
@@ -263,7 +263,7 @@ class ApplicationController < ActionController::Base
# internal repos where you are not a member. Enable this filter
# or improve current implementation to filter only issues you
# created or assigned or mentioned
#@filter_params[:authorized_only] = true
# @filter_params[:authorized_only] = true
end
 
@filter_params
Loading
Loading
Loading
Loading
@@ -31,6 +31,24 @@ class AutocompleteController < ApplicationController
render json: @user, only: [:name, :username, :id], methods: [:avatar_url]
end
 
def projects
project = Project.find_by_id(params[:project_id])
projects = current_user.authorized_projects
projects = projects.select do |project|
current_user.can?(:admin_issue, project)
end
no_project = {
id: 0,
name_with_namespace: 'No project',
}
projects.unshift(no_project)
projects.delete(project)
render json: projects.to_json(only: [:id, :name_with_namespace], methods: :name_with_namespace)
end
private
 
def find_users
Loading
Loading
Loading
Loading
@@ -122,7 +122,7 @@ module CreatesCommit
# Merge request from fork to this project
@mr_source_project = @tree_edit_project
@mr_target_project = @project
@mr_target_branch ||= @ref
@mr_target_branch ||= @ref
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment