diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-02-24 00:22:36 +0300 |
---|---|---|
committer | Rubén Dávila <rdavila84@gmail.com> | 2016-03-05 06:37:03 +0300 |
commit | ed4808555877c668366d98a5408937712ad10d52 (patch) | |
tree | 1a11a41356487d978b6e0ecdf2a84ef20221d192 /app/views/shared/milestones | |
parent | 834b5d49ecb486065e3ecbf8b36becb416eff366 (diff) |
Refactor Merge Requests tab into a custom partial
* Add Labels tab to Groups
* Add decorator for label so it's aware of Milestones.
Diffstat (limited to 'app/views/shared/milestones')
-rw-r--r-- | app/views/shared/milestones/_labels_tab.html.haml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/views/shared/milestones/_labels_tab.html.haml b/app/views/shared/milestones/_labels_tab.html.haml new file mode 100644 index 00000000000..bb6ce0afb40 --- /dev/null +++ b/app/views/shared/milestones/_labels_tab.html.haml @@ -0,0 +1,15 @@ +%ul.bordered-list.manage-labels-list + - labels.each do |label| + - milestone = @milestone.is_a?(Milestone) ? @milestone : label.milestone + + %li + = render_colored_label(label) + - args = [milestone.project.namespace, milestone.project, milestone_title: milestone.title, label_name: label.title] + - options = args.extract_options! + + %span.issues-count + = link_to namespace_project_issues_path(*args, options.merge(state: 'opened')) do + = pluralize label.open_issues_count, 'open issue' + %span.issues-count + = link_to namespace_project_issues_path(*args, options.merge(state: 'closed')) do + = pluralize label.closed_issues_count, 'closed issue' |