diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-23 19:47:22 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-23 19:47:22 +0300 |
commit | 2ed7cbfba4ff3c6a4cf3e72515a0375544998de0 (patch) | |
tree | ae6d7530745c80633cd993c99f7820e1452f3e1b /app/views/projects/issues/_issue.html.haml | |
parent | 95791316f4037273af7b747ce1851d5f4e46933f (diff) | |
download | gitlab-ce-2ed7cbfba4ff3c6a4cf3e72515a0375544998de0.tar.gz |
Move projects controllers/views in Projects module
Diffstat (limited to 'app/views/projects/issues/_issue.html.haml')
-rw-r--r-- | app/views/projects/issues/_issue.html.haml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml new file mode 100644 index 00000000000..f44c0a6c81f --- /dev/null +++ b/app/views/projects/issues/_issue.html.haml @@ -0,0 +1,44 @@ +%li{ 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) + + .issue-title + %span.light= "##{issue.id}" + = link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title" + + .issue-info + - if issue.assignee + assigned to #{link_to_member(@project, issue.assignee)} + - else + unassigned + - if issue.votes_count > 0 + = render 'votes/votes_inline', votable: issue + - if issue.notes.any? + %span + %i.icon-comments + = issue.notes.count + - if issue.milestone_id? + %span + %i.icon-time + = issue.milestone.title + .pull-right + %small updated #{time_ago_in_words(issue.updated_at)} ago + + .issue-labels + - issue.labels.each do |label| + %span{class: "label #{label_css_class(label.name)}"} + %i.icon-tag + = label.name + + .issue-actions + - if can? current_user, :modify_issue, issue + - if issue.closed? + = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-small grouped reopen_issue", remote: true + - else + = link_to 'Close', project_issue_path(issue.project, issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-small grouped close_issue", remote: true + = link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link grouped" do + %i.icon-edit + Edit + + |