<commit_before><% content_for(:javascript) do %>
  var attendancetype_colors = {
    <%= @attendancetypes.map { |atype| "#{atype.id} : '#{atype.color.downcase}'" }.join(", ").html_safe %>
  };
<% end %>

<h2 class="collapsed-page-header"><%= @section.useful_name %></h2>
<div id="site-actions">
  <%= link_to t('buttons.add_session'), new_section_meeting_path(@section), :class => 'linkbutton' %>
  <%= link_to t('buttons.view_totals'), {:action => :totals}, :class => 'linkbutton' %>
  <% if @num_cancelled_meetings > 0 && !@force_show_cancelled %>
    <a id="toggle_cancelled" href="#" class="linkbutton"><%=t 'buttons.show_cancelled' %></a>
  <% end %>
  <% if @auth_user.edit_gradesettings?(@section.site) %>
    <%= link_to t('buttons.site_settings'), edit_settings_site_path(@section.site), class: 'linkbutton lessimportant' %>
  <% end %>
  <% if @auth_user.set_permissions?(@section.site) %>
    <%= link_to t('buttons.configure_roles'), edit_perms_site_path(@section.site), :class => 'linkbutton lessimportant' %>
  <% end %>
  <% if @section.site.sections.count > 1 %>
    <%= link_to t('buttons.change_section'), site_path(@section.site), :class => 'linkbutton lessimportant' %>
  <% end %>
  <%= link_to t('buttons.download_csv'), {:action => :show, :format => :csv}, :class => 'linkbutton lessimportant' %>
</div>
<% if @meetings.empty? %>
  <p><%=t 'section.no_sessions', add_session: t('buttons.add_session') %></p>
<% else %>
<%= form_for(@section, :url => {:action => 'record_attendance'}, :method => :post, :html => {:id => 'site_attendance', :class => 'site_attendance'}) do |f| %>
<div id="site-table-container">
<div id="header-container">
<div id="table-name-head">
<table>
  <thead>
    <tr><th><%=t 'general.name' %></th></tr>
  </thead>
</table>
</div>
<div id="table-head">
<table>
<thead>
  <tr>
    <% @meetings.each_with_index do |meeting, index| %>
      <th class="<%= meeting.cancelled && !@force_show_cancelled ? 'cancelled' : '' %> <%= index == 0 ? 'first_col' : '' %>" data-meeting-id="<%= meeting.id %>">
        <%= meeting.starttime.strftime('%b %-d at %l:%M%P') %>
        <%= link_to '', edit_meeting_path(meeting), class: 'fa fa-pencil-square-o', title: 'Edit session and record attendance' %>
        <% unless meeting.source_starttime.blank? %>
          <i class="fa fa-credit-card" title="Created for txstate card readers"></i>
        <% end %>
      </th>
    <% end %>
  </tr>
</thead>
</table>
</div>
</div>
<div id="body-container">
<div id="table-names">
<table>
<tbody>
  <% started_inactives = false %>
  <% started_moved = false %>
  <% @attendances.each do |membership_id, ua_hash| %>
    <% if !started_inactives && !ua_hash.values.first.membership.active %>
      <tr class="separator inactive-separator">
        <th><%=t 'general.inactive' %> <span id="expand-inactives">+</span></th>
      </tr>
      <% reset_cycle() %>
      <% started_inactives = true %>
    <% end %>
    <% if !started_moved && !ua_hash.values.first.membership.sections.include?(@section) %>
      <tr class="separator moved-separator">
        <th><%=t 'general.moved' %> <span id="expand-moved">+</span></th>
      </tr>
      <% reset_cycle() %>
      <% started_moved = true %>
    <% end %>
    <tr class="<%= cycle('odd', 'even') %> <% if started_moved %> <%='moved' %> <% elsif started_inactives %> <%= 'inactive' %> <% end %>">
      <td class="name"><a class="<%= @show_remove_user_link ? 'next-to-remove' : '' %>" href="<%= section_membership_path(@section, membership_id) %>" title="<%= ua_hash.values.first.membership.user.fullname %>"><%= ua_hash.values.first.membership.user.fullname %></a>
      <%= if @show_remove_user_link then
            link_to section_membership_remove_from_section_path(@section, membership_id), :class => 'remove-user-link' do
              image_tag "cross.png", :alt => t('section.remove_user')
            end
          end %></a></td>
    </tr>
  <% end %>
  <% reset_cycle() %>
</tbody>
</table>
</div>
<div id="table-main">
</table>
<table>
<tbody>
  <% started_inactives = false %>
  <% started_moved = false %>
  <% @attendances.each do |membership_id, ua_hash| %>
      <% if !started_inactives && !ua_hash.values.first.membership.active %>
        <tr class="separator inactive-separator">
        <% @meetings.each do |meeting| %>
          <th class="<%= 'cancelled' if meeting.cancelled && !@force_show_cancelled %>">&nbsp;</th>
        <% end %>
        </tr>
        <% reset_cycle() %>
        <% started_inactives = true %>
      <% end %>
      <% if !started_moved && !ua_hash.values.first.membership.sections.include?(@section) %>
        <tr class="separator moved-separator">
          <%@meetings.each do |meeting| %>
            <th class="<%= 'cancelled' if meeting.cancelled && !@force_show_cancelled %>">&nbsp;</th>
          <% end %>
        </tr>
        <% reset_cycle() %>
        <% started_moved = true %>
      <% end %>
      <tr class="<%= cycle('odd', 'even') %> <% if started_moved %> <%='moved' %> <% elsif started_inactives %> <%= 'inactive' %> <% end %>">
      <% @meetings.each_with_index do |meeting, index| %>
        <td class="attendancetype <%= meeting.cancelled && !@force_show_cancelled ? 'cancelled' : '' %> <%= index == 0 ? 'first_col' : '' %>">
          <% if ua = ua_hash[meeting.id] %>
            <% if meeting.active %>
              <select name="meeting-<%= meeting.id %>_member-<%= membership_id %>">
              <% @attendancetypes.each do |atype| %>
                <option class="atype" value="<%= atype.id %>" <%= atype.id == ua.attendancetype_id ? 'selected' : '' %>><%= atype.name %></option>
              <% end %>
              </select>
              <% unless ua.checkins.empty? %>
                <i class="fa <%= ua.override ? 'fa-chain-broken' : 'fa-clock-o' %> checkin"
                   title="<%= ua.override ? 'Overriding' : '' %> <%= ua.checkins.first.source %> at <%= ua.checkins.first.time.strftime('%l:%M%P').strip %>"></i>
              <% end %>
            <% else %>
              cancelled
            <% end %>
          <% else %>
            &nbsp;
          <% end %>
        </td>
      <% end %>
    </tr>
  <% end %>
</tbody>
</table>
</div>
</div>
</div>
<input type="submit" name="submit" value="Save"/>
<% end %>
<% end %>
<commit_msg>Add icon for meetings with a checkin code<commit_after><% content_for(:javascript) do %>
  var attendancetype_colors = {
    <%= @attendancetypes.map { |atype| "#{atype.id} : '#{atype.color.downcase}'" }.join(", ").html_safe %>
  };
<% end %>

<h2 class="collapsed-page-header"><%= @section.useful_name %></h2>
<div id="site-actions">
  <%= link_to t('buttons.add_session'), new_section_meeting_path(@section), :class => 'linkbutton' %>
  <%= link_to t('buttons.view_totals'), {:action => :totals}, :class => 'linkbutton' %>
  <% if @num_cancelled_meetings > 0 && !@force_show_cancelled %>
    <a id="toggle_cancelled" href="#" class="linkbutton"><%=t 'buttons.show_cancelled' %></a>
  <% end %>
  <% if @auth_user.edit_gradesettings?(@section.site) %>
    <%= link_to t('buttons.site_settings'), edit_settings_site_path(@section.site), class: 'linkbutton lessimportant' %>
  <% end %>
  <% if @auth_user.set_permissions?(@section.site) %>
    <%= link_to t('buttons.configure_roles'), edit_perms_site_path(@section.site), :class => 'linkbutton lessimportant' %>
  <% end %>
  <% if @section.site.sections.count > 1 %>
    <%= link_to t('buttons.change_section'), site_path(@section.site), :class => 'linkbutton lessimportant' %>
  <% end %>
  <%= link_to t('buttons.download_csv'), {:action => :show, :format => :csv}, :class => 'linkbutton lessimportant' %>
</div>
<% if @meetings.empty? %>
  <p><%=t 'section.no_sessions', add_session: t('buttons.add_session') %></p>
<% else %>
<%= form_for(@section, :url => {:action => 'record_attendance'}, :method => :post, :html => {:id => 'site_attendance', :class => 'site_attendance'}) do |f| %>
<div id="site-table-container">
<div id="header-container">
<div id="table-name-head">
<table>
  <thead>
    <tr><th><%=t 'general.name' %></th></tr>
  </thead>
</table>
</div>
<div id="table-head">
<table>
<thead>
  <tr>
    <% @meetings.each_with_index do |meeting, index| %>
      <th class="<%= meeting.cancelled && !@force_show_cancelled ? 'cancelled' : '' %> <%= index == 0 ? 'first_col' : '' %>" data-meeting-id="<%= meeting.id %>">
        <%= meeting.starttime.strftime('%b %-d at %l:%M%P') %>
        <%= link_to '', edit_meeting_path(meeting), class: 'fa fa-pencil-square-o', title: 'Edit session and record attendance' %>
        <% if !meeting.source_starttime.blank? %>
          <i class="fa fa-credit-card" title="Created for txstate card readers"></i>
        <% elsif !meeting.checkin_code.blank? %>
          <i class="fa fa-qrcode" title="Checkin code: <%= meeting.checkin_code %>"></i>
        <% end %>
      </th>
    <% end %>
  </tr>
</thead>
</table>
</div>
</div>
<div id="body-container">
<div id="table-names">
<table>
<tbody>
  <% started_inactives = false %>
  <% started_moved = false %>
  <% @attendances.each do |membership_id, ua_hash| %>
    <% if !started_inactives && !ua_hash.values.first.membership.active %>
      <tr class="separator inactive-separator">
        <th><%=t 'general.inactive' %> <span id="expand-inactives">+</span></th>
      </tr>
      <% reset_cycle() %>
      <% started_inactives = true %>
    <% end %>
    <% if !started_moved && !ua_hash.values.first.membership.sections.include?(@section) %>
      <tr class="separator moved-separator">
        <th><%=t 'general.moved' %> <span id="expand-moved">+</span></th>
      </tr>
      <% reset_cycle() %>
      <% started_moved = true %>
    <% end %>
    <tr class="<%= cycle('odd', 'even') %> <% if started_moved %> <%='moved' %> <% elsif started_inactives %> <%= 'inactive' %> <% end %>">
      <td class="name"><a class="<%= @show_remove_user_link ? 'next-to-remove' : '' %>" href="<%= section_membership_path(@section, membership_id) %>" title="<%= ua_hash.values.first.membership.user.fullname %>"><%= ua_hash.values.first.membership.user.fullname %></a>
      <%= if @show_remove_user_link then
            link_to section_membership_remove_from_section_path(@section, membership_id), :class => 'remove-user-link' do
              image_tag "cross.png", :alt => t('section.remove_user')
            end
          end %></a></td>
    </tr>
  <% end %>
  <% reset_cycle() %>
</tbody>
</table>
</div>
<div id="table-main">
</table>
<table>
<tbody>
  <% started_inactives = false %>
  <% started_moved = false %>
  <% @attendances.each do |membership_id, ua_hash| %>
      <% if !started_inactives && !ua_hash.values.first.membership.active %>
        <tr class="separator inactive-separator">
        <% @meetings.each do |meeting| %>
          <th class="<%= 'cancelled' if meeting.cancelled && !@force_show_cancelled %>">&nbsp;</th>
        <% end %>
        </tr>
        <% reset_cycle() %>
        <% started_inactives = true %>
      <% end %>
      <% if !started_moved && !ua_hash.values.first.membership.sections.include?(@section) %>
        <tr class="separator moved-separator">
          <%@meetings.each do |meeting| %>
            <th class="<%= 'cancelled' if meeting.cancelled && !@force_show_cancelled %>">&nbsp;</th>
          <% end %>
        </tr>
        <% reset_cycle() %>
        <% started_moved = true %>
      <% end %>
      <tr class="<%= cycle('odd', 'even') %> <% if started_moved %> <%='moved' %> <% elsif started_inactives %> <%= 'inactive' %> <% end %>">
      <% @meetings.each_with_index do |meeting, index| %>
        <td class="attendancetype <%= meeting.cancelled && !@force_show_cancelled ? 'cancelled' : '' %> <%= index == 0 ? 'first_col' : '' %>">
          <% if ua = ua_hash[meeting.id] %>
            <% if meeting.active %>
              <select name="meeting-<%= meeting.id %>_member-<%= membership_id %>">
              <% @attendancetypes.each do |atype| %>
                <option class="atype" value="<%= atype.id %>" <%= atype.id == ua.attendancetype_id ? 'selected' : '' %>><%= atype.name %></option>
              <% end %>
              </select>
              <% unless ua.checkins.empty? %>
                <i class="fa <%= ua.override ? 'fa-chain-broken' : 'fa-clock-o' %> checkin"
                   title="<%= ua.override ? 'Overriding' : '' %> <%= ua.checkins.first.source %> at <%= ua.checkins.first.time.strftime('%l:%M%P').strip %>"></i>
              <% end %>
            <% else %>
              cancelled
            <% end %>
          <% else %>
            &nbsp;
          <% end %>
        </td>
      <% end %>
    </tr>
  <% end %>
</tbody>
</table>
</div>
</div>
</div>
<input type="submit" name="submit" value="Save"/>
<% end %>
<% end %>

{'fraction_non_alphanumeric': 0.21728588189284317, 'fraction_numerical': 0.0009385999217833399, 'mean_word_length': 3.1499513145082765, 'pattern_counts': {'":': 0, '<': 397, '<?xml version=': 0, '>': 433, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '223637', 'n_tokens_mistral': 4863, 'n_tokens_neox': 4377, 'n_words': 806}