Show title of milestone.

This commit is contained in:
Marin Jankovski 2014-06-25 13:30:23 +02:00
parent aaba993352
commit e1afea777a
3 changed files with 18 additions and 17 deletions

View file

@ -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

View file

@ -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"

View file

@ -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