<%= link_to 'New Holiday', new_holiday_path, class: 'icon icon-add' %>

<%= l(:label_holiday_plural, default: 'Holidays') %>

<% if @holidays.any? %>
<% @holidays.each do |holiday| %> <% end %>
<%= l(:field_name, default: 'Name') %> <%= l(:field_type, default: 'Type') %> <%= l(:field_date, default: 'Date / Rule') %>
<%= holiday.name %> <% if !holiday.is_recurring %> One-Time <% else %> Recurring (<%= holiday.recurrence_type.capitalize %>) <% end %> <% if !holiday.is_recurring || holiday.recurrence_type == 'fixed' %> <%= holiday.exact_date&.strftime('%B %d, %Y') %> <% elsif holiday.recurrence_type == 'dynamic' %> <%= ['1st', '2nd', '3rd', '4th', 'Last'][holiday.week_of_month - 1] %> <%= Date::DAYNAMES[holiday.day_of_week] %> of <%= Date::MONTHNAMES[holiday.month] %> <% end %> <%= link_to l(:button_edit), edit_holiday_path(holiday), class: 'icon icon-edit' %> <%= link_to l(:button_delete), holiday_path(holiday), method: :delete, data: { confirm: l(:text_are_you_sure) }, class: 'icon icon-del' %>
<% else %>

<%= l(:label_no_data) %>

<% end %>