Commit 91c388af authored by Gilang Gumilar's avatar Gilang Gumilar Committed by Mark Chao

Replace bootstrap alerts in app/.../error.html.haml

parent e36f62ad
...@@ -7,7 +7,7 @@ module ProjectsHelper ...@@ -7,7 +7,7 @@ module ProjectsHelper
end end
def link_to_project(project) def link_to_project(project)
link_to namespace_project_path(namespace_id: project.namespace, id: project), title: h(project.name) do link_to namespace_project_path(namespace_id: project.namespace, id: project), title: h(project.name), class: 'gl-link' do
title = content_tag(:span, project.name, class: 'project-name') title = content_tag(:span, project.name, class: 'project-name')
if project.namespace if project.namespace
......
- page_title _("Fork project") - page_title _("Fork project")
- if @forked_project && !@forked_project.saved? - if @forked_project && !@forked_project.saved?
.alert.alert-danger.alert-block .gl-alert.gl-alert-danger.gl-mt-5
%h4 = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon')
%h4.gl-alert-title
= sprite_icon('fork') = sprite_icon('fork')
= _("Fork Error!") = _("Fork Error!")
%p .gl-alert-body
= _("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 %p
– = _("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) }
- error = @forked_project.errors.full_messages.first
- if error.include?("already been taken") - if @forked_project && @forked_project.errors.any?
= _("Name has already been taken") %p
- else –
= error - error = @forked_project.errors.full_messages.first
- if error.include?("already been taken")
= _("Name has already been taken")
- else
= error
%p .gl-alert-actions
= link_to _("Try to fork again"), new_project_fork_path(@project), title: _("Fork"), class: "btn" = link_to _("Try to fork again"), new_project_fork_path(@project), title: _("Fork"), class: "btn gl-alert-action btn-info btn-md gl-button"
---
title: Replace bootstrap alerts in app/views/projects/forks/error.html.haml
merge_request: 41292
author: Gilang Gumilar
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment