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