Sha256: 8f9aa0d76064c9a3d6c8f29dc3c4837ae0e10a0eeb03b5ac8d335e4ab2ce0e4a

Contents?: true

Size: 1.74 KB

Versions: 4

Compression:

Stored size: 1.74 KB

Contents

<%
# VARIABLES:
# * @event => Event these proposals are for
# * @proposals => Array of proposal objects
# * @kind => Symbol indicating mode, either :proposals or :sessions
%>

<% page_title "#{@event.title} #{@kind}" %>

<% include_user_favorites_javascript %>

<%
cache_key = "#{@kind}_index,event_#{@event.id},admin_#{admin?},accepting_#{@event.accepting_proposals?}"
cache_key << ",sort_#{params[:sort]}" if params[:sort]
cache_key << ",dir_#{params[:dir]}" if params[:dir]
%>

<% cache cache_key do %>
  <div>
    <% if @kind == :proposals %>
      <% if accepting_proposals? %>
        <div class="event_text open_text">
          <%= simple_format @event.open_text.try(:html_safe) %>
          <%= link_to "Edit", edit_manage_event_path(@event, :jump_to => :open_text), :class => "editable" if admin? %>
        </div>
        <div class="submit-a-proposal-wrapper">
          <%= link_to 'Submit a proposal!', new_event_proposal_path(@event), :class => "submit-a-proposal-button" %>
        </div>
      <% else %>
      <div class="event_text closed_text">
        <%= simple_format @event.closed_text.try(:html_safe) %>
        <%= link_to "Edit", edit_manage_event_path(@event, :jump_to => :closed_text), :class => "editable" if admin?%>
      </div>
      <% end %>
    <% elsif @kind == :sessions %>
      <div class="event_text session_text">
        <%= simple_format @event.session_text.try(:html_safe) %>
        <%= link_to "Edit", edit_manage_event_path(@event, :jump_to => :session_text), :class => "editable" if admin? %>
      </div>
    <% else %>
      <% raise TypeError, "Unknown kind: #{@kind.class.name.inspect}" %>
    <% end %>
  </div>

  <%= render :partial => "list", :locals => {:kind => @kind, :records => @proposals, :sorter => true} %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
open_conference_ware-1.0.0.pre4 app/views/open_conference_ware/proposals/index.html.erb
open_conference_ware-1.0.0.pre3 app/views/open_conference_ware/proposals/index.html.erb
open_conference_ware-1.0.0.pre2 app/views/open_conference_ware/proposals/index.html.erb
open_conference_ware-1.0.0.pre1 app/views/open_conference_ware/proposals/index.html.erb