<commit_before><% content_for(:title) do %>Project Invitations<% end %>
<h2>Project Invitations</h2>
<% if @project_invitations.empty? && @invitations_by_you.empty? %>
  <p class="ui description">You don't have any pending project invitations, <%= link_to "join some projects", projects_path %> and <%= link_to "invite some observations", observations_path %>!</p>
<% end %>
<% unless @project_invitations.empty? %>
  <div class="column span-24 stacked">
    <h3>Pending invitations you've recieved</h3>
    <p class="ui description">The following observations have been invited to join projects. Click "Accept" or "Ignore" to respond to the invitations.</p>
    <% for pi in @project_invitations %>
      <div class="column span-24">
        <div class="column span-8">
          <div id="observations" class="compact mini observations date-added">
            <%= render :partial => 'observations/observation_component', 
               :locals => {:observation => pi.observation} %>
          </div>
        </div>
        <div class="last column span-16">
          <div class="notice box clear inline buttonrow">
            <span class="inter">
              <%= image_tag pi.project.icon.url(:mini), :width => 16, :height => 16, :style => "vertical-align: middle" %>
              <%= link_to truncate(h(pi.project.title), :length => (is_me?(pi.observation.user) || is_me?(pi.user) || curator_of?(pi.project) ? 50 : 65)), pi.project %>
            </span>
            <span class="date">
              <%= pi.created_at.in_time_zone(pi.user.time_zone || 'UTC').strftime("%b. %e, %Y") %>
            </span>
            <nobr class="inlineblock right">
            <% if is_me?(pi.observation.user) -%>
              <%= link_to "accept", accept_project_invitation_path(pi),
                :method => :post,
                :class => "glaucous button",
                "data-loading-click" => "" %>
            <% end -%>
            <% if is_me?(pi.observation.user) || is_me?(pi.user)  || curator_of?(pi.project) -%>
              <%= link_to (is_me?(pi.observation.user) ? "ignore" : "uninvite"), pi,
                :method => :delete,
                :confirm => "Are you sure you want to remove this invitation?",
                :class => "pale button",
                "data-loading-click" => "" %>
            <% end -%>
          </nobr>
        </div>
      </div>
    <% end %>
  </div>
<% end %>

<% unless @invitations_by_you.empty? %>
  <div class="column span-24 stacked">
    <h3>Pending invitations you've sent</h3>
    <p class="ui description">You've invited the following observations.</p>
    <% for project, pis in @invitations_by_you %>
      <div class="column span-24 stacked clear">
      <h3><%= link_to project.title, projects_path(project) %></h3>
      <% for  pi in pis %>
        <div class="column span-24">
          <div class="column span-8">
            <div id="observations" class="compact mini observations date-added">
              <%= render :partial => 'observations/observation_component', 
                :locals => {:observation => pi.observation} %>
             </div>
          </div>
          <div class="last column span-16">
            <div class="notice box clear inline buttonrow">
              <span class="inter">
                <%= image_tag pi.project.icon.url(:mini), :width => 16, :height => 16, :style => "vertical-align: middle" %>
                <%= link_to truncate(h(pi.project.title), :length => (is_me?(pi.observation.user) || is_me?(pi.user) || curator_of?(pi.project) ? 50 : 65)), pi.project %>
              </span>
              <span class="date">
                <%= pi.created_at.in_time_zone(pi.user.time_zone || 'UTC').strftime("%b. %e, %Y") %>
              </span>
              <nobr class="inlineblock right">
              <% if is_me?(pi.observation.user) -%>
                <%= link_to "accept", accept_project_invitation_path(pi),
                  :method => :post,
                  :class => "glaucous button",
                  "data-loading-click" => "" %>
              <% end -%>
              <% if is_me?(pi.observation.user) || is_me?(pi.user)  || curator_of?(pi.project) -%>
                <%= link_to (is_me?(pi.observation.user) ? "ignore" : "uninvite"), pi,
                  :method => :delete,
                  :confirm => "Are you sure you want to remove this invitation?",
                  :class => "pale button",
                  "data-loading-click" => "" %>
                <% end -%>
            </nobr>
          </div>
        </div>
      <% end -%>
      </div>
    <% end %>
  </div>
<% end %>
<commit_msg>Fixed missing closing tag on project_invitiations/index.<commit_after><% content_for(:title) do %>Project Invitations<% end %>

<h2>Project Invitations</h2>

<% if @project_invitations.empty? && @invitations_by_you.empty? %>
  <p class="ui description">
    You don't have any pending project invitations, <%= link_to "join some projects", projects_path %> and <%= link_to "invite some observations", observations_path %>!
  </p>
<% end %>

<% unless @project_invitations.empty? %>
  <div class="clear column span-24 stacked">
    <h3>Pending invitations you've recieved</h3>
    <p class="ui description">The following observations have been invited to join projects. Click "Accept" or "Ignore" to respond to the invitations.</p>
    <% for pi in @project_invitations %>
      <div class="column span-24">
        <div class="column span-8">
          <div id="observations" class="compact mini observations date-added">
            <%= render :partial => 'observations/observation_component', 
               :locals => {:observation => pi.observation} %>
          </div>
        </div>
        <div class="last column span-16">
          <div class="notice box clear inline buttonrow">
            <span class="inter">
              <%= image_tag pi.project.icon.url(:mini), :width => 16, :height => 16, :style => "vertical-align: middle" %>
              <%= link_to truncate(h(pi.project.title), :length => (is_me?(pi.observation.user) || is_me?(pi.user) || curator_of?(pi.project) ? 50 : 65)), pi.project %>
            </span>
            <span class="date">
              <%= pi.created_at.in_time_zone(pi.user.time_zone || 'UTC').strftime("%b. %e, %Y") %>
            </span>
            <nobr class="inlineblock right">
              <% if is_me?(pi.observation.user) -%>
                <%= link_to "accept", accept_project_invitation_path(pi),
                  :method => :post,
                  :class => "glaucous button",
                  "data-loading-click" => "" %>
              <% end -%>
              <% if is_me?(pi.observation.user) || is_me?(pi.user)  || curator_of?(pi.project) -%>
                <%= link_to (is_me?(pi.observation.user) ? "ignore" : "uninvite"), pi,
                  :method => :delete,
                  :confirm => "Are you sure you want to remove this invitation?",
                  :class => "pale button",
                  "data-loading-click" => "" %>
              <% end -%>
            </nobr>
          </div>
        </div>
      </div>
    <% end %>
  </div>
<% end %>

<% unless @invitations_by_you.empty? %>
  <div class="clear column span-24 stacked">
    <h3>Pending invitations you've sent</h3>
    <p class="ui description">You've invited the following observations.</p>
    <% for project, pis in @invitations_by_you %>
      <div class="column span-24 stacked clear">
        <h3><%= link_to project.title, projects_path(project) %></h3>
        <% for pi in pis %>
          <div class="column span-24">
            <div class="column span-8">
              <div id="observations" class="compact mini observations date-added">
                <%= render :partial => 'observations/observation_component', 
                  :locals => {:observation => pi.observation} %>
              </div>
            </div>
            <div class="last column span-16">
              <div class="notice box clear inline buttonrow">
                <span class="inter">
                  <%= image_tag pi.project.icon.url(:mini), :width => 16, :height => 16, :style => "vertical-align: middle" %>
                  <%= link_to truncate(h(pi.project.title), :length => (is_me?(pi.observation.user) || is_me?(pi.user) || curator_of?(pi.project) ? 50 : 65)), pi.project %>
                </span>
                <span class="date">
                  <%= pi.created_at.in_time_zone(pi.user.time_zone || 'UTC').strftime("%b. %e, %Y") %>
                </span>
                <nobr class="inlineblock right">
                  <% if is_me?(pi.observation.user) -%>
                    <%= link_to "accept", accept_project_invitation_path(pi),
                      :method => :post,
                      :class => "glaucous button",
                      "data-loading-click" => "" %>
                  <% end -%>
                  <% if is_me?(pi.observation.user) || is_me?(pi.user)  || curator_of?(pi.project) -%>
                    <%= link_to (is_me?(pi.observation.user) ? "ignore" : "uninvite"), pi,
                      :method => :delete,
                      :confirm => "Are you sure you want to remove this invitation?",
                      :class => "pale button",
                      "data-loading-click" => "" %>
                  <% end -%>
                </nobr>
              </div>
            </div>
          </div>
        <% end -%>
      </div>
    <% end %>
  </div>
<% end %>
{'fraction_non_alphanumeric': 0.16563190571398506, 'fraction_numerical': 0.008418394191308009, 'mean_word_length': 2.0037926675094817, 'pattern_counts': {'":': 0, '<': 179, '<?xml version=': 0, '>': 235, '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': '3096680', 'n_tokens_mistral': 3029, 'n_tokens_neox': 2796, 'n_words': 640}