summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-06-25 13:30:23 +0200
committerMarin Jankovski <marin@gitlab.com>2014-06-30 09:44:30 +0200
commite1afea777a6f0d2e28adc2765c9445cb10bd25f8 (patch)
tree948325c45d2bed91fa2f5e8b6a6217918ccb3fab
parentaaba993352d65ad645215083cd6a4a46006f4b32 (diff)
downloadgitlab-ce-e1afea777a6f0d2e28adc2765c9445cb10bd25f8.tar.gz
Show title of milestone.
-rw-r--r--app/controllers/groups/milestones_controller.rb3
-rw-r--r--app/views/groups/milestones/_milestone.html.haml13
-rw-r--r--app/views/groups/milestones/index.html.haml19
3 files changed, 18 insertions, 17 deletions
diff --git a/app/controllers/groups/milestones_controller.rb b/app/controllers/groups/milestones_controller.rb
index fc538105125..88a709024d4 100644
--- a/app/controllers/groups/milestones_controller.rb
+++ b/app/controllers/groups/milestones_controller.rb
@@ -3,5 +3,8 @@ class Groups::MilestonesController < ApplicationController
def index
@group = Group.find_by(path: params[:group_id])
+ project_ids = @group.projects
+ project_milestones = Milestone.where(project_id: project_ids)
+ @milestones = project_milestones
end
end
diff --git a/app/views/groups/milestones/_milestone.html.haml b/app/views/groups/milestones/_milestone.html.haml
deleted file mode 100644
index 1f8488782cf..00000000000
--- a/app/views/groups/milestones/_milestone.html.haml
+++ /dev/null
@@ -1,13 +0,0 @@
-- if @milestones.any?
- - @issues.group_by(&:project).each do |group|
- .panel.panel-default.panel-small
- - project = group[0]
- .panel-heading
- = link_to_project project
- = link_to 'show all', project_issues_path(project), class: 'pull-right'
-
- %ul.well-list.issues-list
- - group[1].each do |issue|
- = render 'projects/issues/issue', issue: issue
- = paginate @issues, theme: "gitlab"
-
diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml
index 8ba325d94a4..a9cf06b817d 100644
--- a/app/views/groups/milestones/index.html.haml
+++ b/app/views/groups/milestones/index.html.haml
@@ -15,7 +15,18 @@
.col-md-3.responsive-side
= render 'groups/filter', entity: 'milestones'
.col-md-9
- - if @milestones.blank?
- .nothing-here-block No milestones to show
- - else
- = render 'groups/milestones/milestone'
+ .panel.panel-default
+ %ul.well-list
+ - if @milestones.blank?
+ %li
+ .nothing-here-block No milestones to show
+ - else
+ - @milestones.group_by(&:title).each do |milestone|
+ %li{class: "milestone milestone-open", id: 1 }
+ .pull-right
+ = link_to root_path, class: "btn btn-small edit-milestone-link btn-grouped" do
+ %i.icon-edit
+ Edit
+ = link_to 'Close Milestone', root_path, method: :put, remote: true, class: "btn btn-small btn-remove"
+ %h4
+ = link_to_gfm truncate(milestone.first, length: 100), root_path