Cache issue in the list

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2015-06-30 15:43:45 +02:00
parent 496f94de4a
commit 40e31e1db3

View file

@ -3,42 +3,43 @@
.issue-check .issue-check
= check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue" = check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue"
.issue-title = cache issue do
%span.issue-title-text .issue-title
= link_to_gfm issue.title, issue_path(issue), class: "row_title" %span.issue-title-text
.issue-labels = link_to_gfm issue.title, issue_path(issue), class: "row_title"
- issue.labels.each do |label| .issue-labels
= link_to_label(label, project: issue.project) - issue.labels.each do |label|
.pull-right.light = link_to_label(label, project: issue.project)
- if issue.closed? .pull-right.light
%span - if issue.closed?
CLOSED %span
- if issue.assignee CLOSED
= link_to_member(@project, issue.assignee, name: false) - if issue.assignee
- note_count = issue.notes.user.count = link_to_member(@project, issue.assignee, name: false)
- if note_count > 0 - note_count = issue.notes.user.count
- if note_count > 0
&nbsp;
%span
%i.fa.fa-comments
= note_count
- else
&nbsp;
%span.issue-no-comments
%i.fa.fa-comments
= 0
.issue-info
= "##{issue.iid} opened #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')} by #{link_to_member(@project, issue.author, avatar: false)}".html_safe
- if issue.votes_count > 0
= render 'votes/votes_inline', votable: issue
- if issue.milestone
&nbsp; &nbsp;
%span %span
%i.fa.fa-comments %i.fa.fa-clock-o
= note_count = issue.milestone.title
- else - if issue.tasks?
&nbsp; %span.task-status
%span.issue-no-comments = issue.task_status
%i.fa.fa-comments
= 0
.issue-info .pull-right.issue-updated-at
= "##{issue.iid} opened #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')} by #{link_to_member(@project, issue.author, avatar: false)}".html_safe %small updated #{time_ago_with_tooltip(issue.updated_at, placement: 'bottom', html_class: 'issue_update_ago')}
- if issue.votes_count > 0
= render 'votes/votes_inline', votable: issue
- if issue.milestone
&nbsp;
%span
%i.fa.fa-clock-o
= issue.milestone.title
- if issue.tasks?
%span.task-status
= issue.task_status
.pull-right.issue-updated-at
%small updated #{time_ago_with_tooltip(issue.updated_at, placement: 'bottom', html_class: 'issue_update_ago')}