<commit_before><%- content_for(:title) do -%>
  <%- @title = capture do %>
    <%= iconic_taxon_image @taxon, :style => "vertical-align: middle" %>
    <%= link_to @taxon do %>
      <%= render :partial => "shared/taxon" %>
    <% end %>
    on
    <%= link_to truncate(@list.title, :length => 85), @list %>
  <% end -%>
  <%= strip_tags(@title).html_safe %>
<%- end -%>
<%- content_for(:extracss) do -%>
  <%= stylesheet_link_tag "lists", "jquery/ui.tabs" %>
  <style type="text/css" media="screen">
    #taxonimage { margin-bottom: 10px; }
    #taxonimage .iconic {
      display: block;
      margin: 10px auto;
    }
    #taxonimage .small.photo {max-width:270px;}
    .listed_taxon_form textarea {
      width: 636px; 
      height: 100px; 
      margin-right: 0;
    }
    form.inline { margin-bottom: 10px;}
    .monthgraph .month_0 { display: none;}
    #comments > h3 { display: none;}
  </style>
<%- end -%>
<%- content_for(:extrajs) do -%>
  <%= javascript_include_tag('jquery/plugins/jqModal' ) %>
  <script type="text/javascript" charset="utf-8">
    $(document).ready(function() {
      $('.tabs').tabs({
        ajaxOptions: {
          data: "partial=cached_component"
        },
        load: function(event, ui) {
          $(ui.panel).append(
            $('<a>View more</a>').addClass('readmore').attr('href', $(ui.tab).attr('rel'))
          )
        }
      })
    })
  </script>
<%- end -%>
<div id="pageheader" class="clear">
  <div class="breadcrumbs">
    <strong><%= link_to "&laquo #{@list.title}".html_safe, @list, :class => 'crumb' %></strong>
  </div><!-- /#breadcrumbs -->
  
  <h2><%= @title %></h2>
</div>

<div class="column span-7">
  <div id="taxonimage" class="photo_view">
    <% if @photo -%>
      <%= link_to image_tag(@photo.small_url, :class => "small photo"), @taxon %>
      <p class="ui attribution description">
        Photo: 
        <%= link_to @photo.attribution, @photo.native_page_url %>
      </p>
    <% else %>
      <%= render :partial => 'taxa/nophoto', :object => @taxon %>
    <% end -%>
  </div>
  
  <div class="observationcounts stacked">
    <div class="ui description">
      <strong><%= @listed_taxon.observations_count %></strong>
      <%= @listed_taxon.observations_count == 1 ? 'observation' : 'observations' -%>
      <%- if @list.is_a?(CheckList) -%>,
        <strong class="count"><%= @listed_taxon.confirmed_observations_count %></strong>
        research grade
      <% end -%>
    </div>
    <% unless @listed_taxon.observation_month_stats.blank? -%>
      <div class="statsgraphs stacked">
        <div class="observedgraph">
          <%= month_graph @listed_taxon.observation_month_stats %>
        </div>
        <% if @list.is_a?(CheckList) -%>
          <div class="confirmedgraph">
            <%= month_graph @listed_taxon.confirmed_observation_month_stats, :max => @listed_taxon.observation_month_stats.values.max %>
          </div>
        <% end -%>
      </div>
    <% end -%>
  </div>
  
  <% if @listed_taxon.first_observation -%>
    <p class="ui description">
      First iNat observation
      <%= link_to one_line_observation(@listed_taxon.first_observation, :skip => %w(user taxon)), @listed_taxon.first_observation %>
      <% if is_not_me?(@list.user) -%>
        by 
        <%= link_to user_image(@listed_taxon.first_observation.user), @listed_taxon.first_observation.user %>
        <%= link_to you_or_login(@listed_taxon.first_observation.user), @listed_taxon.first_observation.user %>,
        added <%= @listed_taxon.first_observation.created_at.to_date.to_s(:long) %>
      <% end -%>
    </p>
  <% end -%>
  
  <% if @listed_taxon.last_observation -%>
    <p class="ui description">
      Last observation
      <%= link_to one_line_observation(@listed_taxon.last_observation, :skip => %w(user taxon)), @listed_taxon.last_observation %>
      <% if is_not_me?(@list.user) -%>
        by 
        <%= link_to user_image(@listed_taxon.last_observation.user), @listed_taxon.last_observation.user %>
        <%= link_to you_or_login(@listed_taxon.last_observation.user), @listed_taxon.last_observation.user %>
      <% end -%>
    </p>
  <% end -%>
  
  <%= separator %>
  
  <p class="ui description">
    Added 
    <% if @listed_taxon.user %>
      by 
      <%= link_to user_image(@listed_taxon.user), @listed_taxon.user %>
      <%= link_to you_or_login(@listed_taxon.user), @listed_taxon.user %>
    <% end %>
    on <%= @listed_taxon.created_at.to_s(:long) %>
  </p>
  
  <p class="ui description">
    Updated
    <% if @listed_taxon.updater %>
      by 
      <%= link_to user_image(@listed_taxon.updater), @listed_taxon.updater %>
      <%= link_to you_or_login(@listed_taxon.updater), @listed_taxon.updater %>
    <% end %>
    on <%= @listed_taxon.updated_at.to_s(:long) %>
  </p>
  
  <div class="meta">
    <strong>Source:</strong> <%= citation_for @listed_taxon.citation_object %>
  </div>
  
  <% if @listed_taxon.removable_by?(current_user) -%>
    <p class="ui description" style="margin-top: 10px">
      <%= link_to "Remove from #{h(@list.title)}", @listed_taxon, :method => :delete, 
        :confirm => "Are you sure you want to remove this taxon from #{h(@list.title)}?",
        :class => "small description" %>
    </p>
  <% end -%>
  
</div>

<%- description_name = @list.is_a?(CheckList) ? "place notes" : "description" %>
<div class="last column span-17">  
  <div id="description" class="description">
    <% if @listed_taxon.description.blank? && @list.listed_taxa_editable_by?(current_user) -%>
      <p class="ui description inplaceedit">
        <%= link_to_function "Add #{description_name}", "$('#description').hide(); $('##{dom_id(@listed_taxon, "edit_description")}').show()" %>
      </p>
    <% else %>
      <div class="clear readable">
        <%= formatted_user_text(@listed_taxon.description) %>
      </div>
      <% if @list.listed_taxa_editable_by?(current_user) -%>
        <p class="ui"><%= link_to_function "edit #{description_name}", "$('#description').hide(); $('##{dom_id(@listed_taxon, "edit_description")}').show()" %></p>
      <% end -%>
    <% end -%>
  </div>
  
  <% if @list.listed_taxa_editable_by?(current_user) -%>
    <%= form_for @listed_taxon, :builder => DefaultFormBuilder, :html => {
        :id => dom_id(@listed_taxon, "edit_description"), :class => "clear box listed_taxon_form", :style => "display: none"} do |f| %>
      <%= f.text_area :description, :label => description_name.capitalize,
        :placeholder => "Add notes about this taxon in this place, e.g. where and when it occurs." %>
      <%= f.submit "Save", :class => "default button" %>
      <%= link_to_function "Cancel", "$('#description').show(); $('##{dom_id(@listed_taxon, "edit_description")}').hide()", 
        :class => "minor button" %>
    <% end %>
  <% end -%>
  
  <% if @list.is_a?(CheckList) -%>
    <div class="stacked">
      <%= render :partial => 'occurrence_field' %>
      <%= render :partial => 'establishment_field' %>
    </div>
  <% end -%>
  
  <div class="tabs">
    <%-
      case @list.class.to_s
      when 'CheckList'
        obs_tab_txt = "Observations from this place"
        obs_url = observations_path(:place_id => @listed_taxon.place_id, :taxon_id => @listed_taxon.taxon_id)
      when 'ProjectList'
        obs_tab_txt = "Observations from this project"
        obs_url = project_observations_path(@list.project_id, :taxon_id => @listed_taxon.taxon_id)
      else
        obs_tab_txt = is_me?(@list.user) ? "Observations by you" : "Observations by #{@list.user.login}"
        obs_url = observations_by_login_path(@list.user.login, :taxon_id => @listed_taxon.taxon_id)
      end
    -%>
    <ul>
      <li><%= link_to content_tag(:span, "Comments"), '#comments' %></li>
      <li><%= link_to content_tag(:span, obs_tab_txt), obs_url, :rel => obs_url, :title => "observations" %></li>
    </ul>
    <div id="comments">
      <%= render :partial => "comments/comments", :object => @listed_taxon %>
    </div>
    <div id="observations" class="mini observations"></div>
  </div>
</div>
<commit_msg>Minor safe issue.<commit_after><%- content_for(:title) do -%>
  <%- @title = capture do %>
    <%= iconic_taxon_image @taxon, :style => "vertical-align: middle" %>
    <%= link_to @taxon do %>
      <%= render :partial => "shared/taxon" %>
    <% end %>
    on
    <%= link_to truncate(@list.title, :length => 85), @list %>
  <% end -%>
  <%= strip_tags(@title).html_safe %>
<%- end -%>
<%- content_for(:extracss) do -%>
  <%= stylesheet_link_tag "lists", "jquery/ui.tabs" %>
  <style type="text/css" media="screen">
    #taxonimage { margin-bottom: 10px; }
    #taxonimage .iconic {
      display: block;
      margin: 10px auto;
    }
    #taxonimage .small.photo {max-width:270px;}
    .listed_taxon_form textarea {
      width: 636px; 
      height: 100px; 
      margin-right: 0;
    }
    form.inline { margin-bottom: 10px;}
    .monthgraph .month_0 { display: none;}
    #comments > h3 { display: none;}
  </style>
<%- end -%>
<%- content_for(:extrajs) do -%>
  <%= javascript_include_tag('jquery/plugins/jqModal' ) %>
  <script type="text/javascript" charset="utf-8">
    $(document).ready(function() {
      $('.tabs').tabs({
        ajaxOptions: {
          data: "partial=cached_component"
        },
        load: function(event, ui) {
          $(ui.panel).append(
            $('<a>View more</a>').addClass('readmore').attr('href', $(ui.tab).attr('rel'))
          )
        }
      })
    })
  </script>
<%- end -%>
<div id="pageheader" class="clear">
  <div class="breadcrumbs">
    <strong><%= link_to "&laquo #{@list.title}".html_safe, @list, :class => 'crumb' %></strong>
  </div><!-- /#breadcrumbs -->
  
  <h2><%= @title %></h2>
</div>

<div class="column span-7">
  <div id="taxonimage" class="photo_view">
    <% if @photo -%>
      <%= link_to image_tag(@photo.small_url, :class => "small photo"), @taxon %>
      <p class="ui attribution description">
        Photo: 
        <%= link_to @photo.attribution, @photo.native_page_url %>
      </p>
    <% else %>
      <%= render :partial => 'taxa/nophoto', :object => @taxon %>
    <% end -%>
  </div>
  
  <div class="observationcounts stacked">
    <div class="ui description">
      <strong><%= @listed_taxon.observations_count %></strong>
      <%= @listed_taxon.observations_count == 1 ? 'observation' : 'observations' -%>
      <%- if @list.is_a?(CheckList) -%>,
        <strong class="count"><%= @listed_taxon.confirmed_observations_count %></strong>
        research grade
      <% end -%>
    </div>
    <% unless @listed_taxon.observation_month_stats.blank? -%>
      <div class="statsgraphs stacked">
        <div class="observedgraph">
          <%= month_graph @listed_taxon.observation_month_stats %>
        </div>
        <% if @list.is_a?(CheckList) -%>
          <div class="confirmedgraph">
            <%= month_graph @listed_taxon.confirmed_observation_month_stats, :max => @listed_taxon.observation_month_stats.values.max %>
          </div>
        <% end -%>
      </div>
    <% end -%>
  </div>
  
  <% if @listed_taxon.first_observation -%>
    <p class="ui description">
      First iNat observation
      <%= link_to one_line_observation(@listed_taxon.first_observation, :skip => %w(user taxon)), @listed_taxon.first_observation %>
      <% if is_not_me?(@list.user) -%>
        by 
        <%= link_to user_image(@listed_taxon.first_observation.user), @listed_taxon.first_observation.user %>
        <%= link_to you_or_login(@listed_taxon.first_observation.user), @listed_taxon.first_observation.user %>,
        added <%= @listed_taxon.first_observation.created_at.to_date.to_s(:long) %>
      <% end -%>
    </p>
  <% end -%>
  
  <% if @listed_taxon.last_observation -%>
    <p class="ui description">
      Last observation
      <%= link_to one_line_observation(@listed_taxon.last_observation, :skip => %w(user taxon)), @listed_taxon.last_observation %>
      <% if is_not_me?(@list.user) -%>
        by 
        <%= link_to user_image(@listed_taxon.last_observation.user), @listed_taxon.last_observation.user %>
        <%= link_to you_or_login(@listed_taxon.last_observation.user), @listed_taxon.last_observation.user %>
      <% end -%>
    </p>
  <% end -%>
  
  <%= separator %>
  
  <p class="ui description">
    Added 
    <% if @listed_taxon.user %>
      by 
      <%= link_to user_image(@listed_taxon.user), @listed_taxon.user %>
      <%= link_to you_or_login(@listed_taxon.user), @listed_taxon.user %>
    <% end %>
    on <%= @listed_taxon.created_at.to_s(:long) %>
  </p>
  
  <p class="ui description">
    Updated
    <% if @listed_taxon.updater %>
      by 
      <%= link_to user_image(@listed_taxon.updater), @listed_taxon.updater %>
      <%= link_to you_or_login(@listed_taxon.updater), @listed_taxon.updater %>
    <% end %>
    on <%= @listed_taxon.updated_at.to_s(:long) %>
  </p>
  
  <div class="meta">
    <strong>Source:</strong> <%= citation_for @listed_taxon.citation_object %>
  </div>
  
  <% if @listed_taxon.removable_by?(current_user) -%>
    <p class="ui description" style="margin-top: 10px">
      <%= link_to "Remove from #{@list.title}", @listed_taxon, :method => :delete, 
        :confirm => "Are you sure you want to remove this taxon from #{@list.title}?",
        :class => "small description" %>
    </p>
  <% end -%>
  
</div>

<%- description_name = @list.is_a?(CheckList) ? "place notes" : "description" %>
<div class="last column span-17">  
  <div id="description" class="description">
    <% if @listed_taxon.description.blank? && @list.listed_taxa_editable_by?(current_user) -%>
      <p class="ui description inplaceedit">
        <%= link_to_function "Add #{description_name}", "$('#description').hide(); $('##{dom_id(@listed_taxon, "edit_description")}').show()" %>
      </p>
    <% else %>
      <div class="clear readable">
        <%= formatted_user_text(@listed_taxon.description) %>
      </div>
      <% if @list.listed_taxa_editable_by?(current_user) -%>
        <p class="ui"><%= link_to_function "edit #{description_name}", "$('#description').hide(); $('##{dom_id(@listed_taxon, "edit_description")}').show()" %></p>
      <% end -%>
    <% end -%>
  </div>
  
  <% if @list.listed_taxa_editable_by?(current_user) -%>
    <%= form_for @listed_taxon, :builder => DefaultFormBuilder, :html => {
        :id => dom_id(@listed_taxon, "edit_description"), :class => "clear box listed_taxon_form", :style => "display: none"} do |f| %>
      <%= f.text_area :description, :label => description_name.capitalize,
        :placeholder => "Add notes about this taxon in this place, e.g. where and when it occurs." %>
      <%= f.submit "Save", :class => "default button" %>
      <%= link_to_function "Cancel", "$('#description').show(); $('##{dom_id(@listed_taxon, "edit_description")}').hide()", 
        :class => "minor button" %>
    <% end %>
  <% end -%>
  
  <% if @list.is_a?(CheckList) -%>
    <div class="stacked">
      <%= render :partial => 'occurrence_field' %>
      <%= render :partial => 'establishment_field' %>
    </div>
  <% end -%>
  
  <div class="tabs">
    <%-
      case @list.class.to_s
      when 'CheckList'
        obs_tab_txt = "Observations from this place"
        obs_url = observations_path(:place_id => @listed_taxon.place_id, :taxon_id => @listed_taxon.taxon_id)
      when 'ProjectList'
        obs_tab_txt = "Observations from this project"
        obs_url = project_observations_path(@list.project_id, :taxon_id => @listed_taxon.taxon_id)
      else
        obs_tab_txt = is_me?(@list.user) ? "Observations by you" : "Observations by #{@list.user.login}"
        obs_url = observations_by_login_path(@list.user.login, :taxon_id => @listed_taxon.taxon_id)
      end
    -%>
    <ul>
      <li><%= link_to content_tag(:span, "Comments"), '#comments' %></li>
      <li><%= link_to content_tag(:span, obs_tab_txt), obs_url, :rel => obs_url, :title => "observations" %></li>
    </ul>
    <div id="comments">
      <%= render :partial => "comments/comments", :object => @listed_taxon %>
    </div>
    <div id="observations" class="mini observations"></div>
  </div>
</div>

{'fraction_non_alphanumeric': 0.18720584592519196, 'fraction_numerical': 0.003591776071340104, 'mean_word_length': 3.151413881748072, 'pattern_counts': {'":': 0, '<': 327, '<?xml version=': 0, '>': 393, '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': '2473123', 'n_tokens_mistral': 5999, 'n_tokens_neox': 5616, 'n_words': 992}