bingo: planned status and capacity type
"MW" on the card mixed IT load, connected power, total site power,
design capacity and even MVA (Oxygen, Sber Yuzhny Port). Record which
one a figure is in a new mw_type column; the dialog tags the number
("64 MW · design") and MVA replaces the unit, while cells keep the bare
figure to stay readable. Add a "planned" status for projects not yet
under construction; like "building", it is left out of the operational
view.
Assisted-by: Claude:opus-5
This commit is contained in:
parent
9e885dd8c1
commit
e5bd1c1ac7
9 changed files with 69 additions and 9 deletions
|
|
@ -41,10 +41,17 @@
|
|||
<% end %>
|
||||
<div class="field"><label for="operator">Operator</label><input type="text" id="operator" name="operator" value="<%= @dc.operator %>" required /></div>
|
||||
<div class="field"><label for="mw">MW <span class="optional">(number or range)</span></label><input type="text" id="mw" name="mw" value="<%= @dc.mw %>" /></div>
|
||||
<div class="field">
|
||||
<label for="mw_type">Capacity type</label>
|
||||
<select id="mw_type" name="mw_type">
|
||||
<option value="" <%= 'selected' unless @dc.mw_type %>>not stated</option>
|
||||
<% Bingo::MW_TYPES.each do |m| %><option value="<%= m %>" <%= 'selected' if @dc.mw_type == m %>><%= m %></option><% end %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="status">Status</label>
|
||||
<select id="status" name="status">
|
||||
<% %w[operational building].each do |s| %><option <%= 'selected' if @dc.status == s %>><%= s %></option><% end %>
|
||||
<% Bingo::STATUSES.each do |s| %><option <%= 'selected' if @dc.status == s %>><%= s %></option><% end %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="field"><label for="year">Year</label><input type="text" id="year" name="year" value="<%= @dc.year %>" inputmode="numeric" /></div>
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
<td><% if dc.photo_file %><img src="/admin/bingo/p/<%= dc.photo_file(480) %>" alt="" width="64" height="40" style="object-fit: cover" /><% else %>—<% end %></td>
|
||||
<td><%= dc.name_ru %><br /><span class="optional"><%= dc.city_ru %></span></td>
|
||||
<td><%= dc.operator %></td>
|
||||
<td class="num mono"><%= dc.mw %></td>
|
||||
<td class="num mono"><%= dc.mw %><%= " #{dc.mw_type}" if dc.mw_type %></td>
|
||||
<td><%= dc.status %></td>
|
||||
<td class="num mono"><%= dc.incidents.size %></td>
|
||||
<td class="actions"><a href="/admin/bingo/dc/<%= dc.id %>">edit</a></td>
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@
|
|||
aria-label="<%= dc.l(:name, @locale) %><%= " — #{kind_label(dc.incidents.first.kind)}" if b.hit[idx] %>">
|
||||
<% if photo %><img class="bg" src="<%= photo %>" alt="" width="480" height="480" decoding="async"<%== ' loading="lazy"' if idx >= 10 %>><% end %>
|
||||
<div>
|
||||
<div class="n">#<%= idx + 1 %><%= " · #{mw(dc)}" if mw(dc) %></div>
|
||||
<% if dc.building? %><div class="tag"><%= t(:building) %></div><% end %>
|
||||
<div class="n">#<%= idx + 1 %><%= " · #{mw(dc, tag: false)}" if mw(dc) %></div>
|
||||
<% if status_label(dc) %><div class="tag"><%= status_label(dc) %></div><% end %>
|
||||
</div>
|
||||
<div>
|
||||
<div class="name"><%= dc.l(:name, @locale) %></div>
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
<div class="body">
|
||||
<h3><%= dc.l(:name, @locale) %></h3>
|
||||
<div class="meta">
|
||||
<%= [dc.operator, mw(dc), dc.l(:city, @locale), dc.building? ? t(:building) : (dc.year && format(t(:since), dc.year))].compact.join(' · ') %>
|
||||
<%= [dc.operator, mw(dc), dc.l(:city, @locale), status_label(dc) || (dc.year && format(t(:since), dc.year))].compact.join(' · ') %>
|
||||
</div>
|
||||
<% if dc.photo_credit || dc.info_url %>
|
||||
<div class="credit">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue