<commit_before><%
# 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}" %>

<%
cache_key = "#{@kind}_index_#{@event.id}"
cache_key << "_#{params[:sort]}_#{params[:dir]}" if params[:sort]
%>

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

  <%= render :partial => "list", :locals => {:kind => @kind, :records => @proposals, :sorter => true} %>
<% end %><commit_msg>Improved proposals#index, added classes to uniquely identify the open_text, closed_text, and session_text.<commit_after><%
# 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}" %>

<%
cache_key = "#{@kind}_index_#{@event.id}"
cache_key << "_#{params[:sort]}_#{params[:dir]}" if params[:sort]
%>

<% cache_if(!logged_in?, cache_key) do %>
  <div>
    <% if @kind == :proposals %>
      <% if accepting_proposals? %>
        <div class="event_text open_text">
          <%= simple_format @event.open_text %>
          <% if admin? %>
            <%= link_to "Edit", edit_manage_event_path(@event), :class => "editable" %>
          <% end %>
        </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 %>
        <% if admin? %>
        <%= link_to "Edit", edit_manage_event_path(@event), :class => "editable" %>
        <% end %>
      </div>
      <% end %>
    <% elsif @kind == :sessions %>
      <div class="event_text session_text">
        <%= simple_format @event.session_text %>
        <% if admin? %>
          <%= link_to "Edit", edit_manage_event_path(@event), :class => "editable" %>
        <% end %>
      </div>
    <% else %>
      <% raise TypeError, "Unknown kind: #{@kind.class.name.inspect}" %>
    <% end %>
  </div>

  <%= render :partial => "list", :locals => {:kind => @kind, :records => @proposals, :sorter => true} %>
<% end %>
{'fraction_non_alphanumeric': 0.19799878714372346, 'fraction_numerical': 0.0, 'mean_word_length': 2.8006912442396312, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 99, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4312969', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1089, 'n_words': 233}