gitlab-org--gitlab-foss/app/views/issues/_show.html.haml
2012-02-11 23:22:33 +02:00

30 lines
1.4 KiB
Text

%li.wll{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(issue.project, issue) }
.right
- if can? current_user, :write_issue, issue
- if issue.closed
= link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small", :remote => true
- else
= link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "success btn small", :remote => true
- if can? current_user, :write_issue, issue
= link_to 'Edit', edit_project_issue_path(issue.project, issue), :class => "btn small edit-issue-link", :remote => true
-#- if can?(current_user, :admin_issue, @project) || issue.author == current_user
= link_to 'Remove', [issue.project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "danger btn small delete-issue", :id => "destroy_issue_#{issue.id}"
= image_tag gravatar_icon(issue.assignee_email), :class => "avatar"
%span.update-author
assigned to
%strong= link_to_issue_assignee(issue)
- if issue.critical
%span.label.important critical
- if issue.today?
%span.label.success today
= link_to project_issue_path(issue.project, issue) do
%p
Issue ##{issue.id}:
= truncate(issue.title, :length => 50)