Commit d1aff25c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Consistent place for state-label across issues, mr, milestones

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 3cdb8f26
...@@ -106,13 +106,11 @@ pre.well-pre { ...@@ -106,13 +106,11 @@ pre.well-pre {
/** Big Labels **/ /** Big Labels **/
.state-label { .state-label {
font-size: 14px; font-size: 14px;
padding: 5px 15px; padding: 6px 25px;
text-align: center; text-align: center;
float: right;
position: relative;
top: -5px;
@include border-radius(4px); @include border-radius(4px);
text-shadow: none; text-shadow: none;
margin-left: 10px;
&.state-label-green { &.state-label-green {
background: #4A4; background: #4A4;
......
...@@ -5,6 +5,11 @@ ...@@ -5,6 +5,11 @@
created at created at
= @issue.created_at.stamp("Aug 21, 2011") = @issue.created_at.stamp("Aug 21, 2011")
- if @issue.closed?
%span.state-label.state-label-red Closed
- else
%span.state-label.state-label-green Open
%span.pull-right %span.pull-right
- if can?(current_user, :write_issue, @project) - if can?(current_user, :write_issue, @project)
= link_to new_project_issue_path(@project), class: "btn grouped", title: "New Issue", id: "new_issue_link" do = link_to new_project_issue_path(@project), class: "btn grouped", title: "New Issue", id: "new_issue_link" do
...@@ -36,10 +41,6 @@ ...@@ -36,10 +41,6 @@
.ui-box.ui-box-show .ui-box.ui-box-show
.ui-box-head .ui-box-head
%h4.box-title %h4.box-title
- if @issue.closed?
.state-label.state-label-red Closed
- else
.state-label.state-label-green Open
= gfm escape_once(@issue.title) = gfm escape_once(@issue.title)
.ui-box-body .ui-box-body
......
...@@ -2,18 +2,11 @@ ...@@ -2,18 +2,11 @@
.ui-box-head .ui-box-head
%h4.box-title %h4.box-title
= gfm escape_once(@merge_request.title) = gfm escape_once(@merge_request.title)
- if @merge_request.merged?
.state-label.state-label-green
%i.icon-ok
Merged
- elsif @merge_request.closed?
.state-label.state-label-red
Closed
.ui-box-body .ui-box-body
%div %div
%cite.cgray %cite.cgray
Created on #{@merge_request.created_at.stamp("Aug 21, 2011")} by #{link_to_member(@project, @merge_request.author)}. Created by #{link_to_member(@project, @merge_request.author)}.
- if @merge_request.assignee - if @merge_request.assignee
Currently assigned to #{link_to_member(@project, @merge_request.assignee)}. Currently assigned to #{link_to_member(@project, @merge_request.assignee)}.
- if @merge_request.milestone - if @merge_request.milestone
......
%h3.page-title %h3.page-title
= "Merge Request ##{@merge_request.iid}:" = "Merge Request ##{@merge_request.iid}"
&nbsp; %small
-if @merge_request.for_fork? created at
%span.label-branch = @merge_request.created_at.stamp("Aug 21, 2011")
%span.label-project= truncate(@merge_request.source_project_path, length: 25)
#{@merge_request.source_branch} - if @merge_request.merged?
&rarr; %span.state-label.state-label-green
%span.label-branch= @merge_request.target_branch %i.icon-ok
Merged
- elsif @merge_request.closed?
%span.state-label.state-label-red
Closed
- else - else
%span.label-branch= @merge_request.source_branch %span.state-label.state-label-green
&rarr; Open
%span.label-branch= @merge_request.target_branch
%span.pull-right %span.pull-right
- if can?(current_user, :modify_merge_request, @merge_request) - if can?(current_user, :modify_merge_request, @merge_request)
...@@ -36,3 +41,16 @@ ...@@ -36,3 +41,16 @@
.back-link .back-link
= link_to project_merge_requests_path(@project) do = link_to project_merge_requests_path(@project) do
&larr; To merge requests &larr; To merge requests
%span.prepend-left-20.monospace
-if @merge_request.for_fork?
%span
%strong
#{truncate(@merge_request.source_project_path, length: 25)}:
#{@merge_request.source_branch}
&rarr;
%span= @merge_request.target_branch
- else
%span= @merge_request.source_branch
&rarr;
%spanh= @merge_request.target_branch
...@@ -3,15 +3,21 @@ ...@@ -3,15 +3,21 @@
Milestone ##{@milestone.iid} Milestone ##{@milestone.iid}
%small %small
= @milestone.expires_at = @milestone.expires_at
- if @milestone.closed?
%span.state-label.state-label-red Closed
- elsif @milestone.expired?
%span.state-label.state-label-red Expired
- else
%span.state-label.state-label-green Open
.pull-right .pull-right
- if can?(current_user, :admin_milestone, @project) - if can?(current_user, :admin_milestone, @project)
= link_to edit_project_milestone_path(@project, @milestone), class: "btn grouped" do = link_to edit_project_milestone_path(@project, @milestone), class: "btn grouped" do
%i.icon-edit %i.icon-edit
Edit Edit
- if @milestone.active? - if @milestone.active?
= link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove" = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove grouped"
- else - else
= link_to 'Reopen Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn" = link_to 'Reopen Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn grouped"
- if @milestone.issues.any? && @milestone.can_be_closed? - if @milestone.issues.any? && @milestone.can_be_closed?
.alert.alert-success .alert.alert-success
...@@ -25,10 +31,6 @@ ...@@ -25,10 +31,6 @@
.ui-box.ui-box-show .ui-box.ui-box-show
.ui-box-head .ui-box-head
%h4.box-title %h4.box-title
- if @milestone.closed?
.state-label.state-label-red Closed
- elsif @milestone.expired?
.state-label.state-label-red Expired
= gfm escape_once(@milestone.title) = gfm escape_once(@milestone.title)
......
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