forked from fixin.me/fixin.me
26 lines
808 B
Plaintext
26 lines
808 B
Plaintext
<%# TODO: show hint when no quantities/units defined %>
|
|
<div class="rightside-area buttongrid">
|
|
<% if current_user.at_least(:active) %>
|
|
<%= image_link_to t('.new_measurement'), 'plus-outline', new_measurement_path,
|
|
id: :new_measurement_link, onclick: 'this.blur();',
|
|
data: {turbo_stream: true} %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<table class="main-area items-table">
|
|
<thead>
|
|
<tr>
|
|
<th><%= Quantity.model_name.human %></th>
|
|
<th><%= Readout.human_attribute_name(:value) %></th>
|
|
<th><%= Unit.model_name.human %></th>
|
|
<th><%= Readout.human_attribute_name(:created_at) %></th>
|
|
<% if current_user.at_least(:active) %>
|
|
<th></th>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="measurements">
|
|
<%= render(@measurements) || render_no_items %>
|
|
</tbody>
|
|
</table>
|