gitlab-org--gitlab-foss/app/views/issues/_show.html.haml

46 lines
1.9 KiB
Text
Raw Normal View History

%li.wll{ id: dom_id(issue), class: issue_css_classes(issue), url: project_issue_path(issue.project, issue) }
- if controller.controller_name == 'issues'
.issue_check
= check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue)
2012-01-29 05:04:09 -05:00
.right
- issue.labels.each do |label|
2012-07-05 02:35:23 -04:00
%span.label.label-issue.grouped
%i.icon-tag
= label.name
- if issue.notes.any?
2012-07-05 02:35:23 -04:00
%span.btn.small.disabled.grouped
2012-06-26 14:20:05 -04:00
%i.icon-comment
= issue.notes.count
- if can? current_user, :modify_issue, issue
2012-01-29 05:04:09 -05:00
- if issue.closed
= link_to 'Reopen', project_issue_path(issue.project, issue, issue: {closed: false }, status_only: true), method: :put, class: "btn small grouped reopen_issue", remote: true
2012-01-29 05:04:09 -05:00
- else
= link_to 'Resolve', project_issue_path(issue.project, issue, issue: {closed: true }, status_only: true), method: :put, class: "success btn small grouped close_issue", remote: true
= link_to edit_project_issue_path(issue.project, issue), class: "btn small edit-issue-link", remote: true do
2012-05-24 02:23:25 -04:00
%i.icon-edit
Edit
2012-06-26 14:47:25 -04:00
- if issue.assignee
= image_tag gravatar_icon(issue.assignee_email), class: "avatar"
2012-06-26 14:47:25 -04:00
- else
= image_tag "no_avatar.png", class: "avatar"
2012-06-26 14:47:25 -04:00
%p= link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title"
2012-06-26 15:23:49 -04:00
%span.update-author
%small.cdark= "##{issue.id}"
2012-06-26 15:23:49 -04:00
- if issue.assignee
assigned to #{issue.assignee_name}
- else
 
2012-09-08 10:44:56 -04:00
- if issue.votes_count > 0
.votes.votes-inline
.upvotes= issue.upvotes
.progress
- up_percent = 100.0/issue.votes_count*issue.upvotes
- down_percent = 100.0-up_percent
.bar.bar-success{style: "width: #{up_percent}%;"}
.bar.bar-danger{style: "width: #{down_percent}%;"}
.downvotes= issue.downvotes