Show project name for Issues tab in Group and Dashboard context.

This commit is contained in:
Rubén Dávila 2016-02-23 19:31:59 -05:00
parent 32f8fc1f9a
commit e0a18829ee
5 changed files with 17 additions and 10 deletions

View file

@ -68,10 +68,10 @@
.tab-content.milestone-content
.tab-pane.active#tab-issues
= render 'shared/milestones/issues_tab', unassigned: @milestone.opened_issues.unassigned, assigned: @milestone.opened_issues.assigned, closed: @milestone.closed_issues
= render 'shared/milestones/issues_tab', unassigned: @milestone.opened_issues.unassigned, assigned: @milestone.opened_issues.assigned, closed: @milestone.closed_issues, show_full_project_name: true
.tab-pane#tab-merge-requests
= render 'shared/milestones/merge_requests_tab', unassigned: @milestone.opened_merge_requests.unassigned, assigned: @milestone.opened_merge_requests.assigned, closed: @milestone.merge_requests.closed, merged: @milestone.merge_requests.merged
= render 'shared/milestones/merge_requests_tab', unassigned: @milestone.opened_merge_requests.unassigned, assigned: @milestone.opened_merge_requests.assigned, closed: @milestone.merge_requests.closed, merged: @milestone.merge_requests.merged, show_full_project_name: true
.tab-pane#tab-participants
= render 'shared/milestones/participants_tab', users: @milestone.participants
.tab-pane#tab-labels
= render 'shared/milestones/labels_tab', labels: @milestone.labels
= render 'shared/milestones/labels_tab', labels: @milestone.labels, show_full_project_name: true

View file

@ -74,10 +74,10 @@
.tab-content.milestone-content
.tab-pane.active#tab-issues
= render 'shared/milestones/issues_tab', unassigned: @milestone.opened_issues.unassigned, assigned: @milestone.opened_issues.assigned, closed: @milestone.closed_issues
= render 'shared/milestones/issues_tab', unassigned: @milestone.opened_issues.unassigned, assigned: @milestone.opened_issues.assigned, closed: @milestone.closed_issues, show_project_name: true
.tab-pane#tab-merge-requests
= render 'shared/milestones/merge_requests_tab', unassigned: @milestone.opened_merge_requests.unassigned, assigned: @milestone.opened_merge_requests.assigned, closed: @milestone.merge_requests.closed, merged: @milestone.merge_requests.merged
= render 'shared/milestones/merge_requests_tab', unassigned: @milestone.opened_merge_requests.unassigned, assigned: @milestone.opened_merge_requests.assigned, closed: @milestone.merge_requests.closed, merged: @milestone.merge_requests.merged, show_project_name: true
.tab-pane#tab-participants
= render 'shared/milestones/participants_tab', users: @milestone.participants
.tab-pane#tab-labels
= render 'shared/milestones/labels_tab', labels: @milestone.labels
= render 'shared/milestones/labels_tab', labels: @milestone.labels, show_project_name: true

View file

@ -3,6 +3,10 @@
%li{ id: dom_id(issue, 'sortable'), class: 'issue-row', 'data-iid' => issue.iid, 'data-url' => issue_path(issue) }
%span
- if show_project_name
%strong #{project.name} ·
- elsif show_full_project_name
%strong #{project.name_with_namespace} ·
= link_to_gfm issue.title, [project.namespace.becomes(Namespace), project, issue], title: issue.title
.issue-detail
= link_to [project.namespace.becomes(Namespace), project, issue] do

View file

@ -4,4 +4,4 @@
.pull-right= issues.size
%ul{ class: "well-list issues-sortable-list", id: "issues-list-#{id}", "data-state" => id }
- issues.sort_by(&:position).each do |issue|
= render 'shared/milestones/issue', issue: issue
= render 'shared/milestones/issue', issue: issue, show_project_name: show_project_name, show_full_project_name: show_full_project_name

View file

@ -1,7 +1,10 @@
- args = { show_project_name: local_assigns.fetch(:show_project_name, false),
show_full_project_name: local_assigns.fetch(:show_full_project_name, false) }
.row.prepend-top-default
.col-md-4
= render('shared/milestones/issues', title: 'Unstarted Issues (open and unassigned)', issues: unassigned, id: 'unassigned')
= render 'shared/milestones/issues', args.merge({ title: 'Unstarted Issues (open and unassigned)', issues: unassigned, id: 'unassigned' })
.col-md-4
= render('shared/milestones/issues', title: 'Ongoing Issues (open and assigned)', issues: assigned, id: 'ongoing')
= render 'shared/milestones/issues', args.merge({ title: 'Ongoing Issues (open and assigned)', issues: assigned, id: 'ongoing' })
.col-md-4
= render('shared/milestones/issues', title: 'Completed Issues (closed)', issues: closed, id: 'closed')
= render 'shared/milestones/issues', args.merge({ title: 'Completed Issues (closed)', issues: closed, id: 'closed' })