aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin_holidays/index.html.erb
blob: d4ee8706be5c29238ede95b83845d589b68dd878 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<% @title = 'Public Holidays' %>
<h1><%= @title %></h1>
<p>

    Alaveteli calculates the due dates of requests taking account of the
    public holidays shown here. If you have set the
    <code>WORKING_OR_CALENDAR_DAYS</code><a
    href="http://alaveteli.org/docs/customising/config/#working_or_calendar_days"
    target="_blank">(docs)</a> setting for Alaveteli to
    <code>working</code>, the date when a response to a request is
    officially overdue will be calculated in days that are not weekends
    or public holidays. If you have set
    <code>WORKING_OR_CALENDAR_DAYS</code> to <code>calendar</code>, the
    date will be calculated in calendar days, but if the due date falls
    on a public holiday or weekend day, then the due date is considered
    to be the next week day that isn't a holiday.

</p>
<div class="btn-toolbar">
  <div class="btn-group">
    <%= link_to 'New holiday', new_admin_holiday_path, :class => "btn btn-primary", :id => 'new-holiday-button' %>
  </div>
  <div class="btn-group">
    <%= link_to 'Create holidays from suggestions or iCal feed', new_admin_holiday_import_path, :class => "btn btn-warning" %>
  </div>
</div>

<div id="existing-holidays">
  <% @years.each do |year| %>
  <h2><%= year %></h2>
  <table class="table table-striped table-condensed">
    <tbody>
      <% @holidays_by_year[year].sort_by(&:day).each do |holiday| %>
      <%= content_tag_for(:tr, holiday, prefix=nil, 'data-target' => edit_admin_holiday_path(holiday)) do %>
        <%= render :partial => 'holiday', :locals => { :holiday => holiday }%>
      <% end %>
    <% end %>
    </tbody>
  </table>
  <% end %>
</div>