Commit b79689de authored by Klaus Stein's avatar Klaus Stein
Browse files

Improve signature/repository display on map page

parent c2c47940
......@@ -46,6 +46,29 @@ main.show.map {
}
}
.repo {
padding: 0px;
padding-bottom: 0px;
span.signature {
border: 1px solid grey;
padding: 0.5rem;
margin-right: 1em;
}
a.repository {
border: 1px solid $link-fg-color;
padding: 0.5rem;
text-decoration: none;
background: $link-bg-color;
color: $link-fg-color;
font-weight: bold;
&:hover, &:focus {
background: $link-bg-hover-color;
}
}
}
.description {
}
......
......@@ -2,3 +2,7 @@ $project-color: #444;
$project-contrast-color: white;
$link-color: #000066;
$link-hover-color: adjust-hue($link-color, 60);
$link-bg-color: desaturate(lighten(#000066, 60), 80);
$link-bg-hover-color: adjust-hue($link-bg-color, 60);
$link-fg-color: $link-color;
......@@ -29,7 +29,9 @@
<tr class="field"><th><%= form.label :place_id %></th><td><%= form.collection_select(:place_id, Place.with_name, :id, :name, {include_blank: true}) %></td></tr>
<tr class="field"><th><%= form.label :categories %></th><td><%= form.collection_select(:category_ids, Category.all, :id, :name, {label: 'Category(s)'}, {multiple: true}) %></td></tr>
<tr class="field"><th><%= form.label :description %></th><td><%= form.text_area :description %></td></tr>
<tr class="field" data-controller="nested-form"><th>Dates:</th>
<tr class="field"><th><%= form.label :repo_doc_ref %></th><td><%= form.text_field :repo_doc_ref %></td></tr>
<tr class="field"><th><%= form.label :repository %></th><td><%= form.collection_select(:repository_id, Repository.order(:name), :id, :name_with_location, include_blank: true) %></td></tr>
<tr class="field" data-controller="nested-form"><th>Dates:</th>
<td><div class="instructions">[Date format: <kbd>yyyy-mm-dd</kbd> (e.g. <kbd>1944-02-11</kbd>)]</div>
<template data-nested-form-target="template">
<%= form.fields_for :itemdates, Itemdate.new, child_index: 'NEW_RECORD' do |itemdate_fields| %>
......@@ -55,8 +57,6 @@
<tr class="field"><th><%= form.label :legend %></th><td><%= form.text_area :legend %></td></tr>
<tr class="field"><th><%= form.label :damage_categories %></th><td><%= form.text_area :damage_categories %></td></tr>
<tr class="field"><th><%= form.label :doi %></th><td><%= form.text_field :doi %></td></tr>
<tr class="field"><th><%= form.label :repository %></th><td><%= form.collection_select(:repository_id, Repository.order(:name), :id, :name_with_location, include_blank: true) %></td></tr>
<tr class="field"><th><%= form.label :repo_doc_ref %></th><td><%= form.text_field :repo_doc_ref %></td></tr>
<tr class="field"><th><%= form.label :copyright %></th><td><%= form.text_field :copyright %></td></tr>
<tr class="field"><th><%= form.label :copyright_holder %></th><td><%= form.text_field :copyright_holder %></td></tr>
</table>
......
......@@ -9,6 +9,14 @@
<% end %></h1>
<%= editlink @map %>
</header>
<p class="repo">
<span class="signature"><%= @map.repo_doc_ref || '–?–' %></span>
<% if @map.repository %>
<%= link_to @map.repository.name, @map.repository, class: 'repository' %>
<% else %>
<span class="repository">–?–</span>
<% end %>
</p>
<p class="shortinfo">
<% %w[scale papersize orientation techniques].each do |key|
if value = @map.attributes[key] and !value.blank? %>
......@@ -47,12 +55,6 @@
<tr><th>Doi:</th><td><%= @map.doi %></td></tr>
<tr><th>Copyright:</th><td><%= @map.copyright %></td></tr>
<tr><th>Copyright holder:</th><td><%= @map.copyright_holder %></td></tr>
<tr><th>Repository:</th><td>
<% if @map.repository %>
<%= link_to @map.repository.name, @map.repository %>
<% end %>
</td></tr>
<tr><th>Signature:</th><td><%= @map.repo_doc_ref %></td></tr>
</table>
<% if @map.wda_map %>
......
Supports Markdown
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