2018-06-14 10:38:14 +00:00
|
|
|
- page_title _("Fork project")
|
2014-11-13 20:06:19 +00:00
|
|
|
- if @forked_project && !@forked_project.saved?
|
2021-07-09 09:09:53 +00:00
|
|
|
= render 'shared/global_alert',
|
|
|
|
title: _('Fork Error!'),
|
|
|
|
variant: :danger,
|
|
|
|
alert_class: 'gl-mt-5',
|
|
|
|
dismissible: false do
|
2020-09-18 03:09:28 +00:00
|
|
|
.gl-alert-body
|
2014-11-13 20:06:19 +00:00
|
|
|
%p
|
2020-09-18 03:09:28 +00:00
|
|
|
= _("You tried to fork %{link_to_the_project} but it failed for the following reason:").html_safe % { link_to_the_project: link_to_project(@project) }
|
|
|
|
|
|
|
|
- if @forked_project && @forked_project.errors.any?
|
|
|
|
%p
|
|
|
|
–
|
|
|
|
- error = @forked_project.errors.full_messages.first
|
|
|
|
- if error.include?("already been taken")
|
2021-07-09 09:09:53 +00:00
|
|
|
= _('Name has already been taken')
|
2020-09-18 03:09:28 +00:00
|
|
|
- else
|
|
|
|
= error
|
2014-11-13 20:06:19 +00:00
|
|
|
|
2020-09-18 03:09:28 +00:00
|
|
|
.gl-alert-actions
|
2021-07-09 09:09:53 +00:00
|
|
|
= link_to _('Try to fork again'), new_project_fork_path(@project), title: _("Fork"), class: "btn gl-alert-action btn-info btn-md gl-button"
|