Commit 7e42084fb800546070d3c5d0d704320d1785fdda

Authored by Dmitriy Zaporozhets
1 parent a718a9af

Move author/date info for Issue#show, MR#show pages to issue-box

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/stylesheets/generic/issue_box.scss
@@ -17,6 +17,13 @@ @@ -17,6 +17,13 @@
17 margin-bottom: 0; 17 margin-bottom: 0;
18 } 18 }
19 19
  20 + .creator {
  21 + padding: 8px 25px;
  22 + background: #eee;
  23 + border-bottom: 1px solid #DDD;
  24 + color: #777;
  25 + }
  26 +
20 .title { 27 .title {
21 font-size: 22px; 28 font-size: 22px;
22 font-weight: 500; 29 font-weight: 500;
app/views/projects/issues/_issue_context.html.haml
1 = form_for [@project, @issue], remote: true, html: {class: 'edit-issue inline-update'} do |f| 1 = form_for [@project, @issue], remote: true, html: {class: 'edit-issue inline-update'} do |f|
2 - Created by #{link_to_member(@project, issue.author)}&nbsp;  
3 - - if issue.assignee  
4 - \ and currently assigned to 2 + %strong.append-right-10
  3 + Assignee:
5 4
6 - if can?(current_user, :modify_issue, @issue) 5 - if can?(current_user, :modify_issue, @issue)
7 = project_users_select_tag('issue[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control', selected: @issue.assignee_id) 6 = project_users_select_tag('issue[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control', selected: @issue.assignee_id)
8 - elsif issue.assignee 7 - elsif issue.assignee
9 = link_to_member(@project, @issue.assignee) 8 = link_to_member(@project, @issue.assignee)
  9 + - else
  10 + None
10 11
11 -  
12 - .pull-right.hidden-sm.hidden-xs  
13 - - if issue.milestone  
14 - - milestone = issue.milestone  
15 - %cite.cgray Attached to milestone  
16 - 12 + .pull-right
  13 + %strong.append-right-10
  14 + Milestone:
17 - if can?(current_user, :modify_issue, @issue) 15 - if can?(current_user, :modify_issue, @issue)
18 = f.select(:milestone_id, milestone_options(@issue), { include_blank: "Select milestone (none):" }, {class: 'select2 select2-compact'}) 16 = f.select(:milestone_id, milestone_options(@issue), { include_blank: "Select milestone (none):" }, {class: 'select2 select2-compact'})
19 -  
20 = hidden_field_tag :issue_context 17 = hidden_field_tag :issue_context
21 = f.submit class: 'btn' 18 = f.submit class: 'btn'
22 - elsif issue.milestone 19 - elsif issue.milestone
23 = link_to issue.milestone.title, project_milestone_path 20 = link_to issue.milestone.title, project_milestone_path
  21 + - else
  22 + None
app/views/projects/issues/show.html.haml
1 %h3.page-title 1 %h3.page-title
2 Issue ##{@issue.iid} 2 Issue ##{@issue.iid}
3 3
4 - %small  
5 - created #{time_ago_with_tooltip(@issue.created_at)}  
6 -  
7 - if @issue.closed? 4 - if @issue.closed?
8 %span.state-label.state-label-red Closed 5 %span.state-label.state-label-red Closed
9 - else 6 - else
@@ -38,6 +35,9 @@ @@ -38,6 +35,9 @@
38 = @issue.milestone.title 35 = @issue.milestone.title
39 36
40 .issue-box 37 .issue-box
  38 + .creator
  39 + Created by #{link_to_member(@project, @issue.author)} #{time_ago_with_tooltip(@issue.created_at)}
  40 +
41 %h4.title 41 %h4.title
42 = gfm escape_once(@issue.title) 42 = gfm escape_once(@issue.title)
43 43
app/views/projects/merge_requests/show/_context.html.haml
1 = form_for [@project, @merge_request], remote: true, html: {class: 'edit-merge_request inline-update'} do |f| 1 = form_for [@project, @merge_request], remote: true, html: {class: 'edit-merge_request inline-update'} do |f|
2 - Created by #{link_to_member(@project, merge_request.author)}&nbsp;  
3 - - if merge_request.assignee  
4 - \ and currently assigned to 2 + %strong.append-right-10
  3 + Assignee:
5 4
6 - if can?(current_user, :modify_merge_request, @merge_request) 5 - if can?(current_user, :modify_merge_request, @merge_request)
7 = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control', selected: @merge_request.assignee_id) 6 = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control', selected: @merge_request.assignee_id)
8 - elsif merge_request.assignee 7 - elsif merge_request.assignee
9 = link_to_member(@project, @merge_request.assignee) 8 = link_to_member(@project, @merge_request.assignee)
  9 + - else
  10 + None
10 11
11 -  
12 - .pull-right.hidden-sm.hidden-xs  
13 - - if merge_request.milestone  
14 - - milestone = merge_request.milestone  
15 - %cite.cgray Attached to milestone  
16 - 12 + .pull-right
  13 + %strong.append-right-10
  14 + Milestone:
17 - if can?(current_user, :modify_merge_request, @merge_request) 15 - if can?(current_user, :modify_merge_request, @merge_request)
18 = f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone (none):" }, {class: 'select2 select2-compact'}) 16 = f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone (none):" }, {class: 'select2 select2-compact'})
19 -  
20 = hidden_field_tag :merge_request_context 17 = hidden_field_tag :merge_request_context
21 = f.submit class: 'btn' 18 = f.submit class: 'btn'
22 - elsif merge_request.milestone 19 - elsif merge_request.milestone
23 = link_to merge_request.milestone.title, project_milestone_path 20 = link_to merge_request.milestone.title, project_milestone_path
  21 + - else
  22 + None
app/views/projects/merge_requests/show/_mr_box.html.haml
1 .issue-box 1 .issue-box
  2 + .creator
  3 + Created by #{link_to_member(@project, @merge_request.author)} #{time_ago_with_tooltip(@merge_request.created_at)}
  4 +
2 %h4.title 5 %h4.title
3 = gfm escape_once(@merge_request.title) 6 = gfm escape_once(@merge_request.title)
4 7
app/views/projects/merge_requests/show/_mr_title.html.haml
1 %h3.page-title 1 %h3.page-title
2 = "Merge Request ##{@merge_request.iid}" 2 = "Merge Request ##{@merge_request.iid}"
3 - %small  
4 - created #{time_ago_with_tooltip(@merge_request.created_at)}  
5 3
6 - if @merge_request.merged? 4 - if @merge_request.merged?
7 %span.state-label.state-label-green 5 %span.state-label.state-label-green