<commit_before><% content_title "Staff Leave Calendar" %>

<div style="margin-bottom: 14px; z-order: 0;">

  <%= form_for @staff_calendar, :url => '' do |f| %>

    <%= error_messages_for @staff_calendar %>

    <table width="100%">
      <tr>
        <td width="120px">From:</td>
        <td width="30px"></td>
        <td class="field"><%= f.date_picker :date_from %></td>
      </tr>
      <tr>
        <td>To:</td>
        <td></td>
        <td class="field"><%= f.date_picker :date_to %></td>
      </tr>
      <tr>
        <td>Location:</td>
        <td><%= f.radio_button :filter_by, 'location' %></td>
        <td class="field">
          <%= f.select :item_id, current_account.locations.collect {|item| [item.title, item.to_param]}, { :include_blank => true }, { :class => 'dropdown' } %>
        </td>
      </tr>
      <tr>
        <td>Department:</td>
        <td><%= f.radio_button :filter_by, 'department' %></td>
        <td class="field">
          <%= f.select :item_id, current_account.departments.collect {|item| [item.title, item.to_param]}, { :include_blank => true }, { :class => 'dropdown' } %>
        </td>
      </tr>
      <tr>
        <td>Employee:</td>
        <td><%= f.radio_button :filter_by, 'employee' %></td>
        <td class="field">
          <%= f.select :item_id, current_employee.staff.collect {|item| [item.full_name, item.to_param]}, { :include_blank => true }, { :class => 'dropdown' } %>
        </td>
      </tr>
      <tr>
        <td colspan="3" align="right">
          <%= f.submit 'Update Displayed Data' %>
        </td>
      </tr>
    </table>
    
  <% end %>
  
</div>

<div id="slider"></div>

<div style="height: 20px;"></div>

<div id="staff_calendar">

  <!-- staff and leave requests -->
  <div style="width: 160px; float: left;">
    <table id="staff" width="100%">
      <thead>
        <tr><td>Year</td></tr>
        <tr><td>Month</td></tr>
        <tr><td>Weekday</td></tr>
        <tr><td>Day</td></tr>
      </thead>
      <tbody>
      <% @staff_calendar.employees.each do |employee| %>
        <tr><td><strong style="overflow: hidden;"><%= employee.full_name %></strong></td></tr>
      <% end %>
      </tbody>
    </table>
  </div>

  <!-- calendar -->
  <div style="width: 594px; float: left; overflow: auto;">
    <table id="leave">
    
      <thead>
  
        <!-- years -->
        <tr>
          <% @staff_calendar.date_range.inject({}) { |r, d| r[d.year] = (r[d.year] || 0) + 1; r }.each do |year, count| %>
            <td colspan="<%= count %>"><%= year %></td>
          <% end %>
        </tr><commit_msg>made zoom slider look better<commit_after><% content_title "Staff Leave Calendar" %>

<div style="margin-bottom: 14px; z-order: 0;">

  <%= form_for @staff_calendar, :url => '' do |f| %>

    <%= error_messages_for @staff_calendar %>

    <table width="100%">
      <tr>
        <td width="120px">From:</td>
        <td width="30px"></td>
        <td class="field"><%= f.date_picker :date_from %></td>
      </tr>
      <tr>
        <td>To:</td>
        <td></td>
        <td class="field"><%= f.date_picker :date_to %></td>
      </tr>
      <tr>
        <td>Location:</td>
        <td><%= f.radio_button :filter_by, 'location' %></td>
        <td class="field">
          <%= f.select :item_id, current_account.locations.collect {|item| [item.title, item.to_param]}, { :include_blank => true }, { :class => 'dropdown' } %>
        </td>
      </tr>
      <tr>
        <td>Department:</td>
        <td><%= f.radio_button :filter_by, 'department' %></td>
        <td class="field">
          <%= f.select :item_id, current_account.departments.collect {|item| [item.title, item.to_param]}, { :include_blank => true }, { :class => 'dropdown' } %>
        </td>
      </tr>
      <tr>
        <td>Employee:</td>
        <td><%= f.radio_button :filter_by, 'employee' %></td>
        <td class="field">
          <%= f.select :item_id, current_employee.staff.collect {|item| [item.full_name, item.to_param]}, { :include_blank => true }, { :class => 'dropdown' } %>
        </td>
      </tr>
      <tr>
        <td colspan="3" align="right">
          <%= f.submit 'Update Displayed Data' %>
        </td>
      </tr>
    </table>
    
  <% end %>
  
</div>

<div style="height: 40px; text-height: 20px;">
  <div style="float: left; width: 100px; color: gray;">Zoom Out</div>
  <div id="slider" style="float: left; width: 556px; margin-top: 4px;"></div>
  <div style="float: right; width: 90px; text-align: right; color: gray;">Zoom In</div>
</div>

<div id="staff_calendar" style="display: inline-block;">

  <!-- staff and leave requests -->
  <div style="width: 160px; float: left;">
    <table id="staff" width="100%">
      <thead>
        <tr><td>Year</td></tr>
        <tr><td>Month</td></tr>
        <tr><td>Weekday</td></tr>
        <tr><td>Day</td></tr>
      </thead>
      <tbody>
      <% @staff_calendar.employees.each do |employee| %>
        <tr><td><strong style="overflow: hidden;"><%= employee.full_name %></strong></td></tr>
      <% end %>
      </tbody>
    </table>
  </div>

  <!-- calendar -->
  <div style="width: 594px; float: left; overflow: auto;">
    <table id="leave">
    
      <thead>
  
        <!-- years -->
        <tr>
          <% @staff_calendar.date_range.inject({}) { |r, d| r[d.year] = (r[d.year] || 0) + 1; r }.each do |year, count| %>
            <td colspan="<%= count %>"><%= year %></td>
          <% end %>
        </tr>
{'fraction_non_alphanumeric': 0.2233632862644416, 'fraction_numerical': 0.011186502842472034, 'mean_word_length': 2.3276388041488714, 'pattern_counts': {'":': 0, '<': 233, '<?xml version=': 0, '>': 247, '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': '1364356', 'n_tokens_mistral': 2067, 'n_tokens_neox': 1896, 'n_words': 402}