diff options
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r-- | app/helpers/tree_helper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index 4437f309a9c..23a9601aed7 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -175,6 +175,21 @@ module TreeHelper } end + def fork_modal_options(project, ref, path, blob) + if show_edit_button?({ blob: blob }) + fork_path = fork_and_edit_path(project, ref, path) + fork_modal_id = "modal-confirm-fork-edit" + elsif show_web_ide_button? + fork_path = ide_fork_and_edit_path(project, ref, path) + fork_modal_id = "modal-confirm-fork-webide" + end + + { + fork_path: fork_path, + fork_modal_id: fork_modal_id + } + end + def web_ide_button_data(options = {}) { project_path: project_to_use.full_path, |