From 1616dfdc07689ccea258e606f414e65836f666a3 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 19 Dec 2013 19:36:27 +0200 Subject: [PATCH] UI improvements to issue show page * labels moved below the issue * removed margin in "created by..." area Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/sections/issues.scss | 10 +++++++++- .../projects/issues/_issue_context.html.haml | 17 +++++------------ app/views/projects/issues/show.html.haml | 9 ++++++++- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/app/assets/stylesheets/sections/issues.scss b/app/assets/stylesheets/sections/issues.scss index 68e8f3fa08a..5e808cf692a 100644 --- a/app/assets/stylesheets/sections/issues.scss +++ b/app/assets/stylesheets/sections/issues.scss @@ -122,5 +122,13 @@ input.check_all_issues { .edit-issue.inline-update select { width: 100%; - max-width: 230px; + max-width: 200px; +} + +.issue-labels .label { + padding: 6px 10px; +} + +form.edit-issue { + margin: 0; } diff --git a/app/views/projects/issues/_issue_context.html.haml b/app/views/projects/issues/_issue_context.html.haml index 29eb338d44d..25e2e03581e 100644 --- a/app/views/projects/issues/_issue_context.html.haml +++ b/app/views/projects/issues/_issue_context.html.haml @@ -1,12 +1,12 @@ -= form_for [@project, @issue], :remote => true, :html => {:class => 'edit-issue inline-update'} do |f| += form_for [@project, @issue], remote: true, html: {class: 'edit-issue inline-update'} do |f| .pull-right - Created by #{link_to_member(@project, issue.author)} + Created by #{link_to_member(@project, issue.author)}  - if issue.assignee \ and currently assigned to - if can?(current_user, :modify_issue, @issue) = link_to profile_path(issue.assignee) do - = image_tag(avatar_icon(issue.assignee.email), :class => 'avatar avatar-inline s16 assignee') if issue.assignee + = image_tag(avatar_icon(issue.assignee.email), class: 'avatar avatar-inline s16 assignee') if issue.assignee = f.select(:assignee_id, @project.team.members.sort_by(&:name).map {|p| [ p.name, p.id ] }, { include_blank: "Assign to user (none):" }, {class: 'chosen'}) - elsif issue.assignee = link_to_member(@project, @issue.assignee) @@ -14,18 +14,11 @@ - if issue.milestone - milestone = issue.milestone %cite.cgray and attached to milestone - + - if can?(current_user, :modify_issue, @issue) = f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { include_blank: "Select milestone (none):" }, {class: 'chosen'}) = hidden_field_tag :issue_context - = f.submit :class => 'btn' + = f.submit class: 'btn' - elsif issue.milestone = link_to issue.milestone.title, project_milestone_path - -.pull-right - - issue.labels.each do |label| - %span{class: "label #{label_css_class(label.name)}"} - %i.icon-tag - = label.name -   diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index b23e577c6f9..1096dc0d706 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -28,7 +28,7 @@ ← To issues list %span.milestone-nav-link - if @issue.milestone - | + | = link_to project_milestone_path(@project, @issue.milestone) do Milestone: = @issue.milestone.title @@ -64,4 +64,11 @@ - @issue.participants.each do |participant| = link_to_member(@project, participant, name: false, size: 24) + .issue-labels.pull-right + - @issue.labels.each do |label| + %span{class: "label #{label_css_class(label.name)}"} + %i.icon-tag + = label.name +   + .voting_notes#notes= render "projects/notes/notes_with_form" -- GitLab