summaryrefslogtreecommitdiff
path: root/app/views/events/show.html.erb
blob: d77f770eac96f7a9203e571901581d7979711a50 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<div id="admin_layout" class="show_node">
  <h1><%= @event.node ? t(".title_for_node", :path => @event.node.unique_name) : t(".title") %></h1>

  <div id="content">
    <div class="layout_row_label"><%= t("admin.columns.actions") %></div>
    <div class="layout_row_content info_group">
      <div class="info_group_items">
        <% if @event.node %>
          <div class="info_item">
            <%= link_to t(".node_link"), node_path(@event.node) %>
          </div>
        <% end %>
        <div class="info_item">
          <%= link_to edit_event_path(@event, return_to: request.path), class: 'action_button' do %>
            <%= icon("edit", library: "tabler", "aria-hidden": true) %> <%= t("admin.common.edit") %>
          <% end %>
        </div>
        <div class="info_item">
          <%= button_to event_path(@event), method: :delete, form: { data: { confirm: t("events.confirm_delete") }, class: 'button_to destructive' } do %>
            <%= icon("trash", library: "tabler", "aria-hidden": true) %> <%= t("admin.common.destroy") %>
          <% end %>
        </div>
      </div>
    </div>

    <div class="layout_row_label"><%= Event.human_attribute_name(:start_time) %></div>
    <div class="layout_row_content"><%= admin_datetime(@event.start_time) %></div>

    <div class="layout_row_label"><%= Event.human_attribute_name(:end_time) %></div>
    <div class="layout_row_content"><%= admin_datetime(@event.end_time) %></div>

    <div class="layout_row_label"><%= Event.human_attribute_name(:rrule) %></div>
    <div class="layout_row_content"><%=h @event.rrule %></div>

    <% if (human = @event.humanize_rrule(I18n.locale)) %>
      <div class="layout_row_label"><%= t(".recurrence") %></div>
      <div class="layout_row_content"><em><%= human %></em></div>
    <% end %>

    <div class="layout_row_label"><%= Event.human_attribute_name(:tag_list) %></div>
    <div class="layout_row_content"><%=h @event.tag_list %></div>

    <div class="layout_row_label"><%= Event.human_attribute_name(:allday) %></div>
    <div class="layout_row_content"><%= @event.allday ? t("admin.common.yes") : t("admin.common.no") %></div>

    <div class="layout_row_label"><%= Event.human_attribute_name(:url) %></div>
    <div class="layout_row_content"><%=h @event.url %></div>

    <div class="layout_row_label"><%= Event.human_attribute_name(:latitude) %></div>
    <div class="layout_row_content"><%=h @event.latitude %></div>

    <div class="layout_row_label"><%= Event.human_attribute_name(:longitude) %></div>
    <div class="layout_row_content"><%=h @event.longitude %></div>
  </div>
</div>