forked from fixin.me/fixin.me
Merge corrections provided by Bambuch, cont.
This commit is contained in:
parent
cd9a64b5ad
commit
9dbcfddf98
@ -172,6 +172,7 @@ input[type=checkbox]:checked {
|
||||
}
|
||||
/* Hide spin buttons in input number fields */
|
||||
input[type=number] {
|
||||
appearance: textfield;
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
input::-webkit-inner-spin-button {
|
||||
|
@ -106,7 +106,7 @@ function dragLeave(event) {
|
||||
if (event.timeStamp <= lastEnterTime) return;
|
||||
event.currentTarget.closest("table").querySelectorAll(".dropzone").forEach((tr) => {
|
||||
tr.classList.remove("dropzone");
|
||||
})
|
||||
});
|
||||
}
|
||||
window.dragLeave = dragLeave;
|
||||
|
||||
|
@ -7,9 +7,10 @@ class User < ApplicationRecord
|
||||
admin: 4, # admin level access
|
||||
active: 3, # read-write user level access
|
||||
restricted: 2, # read-only user level access
|
||||
locked: 1, # disallowed to sign in due to failed logins; maintained by Devise :lockable
|
||||
locked: 1, # disallowed to sign in due to failed logins; maintained by
|
||||
# Devise :lockable
|
||||
disabled: 0, # administratively disallowed to sign in
|
||||
}, default: :active
|
||||
}, default: :active, validate: true
|
||||
|
||||
has_many :readouts, dependent: :destroy
|
||||
accepts_nested_attributes_for :readouts
|
||||
|
@ -4,7 +4,7 @@
|
||||
<%# TODO: show hint when no quantities/units defined %>
|
||||
<div class="hflex">
|
||||
<%= select_tag :id, options_from_collection_for_select(
|
||||
@quantities, :id, ->(q){ sanitize(' '*q.depth + q.name) }
|
||||
@quantities, :id, ->(q){ sanitize(' ' * q.depth + q.name) }
|
||||
), form: :new_readouts_form %>
|
||||
<% common_options = {form: :new_readouts_form, formaction: new_measurement_path,
|
||||
formmethod: :get, formnovalidate: true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
<%= turbo_stream.close_form dom_id(@quantity.parent || Quantity, :new) %>
|
||||
<%= turbo_stream.remove :no_items %>
|
||||
<% @ancestors.map do |ancestor| %>
|
||||
<% @ancestors.each do |ancestor| %>
|
||||
<%= turbo_stream.replace ancestor %>
|
||||
<% end %>
|
||||
<%= @before ? turbo_stream.before(@before, @quantity) :
|
||||
|
@ -1,4 +1,4 @@
|
||||
<% @ancestors.map do |ancestor| %>
|
||||
<% @ancestors.each do |ancestor| %>
|
||||
<%= turbo_stream.replace ancestor %>
|
||||
<% end %>
|
||||
<%= turbo_stream.remove @quantity %>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<% @self_and_progenies.each do |q| %>
|
||||
<%= turbo_stream.remove q %>
|
||||
<% end %>
|
||||
<% @previous_ancestors.union(@ancestors).map do |ancestor| %>
|
||||
<% @previous_ancestors.union(@ancestors).each do |ancestor| %>
|
||||
<%= turbo_stream.replace ancestor %>
|
||||
<% end %>
|
||||
<% @self_and_progenies.each do |q| %>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<%= turbo_stream.close_form dom_id(@quantity, :edit) %>
|
||||
<% @ancestors.push(@quantity).map do |ancestor| %>
|
||||
<% @ancestors.push(@quantity).each do |ancestor| %>
|
||||
<%= turbo_stream.replace ancestor %>
|
||||
<% end %>
|
||||
|
@ -4,7 +4,9 @@
|
||||
<th><%= User.human_attribute_name(:email).capitalize %></th>
|
||||
<th><%= User.human_attribute_name(:status).capitalize %></th>
|
||||
<th><%= User.human_attribute_name(:confirmed_at).capitalize %></th>
|
||||
<th><%= User.human_attribute_name(:created_at).capitalize %> <sup>UTC</sup></th>
|
||||
<th>
|
||||
<%= User.human_attribute_name(:created_at).capitalize %> <sup>UTC</sup>
|
||||
</th>
|
||||
<th><%= t :actions %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -22,15 +24,15 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="svg">
|
||||
<%= svg_tag "pictograms/checkbox-marked-outline" if user.confirmed_at.present? %>
|
||||
</td>
|
||||
<td><%= user.created_at.to_fs(:db_without_sec) %></td>
|
||||
<td class="actions">
|
||||
<% if allow_disguise?(user) %>
|
||||
<%= image_link_to t(".disguise"), "incognito", disguise_user_path(user) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="svg">
|
||||
<%= svg_tag "pictograms/checkbox-marked-outline" if user.confirmed_at.present? %>
|
||||
</td>
|
||||
<td><%= user.created_at.to_fs(:db_without_sec) %></td>
|
||||
<td class="actions">
|
||||
<% if allow_disguise?(user) %>
|
||||
<%= image_link_to t(".disguise"), "incognito", disguise_user_path(user) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
Loading…
x
Reference in New Issue
Block a user