- <%= devise_error_messages! %>
+ <%= render "devise/shared/error_messages", resource: resource %>
<%= form_with(scope: resource_name, url: password_path(resource_name), method: :put, local: true) do |f| %>
<%= f.hidden_field :reset_password_token, value: params[:reset_password_token] %>
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb
index 76dc956..0432ec5 100644
--- a/app/views/devise/registrations/edit.html.erb
+++ b/app/views/devise/registrations/edit.html.erb
@@ -1,6 +1,6 @@
-<%= devise_error_messages! %>
+<%= render "devise/shared/error_messages", resource: resource %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
diff --git a/app/views/entries/_form.html.erb b/app/views/entries/_form.html.erb
index 7ec4310..7134cb1 100644
--- a/app/views/entries/_form.html.erb
+++ b/app/views/entries/_form.html.erb
@@ -1,3 +1,15 @@
+
+
+
+
+
+
+
+
Gesamtsumme: 0h 0min (0min)
+
+
+
+
<%= form_with(model: entry, local: true) do |form| %>
<% if entry.errors.any? %>
@@ -10,6 +22,7 @@
<% end %>
+
@@ -27,6 +40,21 @@
value: (form.object.date) %>
+
+
+ <%= form.label :start_time, 'Beginn (Uhrzeit)', class: 'form-label' %>
+ <%= form.time_field :start_time, class: 'form-control', step: 60 %>
+
+
+
+ <%= form.label :end_time, 'Ende (Uhrzeit)', class: 'form-label' %>
+ <%= form.time_field :end_time, class: 'form-control', step: 60 %>
+
+
+
+
+
+
<%= form.label :hours, 'Stunden', class: 'form-label' %>
<%= form.number_field :hours,
@@ -42,6 +70,22 @@
min: 0, max: 59,
value: form.object.minutes || 0 %>
+
+
+
+
+
+ <%= form.check_box :has_break, { class: 'form-check-input', id: 'entry_has_break' }, true, false %>
+ <%= form.label :has_break, '30 Min. Mittagspause abziehen', class: 'form-check-label ms-2' %>
+
+
+
+
+
+
+
+
@@ -99,3 +143,97 @@
}
});
+
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 803fce3..46849bc 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -93,7 +93,13 @@
<%= link_to "Profil", edit_user_registration_path, class: "nav-link" %>
- <% if current_user&.email =="christoph@marzell.net" %>
+ <% if current_user.is_admin? %>
+
+ <%= link_to "Database", db_dump_path, class: "nav-link" %>
+
+ <% end %>
+
+ <% if current_user.is_admin? %>
<%= link_to "Database", db_dump_path, class: "nav-link" %>