diff options
author | Regis <boudinot.regis@yahoo.com> | 2017-01-18 18:05:06 +0300 |
---|---|---|
committer | Regis <boudinot.regis@yahoo.com> | 2017-01-18 18:05:06 +0300 |
commit | d143cae9ca733274e04a7142d1dbd9fe70284534 (patch) | |
tree | 01c70f4842f623890713beaca9f80269f1413e31 /app | |
parent | 97610fda24f77cdb88f40aac4016594ae958bea1 (diff) | |
parent | 5e9196b3bcc31ce7fd698ed49af5d39eae1da630 (diff) |
Merge branch 'master' into ui_pipelines_mini_graph
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/compare_controller.rb | 11 | ||||
-rw-r--r-- | app/views/projects/commit/_commit_box.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/commits/_commit.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/tree/_tree_content.html.haml | 2 |
4 files changed, 13 insertions, 4 deletions
diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb index ec02fc15d35..d32966645c8 100644 --- a/app/controllers/projects/compare_controller.rb +++ b/app/controllers/projects/compare_controller.rb @@ -25,8 +25,17 @@ class Projects::CompareController < Projects::ApplicationController end def create - redirect_to namespace_project_compare_path(@project.namespace, @project, + if params[:from].blank? || params[:to].blank? + flash[:alert] = "You must select from and to branches" + from_to_vars = { + from: params[:from].presence, + to: params[:to].presence + } + redirect_to namespace_project_compare_index_path(@project.namespace, @project, from_to_vars) + else + redirect_to namespace_project_compare_path(@project.namespace, @project, params[:from], params[:to]) + end end private diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index a9ee9230076..08eb0c57f66 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -1,7 +1,7 @@ .page-content-header .header-main-content %strong - = clipboard_button(clipboard_text: @commit.id) + = clipboard_button(clipboard_text: @commit.id, title: "Copy commit SHA to clipboard") = @commit.short_id %span.hidden-xs authored #{time_ago_with_tooltip(@commit.authored_date)} diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index 3c6c50dce3c..002e3d345dc 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -36,6 +36,6 @@ .table-list-cell.commit-actions.hidden-xs - if commit.status(ref) = render_commit_status(commit, ref: ref) - = clipboard_button(clipboard_text: commit.id) + = clipboard_button(clipboard_text: commit.id, title: "Copy commit SHA to clipboard") = link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit-short-id btn btn-transparent" = link_to_browse_code(project, commit) diff --git a/app/views/projects/tree/_tree_content.html.haml b/app/views/projects/tree/_tree_content.html.haml index 038a960bd0c..2c08221565b 100644 --- a/app/views/projects/tree/_tree_content.html.haml +++ b/app/views/projects/tree/_tree_content.html.haml @@ -8,7 +8,7 @@ .pull-left Last commit .last-commit.hidden-sm.pull-left %small.light - = clipboard_button(clipboard_text: @commit.id) + = clipboard_button(clipboard_text: @commit.id, title: "Copy commit SHA to clipboard") = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace" = time_ago_with_tooltip(@commit.committed_date) = @commit.full_title |