Kalender – <%= Date::MONTHNAMES[@month] %> <%= @year %>

<%= link_to "← Vorheriger Monat", calendar_month_path(@year, @month - 1, typ: @filter_typ, art: @filter_art), class: "btn btn-outline-primary" %> <%= link_to "Nächster Monat →", calendar_month_path(@year, @month + 1, typ: @filter_typ, art: @filter_art), class: "btn btn-outline-primary ms-2" %>
<%= form_with url: calendar_month_path(@year, @month), 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 %>
<% day_names = I18n.t("date.abbr_day_names") %> <% monday_first = day_names.rotate(1) %> <% monday_first.each do |day| %> <% end %> <% weeks = @days.in_groups_of(7, nil) %> <% weeks.each do |week| %> <% week.each do |date| %> <% end %> <% end %>
<%= day %>
<% if date %>
<%= date.day %> <%= link_to "+", new_entry_path(date: date), class: "btn btn-sm btn-success day-add", title: "Eintrag hinzufügen", onclick: "event.stopPropagation();" %>
<% (@entries[date.to_date] || []).each do |entry| %> <%= link_to edit_entry_path(entry), class: "day-entry text-decoration-none", onclick: "event.stopPropagation();" do %> <%= entry.entry_art.capitalize %> <%= entry.hours %>h <%= entry.minutes %>min <% end %> <% end %>
<% end %>