Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
urbanmetamapping
platform
MapMyMaps-p1
Commits
d362efe0
Commit
d362efe0
authored
Mar 07, 2022
by
Klaus Stein
Browse files
Add titles and interpretation to map
parent
1c4dc9cc
Changes
10
Hide whitespace changes
Inline
Side-by-side
app/frontend/stylesheets/_main.scss
View file @
d362efe0
...
...
@@ -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
;
padding
:
1rem
;
background
:
$show-bg
;
...
...
app/models/map.rb
View file @
d362efe0
...
...
@@ -11,6 +11,7 @@
# description :text
# district(location of map within place) :string
# doi :string
# interpretation :text
# legend :text
# orientation(e.g. north) :string
# papersize(e.g. 1233mm × 855mm) :string
...
...
@@ -20,6 +21,7 @@
# scale(e.g. 1:50000) :string
# techniques :string
# title :string
# titles :text
# created_at :datetime not null
# updated_at :datetime not null
# place_id :bigint not null
...
...
app/views/maps/_form.html.erb
View file @
d362efe0
...
...
@@ -12,6 +12,8 @@
<table>
<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"
data-controller=
"nested-form"
><th>
Images
</th><td>
<template
data-nested-form-target=
"template"
>
...
...
app/views/maps/edit.html.erb
View file @
d362efe0
<main
class=
"edit map"
>
<h1>
Editing Map
</h1>
<%=
render
'form'
,
map:
@map
%>
...
...
@@ -18,3 +19,4 @@
<%=
render
'dfg_maps/show'
,
dfg_map:
@map
.
dfg_map
%>
</section>
<%
end
%>
</details>
app/views/maps/new.html.erb
View file @
d362efe0
<main
class=
"new map"
>
<h1>
New Map
</h1>
<%=
render
'form'
,
map:
@map
%>
<%=
link_to
'Back'
,
maps_path
%>
</main>
app/views/maps/show.html.erb
View file @
d362efe0
...
...
@@ -65,6 +65,8 @@
<%
@map
.
itemdates
.
each
do
|
itemdate
|
%>
<tr><th>
Date:
</th><td>
<%=
itemdate
.
edtfdate
.
edtf
%>
(
<%=
itemdate
.
description
%>
)
</td></tr>
<%
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>
Creator:
</th><td>
<%=
@map
.
creator
%>
</td></tr>
<tr><th>
Legend:
</th><td>
<%=
@map
.
legend
%>
</td></tr>
...
...
db/migrate/20220307214830_add_titles_interpretation_to_maps.rb
0 → 100644
View file @
d362efe0
class
AddTitlesInterpretationToMaps
<
ActiveRecord
::
Migration
[
6.1
]
def
change
add_column
:maps
,
:titles
,
:text
add_column
:maps
,
:interpretation
,
:text
end
end
db/schema.rb
View file @
d362efe0
...
...
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2022_03_07_2
04434
)
do
ActiveRecord
::
Schema
.
define
(
version:
2022_03_07_2
14830
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"adminpack"
...
...
@@ -151,6 +151,8 @@ ActiveRecord::Schema.define(version: 2022_03_07_204434) do
t
.
datetime
"updated_at"
,
precision:
6
,
null:
false
t
.
bigint
"repository_id"
t
.
string
"repo_doc_ref_part"
t
.
text
"titles"
t
.
text
"interpretation"
t
.
index
[
"place_id"
],
name:
"index_maps_on_place_id"
t
.
index
[
"repository_id"
],
name:
"index_maps_on_repository_id"
end
...
...
test/fixtures/maps.yml
View file @
d362efe0
...
...
@@ -11,6 +11,7 @@
# description :text
# district(location of map within place) :string
# doi :string
# interpretation :text
# legend :text
# orientation(e.g. north) :string
# papersize(e.g. 1233mm × 855mm) :string
...
...
@@ -20,6 +21,7 @@
# scale(e.g. 1:50000) :string
# techniques :string
# title :string
# titles :text
# created_at :datetime not null
# updated_at :datetime not null
# place_id :bigint not null
...
...
test/models/map_test.rb
View file @
d362efe0
...
...
@@ -11,6 +11,7 @@
# description :text
# district(location of map within place) :string
# doi :string
# interpretation :text
# legend :text
# orientation(e.g. north) :string
# papersize(e.g. 1233mm × 855mm) :string
...
...
@@ -20,6 +21,7 @@
# scale(e.g. 1:50000) :string
# techniques :string
# title :string
# titles :text
# created_at :datetime not null
# updated_at :datetime not null
# place_id :bigint not null
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment