Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorMarc Radulescu <marc@gitlab.com>2014-05-22 12:35:13 +0400
committerMarc Radulescu <marc@gitlab.com>2014-05-22 12:35:13 +0400
commitf5147780ff2290332d8979d399cfd55bf4a5fd37 (patch)
tree0734b10a74edea14a06174613a2b460efeee7f22 /app/views
parentd1980adf93e417850fcd3bac8caed1f2c9da7fb4 (diff)
parent9f80ab8e75181534cb21809258337f081beaf918 (diff)
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into grammar_fixes
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/users/_form.html.haml4
-rw-r--r--app/views/events/event/_note.html.haml4
-rw-r--r--app/views/groups/show.html.haml2
-rw-r--r--app/views/layouts/_head_panel.html.haml2
-rw-r--r--app/views/notify/closed_merge_request_email.html.haml2
-rw-r--r--app/views/notify/closed_merge_request_email.text.haml2
-rw-r--r--app/views/notify/merged_merge_request_email.html.haml2
-rw-r--r--app/views/notify/merged_merge_request_email.text.haml2
-rw-r--r--app/views/projects/blob/_blob.html.haml6
-rw-r--r--app/views/projects/blob/_remove.html.haml3
-rw-r--r--app/views/projects/commits/_parallel_view.html.haml83
-rw-r--r--app/views/projects/edit_tree/show.html.haml3
-rw-r--r--app/views/projects/issues/_issue_context.html.haml40
-rw-r--r--app/views/projects/issues/index.html.haml3
-rw-r--r--app/views/projects/issues/show.html.haml31
-rw-r--r--app/views/projects/merge_requests/_form.html.haml101
-rw-r--r--app/views/projects/merge_requests/_merge_request.html.haml16
-rw-r--r--app/views/projects/merge_requests/_new_compare.html.haml84
-rw-r--r--app/views/projects/merge_requests/_new_submit.html.haml82
-rw-r--r--app/views/projects/merge_requests/_show.html.haml1
-rw-r--r--app/views/projects/merge_requests/branch_from.js.haml5
-rw-r--r--app/views/projects/merge_requests/index.html.haml3
-rw-r--r--app/views/projects/merge_requests/new.html.haml7
-rw-r--r--app/views/projects/merge_requests/show/_context.html.haml40
-rw-r--r--app/views/projects/merge_requests/show/_mr_accept.html.haml6
-rw-r--r--app/views/projects/merge_requests/show/_mr_box.html.haml6
-rw-r--r--app/views/projects/merge_requests/show/_mr_title.html.haml4
-rw-r--r--app/views/projects/merge_requests/show/_participants.html.haml11
-rw-r--r--app/views/projects/merge_requests/show/_state_widget.html.haml17
-rw-r--r--app/views/projects/milestones/show.html.haml10
-rw-r--r--app/views/projects/new_tree/show.html.haml3
-rw-r--r--app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml21
-rw-r--r--app/views/projects/notes/_note.html.haml4
-rw-r--r--app/views/projects/show.html.haml2
-rw-r--r--app/views/projects/wikis/_form.html.haml5
-rw-r--r--app/views/projects/wikis/_new.html.haml2
-rw-r--r--app/views/shared/_commit_message_container.html.haml5
-rw-r--r--app/views/shared/_project_filter.html.haml2
38 files changed, 407 insertions, 219 deletions
diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml
index 881a043f36f..b9e6382ea88 100644
--- a/app/views/admin/users/_form.html.haml
+++ b/app/views/admin/users/_form.html.haml
@@ -2,9 +2,9 @@
= form_for [:admin, @user], html: { class: 'form-horizontal' } do |f|
-if @user.errors.any?
#error_explanation
- %ul.unstyled.alert.alert-danger
+ .alert.alert-danger
- @user.errors.full_messages.each do |msg|
- %li= msg
+ %p= msg
%fieldset
%legend Account
diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml
index db5f3ebb00f..ad2afbce14c 100644
--- a/app/views/events/event/_note.html.haml
+++ b/app/views/events/event/_note.html.haml
@@ -14,8 +14,8 @@
- note = event.target
- if note.attachment.url
- if note.attachment.image?
- = link_to note.attachment.url, target: '_blank' do
- = image_tag note.attachment.url, class: 'note-image-attach'
+ = link_to note.attachment.secure_url, target: '_blank' do
+ = image_tag note.attachment.secure_url, class: 'note-image-attach'
- else
= link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do
%i.icon-paper-clip
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml
index 0343670c203..0c62772a5c9 100644
--- a/app/views/groups/show.html.haml
+++ b/app/views/groups/show.html.haml
@@ -1,5 +1,5 @@
.dashboard
- .activities.col-md-8.hidden-sm
+ .activities.col-md-8.hidden-sm.hidden-xs
- if current_user
= render "events/event_last_push", event: @last_push
= link_to dashboard_path, class: 'btn btn-tiny' do
diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml
index bf37e708206..fba56b5dc3b 100644
--- a/app/views/layouts/_head_panel.html.haml
+++ b/app/views/layouts/_head_panel.html.haml
@@ -43,6 +43,6 @@
%li
= link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do
%i.icon-signout
- %li
+ %li.hidden-xs
= link_to current_user, class: "profile-pic", id: 'profile-pic' do
= image_tag avatar_icon(current_user.email, 26), alt: 'User activity'
diff --git a/app/views/notify/closed_merge_request_email.html.haml b/app/views/notify/closed_merge_request_email.html.haml
index 809d46f31be..574e8bfef24 100644
--- a/app/views/notify/closed_merge_request_email.html.haml
+++ b/app/views/notify/closed_merge_request_email.html.haml
@@ -1,2 +1,2 @@
%p
- = "Merge Request !#{@merge_request.iid} was closed by #{@updated_by.name}"
+ = "Merge Request ##{@merge_request.iid} was closed by #{@updated_by.name}"
diff --git a/app/views/notify/closed_merge_request_email.text.haml b/app/views/notify/closed_merge_request_email.text.haml
index ee434ec8cb2..d6b76e906c5 100644
--- a/app/views/notify/closed_merge_request_email.text.haml
+++ b/app/views/notify/closed_merge_request_email.text.haml
@@ -1,4 +1,4 @@
-= "Merge Request #{@merge_request.iid} was closed by #{@updated_by.name}"
+= "Merge Request ##{@merge_request.iid} was closed by #{@updated_by.name}"
Merge Request url: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
diff --git a/app/views/notify/merged_merge_request_email.html.haml b/app/views/notify/merged_merge_request_email.html.haml
index 0c62d439aed..6762fae7f64 100644
--- a/app/views/notify/merged_merge_request_email.html.haml
+++ b/app/views/notify/merged_merge_request_email.html.haml
@@ -1,2 +1,2 @@
%p
- = "Merge Request !#{@merge_request.iid} was merged"
+ = "Merge Request ##{@merge_request.iid} was merged"
diff --git a/app/views/notify/merged_merge_request_email.text.haml b/app/views/notify/merged_merge_request_email.text.haml
index 550f677fed4..360da60bc3f 100644
--- a/app/views/notify/merged_merge_request_email.text.haml
+++ b/app/views/notify/merged_merge_request_email.text.haml
@@ -1,4 +1,4 @@
-= "Merge Request #{@merge_request.iid} was merged"
+= "Merge Request ##{@merge_request.iid} was merged"
Merge Request Url: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml
index e59d970bf46..863e4e3de53 100644
--- a/app/views/projects/blob/_blob.html.haml
+++ b/app/views/projects/blob/_blob.html.haml
@@ -15,18 +15,18 @@
- else
= link_to title, '#'
-%ul.blob-commit-info.bs-callout.bs-callout-info
+%ul.blob-commit-info.bs-callout.bs-callout-info.hidden-xs
- blob_commit = @repository.last_commit_for_path(@commit.id, @blob.path)
= render blob_commit, project: @project
%div#tree-content-holder.tree-content-holder
.file-holder
- .file-title
+ .file-title.clearfix
%i.icon-file
%span.file_name
= blob.name
%small= number_to_human_size blob.size
- %span.options= render "actions"
+ %span.options.hidden-xs= render "actions"
- if blob.text?
= render "text", blob: blob
- elsif blob.image?
diff --git a/app/views/projects/blob/_remove.html.haml b/app/views/projects/blob/_remove.html.haml
index 6384703671a..692248dd233 100644
--- a/app/views/projects/blob/_remove.html.haml
+++ b/app/views/projects/blob/_remove.html.haml
@@ -14,7 +14,8 @@
= label_tag 'commit_message', class: "control-label" do
Commit message
.col-sm-10
- = text_area_tag 'commit_message', params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3, class: 'form-control'
+ = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message',
+ params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3, class: 'form-control')}
.form-group
.col-sm-2
.col-sm-10
diff --git a/app/views/projects/commits/_parallel_view.html.haml b/app/views/projects/commits/_parallel_view.html.haml
index 5b60ab80ba4..80f5be98f2f 100644
--- a/app/views/projects/commits/_parallel_view.html.haml
+++ b/app/views/projects/commits/_parallel_view.html.haml
@@ -2,54 +2,37 @@
- old_lines, new_lines = parallel_diff_lines(project, @commit, diff, file)
- num_lines = old_lines.length
-%div.text-file-parallel
- %div.diff-side.diff-side-left
- %table
- - old_lines.each do |line|
+%div.text-file
+ %table
+ - num_lines.times do |index|
+ - new_line = new_lines[index]
+ - old_line = old_lines[index]
+ %tr.line_holder.parallel
+ -# For old line
+ - if old_line.type == :file_created
+ %td.old_line= old_line.num
+ %td.line_content.parallel= "File was created"
+ - elsif old_line.type == :deleted
+ %td.old_line.old= old_line.num
+ %td.line_content{class: "parallel noteable_line old #{old_line.code}", "line_code" => old_line.code}= old_line.content
+ - else old_line.type == :no_change
+ %td.old_line= old_line.num
+ %td.line_content.parallel= old_line.content
+
+ -# For new line
+ - if new_line.type == :file_deleted
+ %td.new_line= new_line.num
+ %td.line_content.parallel= "File was deleted"
+ - elsif new_line.type == :added
+ %td.new_line.new= new_line.num
+ %td.line_content{class: "parallel noteable_line new #{new_line.code}", "line_code" => new_line.code}= new_line.content
+ - else new_line.type == :no_change
+ %td.new_line= new_line.num
+ %td.line_content.parallel= new_line.content
+
+ - if @reply_allowed
+ - comments1 = @line_notes.select { |n| n.line_code == old_line.code }.sort_by(&:created_at)
+ - comments2 = @line_notes.select { |n| n.line_code == new_line.code }.sort_by(&:created_at)
+ - unless comments1.empty? and comments2.empty?
+ = render "projects/notes/diff_notes_with_reply_parallel", notes1: comments1, notes2: comments2
- %tr.line_holder.parallel
- - if line.type == :file_created
- %td.line_content.parallel= "File was created"
- - elsif line.type == :deleted
- %td.line_content{class: "parallel noteable_line old #{line.code}", "line_code" => line.code }= line.content
- - else line.type == :no_change
- %td.line_content.parallel= line.content
-
- %div.diff-middle
- %table
- - num_lines.times do |index|
- %tr
- - if old_lines[index].type == :deleted
- %td.old_line.old= old_lines[index].num
- - else
- %td.old_line= old_lines[index].num
-
- %td.diff_line=""
-
- - if new_lines[index].type == :added
- %td.new_line.new= new_lines[index].num
- - else
- %td.new_line= new_lines[index].num
-
- %div.diff-side.diff-side-right
- %table
- - new_lines.each do |line|
-
- %tr.line_holder.parallel
- - if line.type == :file_deleted
- %td.line_content.parallel= "File was deleted"
- - elsif line.type == :added
- %td.line_content{class: "parallel noteable_line new #{line.code}", "line_code" => line.code }= line.content
- - else line.type == :no_change
- %td.line_content.parallel= line.content
-
-:javascript
- $('.diff-side-right').on('scroll', function(){
- $('.diff-side-left, .diff-middle').scrollTop($(this).scrollTop());
- $('.diff-side-left').scrollLeft($(this).scrollLeft());
- });
-
- $('.diff-side-left').on('scroll', function(){
- $('.diff-side-right, .diff-middle').scrollTop($(this).scrollTop()); // might never be relevant
- $('.diff-side-right').scrollLeft($(this).scrollLeft());
- });
diff --git a/app/views/projects/edit_tree/show.html.haml b/app/views/projects/edit_tree/show.html.haml
index 48babb43aaf..93037ef9585 100644
--- a/app/views/projects/edit_tree/show.html.haml
+++ b/app/views/projects/edit_tree/show.html.haml
@@ -23,7 +23,8 @@
= label_tag 'commit_message', class: "control-label" do
Commit message
.col-sm-10
- = text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3, class: 'form-control'
+ = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', '',
+ placeholder: "Update #{@blob.name}", required: true, rows: 3, class: 'form-control')}
.form-actions
= hidden_field_tag 'last_commit', @last_commit
= hidden_field_tag 'content', '', id: "file-content"
diff --git a/app/views/projects/issues/_issue_context.html.haml b/app/views/projects/issues/_issue_context.html.haml
index aae101cf40f..425dcb45ddf 100644
--- a/app/views/projects/issues/_issue_context.html.haml
+++ b/app/views/projects/issues/_issue_context.html.haml
@@ -1,22 +1,24 @@
= form_for [@project, @issue], remote: true, html: {class: 'edit-issue inline-update'} do |f|
- %strong.append-right-10
- Assignee:
+ .row
+ .col-md-6
+ %strong.append-right-10
+ Assignee:
- - if can?(current_user, :modify_issue, @issue)
- = project_users_select_tag('issue[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control', selected: @issue.assignee_id)
- - elsif issue.assignee
- = link_to_member(@project, @issue.assignee)
- - else
- None
+ - if can?(current_user, :modify_issue, @issue)
+ = project_users_select_tag('issue[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control', selected: @issue.assignee_id)
+ - elsif issue.assignee
+ = link_to_member(@project, @issue.assignee)
+ - else
+ None
- .pull-right
- %strong.append-right-10
- Milestone:
- - if can?(current_user, :modify_issue, @issue)
- = f.select(:milestone_id, milestone_options(@issue), { include_blank: "Select milestone (none):" }, {class: 'select2 select2-compact'})
- = hidden_field_tag :issue_context
- = f.submit class: 'btn'
- - elsif issue.milestone
- = link_to issue.milestone.title, project_milestone_path
- - else
- None
+ .col-md-6.text-right
+ %strong.append-right-10
+ Milestone:
+ - if can?(current_user, :modify_issue, @issue)
+ = f.select(:milestone_id, milestone_options(@issue), { include_blank: "Select milestone" }, {class: 'select2 select2-compact'})
+ = hidden_field_tag :issue_context
+ = f.submit class: 'btn'
+ - elsif issue.milestone
+ = link_to issue.milestone.title, project_milestone_path
+ - else
+ None
diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml
index 5e899d412c6..51a8c911af8 100644
--- a/app/views/projects/issues/index.html.haml
+++ b/app/views/projects/issues/index.html.haml
@@ -1,6 +1,7 @@
= render "head"
.row
.col-md-3
- = render 'shared/project_filter', project_entities_path: project_issues_path(@project), labels: true
+ = render 'shared/project_filter', project_entities_path: project_issues_path(@project),
+ labels: true, redirect: 'issues'
.col-md-9.issues-holder
= render "issues"
diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml
index 124eb53571d..b6d3a8edf4d 100644
--- a/app/views/projects/issues/show.html.haml
+++ b/app/views/projects/issues/show.html.haml
@@ -1,7 +1,7 @@
%h3.page-title
Issue ##{@issue.iid}
- %span.pull-right
+ %span.pull-right.issue-btn-group
- if can?(current_user, :write_issue, @project)
= link_to new_project_issue_path(@project), class: "btn btn-grouped", title: "New Issue", id: "new_issue_link" do
%i.icon-plus
@@ -16,28 +16,29 @@
%i.icon-edit
Edit
-.votes-holder
- #votes= render 'votes/votes_block', votable: @issue
+.clearfix
+ .votes-holder
+ #votes= render 'votes/votes_block', votable: @issue
-.back-link
- = link_to project_issues_path(@project) do
- &larr; To issues list
- %span.milestone-nav-link
- - if @issue.milestone
- |
- %span.light Milestone
- = link_to project_milestone_path(@project, @issue.milestone) do
- = @issue.milestone.title
+ .back-link
+ = link_to project_issues_path(@project) do
+ &larr; To issues list
+ %span.milestone-nav-link
+ - if @issue.milestone
+ |
+ %span.light Milestone
+ = link_to project_milestone_path(@project, @issue.milestone) do
+ = @issue.milestone.title
.issue-box{ class: issue_box_class(@issue) }
- .state
- %span.state-label
+ .state.clearfix
+ .state-label.col-sm-2.col-xs-12
- if @issue.closed?
Closed
- else
Open
- %span.creator
+ %span.creator.col-sm-9.col-xs-12
Created by #{link_to_member(@project, @issue.author)} #{time_ago_with_tooltip(@issue.created_at)}
%h4.title
diff --git a/app/views/projects/merge_requests/_form.html.haml b/app/views/projects/merge_requests/_form.html.haml
index 0fe2d1d9801..290a15e2664 100644
--- a/app/views/projects/merge_requests/_form.html.haml
+++ b/app/views/projects/merge_requests/_form.html.haml
@@ -14,33 +14,6 @@
- @merge_request.errors.full_messages.each do |msg|
%div= msg
- .merge-request-branches
- .form-group
- = label_tag nil, class: 'control-label' do
- From
- .col-sm-10
- .clearfix
- .pull-left
- = f.select(:source_project_id, [[@merge_request.source_project_path,@merge_request.source_project.id]] , {}, { class: 'source_project select2 span3', disabled: @merge_request.persisted? })
- .pull-left
- &nbsp;
- = f.select(:source_branch, @merge_request.source_branches, { include_blank: "Select branch" }, {class: 'source_branch select2 span2'})
- .mr_source_commit
- %br
- .form-group
- = label_tag nil, class: 'control-label' do
- To
- .col-sm-10
- .clearfix
- .pull-left
- - projects = @project.forked_from_project.nil? ? [@project] : [@project, @project.forked_from_project]
- = f.select(:target_project_id, options_from_collection_for_select(projects, 'id', 'path_with_namespace', f.object.target_project_id), {}, { class: 'target_project select2 span3', disabled: @merge_request.persisted? })
- .pull-left
- &nbsp;
- = f.select(:target_branch, @merge_request.target_branches, { include_blank: "Select branch" }, {class: 'target_branch select2 span2'})
- .mr_target_commit
-
- %hr
.merge-request-form-info
.form-group
= f.label :title, class: 'control-label' do
@@ -51,6 +24,32 @@
.col-sm-10
= f.text_area :description, class: "form-control js-gfm-input", rows: 14
%p.hint Description is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
+ %hr
+ .form-group
+ .issue-assignee
+ = f.label :assignee_id, class: 'control-label' do
+ %i.icon-user
+ Assign to
+ .col-sm-10
+ = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control', selected: @merge_request.assignee_id)
+ &nbsp;
+ = link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link'
+ .form-group
+ .issue-milestone
+ = f.label :milestone_id, class: 'control-label' do
+ %i.icon-time
+ Milestone
+ .col-sm-10= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2'})
+
+
+ - if @merge_request.persisted? # Only allow labels on edit to avoid fork vs upstream repo labels issue
+ .form-group
+ = f.label :label_list, class: 'control-label' do
+ %i.icon-tag
+ Labels
+ .col-sm-10
+ = f.text_field :label_list, maxlength: 2000, class: "form-control"
+ %p.hint Separate labels with commas.
.form-actions
- if @merge_request.new_record?
@@ -66,20 +65,36 @@
:javascript
disableButtonIfEmptyField("#merge_request_title", ".btn-save");
-
- var source_branch = $("#merge_request_source_branch")
- , target_branch = $("#merge_request_target_branch")
- , target_project = $("#merge_request_target_project_id");
-
- $.get("#{branch_from_project_merge_requests_path(@source_project)}", {ref: source_branch.val() });
- $.get("#{branch_to_project_merge_requests_path(@source_project)}", {target_project_id: target_project.val(),ref: target_branch.val() });
-
- target_project.on("change", function() {
- $.get("#{update_branches_project_merge_requests_path(@source_project)}", {target_project_id: $(this).val() });
- });
- source_branch.on("change", function() {
- $.get("#{branch_from_project_merge_requests_path(@source_project)}", {ref: $(this).val() });
- });
- target_branch.on("change", function() {
- $.get("#{branch_to_project_merge_requests_path(@source_project)}", {target_project_id: target_project.val(),ref: $(this).val() });
+ $('.assign-to-me-link').on('click', function(e){
+ $('#merge_request_assignee_id').val("#{current_user.id}").trigger("change");
+ e.preventDefault();
});
+
+ $("#merge_request_label_list")
+ .bind( "keydown", function( event ) {
+ if ( event.keyCode === $.ui.keyCode.TAB &&
+ $( this ).data( "autocomplete" ).menu.active ) {
+ event.preventDefault();
+ }
+ })
+ .bind("click", function(event) {
+ $(this).autocomplete("search", "");
+ })
+ .autocomplete({
+ minLength: 0,
+ source: function( request, response ) {
+ response( $.ui.autocomplete.filter(
+ #{raw labels_autocomplete_source}, extractLast( request.term ) ) );
+ },
+ focus: function() {
+ return false;
+ },
+ select: function(event, ui) {
+ var terms = split( this.value );
+ terms.pop();
+ terms.push( ui.item.value );
+ terms.push( "" );
+ this.value = terms.join( ", " );
+ return false;
+ }
+ });
diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml
index 980ac126742..c9a80ec22ef 100644
--- a/app/views/projects/merge_requests/_merge_request.html.haml
+++ b/app/views/projects/merge_requests/_merge_request.html.haml
@@ -11,13 +11,9 @@
- if merge_request.for_fork?
%span.light
#{merge_request.source_project_namespace}:
- = merge_request.source_branch
- %i.icon-angle-right.light
- = merge_request.target_branch
- - else
- = merge_request.source_branch
- %i.icon-angle-right.light
- = merge_request.target_branch
+ = truncate merge_request.source_branch, length: 25
+ %i.icon-angle-right.light
+ = merge_request.target_branch
.merge-request-info
- if merge_request.author
authored by #{link_to_member(merge_request.source_project, merge_request.author)}
@@ -35,3 +31,9 @@
.pull-right
%small updated #{time_ago_with_tooltip(merge_request.updated_at, 'bottom', 'merge_request_updated_ago')}
+
+ .merge-request-labels
+ - merge_request.labels.each do |label|
+ %span{class: "label #{label_css_class(label.name)}"}
+ %i.icon-tag
+ = label.name
diff --git a/app/views/projects/merge_requests/_new_compare.html.haml b/app/views/projects/merge_requests/_new_compare.html.haml
new file mode 100644
index 00000000000..a8b774a3cd1
--- /dev/null
+++ b/app/views/projects/merge_requests/_new_compare.html.haml
@@ -0,0 +1,84 @@
+%h3.page-title Compare branches for new Merge Request
+%hr
+
+= form_for [@project, @merge_request], url: new_project_merge_request_path(@project), method: :get, html: { class: "merge-request-form form-inline" } do |f|
+ .hide.alert.alert-danger.mr-compare-errors
+ .merge-request-branches.row
+ .col-md-6
+ .panel.panel-default
+ .panel-heading
+ %strong Source branch
+ .panel-body
+ = f.select(:source_project_id, [[@merge_request.source_project_path,@merge_request.source_project.id]] , {}, { class: 'source_project select2 span3', disabled: @merge_request.persisted? })
+ &nbsp;
+ = f.select(:source_branch, @merge_request.source_branches, { include_blank: "Select branch" }, {class: 'source_branch select2 span2'})
+ .panel-footer
+ .mr_source_commit
+
+ .col-md-6
+ .panel.panel-default
+ .panel-heading
+ %strong Target branch
+ .panel-body
+ - projects = @project.forked_from_project.nil? ? [@project] : [@project, @project.forked_from_project]
+ = f.select(:target_project_id, options_from_collection_for_select(projects, 'id', 'path_with_namespace', f.object.target_project_id), {}, { class: 'target_project select2 span3', disabled: @merge_request.persisted? })
+ &nbsp;
+ = f.select(:target_branch, @merge_request.target_branches, { include_blank: "Select branch" }, {class: 'target_branch select2 span2'})
+ .panel-footer
+ .mr_target_commit
+
+ -if @merge_request.errors.any?
+ .alert.alert-danger
+ - @merge_request.errors.full_messages.each do |msg|
+ %div= msg
+
+ - if @merge_request.source_branch.present? && @merge_request.target_branch.present?
+ .light-well
+ %center
+ %h4
+ There isn't anything to merge.
+ %p.slead
+ - if @merge_request.source_branch == @merge_request.target_branch
+ You'll need to use different branch names to get a valid comparison.
+ - else
+ %span.label-branch #{@merge_request.source_branch}
+ and
+ %span.label-branch #{@merge_request.target_branch}
+ are the same.
+
+
+ %hr
+ = f.submit 'Compare branches', class: "btn btn-primary mr-compare-btn"
+
+:javascript
+ var source_branch = $("#merge_request_source_branch")
+ , target_branch = $("#merge_request_target_branch")
+ , target_project = $("#merge_request_target_project_id");
+
+ $.get("#{branch_from_project_merge_requests_path(@source_project)}", {ref: source_branch.val() });
+ $.get("#{branch_to_project_merge_requests_path(@source_project)}", {target_project_id: target_project.val(),ref: target_branch.val() });
+
+ target_project.on("change", function() {
+ $.get("#{update_branches_project_merge_requests_path(@source_project)}", {target_project_id: $(this).val() });
+ });
+ source_branch.on("change", function() {
+ $.get("#{branch_from_project_merge_requests_path(@source_project)}", {ref: $(this).val() });
+ $(".mr-compare-errors").fadeOut();
+ $(".mr-compare-btn").enable();
+ });
+ target_branch.on("change", function() {
+ $.get("#{branch_to_project_merge_requests_path(@source_project)}", {target_project_id: target_project.val(),ref: $(this).val() });
+ $(".mr-compare-errors").fadeOut();
+ $(".mr-compare-btn").enable();
+ });
+
+
+:coffeescript
+
+ $(".merge-request-form").on 'submit', ->
+ if $("#merge_request_source_branch").val() is "" or $('#merge_request_target_branch').val() is ""
+ $(".mr-compare-errors").html("You must select source and target branch to proceed")
+ $(".mr-compare-errors").fadeIn()
+ event.preventDefault()
+ return
+
diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml
new file mode 100644
index 00000000000..b5479be708b
--- /dev/null
+++ b/app/views/projects/merge_requests/_new_submit.html.haml
@@ -0,0 +1,82 @@
+%h3.page-title
+ New merge request
+%p.slead
+ From
+ %strong.monospace
+ #{@merge_request.source_project_namespace}:#{@merge_request.source_branch}
+ into
+ %strong.monospace
+ #{@merge_request.target_project_namespace}:#{@merge_request.target_branch}
+
+ %span.pull-right
+ = link_to 'Change branches', new_project_merge_request_path(@project)
+
+= form_for [@project, @merge_request], html: { class: "merge-request-form" } do |f|
+ .panel.panel-default
+
+ .panel-body
+ .form-group
+ .light
+ = f.label :title do
+ = "Title *"
+ = f.text_field :title, class: "form-control input-lg js-gfm-input", maxlength: 255, rows: 5, required: true
+ .form-group
+ .light
+ = f.label :description, "Description"
+ = f.text_area :description, class: "form-control js-gfm-input", rows: 10
+ %p.hint Description is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
+ .form-group
+ .issue-assignee
+ = f.label :assignee_id do
+ %i.icon-user
+ Assign to
+ %div
+ = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control', selected: @merge_request.assignee_id, project_id: @merge_request.target_project_id)
+ &nbsp;
+ = link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link'
+ .form-group
+ .issue-milestone
+ = f.label :milestone_id do
+ %i.icon-time
+ Milestone
+ %div= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2'})
+ .panel-footer
+ - if @target_repo.contribution_guide
+ - contribution_guide_url = project_blob_path(@target_project, tree_join(@target_repo.root_ref, @target_repo.contribution_guide.name))
+ %p
+ Please review the
+ %strong #{link_to "guidelines for contribution", contribution_guide_url}
+ to this repository.
+ = f.hidden_field :source_project_id
+ = f.hidden_field :target_project_id
+ = f.hidden_field :target_branch
+ = f.hidden_field :source_branch
+ = f.submit 'Submit merge request', class: "btn btn-create"
+
+.mr-compare
+ %div.ui-box
+ .title
+ Commits (#{@commits.count})
+ - if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
+ %ul.well-list
+ - Commit.decorate(@commits.first(MergeRequestDiff::COMMITS_SAFE_SIZE)).each do |commit|
+ = render "projects/commits/inline_commit", commit: commit, project: @project
+ %li.warning-row.unstyled
+ other #{@commits.size - MergeRequestDiff::COMMITS_SAFE_SIZE} commits hidden to prevent performance issues.
+ - else
+ %ul.well-list= render Commit.decorate(@commits), project: @project
+
+ %h4 Changes
+ - if @diffs.present?
+ = render "projects/commits/diffs", diffs: @diffs, project: @project
+ - elsif @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
+ .bs-callout.bs-callout-danger
+ %h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits.
+ %p To preserve performance the line changes are not shown.
+
+
+:javascript
+ $('.assign-to-me-link').on('click', function(e){
+ $('#merge_request_assignee_id').val("#{current_user.id}").trigger("change");
+ e.preventDefault();
+ });
diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml
index e36a48f62cf..193c600f774 100644
--- a/app/views/projects/merge_requests/_show.html.haml
+++ b/app/views/projects/merge_requests/_show.html.haml
@@ -4,6 +4,7 @@
= render "projects/merge_requests/show/mr_box"
= render "projects/merge_requests/show/state_widget"
= render "projects/merge_requests/show/commits"
+ = render "projects/merge_requests/show/participants"
- if @commits.present?
%ul.nav.nav-tabs
diff --git a/app/views/projects/merge_requests/branch_from.js.haml b/app/views/projects/merge_requests/branch_from.js.haml
index 693c2057a0f..8372afa61b5 100644
--- a/app/views/projects/merge_requests/branch_from.js.haml
+++ b/app/views/projects/merge_requests/branch_from.js.haml
@@ -1,7 +1,2 @@
:plain
$(".mr_source_commit").html("#{commit_to_html(@commit, @source_project, false)}");
- var mrTitle = $('#merge_request_title');
-
- if(mrTitle.val().length == 0) {
- mrTitle.val("#{params[:ref].titleize.humanize}");
- }
diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml
index 34faebf619c..12a72edb224 100644
--- a/app/views/projects/merge_requests/index.html.haml
+++ b/app/views/projects/merge_requests/index.html.haml
@@ -8,7 +8,8 @@
%hr
.row
.col-md-3
- = render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project)
+ = render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project),
+ labels: true, redirect: 'merge_requests'
.col-md-9
.mr-filters.append-bottom-10
.dropdown.inline
diff --git a/app/views/projects/merge_requests/new.html.haml b/app/views/projects/merge_requests/new.html.haml
index 8ee0e1a8d46..c24e5916721 100644
--- a/app/views/projects/merge_requests/new.html.haml
+++ b/app/views/projects/merge_requests/new.html.haml
@@ -1,3 +1,4 @@
-%h3.page-title New Merge Request
-%hr
-= render 'form'
+- if @commits.present?
+ = render 'new_submit'
+- else
+ = render 'new_compare'
diff --git a/app/views/projects/merge_requests/show/_context.html.haml b/app/views/projects/merge_requests/show/_context.html.haml
index 2bd850426a9..5c6734fd24b 100644
--- a/app/views/projects/merge_requests/show/_context.html.haml
+++ b/app/views/projects/merge_requests/show/_context.html.haml
@@ -1,22 +1,24 @@
= form_for [@project, @merge_request], remote: true, html: {class: 'edit-merge_request inline-update'} do |f|
- %strong.append-right-10
- Assignee:
+ .row
+ .col-md-6
+ %strong.append-right-10
+ Assignee:
- - if can?(current_user, :modify_merge_request, @merge_request)
- = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control', selected: @merge_request.assignee_id)
- - elsif merge_request.assignee
- = link_to_member(@project, @merge_request.assignee)
- - else
- None
+ - if can?(current_user, :modify_merge_request, @merge_request)
+ = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control', selected: @merge_request.assignee_id)
+ - elsif merge_request.assignee
+ = link_to_member(@project, @merge_request.assignee)
+ - else
+ None
- .pull-right
- %strong.append-right-10
- Milestone:
- - if can?(current_user, :modify_merge_request, @merge_request)
- = f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone (none):" }, {class: 'select2 select2-compact'})
- = hidden_field_tag :merge_request_context
- = f.submit class: 'btn'
- - elsif merge_request.milestone
- = link_to merge_request.milestone.title, project_milestone_path
- - else
- None
+ .col-md-6.text-right
+ %strong.append-right-10
+ Milestone:
+ - 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'})
+ = hidden_field_tag :merge_request_context
+ = f.submit class: 'btn'
+ - elsif merge_request.milestone
+ = link_to merge_request.milestone.title, project_milestone_path
+ - else
+ None
diff --git a/app/views/projects/merge_requests/show/_mr_accept.html.haml b/app/views/projects/merge_requests/show/_mr_accept.html.haml
index 6594709f2ae..1276489c2d9 100644
--- a/app/views/projects/merge_requests/show/_mr_accept.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_accept.html.haml
@@ -12,7 +12,7 @@
- if @show_merge_controls
.automerge_widget.can_be_merged.hide
.clearfix
- = form_for [:automerge, @project, @merge_request], remote: true, method: :get do |f|
+ = form_for [:automerge, @project, @merge_request], remote: true, method: :post do |f|
%h4
You can accept this request automatically.
%div
@@ -21,7 +21,6 @@
= link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
for instructions.
-
.js-toggle-container
%p
If you want to modify merge commit message -
@@ -31,7 +30,8 @@
.form-group
= label_tag :merge_commit_message, "Commit message", class: 'control-label'
.col-sm-10
- = text_area_tag :merge_commit_message, @merge_request.merge_commit_message, class: "form-control js-gfm-input", rows: 14, required: true
+ = render 'shared/commit_message_container', {textarea: text_area_tag(:merge_commit_message,
+ @merge_request.merge_commit_message, class: "form-control js-gfm-input", rows: 14, required: true)}
%p.hint
The recommended maximum line length is 52 characters for the first line and 72 characters for all following lines.
diff --git a/app/views/projects/merge_requests/show/_mr_box.html.haml b/app/views/projects/merge_requests/show/_mr_box.html.haml
index 8855982a2e7..435e916c6dc 100644
--- a/app/views/projects/merge_requests/show/_mr_box.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_box.html.haml
@@ -1,6 +1,6 @@
.issue-box{ class: issue_box_class(@merge_request) }
- .state
- %span.state-label
+ .state.clearfix
+ %span.state-label.col-sm-2.col-xs-12
- if @merge_request.merged?
Merged
- elsif @merge_request.closed?
@@ -8,7 +8,7 @@
- else
Open
- %span.creator
+ %span.creator.col-sm-9.col-xs-12
Created by #{link_to_member(@project, @merge_request.author)} #{time_ago_with_tooltip(@merge_request.created_at)}
%h4.title
diff --git a/app/views/projects/merge_requests/show/_mr_title.html.haml b/app/views/projects/merge_requests/show/_mr_title.html.haml
index 7676fc137c7..2c905413bc3 100644
--- a/app/views/projects/merge_requests/show/_mr_title.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_title.html.haml
@@ -1,7 +1,7 @@
%h3.page-title
= "Merge Request ##{@merge_request.iid}"
- %span.pull-right
+ %span.pull-right.issue-btn-group
- if can?(current_user, :modify_merge_request, @merge_request)
- if @merge_request.open?
.btn-group.pull-left
@@ -39,4 +39,4 @@
- else
%span= @merge_request.source_branch
&rarr;
- %spanh= @merge_request.target_branch
+ %span= @merge_request.target_branch
diff --git a/app/views/projects/merge_requests/show/_participants.html.haml b/app/views/projects/merge_requests/show/_participants.html.haml
new file mode 100644
index 00000000000..0dabd965e52
--- /dev/null
+++ b/app/views/projects/merge_requests/show/_participants.html.haml
@@ -0,0 +1,11 @@
+.participants
+ %cite.cgray #{@merge_request.participants.count} participants
+ - @merge_request.participants.each do |participant|
+ = link_to_member(@project, participant, name: false, size: 24)
+
+ .merge-request-show-labels.pull-right
+ - @merge_request.labels.each do |label|
+ %span{class: "label #{label_css_class(label.name)}"}
+ %i.icon-tag
+ = label.name
+ &nbsp;
diff --git a/app/views/projects/merge_requests/show/_state_widget.html.haml b/app/views/projects/merge_requests/show/_state_widget.html.haml
index c9ecbceaf54..80fe540489b 100644
--- a/app/views/projects/merge_requests/show/_state_widget.html.haml
+++ b/app/views/projects/merge_requests/show/_state_widget.html.haml
@@ -21,14 +21,6 @@
#{time_ago_with_tooltip(@merge_request.merge_event.created_at)}
= render "projects/merge_requests/show/remove_source_branch"
- - if !@closes_issues.empty? && @merge_request.open?
- .alert.alert-info.alert-info
- %span
- %i.icon-ok
- Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'}
- = succeed '.' do
- != gfm(@closes_issues.map { |i| "##{i.iid}" }.to_sentence)
-
- unless @commits.any?
%h4 Nothing to merge
%p
@@ -38,3 +30,12 @@
%span.label-branch #{@merge_request.target_branch}
%br
Try to use different branches or push new code.
+
+ - if !@closes_issues.empty? && @merge_request.open?
+ .panel-footer
+ %span
+ %i.icon-ok
+ Accepting this merge request will close #{@closes_issues.size == 1 ? 'issue' : 'issues'}
+ = succeed '.' do
+ != gfm(@closes_issues.map { |i| "##{i.iid}" }.to_sentence)
+
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 06cf9946784..0fe5ac25b5e 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -1,8 +1,6 @@
= render "projects/issues/head"
%h3.page-title
Milestone ##{@milestone.iid}
- %small
- = @milestone.expires_at
.pull-right
- if can?(current_user, :admin_milestone, @project)
= link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-grouped" do
@@ -23,14 +21,16 @@
.issue-box{ class: issue_box_class(@milestone) }
- .state
- %span.state-label
+ .state.clearfix
+ .state-label.col-sm-2.col-xs-12
- if @milestone.closed?
Closed
- elsif @milestone.expired?
Expired
- else
Open
+ %span.creator.col-sm-9.col-xs-12
+ = @milestone.expires_at
%h4.title
= gfm escape_once(@milestone.title)
@@ -100,7 +100,7 @@
%ul.bordered-list
- @users.each do |user|
%li
- = link_to user, title: user.name, class: "dark" do
+ = link_to user, title: user.name, class: "darken" do
= image_tag avatar_icon(user.email, 32), class: "avatar s32"
%strong= truncate(user.name, lenght: 40)
%br
diff --git a/app/views/projects/new_tree/show.html.haml b/app/views/projects/new_tree/show.html.haml
index 9d7c7afbeac..9ecbbe7508e 100644
--- a/app/views/projects/new_tree/show.html.haml
+++ b/app/views/projects/new_tree/show.html.haml
@@ -24,7 +24,8 @@
= label_tag 'commit_message', class: "control-label" do
Commit message
.col-sm-10
- = text_area_tag 'commit_message', params[:commit_message], placeholder: "Added new file", required: true, rows: 3, class: 'form-control'
+ = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message',
+ params[:commit_message], placeholder: "Added new file", required: true, rows: 3, class: 'form-control')}
.file-holder
.file-title
diff --git a/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml b/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
index 2012aa021b9..399ce30d1a9 100644
--- a/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
+++ b/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
@@ -1,34 +1,33 @@
- note1 = notes1.first # example note
- note2 = notes2.first # example note
+-# Check if line want not changed since comment was left
+/- if !defined?(line) || line == note.diff_line
%tr.notes_holder.js-toggle-content
- -# Check if line want not changed since comment was left
- /- if !defined?(line1) || line1 == note1.diff_line
- if note1
+ %td.notes_line
+ %span.btn.disabled
+ %i.icon-comment
+ = notes1.count
%td.notes_content
%ul.notes{ rel: note1.discussion_id }
= render notes1
+
= render "projects/notes/discussion_reply_button", note: note1
- %td.notes_line2
- %span.btn.disabled.parallel-comment
- %i.icon-comment
- = notes1.count
- else
%td= ""
%td= ""
- %td= ""
-
- -# Check if line want not changed since comment was left
- /- if !defined?(line2) || line2 == note2.diff_line
- if note2
%td.notes_line
- %span.btn.disabled.parallel-comment
+ %span.btn.disabled
%i.icon-comment
= notes2.count
%td.notes_content
%ul.notes{ rel: note2.discussion_id }
= render notes2
+
= render "projects/notes/discussion_reply_button", note: note2
- else
%td= ""
%td= ""
+
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index 81bf0611ec6..2fd8cb6d489 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -54,8 +54,8 @@
- if note.attachment.url
.note-attachment
- if note.attachment.image?
- = link_to note.attachment.url, target: '_blank' do
- = image_tag note.attachment.url, class: 'note-image-attach'
+ = link_to note.attachment.secure_url, target: '_blank' do
+ = image_tag note.attachment.secure_url, class: 'note-image-attach'
.attachment.pull-right
= link_to note.attachment.secure_url, target: "_blank" do
%i.icon-paper-clip
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 20879d69091..7e9f1122aa9 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -6,7 +6,7 @@
= render 'shared/event_filter'
.content_list
= spinner
- .col-md-3.project-side.hidden-sm
+ .col-md-3.project-side.hidden-sm.hidden-xs
.clearfix
- if @project.archived?
.alert.alert-warning
diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml
index c77ed3433d1..0c2e33f2282 100644
--- a/app/views/projects/wikis/_form.html.haml
+++ b/app/views/projects/wikis/_form.html.haml
@@ -1,10 +1,9 @@
= form_for [@project, @page], method: @page.persisted? ? :put : :post, html: { class: 'form-horizontal' } do |f|
-if @page.errors.any?
#error_explanation
- %h2= "#{pluralize(@page.errors.count, "error")} prohibited this wiki from being saved:"
- %ul
+ .alert.alert-danger
- @page.errors.full_messages.each do |msg|
- %li= msg
+ %p= msg
= f.hidden_field :title, value: @page.title
.form-group
diff --git a/app/views/projects/wikis/_new.html.haml b/app/views/projects/wikis/_new.html.haml
index 8cb7fa8aa0b..1ce292a02df 100644
--- a/app/views/projects/wikis/_new.html.haml
+++ b/app/views/projects/wikis/_new.html.haml
@@ -9,6 +9,6 @@
%span Page slug
= text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'form-control', required: true, :'data-wikis-path' => project_wikis_path(@project)
%p.hint
- Please don't use spaces and slashes
+ Please don't use spaces.
.modal-footer
= link_to 'Build', '#', class: 'build-new-wiki btn btn-create'
diff --git a/app/views/shared/_commit_message_container.html.haml b/app/views/shared/_commit_message_container.html.haml
new file mode 100644
index 00000000000..cca7a0efc9b
--- /dev/null
+++ b/app/views/shared/_commit_message_container.html.haml
@@ -0,0 +1,5 @@
+.commit-message-container
+ .max-width-marker
+ -# When the `ch` CSS length unit becomes widely supported `http://www.quirksmode.org/css/units-values` remove this workaround.
+ = 'a' * 72
+ = textarea
diff --git a/app/views/shared/_project_filter.html.haml b/app/views/shared/_project_filter.html.haml
index d82b08eeaa2..7936a038be3 100644
--- a/app/views/shared/_project_filter.html.haml
+++ b/app/views/shared/_project_filter.html.haml
@@ -44,7 +44,7 @@
.light-well
Add first label to your issues
%br
- or #{link_to 'generate', generate_project_labels_path(@project), method: :post} default set of labels
+ or #{link_to 'generate', generate_project_labels_path(@project, redirect: redirect), method: :post} default set of labels
%fieldset
- if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any?