summaryrefslogtreecommitdiff
path: root/app/views/events/index.html.erb
blob: 3d953d5f758c7820b1caac69a48c8911b06b7b9a (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
<h1>Events</h1>

<%= link_to 'New event', new_event_path, class: 'action_button' %>
<%= link_to 'View events without a page →', without_node_events_path %>

<%= will_paginate @events %>

<table class="events_table">
  <tr class="header">
    <th>Title</th>
    <th>Start time</th>
    <th>End time</th>
    <th>Rrule</th>
    <th>Allday</th>
    <th>Url</th>
    <th>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 %></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 'edit', edit_event_path(event) %></td>
  </tr>
<% end %>
</table>