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
11131f9d
Commit
11131f9d
authored
Dec 16, 2021
by
Klaus Stein
Browse files
Improve map index display
parent
3f8ad7f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/frontend/stylesheets/_maps.scss
View file @
11131f9d
...
...
@@ -59,11 +59,14 @@ main.maps {
.right
{
text-align
:
right
;
}
.wide
,
.narrow
{
.wwide
,
.wide
,
.narrow
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:nowrap
;
}
.wwide
{
max-width
:
20em
;
}
.wide
{
max-width
:
8em
;
}
...
...
app/helpers/application_helper.rb
View file @
11131f9d
module
ApplicationHelper
def
joined
(
*
strs
,
joiner:
' • '
)
strs
.
compact
.
join
(
joiner
)
strs
.
reject
(
&
:blank?
).
compact
.
join
(
joiner
)
end
end
app/views/maps/index.html.erb
View file @
11131f9d
...
...
@@ -63,11 +63,10 @@
place
=
map
.
place
.
name
place
=
place
.
to_s
+
" (
#{
map
.
district
}
)"
unless
map
.
district
.
blank?
%>
<%=
td
(
place
,
a:
map
.
place
,
klass:
'wide'
)
%>
<%=
td
(
joined
(
map
.
place
&
.
name
,
map
.
district
)
,
a:
map
.
place
,
klass:
'wide'
)
%>
<%=
td
(
map
.
categories
.
sort
.
map
{
|
c
|
c
.
name
}.
join
(
' • '
),
klass:
'narrow'
)
%>
<%=
td
(
joined
(
map
.
repo_doc_ref
,
map
.
repo_doc_ref_part
)
,
klass:
'full'
)
%>
<%
repo
=
[
map
.
repository
&
.
name
,
map
.
repository
&
.
location
].
compact
.
join
(
', '
)
%>
<%=
td
(
repo
,
a:
map
.
repository
,
klass:
'wide'
)
%>
<%=
td
(
joined
(
map
.
repo_doc_ref
,
map
.
repo_doc_ref_part
)
,
klass:
'wwide'
)
%>
<%=
td
(
joined
(
map
.
repository
&
.
name
,
map
.
repository
&
.
location
,
joiner:
', '
),
a:
map
.
repository
,
klass:
'wide'
)
%>
<%=
td
(
map
.
description
,
klass:
'narrow'
)
%>
<%=
td
(
map
.
dates
,
klass:
'narrow'
)
%>
<%=
td
(
map
.
basemap
,
klass:
'wide'
)
%>
...
...
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