Rework of milestones
This commit is contained in:
parent
b01f8b63c2
commit
190e483fb4
8 changed files with 72 additions and 34 deletions
|
@ -28,7 +28,7 @@
|
|||
%p= link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title"
|
||||
|
||||
%span.update-author
|
||||
%small.cdark= "##{issue.id}"
|
||||
%span.cdark= "##{issue.id}"
|
||||
- if issue.assignee
|
||||
assigned to #{issue.assignee_name}
|
||||
- else
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
%li{class: "milestone", id: dom_id(milestone) }
|
||||
%li{class: "milestone milestone-#{milestone.closed ? 'closed' : 'open'}", id: dom_id(milestone) }
|
||||
.right
|
||||
- if can? current_user, :admin_milestone, milestone.project
|
||||
- if can?(current_user, :admin_milestone, milestone.project) and milestone.open?
|
||||
= link_to edit_project_milestone_path(milestone.project, milestone), class: "btn small edit-milestone-link grouped" do
|
||||
%i.icon-edit
|
||||
Edit
|
||||
%h4
|
||||
= link_to_gfm truncate(milestone.title, length: 100), project_milestone_path(milestone.project, milestone)
|
||||
- if milestone.expired? and not milestone.closed
|
||||
%span.cred (Expired)
|
||||
%small
|
||||
= milestone.expires_at
|
||||
.row
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
%li{class: ("active" if (params[:f] == "active" || !params[:f]))}
|
||||
= link_to project_milestones_path(@project, f: "active") do
|
||||
Active
|
||||
%li{class: ("active" if params[:f] == "closed")}
|
||||
= link_to project_milestones_path(@project, f: "closed") do
|
||||
Closed
|
||||
%li{class: ("active" if params[:f] == "all")}
|
||||
= link_to project_milestones_path(@project, f: "all") do
|
||||
All
|
||||
|
@ -19,7 +22,7 @@
|
|||
= render @milestones
|
||||
|
||||
- if @milestones.present?
|
||||
%li.bottom= paginate @milestones, remote: true, theme: "gitlab"
|
||||
%li.bottom= paginate @milestones, theme: "gitlab"
|
||||
- else
|
||||
%li
|
||||
%h3.nothing_here_message Nothing to show here
|
||||
|
|
|
@ -1,31 +1,41 @@
|
|||
%h3.page_title
|
||||
Milestone ##{@milestone.id}
|
||||
%small
|
||||
= @milestone.expires_at
|
||||
.row
|
||||
.span6
|
||||
%h3.page_title
|
||||
Milestone ##{@milestone.id}
|
||||
%small
|
||||
= @milestone.expires_at
|
||||
.back_link
|
||||
= link_to project_milestones_path(@project) do
|
||||
← To milestones list
|
||||
.span6
|
||||
.right
|
||||
- unless @milestone.closed
|
||||
= link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn small grouped", title: "New Issue" do
|
||||
%i.icon-plus
|
||||
New Issue
|
||||
= link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link small grouped"
|
||||
- if can?(current_user, :admin_milestone, @project)
|
||||
= link_to edit_project_milestone_path(@project, @milestone), class: "btn small grouped" do
|
||||
%i.icon-edit
|
||||
Edit
|
||||
|
||||
%span.right
|
||||
= link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn small grouped", title: "New Issue" do
|
||||
%i.icon-plus
|
||||
New Issue
|
||||
= link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link small grouped"
|
||||
- if can?(current_user, :admin_milestone, @project)
|
||||
= link_to edit_project_milestone_path(@project, @milestone), class: "btn small grouped" do
|
||||
%i.icon-edit
|
||||
Edit
|
||||
|
||||
.back_link
|
||||
= link_to project_milestones_path(@project) do
|
||||
← To milestones list
|
||||
|
||||
- if @milestone.can_be_closed?
|
||||
%hr
|
||||
%p
|
||||
%span All issues for this milestone are closed. You may close milestone now.
|
||||
= link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {closed: true }), method: :put, class: "btn small danger"
|
||||
|
||||
.main_box
|
||||
.top_box_content
|
||||
%h5
|
||||
%h4.box-title
|
||||
- if @milestone.closed
|
||||
.alert-message.error.status_info Closed
|
||||
- else
|
||||
.alert-message.success.status_info Open
|
||||
.error.status_info Closed
|
||||
- elsif @milestone.expired?
|
||||
.error.status_info Expired
|
||||
|
||||
= gfm escape_once(@milestone.title)
|
||||
%small.right= @milestone.expires_at
|
||||
|
||||
.middle_box_content
|
||||
%h5
|
||||
|
@ -34,6 +44,7 @@
|
|||
#{@milestone.closed_items_count} closed
|
||||
–
|
||||
#{@milestone.open_items_count} open
|
||||
%span.right= @milestone.expires_at
|
||||
.progress.progress-info
|
||||
.bar{style: "width: #{@milestone.percent_complete}%;"}
|
||||
|
||||
|
@ -43,6 +54,7 @@
|
|||
= preserve do
|
||||
= markdown @milestone.description
|
||||
|
||||
|
||||
.row
|
||||
.span6
|
||||
%table.milestone-issue-filter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue