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

Add comment counter to map overview

parent 485b6ea1
......@@ -3,6 +3,7 @@
#
module TableHelper
def td(text, no_title: false, a: nil, klass: nil)
text = text.to_s
out = '<td'
out += ' title="' + h(text) + '"' if text && !text.strip.blank? && !no_title
out += ' class="' + klass.to_s + '"' if klass
......
......@@ -13,6 +13,7 @@
<col id="col-categories" />
<col id="col-repo_signature" />
<col id="col-repository" />
<col id="col-comments" />
<col id="col-description" />
<col id="col-interpretation" />
<col id="col-dates" />
......@@ -35,9 +36,10 @@
<th scope="col"></th>
<th scope="col">Title</th>
<th scope="col">Place</th>
<th scope="col" title="Categories">C.</th>
<th scope="col" title="Categories">Cat.</th>
<th scope="col">Signature</th>
<th scope="col">Repository</th>
<th scope="col" class="narrow">#C</th>
<th scope="col" class="narrow">Desc.</th>
<th scope="col" class="narrow">I.</th>
<th scope="col" class="narrow">Date(s)</th>
......@@ -69,6 +71,7 @@
<%= td(map.categories.sort.map{|c| c.name}.join(' • '), klass: 'narrow') %>
<%= 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.comments.count, klass: 'wide right') %>
<%= td(map.description, klass: 'narrow') %>
<%= td(map.interpretation, klass: 'narrow') %>
<%= td(map.dates, klass: 'narrow') %>
......
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