Sha256: 412e267c248293aa2755ed96d8709395d2010196b6e241aa939a882837b91e27

Contents?: true

Size: 1.91 KB

Versions: 5

Compression:

Stored size: 1.91 KB

Contents

<% content_for :doc_title, t('intro.admin.tour_list') %>
<% content_for :box_class, 'intro-admin__box-tours' %>
<% content_for :box_title, t('intro.admin.tour_list') %>
<% content_for :box_actions do %>
  <%= link_to t('intro.admin.add_tour'), new_admin_tour_path %>
<% end%>

<%= render layout: 'intro/admin/tours/container' do %>
  <% if @tours.blank? %>
    <div class='message'>
      <%= t('intro.admin.none_tours') %>
    </div>
  <% else %>
    <table class='intro-admin__tours-table'>
      <thead>
        <tr>
          <th>ID</th>
          <th><%= t('intro.admin.tour.ident') %></th>
          <th><%= t('intro.admin.tour.simple_route') %></th>
          <th><%= t('intro.admin.tour.created_time') %></th>
          <th><%= t('intro.admin.tour.expired_time') %></th>
          <th><%= t('intro.admin.actions') %></th>
        </tr>
      </thead>
      <tbody>
        <% @tours.each do |tour| %>
          <tr class="intro-admin__tours-item <%= 'expired' if tour.expired? %>">
            <td><%= tour.id %></td>
            <td class='ident-column' title="<%= tour.ident %>"><%= tour.ident %></td>
            <td class='simple-route-column' title="<%= tour.simple_route %>"><%= tour.simple_route %></td>
            <td><%= tour.created_at.strftime('%F') %></td>
            <td><%= tour.expired_at.try(:strftime, '%F') %></td>
            <td>
              <%= link_to t('intro.admin.edit'), edit_admin_tour_path(tour) %>
              <%= link_to (tour.published? ? t('intro.admin.unpublish') : t('intro.admin.publish')), publish_admin_tour_path(tour, published: !tour.published), method: :put %>
              <%= link_to t('intro.admin.delete'), admin_tour_path(tour), method: :delete, data: { confirm: t('intro.admin.tips.delete_tour_confirm') } %>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>

    <center class='intro-admin__pagination'>
      <%= paginate @tours %>
    </center>
  <% end %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
intro-0.4.1 app/views/intro/admin/tours/index.html.erb
intro-0.4.0 app/views/intro/admin/tours/index.html.erb
intro-0.3.0 app/views/intro/admin/tours/index.html.erb
intro-0.2.0 app/views/intro/admin/tours/index.html.erb
intro-0.1.0 app/views/intro/admin/tours/index.html.erb