forked from fixin.me/fixin.me
WIP
This commit is contained in:
@@ -218,6 +218,7 @@ module ApplicationHelper
|
||||
end.join.html_safe
|
||||
end
|
||||
|
||||
# TODO: remove from Default::Units and delete
|
||||
def render_no_items
|
||||
tag.tr id: :no_items do
|
||||
tag.td t("#{controller_path.tr('/', '.')}.no_items"), colspan: 10, class: 'hint'
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
</div>
|
||||
|
||||
<table class="main-area">
|
||||
<caption class="hint"><%= t '.no_items' %></caption>
|
||||
<tbody id="measurements">
|
||||
<%= render(@measurements) || render_no_items %>
|
||||
<%= render(@measurements) %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -6,15 +6,16 @@
|
||||
<%= readout.quantity.relative_pathname(@superquantity) %>
|
||||
<%= form.hidden_field :quantity_id %>
|
||||
</td>
|
||||
<td>
|
||||
<%= form.number_field :value, required: true, autofocus: readout_counter == 0 %>
|
||||
<td class="hexpand">
|
||||
<%= form.number_field :value, class: 'hminnumber hstretch', required: true,
|
||||
autofocus: readout_counter == 0 %>
|
||||
</td>
|
||||
<td>
|
||||
<%= form.collection_select :unit_id, @user_units, :id,
|
||||
->(u){ sanitize(' ' * (u.base_id ? 1 : 0) + u.symbol) },
|
||||
{prompt: '', disabled: '', selected: ''}, required: true %>
|
||||
{prompt: '', disabled: '', selected: ''}, class: 'hstretch', required: true %>
|
||||
</td>
|
||||
<td class="flex">
|
||||
<td>
|
||||
<%# TODO: change to _link_ after giving up displaying relative paths %>
|
||||
<%= image_button_tag '', 'delete-outline', class: 'dangerous', name: nil,
|
||||
formaction: discard_readouts_path(readout.quantity),
|
||||
|
||||
@@ -98,12 +98,12 @@ en:
|
||||
source_code: Get code
|
||||
measurements:
|
||||
navigation: Measurements
|
||||
no_items: There are no measurements taken. You can Add some now.
|
||||
form:
|
||||
select_quantity: select quantities...
|
||||
taken_at_html: Measurement taken at 
|
||||
index:
|
||||
new_measurement: Add measurement
|
||||
no_items: There are no measurements taken. You can Add some now.
|
||||
quantities:
|
||||
navigation: Quantities
|
||||
quantity:
|
||||
|
||||
Reference in New Issue
Block a user