summaryrefslogtreecommitdiff
path: root/app/views/groups/milestones/index.html.haml
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-06-27 10:14:57 +0200
committerMarin Jankovski <marin@gitlab.com>2014-06-30 09:45:16 +0200
commitc223fb1a9677ae00285426090618f5762de9f40e (patch)
treeb09d63edbd4982066daf2f25203e12b8e0655b3a /app/views/groups/milestones/index.html.haml
parentb6425f33bc0b0547058e96e5ab99a7892d9297f2 (diff)
downloadgitlab-ce-c223fb1a9677ae00285426090618f5762de9f40e.tar.gz
Start building group milestone show page.
Diffstat (limited to 'app/views/groups/milestones/index.html.haml')
-rw-r--r--app/views/groups/milestones/index.html.haml15
1 files changed, 7 insertions, 8 deletions
diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml
index b93ff09d25c..e3dd1ae5ae0 100644
--- a/app/views/groups/milestones/index.html.haml
+++ b/app/views/groups/milestones/index.html.haml
@@ -22,21 +22,20 @@
.nothing-here-block No milestones to show
- else
- @group_milestones.each do |milestone|
- %li{class: "milestone milestone-#{milestone.state == 'closed' ? 'closed' : 'open'}", id: dom_id(milestone.milestones.first) }
+ %li{class: "milestone milestone-#{milestone.closed? ? 'closed' : 'open'}", id: dom_id(milestone.milestones.first) }
.pull-right
- - safe_title = milestone.title.gsub(".", "-")
- - if milestone.state == 'closed'
- = link_to 'Reopen Milestone', group_milestone_path(@group, safe_title, milestone: {state_event: :activate }), method: :put, class: "btn btn-small btn-grouped"
+ - if milestone.closed?
+ = link_to 'Reopen Milestone', group_milestone_path(@group, milestone.safe_title, milestone: {state_event: :activate }), method: :put, class: "btn btn-small btn-grouped"
- else
- = link_to 'Close Milestone', group_milestone_path(@group, safe_title, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-remove"
+ = link_to 'Close Milestone', group_milestone_path(@group, milestone.safe_title, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-remove"
%h4
- = link_to_gfm truncate(milestone.title, length: 100), group_milestone_path(@group, safe_title)
+ = link_to_gfm truncate(milestone.title, length: 100), group_milestone_path(@group, milestone.safe_title)
%div
%div
- = link_to root_path do
+ = link_to group_milestone_path(@group, milestone.safe_title) do
= pluralize milestone.issue_count, 'Issue'
&nbsp;
- = link_to root_path do
+ = link_to group_milestone_path(@group, milestone.safe_title) do
= pluralize milestone.merge_requests_count, 'Merge Request'
&nbsp;
%span.light #{milestone.percent_complete}% complete