-
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
9 changed files
with
232 additions
and
172 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
4 changes: 3 additions & 1 deletion
4
app/views/application/paper_trail/_revision_comment_field.html.erb
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 +1,3 @@ | ||
<%= f.text_field :revision_comment, label: "Briefly describe your changes...", label_as_placeholder: true %> | ||
<%= f.text_field :revision_comment, | ||
label: "Briefly describe what you changed and why...", | ||
label_as_placeholder: true %> |
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 was deleted.
Oops, something went wrong.
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,52 +1,49 @@ | ||
<header id="site-header" class="bg-light text-primary"> | ||
<div class="container my-5"> | ||
|
||
<div class="d-flex"> | ||
<h1 class="display-3"><%= site.name %></h1> | ||
<% if can? :edit, Site %> | ||
<div class="ms-auto"> | ||
<%= link_to edit_icon, | ||
edit_site_path, | ||
title: "Edit site details", | ||
class: "btn btn-sm btn-outline-primary", | ||
data: { turbo_frame: "remote_modal" } %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<header id="site-header"> | ||
<div class="d-flex"> | ||
<h1 class="display-3"><%= site.name %></h1> | ||
<% if can? :edit, Site %> | ||
<div class="ms-auto"> | ||
<%= link_to edit_icon, | ||
edit_site_path, | ||
title: "Edit site details", | ||
class: "btn btn-sm btn-outline-primary", | ||
data: { turbo_frame: "remote_modal" } %> | ||
</div> | ||
<% end %> | ||
</div> | ||
|
||
<div class="h5"> | ||
<%= xr_icon Site, {}, { style: "width: auto; height: 1.25rem;" } %> | ||
Archaeological site | ||
in <%= render "country", site: @site %> | ||
</div> | ||
<div class="h5"> | ||
<%= xr_icon Site, {}, { style: "width: auto; height: 1.25rem;" } %> | ||
Archaeological site | ||
in <%= render "country", site: @site %> | ||
</div> | ||
|
||
<% if @site.site_names.any? %> | ||
<dl> | ||
<dt>Also known as</dt> | ||
<dd> | ||
<ul class="list-unstyled"> | ||
<%= turbo_frame_tag "site_names", class: "my-3" do %> | ||
<% for site_name in @site.site_names.order(:language, :name) do %> | ||
<%= turbo_frame_tag site_name do %> | ||
<li><%= render site_name %></li> | ||
<% end %> | ||
<% if @site.site_names.any? %> | ||
<dl> | ||
<dt>Also known as</dt> | ||
<dd> | ||
<ul class="list-unstyled"> | ||
<%= turbo_frame_tag "site_names", class: "my-3" do %> | ||
<% for site_name in @site.site_names.order(:language, :name) do %> | ||
<%= turbo_frame_tag site_name do %> | ||
<li><%= render site_name %></li> | ||
<% end %> | ||
<% end %> | ||
<% if can? :create, :site_name %> | ||
<%= turbo_frame_tag SiteName.new %> | ||
<% end %> | ||
</ul> | ||
</dd> | ||
</dl> | ||
<% end %> | ||
<% if can? :create, :site_name %> | ||
<%= link_to create_icon + "Add alias", [:new, @site, :site_name], | ||
data: { turbo_frame: dom_id(SiteName.new) } %> | ||
<% end %> | ||
|
||
<div class="my-3"> | ||
<%= render "shared/record_metadata", record: @site %> | ||
</div> | ||
<% end %> | ||
<% if can? :create, :site_name %> | ||
<%= turbo_frame_tag SiteName.new %> | ||
<% end %> | ||
</ul> | ||
</dd> | ||
</dl> | ||
<% end %> | ||
<% if can? :create, :site_name %> | ||
<%= link_to create_icon + "Add alias", [:new, @site, :site_name], | ||
data: { turbo_frame: dom_id(SiteName.new) } %> | ||
<% end %> | ||
|
||
<div class="my-3"> | ||
<%= render "shared/record_metadata", record: @site %> | ||
</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,5 +1,21 @@ | ||
<% content_for :title, "Edit site details" %> | ||
|
||
<%= render "shared/remote_modal", title: "Edit site details" do %> | ||
|
||
<%= render 'form' %> | ||
<%= bootstrap_form_with(model: @site, local: true, id: "siteForm") do |f| %> | ||
|
||
<%= render 'fields', f: f %> | ||
|
||
<section class="my-3"> | ||
<h2 class="h5">Change summary</h2> | ||
<%= render "application/paper_trail/revision_comment_field", f: f %> | ||
</section> | ||
|
||
<% end %> | ||
|
||
<%= content_for :buttons do %> | ||
<%= button_tag "Cancel", type: 'reset', class: 'btn btn-outline-primary', form: "siteForm", data: { "bs-dismiss": "modal" } %> | ||
<%= button_tag "Save changes", class: 'btn btn-primary', 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 |
---|---|---|
@@ -1,5 +1,22 @@ | ||
<% content_for :title, "New site" %> | ||
|
||
<main class="container my-5"> | ||
<h1>New site</h1> | ||
|
||
<%= render 'form', site: @site %> | ||
<div class="row"> | ||
<div class="col-auto"> | ||
|
||
<h1>New site</h1> | ||
|
||
<section class="my-3"> | ||
Please check that the site does not already exist in XRONOS first! | ||
</section> | ||
|
||
<%= bootstrap_form_with(model: @site, local: true, id: "siteForm") do |f| %> | ||
<%= render "fields", f: f %> | ||
<%= f.submit class: 'btn btn-primary' %> | ||
<% end %> | ||
|
||
</div> | ||
</div> | ||
|
||
</main> |
Oops, something went wrong.