Skip to content
Snippets Groups Projects
Commit e0ab881b authored by Andriy Dyadyura's avatar Andriy Dyadyura
Browse files

update issue page

parents 0e8ec789 110a5f9c
No related branches found
No related tags found
No related merge requests found
Showing
with 103 additions and 124 deletions
Please view this file on the master branch, on stable branches it's out of date.
 
v 8.3.0 (unreleased)
- API support for starred projects for authorized user (Zeger-Jan van de Weg)
- Add open_issues_count to project API (Stan Hu)
- Expand character set of usernames created by Omniauth (Corey Hinshaw)
- Add button to automatically merge a merge request when the build succeeds (Zeger-Jan van de Weg)
- Merge when build succeeds (Zeger-Jan van de Weg)
Loading
Loading
Loading
Loading
@@ -215,7 +215,7 @@ group :development do
gem "annotate", "~> 2.6.0"
gem "letter_opener", '~> 1.1.2'
gem 'quiet_assets', '~> 1.0.2'
gem 'rerun', '~> 0.10.0'
gem 'rerun', '~> 0.11.0'
gem 'bullet', require: false
gem 'rblineprof', platform: :mri, require: false
gem 'web-console', '~> 2.0'
Loading
Loading
Loading
Loading
@@ -117,23 +117,6 @@ GEM
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
celluloid (0.17.2)
celluloid-essentials
celluloid-extras
celluloid-fsm
celluloid-pool
celluloid-supervision
timers (>= 4.1.1)
celluloid-essentials (0.20.5)
timers (>= 4.1.1)
celluloid-extras (0.20.5)
timers (>= 4.1.1)
celluloid-fsm (0.20.5)
timers (>= 4.1.1)
celluloid-pool (0.20.5)
timers (>= 4.1.1)
celluloid-supervision (0.20.5)
timers (>= 4.1.1)
charlock_holmes (0.7.3)
chunky_png (1.3.5)
cliver (0.3.2)
Loading
Loading
@@ -369,7 +352,6 @@ GEM
hipchat (1.5.2)
httparty
mimemagic
hitimes (1.2.3)
html-pipeline (1.11.0)
activesupport (>= 2)
nokogiri (~> 1.4)
Loading
Loading
@@ -410,8 +392,7 @@ GEM
addressable (~> 2.3)
letter_opener (1.1.2)
launchy (~> 2.2)
listen (2.9.0)
celluloid (>= 0.15.2)
listen (3.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
loofah (2.0.3)
Loading
Loading
@@ -601,8 +582,8 @@ GEM
redis-store (1.1.7)
redis (>= 2.2)
request_store (1.2.1)
rerun (0.10.0)
listen (~> 2.7, >= 2.7.3)
rerun (0.11.0)
listen (~> 3.0)
responders (2.1.0)
railties (>= 4.2.0, < 5)
rest-client (1.8.0)
Loading
Loading
@@ -759,8 +740,6 @@ GEM
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
timers (4.1.1)
hitimes
timfel-krb5-auth (0.8.3)
tinder (1.10.1)
eventmachine (~> 1.0)
Loading
Loading
@@ -941,7 +920,7 @@ DEPENDENCIES
redis-namespace
redis-rails (~> 4.0.0)
request_store (~> 1.2.0)
rerun (~> 0.10.0)
rerun (~> 0.11.0)
responders (~> 2.0)
rouge (~> 1.10.1)
rqrcode-rails3 (~> 0.1.7)
Loading
Loading
Loading
Loading
@@ -18,7 +18,7 @@ class @IssuableContext
 
$('.issuable-affix').affix offset:
top: ->
@top = ($('.issuable-affix').offset().top - 60)
@top = ($('.issuable-affix').offset().top - 70)
bottom: ->
@bottom = $('.footer').outerHeight(true)
 
Loading
Loading
Loading
Loading
@@ -10,12 +10,12 @@ class @Issue
@initTaskList()
 
initTaskList: ->
$('.issue-details .js-task-list-container').taskList('enable')
$(document).on 'tasklist:changed', '.issue-details .js-task-list-container', @updateTaskList
$('.detail-page-description .js-task-list-container').taskList('enable')
$(document).on 'tasklist:changed', '.detail-page-description .js-task-list-container', @updateTaskList
 
disableTaskList: ->
$('.issue-details .js-task-list-container').taskList('disable')
$(document).off 'tasklist:changed', '.issue-details .js-task-list-container'
$('.detail-page-description .js-task-list-container').taskList('disable')
$(document).off 'tasklist:changed', '.detail-page-description .js-task-list-container'
 
# TODO (rspeicher): Make the issue description inline-editable like a note so
# that we can re-use its form here
Loading
Loading
Loading
Loading
@@ -40,12 +40,12 @@ class @MergeRequest
this.$('.all-commits').removeClass 'hide'
 
initTaskList: ->
$('.merge-request-details .js-task-list-container').taskList('enable')
$(document).on 'tasklist:changed', '.merge-request-details .js-task-list-container', @updateTaskList
$('.detail-page-description .js-task-list-container').taskList('enable')
$(document).on 'tasklist:changed', '.detail-page-description .js-task-list-container', @updateTaskList
 
disableTaskList: ->
$('.merge-request-details .js-task-list-container').taskList('disable')
$(document).off 'tasklist:changed', '.merge-request-details .js-task-list-container'
$('.detail-page-description .js-task-list-container').taskList('disable')
$(document).off 'tasklist:changed', '.detail-page-description .js-task-list-container'
 
# TODO (rspeicher): Make the merge request description inline-editable like a
# note so that we can re-use its form here
Loading
Loading
Loading
Loading
@@ -14,22 +14,27 @@
margin-right: 10px;
font-size: $gl-font-size;
 
&.issue-box-closed {
&.status-box-closed {
background-color: $gl-danger;
color: #FFF;
}
 
&.issue-box-merged {
&.status-box-merged {
background-color: $gl-primary;
color: #FFF;
}
 
<<<<<<< HEAD
&.issue-box-open {
background-color: #31af64;
=======
&.status-box-open {
background-color: #019875;
>>>>>>> 110a5f9c96457ac314f30630735dd827d9d96a4c
color: #FFF;
}
 
&.issue-box-expired {
&.status-box-expired {
background: #cea61b;
color: #FFF;
}
Loading
Loading
Loading
Loading
@@ -143,7 +143,11 @@ ul.controls {
 
> li {
float: left;
padding-right: 10px;
margin-right: 10px;
&:last-child {
margin-right: 0;
}
 
.author_link {
display: inline-block;
Loading
Loading
Loading
Loading
@@ -87,7 +87,7 @@
 
.new_note,
.edit_note,
.issuable-description,
.detail-page-description,
.milestone-description,
.wiki-content,
.merge-request-form {
Loading
Loading
Loading
Loading
@@ -10,8 +10,7 @@
margin-left: -$gl-padding;
margin-right: -$gl-padding;
color: $gl-gray;
border-bottom: 1px solid #ECEEF1;
border-right: 1px solid #ECEEF1;
border-bottom: 1px solid $border-white-light;
 
&:target {
background: $hover;
Loading
Loading
.detail-page-header {
margin: -$gl-padding;
padding: 7px $gl-padding;
margin-bottom: 0px;
border-bottom: 1px solid $border-color;
color: #5c5d5e;
font-size: 16px;
line-height: 42px;
.author {
color: #5c5d5e;
}
.identifier {
color: #5c5d5e;
}
}
.detail-page-description {
.title {
margin: 0;
font-size: 23px;
color: #313236;
}
.description {
margin-top: 6px;
p:last-child {
margin-bottom: 0;
}
}
}
Loading
Loading
@@ -18,7 +18,7 @@
 
&.affix {
position: fixed;
top: 60px;
top: 70px;
margin-right: 35px;
}
}
Loading
Loading
@@ -36,33 +36,12 @@
}
 
.issuable-details {
.issue-title {
margin: 0;
font-size: 23px;
color: #313236;
}
.description {
margin-top: 6px;
p:last-child {
margin-bottom: 0;
}
}
section {
border-right: 1px solid #ECEEF1;
border-right: 1px solid $border-white-light;
 
> .tab-content {
.issuable-discussion {
margin-right: 1px;
}
.issue-discussion > .gray-content-block,
> .gray-content-block {
margin-top: 0;
border-top: none;
margin-right: -15px;
}
}
}
 
Loading
Loading
@@ -135,24 +114,4 @@
margin-top: 6px;
margin-right: 2px;
}
}
.issuable-title {
margin: -$gl-padding;
padding: 10px $gl-padding;
margin-bottom: 0px;
border-bottom: 1px solid $border-color;
color: #8F8F8F;
font-size: 16px;
line-height: 34px;
.author {
color: #323232;
font-weight: 500;
}
.issuable-id {
color: #323232;
font-weight: 500;
}
}
}
\ No newline at end of file
Loading
Loading
@@ -141,11 +141,6 @@ form.edit-issue {
}
}
 
.issue-closed-by-widget {
padding: 16px 0;
margin: 0px;
}
.issue-form .select2-container {
width: 250px !important;
}
Loading
Loading
@@ -79,7 +79,6 @@
padding: $gl-padding;
margin-left: -$gl-padding;
margin-right: -$gl-padding;
border-right: 1px solid $border-color;
border-top: 1px solid $border-color;
margin-bottom: -$gl-padding;
}
Loading
Loading
Loading
Loading
@@ -35,3 +35,20 @@
border-color: $gl-warning;
}
}
.ci-status-icon-success {
@extend .cgreen;
}
.ci-status-icon-failed {
@extend .cred;
}
.ci-status-icon-running,
.ci-status-icon-pending {
// These are standard text color
}
.ci-status-icon-canceled,
.ci-status-icon-disabled,
.ci-status-icon-not-found,
.ci-status-icon-skipped {
@extend .cgray;
}
Loading
Loading
@@ -7,7 +7,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
before_action :closes_issues, only: [:edit, :update, :show, :diffs, :commits, :builds]
before_action :validates_merge_request, only: [:show, :diffs, :commits, :builds]
before_action :define_show_vars, only: [:show, :diffs, :commits, :builds]
before_action :define_widget_vars, only: [:merge, :cancel_merge_when_build_succeeds]
before_action :define_widget_vars, only: [:merge, :cancel_merge_when_build_succeeds, :merge_check]
before_action :ensure_ref_fetched, only: [:show, :diffs, :commits, :builds]
 
# Allow read any merge_request
Loading
Loading
@@ -153,11 +153,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
 
def merge_check
if @merge_request.unchecked?
@merge_request.check_if_can_be_merged
end
closes_issues
@merge_request.check_if_can_be_merged if @merge_request.unchecked?
 
render partial: "projects/merge_requests/widget/show.html.haml", layout: false
end
Loading
Loading
@@ -178,7 +174,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
 
@merge_request.update(merge_error: nil)
 
if params[:merge_when_build_succeeds] && @merge_request.ci_commit && @merge_request.ci_commit.active?
if params[:merge_when_build_succeeds].present? && @merge_request.ci_commit && @merge_request.ci_commit.active?
MergeRequests::MergeWhenBuildSucceedsService.new(@project, current_user, merge_params)
.execute(@merge_request)
@status = :merge_when_build_succeeds
Loading
Loading
@@ -299,6 +295,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
 
def define_widget_vars
@ci_commit = @merge_request.ci_commit
closes_issues
end
 
def invalid_mr
Loading
Loading
Loading
Loading
@@ -12,19 +12,6 @@ module CiStatusHelper
ci_label_for_status(ci_commit.status)
end
 
def ci_status_color(ci_commit)
case ci_commit.status
when 'success'
'green'
when 'failed'
'red'
when 'running', 'pending'
'yellow'
else
'gray'
end
end
def ci_status_with_icon(status)
content_tag :span, class: "ci-status ci-#{status}" do
ci_icon_for_status(status) + '&nbsp;'.html_safe + ci_label_for_status(status)
Loading
Loading
@@ -56,12 +43,11 @@ module CiStatusHelper
end
 
def render_ci_status(ci_commit)
link_to ci_status_path(ci_commit),
class: "ci-status-link c#{ci_status_color(ci_commit)}",
link_to ci_status_icon(ci_commit),
ci_status_path(ci_commit),
class: "ci-status-link ci-status-icon-#{ci_commit.status.dasherize}",
title: "Build #{ci_status_label(ci_commit)}",
data: { toggle: 'tooltip', placement: 'left' } do
ci_status_icon(ci_commit)
end
data: { toggle: 'tooltip', placement: 'left' }
end
 
def no_runners_for_project?(project)
Loading
Loading
Loading
Loading
@@ -57,15 +57,15 @@ module IssuesHelper
options_from_collection_for_select(milestones, 'id', 'title', object.milestone_id)
end
 
def issue_box_class(item)
def status_box_class(item)
if item.respond_to?(:expired?) && item.expired?
'issue-box-expired'
'status-box-expired'
elsif item.respond_to?(:merged?) && item.merged?
'issue-box-merged'
'status-box-merged'
elsif item.closed?
'issue-box-closed'
'status-box-closed'
else
'issue-box-open'
'status-box-open'
end
end
 
Loading
Loading
Loading
Loading
@@ -51,7 +51,7 @@ module Mentionable
else
self.class.mentionable_attrs.each do |attr, options|
text = send(attr)
options[:cache_key] = [self, attr] if options.delete(:cache)
options[:cache_key] = [self, attr] if options.delete(:cache) && self.persisted?
ext.analyze(text, options)
end
end
Loading
Loading
Loading
Loading
@@ -850,4 +850,8 @@ class Project < ActiveRecord::Base
def build_timeout_in_minutes=(value)
self.build_timeout = value.to_i * 60
end
def open_issues_count
issues.opened.count
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