summaryrefslogtreecommitdiff
path: root/app/views/projects/issues
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2017-01-23 18:40:25 -0200
committerFelipe Artur <felipefac@gmail.com>2017-02-09 17:40:37 -0200
commit0b14b654b6e5d936f7241dcc0c249e0d4cc42728 (patch)
tree714fff562236a7cbc78d837cea8ff7a648923166 /app/views/projects/issues
parentc4fd6ff407cff8f2f742997a7400ba940a1fce5f (diff)
downloadgitlab-ce-0b14b654b6e5d936f7241dcc0c249e0d4cc42728.tar.gz
Gather issuable metadata to avoid n+ queries on index viewissue_25900_2
Diffstat (limited to 'app/views/projects/issues')
-rw-r--r--app/views/projects/issues/_issue.html.haml17
1 files changed, 1 insertions, 16 deletions
diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml
index 5c9839cb330..0e3902c066a 100644
--- a/app/views/projects/issues/_issue.html.haml
+++ b/app/views/projects/issues/_issue.html.haml
@@ -17,22 +17,7 @@
%li
= link_to_member(@project, issue.assignee, name: false, title: "Assigned to :name")
- - upvotes, downvotes = issue.upvotes, issue.downvotes
- - if upvotes > 0
- %li
- = icon('thumbs-up')
- = upvotes
-
- - if downvotes > 0
- %li
- = icon('thumbs-down')
- = downvotes
-
- - note_count = issue.notes.user.count
- %li
- = link_to issue_path(issue, anchor: 'notes'), class: ('no-comments' if note_count.zero?) do
- = icon('comments')
- = note_count
+ = render 'shared/issuable_meta_data', issuable: issue
.issue-info
#{issuable_reference(issue)} &middot;