summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-02-15 12:03:37 +0100
committerJames Lopez <james@jameslopez.es>2018-02-23 14:02:40 +0100
commit6ade6e2bb6a937c08da9a1bc62f62e92ad2ab06e (patch)
tree9abe332d3c935bed6481b74478a916005b07f714 /app/helpers
parent50ccc6dcc79d5864f5fb9e18e2c586fd3e5f9218 (diff)
downloadgitlab-ce-6ade6e2bb6a937c08da9a1bc62f62e92ad2ab06e.tar.gz
fix specs
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/blob_helper.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb
index d520f2ed068..1c076321cb7 100644
--- a/app/helpers/blob_helper.rb
+++ b/app/helpers/blob_helper.rb
@@ -84,7 +84,7 @@ module BlobHelper
elsif can_modify_blob?(blob, project, ref)
button_tag label, class: "#{common_classes}", 'data-target' => "#modal-#{modal_type}-blob", 'data-toggle' => 'modal'
elsif can?(current_user, :fork_project, project)
- edit_fork_button_tag(common_classes, project, label, edit_modify_file_fork_params(action))
+ edit_fork_button_tag(common_classes, project, label, edit_modify_file_fork_params(action), action)
end
end
@@ -331,16 +331,17 @@ module BlobHelper
{
to: request.fullpath,
notice: edit_in_new_fork_notice_action(action),
- notice_now: edit_in_new_fork_notice_now
+ notice_now: edit_in_new_fork_notice_now,
+ action: action
}
end
- def edit_fork_button_tag(common_classes, project, label, params)
+ def edit_fork_button_tag(common_classes, project, label, params, action = 'edit')
fork_path = project_forks_path(project, namespace_key: current_user.namespace.id, continue: params)
- button_tag edit_text,
+ button_tag label,
class: "#{common_classes} js-edit-blob-link-fork-toggler",
- data: { action: 'edit', fork_path: fork_path }
+ data: { action: action, fork_path: fork_path }
end
def edit_button_tag(button_text, common_classes)