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

Add titles and interpretation to map

parent 1c4dc9cc
...@@ -93,7 +93,7 @@ div.page { ...@@ -93,7 +93,7 @@ div.page {
} }
.place, .show.map, .show.imagemap, .edit.imagemap { .place, .show.map, .edit.map, .new.map, .show.imagemap, .edit.imagemap {
border: 2px solid grey; border: 2px solid grey;
padding: 1rem; padding: 1rem;
background: $show-bg; background: $show-bg;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
# description :text # description :text
# district(location of map within place) :string # district(location of map within place) :string
# doi :string # doi :string
# interpretation :text
# legend :text # legend :text
# orientation(e.g. north) :string # orientation(e.g. north) :string
# papersize(e.g. 1233mm × 855mm) :string # papersize(e.g. 1233mm × 855mm) :string
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
# scale(e.g. 1:50000) :string # scale(e.g. 1:50000) :string
# techniques :string # techniques :string
# title :string # title :string
# titles :text
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
# place_id :bigint not null # place_id :bigint not null
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
<table> <table>
<tr class="field"><th><%= form.label :title %></th><td><%= form.text_field :title %></td></tr> <tr class="field"><th><%= form.label :title %></th><td><%= form.text_field :title %></td></tr>
<tr class="field"><th><%= form.label :alternate_titles %></th><td><%= form.text_field :titles %></td></tr>
<tr class="field"><th><%= form.label :interpretation %></th><td><%= form.text_area :interpretation %></td></tr>
<tr class="field"><th><%= form.label :repo_doc_ref %></th><td><%= form.text_field :repo_doc_ref %> <%= form.text_field :repo_doc_ref_part %></td></tr> <tr class="field"><th><%= form.label :repo_doc_ref %></th><td><%= form.text_field :repo_doc_ref %> <%= form.text_field :repo_doc_ref_part %></td></tr>
<tr class="field" data-controller="nested-form"><th>Images</th><td> <tr class="field" data-controller="nested-form"><th>Images</th><td>
<template data-nested-form-target="template"> <template data-nested-form-target="template">
......
<main class="edit map">
<h1>Editing Map</h1> <h1>Editing Map</h1>
<%= render 'form', map: @map %> <%= render 'form', map: @map %>
...@@ -18,3 +19,4 @@ ...@@ -18,3 +19,4 @@
<%= render 'dfg_maps/show', dfg_map: @map.dfg_map %> <%= render 'dfg_maps/show', dfg_map: @map.dfg_map %>
</section> </section>
<% end %> <% end %>
</details>
<main class="new map">
<h1>New Map</h1> <h1>New Map</h1>
<%= render 'form', map: @map %> <%= render 'form', map: @map %>
<%= link_to 'Back', maps_path %> <%= link_to 'Back', maps_path %>
</main>
...@@ -65,6 +65,8 @@ ...@@ -65,6 +65,8 @@
<% @map.itemdates.each do |itemdate| %> <% @map.itemdates.each do |itemdate| %>
<tr><th>Date:</th><td><%= itemdate.edtfdate.edtf %> (<%= itemdate.description %>)</td></tr> <tr><th>Date:</th><td><%= itemdate.edtfdate.edtf %> (<%= itemdate.description %>)</td></tr>
<% end %> <% end %>
<tr><th>Alternate titles:</th><td><%= @map.titles %></td></tr>
<tr><th>Interpretation:</th><td><%= @map.interpretation %></td></tr>
<tr><th>based on:</th><td><%= @map.basemap %></td></tr> <tr><th>based on:</th><td><%= @map.basemap %></td></tr>
<tr><th>Creator:</th><td><%= @map.creator %></td></tr> <tr><th>Creator:</th><td><%= @map.creator %></td></tr>
<tr><th>Legend:</th><td><%= @map.legend %></td></tr> <tr><th>Legend:</th><td><%= @map.legend %></td></tr>
......
class AddTitlesInterpretationToMaps < ActiveRecord::Migration[6.1]
def change
add_column :maps, :titles, :text
add_column :maps, :interpretation, :text
end
end
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_03_07_204434) do ActiveRecord::Schema.define(version: 2022_03_07_214830) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "adminpack" enable_extension "adminpack"
...@@ -151,6 +151,8 @@ ActiveRecord::Schema.define(version: 2022_03_07_204434) do ...@@ -151,6 +151,8 @@ ActiveRecord::Schema.define(version: 2022_03_07_204434) do
t.datetime "updated_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false
t.bigint "repository_id" t.bigint "repository_id"
t.string "repo_doc_ref_part" t.string "repo_doc_ref_part"
t.text "titles"
t.text "interpretation"
t.index ["place_id"], name: "index_maps_on_place_id" t.index ["place_id"], name: "index_maps_on_place_id"
t.index ["repository_id"], name: "index_maps_on_repository_id" t.index ["repository_id"], name: "index_maps_on_repository_id"
end end
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
# description :text # description :text
# district(location of map within place) :string # district(location of map within place) :string
# doi :string # doi :string
# interpretation :text
# legend :text # legend :text
# orientation(e.g. north) :string # orientation(e.g. north) :string
# papersize(e.g. 1233mm × 855mm) :string # papersize(e.g. 1233mm × 855mm) :string
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
# scale(e.g. 1:50000) :string # scale(e.g. 1:50000) :string
# techniques :string # techniques :string
# title :string # title :string
# titles :text
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
# place_id :bigint not null # place_id :bigint not null
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
# description :text # description :text
# district(location of map within place) :string # district(location of map within place) :string
# doi :string # doi :string
# interpretation :text
# legend :text # legend :text
# orientation(e.g. north) :string # orientation(e.g. north) :string
# papersize(e.g. 1233mm × 855mm) :string # papersize(e.g. 1233mm × 855mm) :string
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
# scale(e.g. 1:50000) :string # scale(e.g. 1:50000) :string
# techniques :string # techniques :string
# title :string # title :string
# titles :text
# created_at :datetime not null # created_at :datetime not null
# updated_at :datetime not null # updated_at :datetime not null
# place_id :bigint not null # place_id :bigint not null
......
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