Commit 8618277f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'issue-merge-req-context-links' of...

Merge branch 'issue-merge-req-context-links' of https://github.com/jasonblanchard/gitlabhq into jasonblanchard-issue-merge-req-context-links

Conflicts:
	CHANGELOG
parents 9e5f4aec 97d4ac40
...@@ -54,7 +54,7 @@ v 7.8.0 ...@@ -54,7 +54,7 @@ v 7.8.0
- -
- -
- API: Access groups with their path (Julien Bianchi) - API: Access groups with their path (Julien Bianchi)
- - Added link to milestone and keeping resource context on smaller viewports for issues and merge requests (Jason Blanchard)
- -
- -
- API: Add support for editing an existing project (Mika Mäenpää and Hannes Rosenögger) - API: Add support for editing an existing project (Mika Mäenpää and Hannes Rosenögger)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
= link_to_member(@project, participant, name: false, size: 24) = link_to_member(@project, participant, name: false, size: 24)
.voting_notes#notes= render "projects/notes/notes_with_form" .voting_notes#notes= render "projects/notes/notes_with_form"
.col-md-3.hidden-sm.hidden-xs .col-md-3
%div %div
.clearfix .clearfix
%span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'} %span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'}
......
...@@ -2,23 +2,21 @@ ...@@ -2,23 +2,21 @@
%div.prepend-top-20 %div.prepend-top-20
%p %p
Assignee: Assignee:
- if issue.assignee
= link_to_member(@project, @issue.assignee)
- else
none
- if can?(current_user, :modify_issue, @issue) - if can?(current_user, :modify_issue, @issue)
= project_users_select_tag('issue[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control js-select2 js-assignee', selected: @issue.assignee_id) = project_users_select_tag('issue[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control js-select2 js-assignee', selected: @issue.assignee_id)
- elsif issue.assignee
= link_to_member(@project, @issue.assignee)
- else
None
%div.prepend-top-20 %div.prepend-top-20
%p %p
Milestone: Milestone:
- if issue.milestone
#{link_to @issue.milestone.title, project_milestone_path(@project, @issue.milestone)}
- else
none
- if can?(current_user, :modify_issue, @issue) - if can?(current_user, :modify_issue, @issue)
= f.select(:milestone_id, milestone_options(@issue), { include_blank: "Select milestone" }, {class: 'select2 select2-compact js-select2 js-milestone'}) = f.select(:milestone_id, milestone_options(@issue), { include_blank: "Select milestone" }, {class: 'select2 select2-compact js-select2 js-milestone'})
= hidden_field_tag :issue_context = hidden_field_tag :issue_context
= f.submit class: 'btn' = f.submit class: 'btn'
- elsif issue.milestone
= link_to project_milestone_path(@project, @issue.milestone) do
= @issue.milestone.title
- else
None
...@@ -3,8 +3,15 @@ ...@@ -3,8 +3,15 @@
:plain :plain
$("##{dom_id(@issue)}").fadeOut(); $("##{dom_id(@issue)}").fadeOut();
- elsif params[:issue_context] - elsif params[:issue_context]
$('.context').html("#{escape_javascript(render partial: 'issue_context', locals: { issue: @issue })}");
$('.context').effect('highlight'); $('.context').effect('highlight');
- if @issue.milestone - if @issue.milestone
$('.milestone-nav-link').replaceWith("<span class='milestone-nav-link'>| <span class='light'>Milestone</span> #{escape_javascript(link_to @issue.milestone.title, project_milestone_path(@issue.project, @issue.milestone))}</span>") $('.milestone-nav-link').replaceWith("<span class='milestone-nav-link'>| <span class='light'>Milestone</span> #{escape_javascript(link_to @issue.milestone.title, project_milestone_path(@issue.project, @issue.milestone))}</span>")
- else - else
$('.milestone-nav-link').html('') $('.milestone-nav-link').html('')
$('select.select2').select2({width: 'resolve', dropdownAutoWidth: true})
$('.edit-issue.inline-update input[type="submit"]').hide();
new ProjectUsersSelect();
new Issue();
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.col-md-9 .col-md-9
= render "projects/merge_requests/show/participants" = render "projects/merge_requests/show/participants"
= render "projects/notes/notes_with_form" = render "projects/notes/notes_with_form"
.col-md-3.hidden-sm.hidden-xs .col-md-3
.clearfix .clearfix
%span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'} %span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'}
= cross_project_reference(@project, @merge_request) = cross_project_reference(@project, @merge_request)
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
%cite.cgray %cite.cgray
= render partial: 'projects/merge_requests/show/context', locals: { merge_request: @merge_request } = render partial: 'projects/merge_requests/show/context', locals: { merge_request: @merge_request }
%hr %hr
.votes-holder.hidden-sm.hidden-xs .votes-holder
%h6 Votes %h6 Votes
#votes= render 'votes/votes_block', votable: @merge_request #votes= render 'votes/votes_block', votable: @merge_request
......
...@@ -2,22 +2,22 @@ ...@@ -2,22 +2,22 @@
%div.prepend-top-20 %div.prepend-top-20
%p %p
Assignee: Assignee:
- if @merge_request.assignee
= link_to_member(@project, @merge_request.assignee)
- else
none
- if can?(current_user, :modify_merge_request, @merge_request) - if can?(current_user, :modify_merge_request, @merge_request)
= project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control js-select2 js-assignee', selected: @merge_request.assignee_id) = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control js-select2 js-assignee', selected: @merge_request.assignee_id)
- elsif merge_request.assignee
= link_to_member(@project, @merge_request.assignee)
- else
None
%div.prepend-top-20 %div.prepend-top-20
%p %p
Milestone: Milestone:
- if @merge_request.milestone
%span.back-to-milestone
#{link_to @merge_request.milestone.title, project_milestone_path(@project, @merge_request.milestone)}
- else
none
- if can?(current_user, :modify_merge_request, @merge_request) - if can?(current_user, :modify_merge_request, @merge_request)
= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2 select2-compact js-select2 js-milestone'}) = f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2 select2-compact js-select2 js-milestone'})
= hidden_field_tag :merge_request_context = hidden_field_tag :merge_request_context
= f.submit class: 'btn' = f.submit class: 'btn'
- elsif merge_request.milestone
= link_to merge_request.milestone.title, project_milestone_path
- else
None
- if params[:merge_request_context] - if params[:merge_request_context]
$('.context').html("#{escape_javascript(render partial: 'projects/merge_requests/show/context', locals: { issue: @issue })}");
$('.context').effect('highlight'); $('.context').effect('highlight');
new ProjectUsersSelect();
$('select.select2').select2({width: 'resolve', dropdownAutoWidth: true});
merge_request = new MergeRequest();
...@@ -65,7 +65,7 @@ describe "Issues", feature: true do ...@@ -65,7 +65,7 @@ describe "Issues", feature: true do
click_button "Save changes" click_button "Save changes"
page.should have_content "Assignee: Select assignee" page.should have_content 'Assignee: none'
issue.reload.assignee.should be_nil issue.reload.assignee.should be_nil
end end
end end
...@@ -249,6 +249,7 @@ describe "Issues", feature: true do ...@@ -249,6 +249,7 @@ describe "Issues", feature: true do
click_button 'Update Issue' click_button 'Update Issue'
page.should have_content "Milestone changed to #{milestone.title}" page.should have_content "Milestone changed to #{milestone.title}"
page.should have_content "Milestone: #{milestone.title}"
has_select?('issue_assignee_id', :selected => milestone.title) has_select?('issue_assignee_id', :selected => milestone.title)
end end
end end
...@@ -287,7 +288,7 @@ describe "Issues", feature: true do ...@@ -287,7 +288,7 @@ describe "Issues", feature: true do
sleep 2 # wait for ajax stuff to complete sleep 2 # wait for ajax stuff to complete
first('.user-result').click first('.user-result').click
page.should have_content "Assignee: Unassigned" page.should have_content 'Assignee: none'
sleep 2 # wait for ajax stuff to complete sleep 2 # wait for ajax stuff to complete
issue.reload.assignee.should be_nil issue.reload.assignee.should be_nil
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment