Sha256: d1db9a315639f911fc2b407ab11317fe8adfa5bf3322162a677b1890d6a43412

Contents?: true

Size: 1.81 KB

Versions: 13

Compression:

Stored size: 1.81 KB

Contents

<div data-role="header">
<h1 class="title"><%= t('page.listing', :model => t('activerecord.models.event')) -%></h1>
</div>

<div data-role="content">
<%- if @library -%>
  <h2><%= link_to @library.display_name.localize, @library -%></h2>
<%- else -%>
  <h2><%= t('event.all_libraries') -%></h2>
<%- end -%>

  <div data-role="fieldcontain">
    <%= form_for :events, :url => events_path, :html => {:method => 'get'} do -%>
      <p>
        <%= label_tag :search_form_top, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%>
        <%= submit_tag t('page.search') -%>
      </p>
    <%- end -%>
  </div>

<p>
  <%- case params[:mode]
      when 'upcoming' -%>
    <%= link_to t('event.all'), url_for(params.merge(:mode => nil, :only_path => true)) -%>
    <strong><%= t('event.upcoming') -%></strong>
    <%= link_to t('event.past'), url_for(params.merge(:mode => 'past', :only_path => true)) -%>
  <%- when 'past' -%>
    <%= link_to t('event.all'), url_for(params.merge(:mode => nil, :only_path => true)) -%>
    <%= link_to t('event.upcoming'), url_for(params.merge(:mode => 'upcoming', :only_path => true)) -%>
    <strong><%= t('event.past') -%></strong>
  <%- else -%>
    <strong><%= t('event.all') -%></strong>
    <%= link_to t('event.upcoming'), url_for(params.merge(:mode => 'upcoming', :only_path => true)) -%>
    <%= link_to t('event.past'), url_for(params.merge(:mode => 'past', :only_path => true)) -%>
  <%- end -%>
</p>
</div>

<ul data-role="listview">
  <%- @events.each_with_index do |event, i| -%>
    <li>
      <%= link_to event.display_name.localize, event -%>
      <br />
      <%= l(event.start_at, :format => :short) -%>
      -
      <%= l(event.end_at, :format => :short) -%>
    </li>
  <%- end -%>
</ul>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
enju_event-0.1.17.pre18 app/views/events/index.mobile.erb
enju_event-0.1.17.pre17 app/views/events/index.mobile.erb
enju_event-0.1.17.pre16 app/views/events/index.mobile.erb
enju_event-0.1.17.pre15 app/views/events/index.mobile.erb
enju_event-0.1.17.pre14 app/views/events/index.mobile.erb
enju_event-0.1.17.pre13 app/views/events/index.mobile.erb
enju_event-0.1.17.pre12 app/views/events/index.mobile.erb
enju_event-0.1.17.pre11 app/views/events/index.mobile.erb
enju_event-0.1.17.pre10 app/views/events/index.mobile.erb
enju_event-0.1.17.pre9 app/views/events/index.mobile.erb
enju_event-0.1.17.pre8 app/views/events/index.mobile.erb
enju_event-0.1.17.pre7 app/views/events/index.mobile.erb
enju_event-0.1.17.pre6 app/views/events/index.mobile.erb