bingo: optional prose per datacenter page

The datacenter pages carry only generated sentences, which is thin
content to rank on. Migration 015 adds about_ru/en/uk, edited in the
admin form and rendered as paragraphs below the facts.

There is deliberately no fallback to ru: Russian prose on the English
page would hurt more than an absent paragraph.

Assisted-by: Claude:opus-5
This commit is contained in:
Sergei Poljanski 2026-10-10 09:41:11 +04:00
commit ca48f4292b
Signed by: asxpi
GPG key ID: 4F8851660FA4121B
6 changed files with 27 additions and 1 deletions

View file

@ -65,6 +65,9 @@
<div class="field"><label for="photo_credit">Photo credit</label><input type="text" id="photo_credit" name="photo_credit" value="<%= @dc.photo_credit %>" /></div>
<div class="field"><label for="photo_source_url">Photo source URL</label><input type="url" id="photo_source_url" name="photo_source_url" value="<%= @dc.photo_source_url %>" /></div>
<div class="field"><label for="info_url">Info / fact source URL</label><input type="url" id="info_url" name="info_url" value="<%= @dc.info_url %>" /></div>
<% %w[ru en uk].each do |l| %>
<div class="field"><label for="about_<%= l %>">About (<%= l %>) <span class="optional">(datacenter page; blank lines split paragraphs; not translated automatically, blank = hidden)</span></label><textarea id="about_<%= l %>" name="about_<%= l %>" rows="4" maxlength="5000"><%= @dc[:"about_#{l}"] %></textarea></div>
<% end %>
<% if can?('bingo', 'write') %><button type="submit" class="download-button"><%= fresh ? 'Add datacenter' : 'Save' %></button><% end %>
</fieldset>
</form>

View file

@ -14,6 +14,7 @@
<h1><%= dc.l(:name, @locale) %></h1>
<%== erb :_dc_meta, layout: false, locals: { dc: dc } %>
<p class="facts"><%= dc_facts(dc).join(' ') %></p>
<% dc.about(@locale).each do |para| %><p class="facts"><%= para %></p><% end %>
<section>
<h2><%= t(:incidents) %></h2>
<%== erb :_dc_incidents, layout: false, locals: { dc: dc } %>