Commit e66a8b4c authored by Marin Jankovski's avatar Marin Jankovski

Move milestone link in group head, 2 column milestone for MR and issues.

parent c223fb1a
......@@ -7,3 +7,12 @@
.member-search-form {
float: left;
}
.milestone-row {
@include str-truncated(90%);
}
.label.label-default.project-name {
width: 80px;
@include str-truncated(80%);
}
......@@ -14,8 +14,8 @@ class Groups::MilestonesController < ApplicationController
def show
project_milestones = Milestone.where(project_id: group.projects)
@group_milestone = Milestones::GroupService.new(project_milestones).milestone(title)
@project_issues = @group_milestone.filter_by(params[:status], "issues")
@project_merge_requests = @group_milestone.filter_by(params[:status], "merge_requests")
@issues = @group_milestone.issues
@merge_requests = @group_milestone.merge_requests
end
def update
......
......@@ -65,16 +65,12 @@ class GroupMilestone
state == 'closed'
end
def opened_unassigned_issues
milestones.map{ |milestone| milestone.issues.opened.unassigned }
def issues
milestones.map{ |milestone| milestone.issues }.flatten.group_by(&:state)
end
def opened_assigned_issues
milestones.map{ |milestone| milestone.issues.opened.assigned }
end
def closed_issues
milestones.map{ |milestone| milestone.issues.closed }
def merge_requests
milestones.map{ |milestone| milestone.merge_requests }.flatten.group_by(&:state)
end
def participants
......
%li{ id: dom_id(issue, 'sortable'), class: 'issue-row', 'data-iid' => issue.iid }
%span.str-truncated
%span.milestone-row
- project = issue.project
%span.label.label-default.project-name
= project.name
= link_to [project, issue] do
%span.cgray ##{issue.iid}
= link_to_gfm issue.title, [project, issue]
......
.panel.panel-default
.panel-heading= name
.panel-heading= title
%ul{ class: "well-list issues-sortable-list" }
- issues.each do |issue|
= render 'issue', issue: issue
- if issues
- issues.each do |issue|
= render 'issue', issue: issue
%li{ id: dom_id(merge_request, 'sortable'), class: 'mr-row', 'data-iid' => merge_request.iid }
%span.str-truncated
%span.milestone-row
- project = merge_request.project
%span.label.label-default.project-name
= project.name
= link_to [project, merge_request] do
%span.cgray ##{merge_request.iid}
= link_to_gfm truncate(merge_request.title, length: 60), [project, merge_request]
= link_to_gfm merge_request.title, [project, merge_request]
.pull-right.assignee-icon
- if merge_request.assignee
= image_tag avatar_icon(merge_request.assignee.email, 16), class: "avatar s16"
.panel.panel-default
.panel-heading= name
.panel-heading= title
%ul{ class: "well-list merge_requests-sortable-list" }
- merge_requests.sort_by(&:position).each do |merge_request|
= render 'merge_request', merge_request: merge_request
- if merge_requests
- merge_requests.sort_by(&:position).each do |merge_request|
= render 'merge_request', merge_request: merge_request
......@@ -52,19 +52,17 @@
.tab-content
.tab-pane.active#tab-issues
.row
.col-md-4.responsive-side
= render 'groups/filter', entity: 'milestone'
.col-md-8
- @project_issues.each do |name, issues|
= render 'issues', name: name, issues: issues
.col-md-6
= render 'issues', title: "Open", issues: @issues["opened"]
.col-md-6
= render 'issues', title: "Closed", issues: @issues["closed"]
.tab-pane#tab-merge-requests
.row
.col-md-4.responsive-side
= render 'groups/filter', entity: 'milestone'
.col-md-8
- @project_merge_requests.each do |name, merge_requests|
= render 'merge_requests', name: name, merge_requests: merge_requests
.col-md-6
= render 'merge_requests', title: "Open", merge_requests: @merge_requests["opened"]
.col-md-6
= render 'merge_requests', title: "Closed", merge_requests: @merge_requests["closed"]
.tab-pane#tab-participants
%ul.bordered-list
......
......@@ -2,6 +2,9 @@
= nav_link(path: 'groups#show', html_options: {class: 'home'}) do
= link_to group_path(@group), title: "Home" do
Activity
= nav_link(path: 'groups#milestones') do
= link_to group_milestones_path(@group) do
Milestones
= nav_link(path: 'groups#issues') do
= link_to issues_group_path(@group) do
Issues
......@@ -12,9 +15,6 @@
Merge Requests
- if current_user
%span.count= current_user.cared_merge_requests.opened.of_group(@group).count
= nav_link(path: 'groups#milestones') do
= link_to group_milestones_path(@group) do
Milestones
= nav_link(path: 'groups#members') do
= link_to "Members", members_group_path(@group)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment