diff options
author | Stefan Tatschner <stefan@sevenbyte.org> | 2015-04-21 10:26:36 +0200 |
---|---|---|
committer | Stefan Tatschner <stefan@sevenbyte.org> | 2015-04-24 09:36:42 +0200 |
commit | dbd0fd20a97054aca804ccd1692a0052a9af0f02 (patch) | |
tree | bbc72bf1af74b5d69fce20aef85bb84fe4327c49 | |
parent | 3f73d611cb7f80aafffd5b4526eb0faeebf624f6 (diff) | |
download | gitlab-ce-dbd0fd20a97054aca804ccd1692a0052a9af0f02.tar.gz |
Tweak issue page
* Include creation time
* Include author without avatar
* Move assignee to the right
* Remove action buttons. IMO they are useless and a bit annoying
* Include comments counter by default, gray it out when there are 0
comments.
-rw-r--r-- | app/assets/stylesheets/pages/issues.scss | 13 | ||||
-rw-r--r-- | app/views/projects/issues/_issue.html.haml | 33 |
2 files changed, 15 insertions, 31 deletions
diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss index cd86a9be8b2..3572f33e91f 100644 --- a/app/assets/stylesheets/pages/issues.scss +++ b/app/assets/stylesheets/pages/issues.scss @@ -25,17 +25,8 @@ display: inline-block; } - .issue-actions { - display: none; - position: absolute; - top: 10px; - right: 15px; - } - - &:hover { - .issue-actions { - display: block; - } + .issue-no-comments { + opacity: 0.5; } } } diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index 998e74d12cf..ef36d1f9547 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -6,24 +6,34 @@ .issue-title %span.str-truncated = link_to_gfm issue.title, issue_path(issue), class: "row_title" + .issue-labels + - issue.labels.each do |label| + = link_to namespace_project_issues_path(issue.project.namespace, issue.project, label_name: label.name) do + = render_colored_label(label) .pull-right.light - if issue.closed? %span CLOSED + - if issue.assignee + = link_to_member(@project, issue.assignee, name: false) - note_count = issue.notes.user.count - if note_count > 0 %span %i.fa.fa-comments = note_count + - else + + %span.issue-no-comments + %i.fa.fa-comments + = 0 .issue-info - = link_to "##{issue.iid}", issue_path(issue), class: "light" - - if issue.assignee - assigned to #{link_to_member(@project, issue.assignee)} + = "##{issue.iid} opened #{time_ago_with_tooltip(issue.created_at, '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 + %span %i.fa.fa-clock-o = issue.milestone.title @@ -33,20 +43,3 @@ .pull-right.issue-updated-at %small updated #{time_ago_with_tooltip(issue.updated_at, 'bottom', 'issue_update_ago')} - - .issue-labels - - issue.labels.each do |label| - = link_to namespace_project_issues_path(issue.project.namespace, issue.project, label_name: label.name) do - = render_colored_label(label) - - .issue-actions - - if can? current_user, :modify_issue, issue - - if issue.closed? - = link_to 'Reopen', issue_path(issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-sm btn-grouped reopen_issue btn-reopen", remote: true - - else - = link_to 'Close', issue_path(issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-sm btn-grouped close_issue btn-close", remote: true - = link_to edit_namespace_project_issue_path(issue.project.namespace, issue.project, issue), class: "btn btn-sm edit-issue-link btn-grouped" do - %i.fa.fa-pencil-square-o - Edit - - |