summaryrefslogtreecommitdiff
path: root/app/views/events/index.html.erb
blob: 138a02ec51393e70b94c91e30a7f830fca29b763 (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
<h1><%= t(".title") %></h1>

<div class="button_row">
  <%= link_to new_event_path, class: 'action_button' do %>
    <%= icon("plus", library: "tabler", "aria-hidden": true) %> <%= t(".create_event") %>
  <% end %>
  <%= link_to t(".without_page_link"), without_node_events_path %>
</div>

<%= will_paginate @events %>

<table class="events_table">
  <tr class="header">
    <th><%= t("admin.columns.title") %></th>
    <th><%= Event.human_attribute_name(:start_time) %></th>
    <th><%= Event.human_attribute_name(:end_time) %></th>
    <th><%= Event.human_attribute_name(:rrule) %></th>
    <th><%= Event.human_attribute_name(:allday) %></th>
    <th><%= Event.human_attribute_name(:url) %></th>
    <th><%= Event.human_attribute_name(:start_node) %></th>
    <th></th>
  </tr>

<% @events.each do |event| %>
  <tr>
    <td><%= link_to event.display_title, event %></td>
    <td><%=h event.start_time %></td>
    <td><%=h event.end_time %></td>
    <td class="rrule_cell"><span class="rrule_text"><%= rrule_with_break_opportunities(event.rrule) %></span></td>
    <td><%=h event.allday %> → <%= event.allday ? t("admin.common.yes") : t("admin.common.no") %></td>
    <td class="url_cell">
    <% if event.url.present? %>
    <span class="truncate"><%= link_to event.url, event.url %></span>
    <% end %>
    </td>
    <td><%= event.node ? link_to(event.node_id, node_path(event.node)) : '' %></td>
    <td><%= link_to t(".edit_link"), edit_event_path(event) %></td>
  </tr>
<% end %>
</table>