diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-07 19:26:41 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-07 19:26:41 +0300 |
commit | 03441769dfc09776eb8511275a3f492ded1a7c42 (patch) | |
tree | bfc6ed0dae6c8e73a43eae071daf7b7753acb9a0 /app/views | |
parent | be68cc461755752697642c58154781ae4ec9ab31 (diff) | |
download | gitlab-ce-03441769dfc09776eb8511275a3f492ded1a7c42.tar.gz |
Include default labels in issues autocomplete etc. Show colored labels on issues show page
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/issues/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/labels/_label.html.haml | 18 | ||||
-rw-r--r-- | app/views/labels/index.html.haml | 9 |
3 files changed, 17 insertions, 12 deletions
diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index 67fe89a761b..2e204b8240d 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -47,7 +47,7 @@ .pull-right - @issue.labels.each do |label| - %span.label + %span{class: "label #{label_css_class(label.name)}"} %i.icon-tag = label.name diff --git a/app/views/labels/_label.html.haml b/app/views/labels/_label.html.haml index 027b041d58e..2b1aafc546b 100644 --- a/app/views/labels/_label.html.haml +++ b/app/views/labels/_label.html.haml @@ -1,9 +1,15 @@ +- frequency = @project.issues.tagged_with(label.name).count %li %strong - %i.icon-tag - = label.name + %span{class: "label #{label_css_class(label.name)}"} + %i.icon-tag + - if frequency.zero? + %span.light= label.name + - else + = label.name .pull-right - = link_to project_issues_path(label_name: label.name) do - %strong - = pluralize(label.count, 'issue') - = "»" + - unless frequency.zero? + = link_to project_issues_path(label_name: label.name) do + %strong + = pluralize(frequency, 'issue') + = "»" diff --git a/app/views/labels/index.html.haml b/app/views/labels/index.html.haml index 895ba439bdf..53f411d932c 100644 --- a/app/views/labels/index.html.haml +++ b/app/views/labels/index.html.haml @@ -4,12 +4,11 @@ Labels %br -.light-well +- if @labels.present? %ul.bordered-list.labels-table - @labels.each do |label| = render 'label', label: label - - unless @labels.present? - %li - %h3.nothing_here_message Add first label to your issues or #{link_to 'generate', generate_project_labels_path(@project), method: :post} default set of labels - +- else + .light-well + %h3.nothing_here_message Add first label to your issues or #{link_to 'generate', generate_project_labels_path(@project), method: :post} default set of labels |