Add "New X" link to dashboard/group milestone project-specific issue/MR panels

This commit is contained in:
Douwe Maan 2015-12-02 14:00:54 +01:00
parent 09e712c0fb
commit b66694d236
2 changed files with 9 additions and 5 deletions

View file

@ -3,8 +3,10 @@
.panel.panel-default.panel-small
- project = group[0]
.panel-heading
= link_to_project project
= link_to 'show all', namespace_project_issues_path(project.namespace, project), class: 'pull-right'
= link_to project.name_with_namespace, namespace_project_issues_path(project.namespace, project)
- if can?(current_user, :create_issue, project)
.pull-right
= link_to 'New issue', new_namespace_project_issue_path(project.namespace, project)
%ul.well-list.issues-list
- group[1].each do |issue|
@ -12,4 +14,3 @@
= paginate @issues, theme: "gitlab"
- else
.nothing-here-block No issues to show

View file

@ -3,8 +3,11 @@
.panel.panel-default.panel-small
- project = group[0]
.panel-heading
= link_to_project project
= link_to 'show all', namespace_project_merge_requests_path(project.namespace, project), class: 'pull-right'
= link_to project.name_with_namespace, namespace_project_merge_requests_path(project.namespace, project)
- if can?(current_user, :create_merge_request, project)
.pull-right
= link_to 'New merge request', new_namespace_project_merge_request_path(project.namespace, project)
%ul.well-list.mr-list
- group[1].each do |merge_request|
= render 'projects/merge_requests/merge_request', merge_request: merge_request