-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
66 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
<%= bootstrap_form_with(model: @site, local: true, id: "siteForm") do |f| %> | ||
|
||
<%= render 'fields', f: f %> | ||
|
||
<%= content_for :buttons do %> | ||
<%= button_tag "Cancel", type: 'reset', class: 'btn btn-danger', form: "siteForm", data: { "bs-dismiss": "modal" } %> | ||
<%= button_tag "Save", class: 'btn btn-success', form: "siteForm" %> | ||
<% end %> | ||
|
||
<% end %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<header id="site-header" class="bg-light text-primary"> | ||
<div class="container my-5"> | ||
<h1 class="display-1"><%= site.name %></h1> | ||
<h2 class="display-6"> | ||
<%= xr_icon Site, {}, { style: "width: auto; height: 2.5rem;" } %> | ||
<%= Site.label.humanize %> | ||
<% if site.country.present? %> in <%= site.country.common_name %><%end%> | ||
</h2> | ||
</div> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,26 @@ | ||
<%= render "shared/remote_modal", title: "Edit site details" do %> | ||
<%= render "header", site: @site %> | ||
|
||
<%= render 'form' %> | ||
|
||
<% end %> | ||
<div class="container my-5"> | ||
<%= turbo_frame_tag @site do %> | ||
<div class="d-flex"> | ||
<h2> | ||
<%= xr_icon Site, {}, style: "width: auto; height: 2rem" %> | ||
<%= Site.label.humanize %> details | ||
</h2> | ||
<% if can? :edit, Site %> | ||
<div class="ms-auto"> | ||
<%= link_to cancel_icon, @site, | ||
title: "Cancel editing", | ||
class: "btn btn-sm btn-outline-danger", | ||
form: "siteForm" %> | ||
<%= button_tag confirm_icon, | ||
title: "Save changes", | ||
class: "btn btn-sm btn-success", | ||
form: "siteForm" %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<%= render 'form' %> | ||
<% end %> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters