Sha256: 0f252d658b4a0223600a8194ff16bf84c3210391a729d236f83cc9444490f4fd

Contents?: true

Size: 1.78 KB

Versions: 24

Compression:

Stored size: 1.78 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>
        <%= 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

24 entries across 24 versions & 1 rubygems

Version Path
enju_event-0.1.17.pre5 app/views/events/index.mobile.erb
enju_event-0.1.17.pre4 app/views/events/index.mobile.erb
enju_event-0.1.17.pre3 app/views/events/index.mobile.erb
enju_event-0.1.17.pre2 app/views/events/index.mobile.erb
enju_event-0.1.17.pre app/views/events/index.mobile.erb
enju_event-0.1.16 app/views/events/index.mobile.erb
enju_event-0.1.15 app/views/events/index.mobile.erb
enju_event-0.1.13 app/views/events/index.mobile.erb
enju_event-0.0.27 app/views/events/index.mobile.erb
enju_event-0.0.26 app/views/events/index.mobile.erb
enju_event-0.0.25 app/views/events/index.mobile.erb
enju_event-0.1.12 app/views/events/index.mobile.erb
enju_event-0.1.11 app/views/events/index.mobile.erb
enju_event-0.0.24 app/views/events/index.mobile.erb
enju_event-0.0.23 app/views/events/index.mobile.erb
enju_event-0.1.10 app/views/events/index.mobile.erb
enju_event-0.1.9 app/views/events/index.mobile.erb
enju_event-0.0.22 app/views/events/index.mobile.erb
enju_event-0.0.21 app/views/events/index.mobile.erb
enju_event-0.1.8 app/views/events/index.mobile.erb