gitlab-org--gitlab-foss/app/views/milestones/_milestone.html.haml
2013-04-16 21:51:26 +03:00

28 lines
1.3 KiB
Text

%li{class: "milestone milestone-#{milestone.closed? ? 'closed' : 'open'}", id: dom_id(milestone) }
.pull-right
- if can?(current_user, :admin_milestone, milestone.project) and milestone.active?
= link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link grouped" do
%i.icon-edit
Edit
- if milestone.can_be_closed?
= link_to 'Close', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-remove"
%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
- if milestone.is_empty?
%span.muted Empty
- else
%div
%div
= link_to project_issues_path(milestone.project, milestone_id: milestone.id) do
= pluralize milestone.issues.count, 'Issue'
 
= link_to project_merge_requests_path(milestone.project, milestone_id: milestone.id) do
= pluralize milestone.merge_requests.count, 'Merge Request'
 
%span.light #{milestone.percent_complete}% complete
.progress.progress-info
.bar{style: "width: #{milestone.percent_complete}%;"}