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

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

<% cache_if(!logged_in?, cache_key) do %>
  <div>
    <% 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 => "addable submit-a-proposal" %>
      </div>
    <% else %>
      <p>
        <%= simple_format @event.closed_text %>
        <% if admin? %>
          <%= link_to "Edit", edit_manage_event_path(@event), :class => "editable" %>
        <% end %>
      </p>
    <% end %>
  </div>

  <% if proposal_excerpts? %>

      <div>
        Sort by:
        <%= proposals_sort_link("Title", 'title') %>,
        <%= proposals_sort_link("Track", 'track') if event_tracks? %>,
        <%= proposals_sort_link("Submission Date", 'submitted_at') %>
      </div>

      <%= render :partial => 'list', :locals => {:proposals => @proposals} %>

  <% else %>
    <table id="proposal-listing">
      <% if @proposals.blank? %>
        <tr>
          <td colspan="2">
            <p class="empty-text">&mdash; No proposals submitted yet &mdash;</p>
          </td>
        </td>
      <% else %>
        <thead>
          <tr>
            <th width="100%">
              <% if multiple_presenters? %>
                Title
              <% else %>
                Speaker and title
              <% end %>
            </th>
  <% if event_tracks? %>
            <th>
              Track
            </th>
  <% end %>
            <th width="0">Submitted</th>
          </tr>
        </thead>
        <% date_cache = {} %>
        <% for proposal in @proposals %>
          <tr class="<%= cycle("even", "odd") %>" valign="top">
            <td width="100%">
              <p class="proposal">
                <% styling = proposal_excerpts? ? 'display: inline-block' : 'inline' %>
                <% if multiple_presenters? %>
                  <%= link_to(h(proposal.title), proposal, :class => "title", :style => styling) %>
                <% else %>
                  <%= link_to(h(proposal.presenter)+" &mdash; "+h(proposal.title), proposal, :class => "title", :style => styling) %>
                <% end %>

                <span class="excerpt">
                  <%= h proposal.excerpt if proposal_excerpts? %>
                </span>

                <p class="speakers">
                  <% if multiple_presenters? %>
                    <%= proposal.users.map{|user| link_to(h(user.fullname), user_path(user), :style => "display: inline")}.join(', ') %>
                  <% end %>
                </p>
              </p>
            </td>
  <% if event_tracks? %>
            <td>
              <p>
                <%= proposal.track.ergo.title || "- N/A -" %>
              </p>
            </td>
  <% end %>
            <td width="0" class="unbreakable">
              <p>
                <% date = proposal.submitted_at.ergo{localtime.to_s} %>
                <% if date_cache[date] %>
                  <!--
                  <span class="date-seen"><%= date %></span>
                  -->
                <% else %>
                  <% date_cache[date] = true %>
                  <span class="date-unseen"><%= date %></span>
                <% end %>
              </p>
            </td>
          </tr>
        <% end %>
      <% end %>
    </table>
  <% end %>

<% end %>
<commit_msg>Updating 'submit a proposal' button on proposals/index to use the new graphic element from the header<commit_after><% page_title "#{@event.title} proposals" %>

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

<% cache_if(!logged_in?, cache_key) do %>
  <div>
    <% 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 %>
      <p>
        <%= simple_format @event.closed_text %>
        <% if admin? %>
          <%= link_to "Edit", edit_manage_event_path(@event), :class => "editable" %>
        <% end %>
      </p>
    <% end %>
  </div>

  <% if proposal_excerpts? %>

      <div>
        Sort by:
        <%= proposals_sort_link("Title", 'title') %>,
        <%= proposals_sort_link("Track", 'track') if event_tracks? %>,
        <%= proposals_sort_link("Submission Date", 'submitted_at') %>
      </div>

      <%= render :partial => 'list', :locals => {:proposals => @proposals} %>

  <% else %>
    <table id="proposal-listing">
      <% if @proposals.blank? %>
        <tr>
          <td colspan="2">
            <p class="empty-text">&mdash; No proposals submitted yet &mdash;</p>
          </td>
        </td>
      <% else %>
        <thead>
          <tr>
            <th width="100%">
              <% if multiple_presenters? %>
                Title
              <% else %>
                Speaker and title
              <% end %>
            </th>
  <% if event_tracks? %>
            <th>
              Track
            </th>
  <% end %>
            <th width="0">Submitted</th>
          </tr>
        </thead>
        <% date_cache = {} %>
        <% for proposal in @proposals %>
          <tr class="<%= cycle("even", "odd") %>" valign="top">
            <td width="100%">
              <p class="proposal">
                <% styling = proposal_excerpts? ? 'display: inline-block' : 'inline' %>
                <% if multiple_presenters? %>
                  <%= link_to(h(proposal.title), proposal, :class => "title", :style => styling) %>
                <% else %>
                  <%= link_to(h(proposal.presenter)+" &mdash; "+h(proposal.title), proposal, :class => "title", :style => styling) %>
                <% end %>

                <span class="excerpt">
                  <%= h proposal.excerpt if proposal_excerpts? %>
                </span>

                <p class="speakers">
                  <% if multiple_presenters? %>
                    <%= proposal.users.map{|user| link_to(h(user.fullname), user_path(user), :style => "display: inline")}.join(', ') %>
                  <% end %>
                </p>
              </p>
            </td>
  <% if event_tracks? %>
            <td>
              <p>
                <%= proposal.track.ergo.title || "- N/A -" %>
              </p>
            </td>
  <% end %>
            <td width="0" class="unbreakable">
              <p>
                <% date = proposal.submitted_at.ergo{localtime.to_s} %>
                <% if date_cache[date] %>
                  <!--
                  <span class="date-seen"><%= date %></span>
                  -->
                <% else %>
                  <% date_cache[date] = true %>
                  <span class="date-unseen"><%= date %></span>
                <% end %>
              </p>
            </td>
          </tr>
        <% end %>
      <% end %>
    </table>
  <% end %>

<% end %>

{'fraction_non_alphanumeric': 0.18328623334679048, 'fraction_numerical': 0.0024222850222042794, 'mean_word_length': 1.5150592216582064, 'pattern_counts': {'":': 0, '<': 219, '<?xml version=': 0, '>': 237, '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': '3084374', 'n_tokens_mistral': 2523, 'n_tokens_neox': 2214, 'n_words': 436}