Kalender – Woche <%= @week %> / <%= @year %>

<%= link_to "← Vorherige Woche", calendar_week_path(@year, @week - 1, typ: @filter_typ, art: @filter_art), class: "btn btn-outline-primary" %> <%= link_to "Nächste Woche →", calendar_week_path(@year, @week + 1, typ: @filter_typ, art: @filter_art), class: "btn btn-outline-primary ms-2" %>
<%= form_with url: calendar_week_path(@year, @week), method: :get, local: true, class: "row g-2 justify-content-end" do %>
<%= select_tag :typ, options_for_select(User::PRAKTIKUMSTYPEN, @filter_typ), include_blank: "Alle Typen", class: "form-select" %>
<%= select_tag :art, options_for_select(User::ENTRY_ARTEN, @filter_art), include_blank: "Alle Arten", class: "form-select" %>
<%= submit_tag "Filtern", class: "btn btn-outline-secondary" %>
<% end %>
<% @days.each do |date| %>
<%= date.strftime("%a %d.%m.") %>
<% if @entries[date] %> <% @entries[date].each do |entry| %>
<%= entry.entry_art.capitalize %> <%= "#{entry.hours}h #{entry.minutes}min" %> <%= link_to "✏️", edit_entry_path(entry), class: "btn btn-sm btn-outline-secondary ms-2" %>
<% end %> <% else %>

Keine Einträge

<% end %>
<%= link_to "+", new_entry_path(date: date), class: "btn btn-sm btn-success mt-1", onclick: "event.stopPropagation();" %>
<% end %>