diff options
author | Phil Hughes <me@iamphill.com> | 2016-05-24 19:06:49 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-08 12:10:18 +0300 |
commit | 8b40a7745be84659c10db02e3bbb74126bd42414 (patch) | |
tree | c1bf27d83bba6f7e766e56477e639c8612521cb6 | |
parent | 79b375e17876105cefcbc5c451e785aceedb0002 (diff) |
Updated tests
-rw-r--r-- | app/helpers/button_helper.rb | 8 | ||||
-rw-r--r-- | app/helpers/commits_helper.rb | 1 | ||||
-rw-r--r-- | app/views/projects/commits/_commit.html.haml | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/app/helpers/button_helper.rb b/app/helpers/button_helper.rb index bf5505125ab..fabd726aae9 100644 --- a/app/helpers/button_helper.rb +++ b/app/helpers/button_helper.rb @@ -22,6 +22,14 @@ module ButtonHelper type: :button end + def clipboard_button_with_class(data = {}, css_class: 'btn-clipboard') + content_tag :button, + icon('clipboard'), + class: "btn #{css_class}", + data: data, + type: :button + end + def http_clone_button(project) klass = 'http-selector' klass << ' has-tooltip' if current_user.try(:require_password?) diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 767b346f2ff..97d52b1fb9e 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -200,7 +200,6 @@ module CommitsHelper source_email = clean(commit.send "#{options[:source]}_email".to_sym) person_name = user.try(:name) || source_name - person_email = user.try(:email) || source_email text = if options[:avatar] diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index f79c9448f60..d6661deb5ff 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -19,7 +19,7 @@ .commit-actions - if commit.status = render_commit_status(commit, cssclass: 'btn btn-transparent') - = clipboard_button({ clipboard_text: commit.id }, css_class: 'btn-transparent') + = clipboard_button_with_class({ clipboard_text: commit.id }, css_class: 'btn-transparent') = 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) |