<commit_before><p id="notice"><%= notice %></p><div align="left">
<% country_image = "/images/" + @country_year.country.handle.downcase+".png" %>
<%= image_tag country_image, :align => "left" %>
</div>
<h1>
<%=@country_year.country.name %> 
(<%=@country_year.number%>)
</h1>
<p>
  <img src="/images/gas_icon.png"> <b>Emissions (in thousand tons CO2-Equivalents):</b>
  <%= @country_year.emission %>
  <a onmouseover="showWMTT('1')" onmouseout="hideWMTT()" href="#">
  <% if @last_year.emission == "-"%>
  <b><font color="gray"> (o)</font></b>
  <%elsif @country_year.emission == "-"%>
  <%else%>
  <% if @country_year.emission < @last_year.emission %> 
	<b><font color="green"> (+)</font></b>
  <% elsif @country_year.emission > @last_year.emission %>
  <b><font color="red"> (-)</font></b>
  <% elsif @country_year.emission = @last_year.emission %>
  <b><font color="gray"> (o)</font></b>
  <% end %>
  <% end %>
	</a>
</p>

<p>
  <img src="/images/percent_icon.png"> <b>Sufficiency of habitats:</b>
  <%= @country_year.sufficiency %>%
  <a onmouseover="showWMTT('2')" onmouseout="hideWMTT()" href="#">
  <% if @last_year.sufficiency == "-"%>
  <b><font color="gray"> (o)</font></b>
  <%elsif @country_year.sufficiency == "-"%>
  <%else%>
  <% if @country_year.sufficiency.to_i > @last_year.sufficiency.to_i %> 
  <b><font color="green"> (+)</font></b>
  <% elsif @country_year.sufficiency.to_i < @last_year.sufficiency.to_i %>
  <b><font color="red"> (-)</font></b>
  <% elsif @country_year.sufficiency = @last_year.sufficiency %>
  <b><font color="gray"> (o)</font></b>
  <% end %>
  <% end %>
  </a>
</p>

<p>
  <img src="/images/area_icon.png"> <b>Area of habitats (percent):</b>
  <%= @country_year.area_habitats_percent %>%
  <a onmouseover="showWMTT('3')" onmouseout="hideWMTT()" href="#">
  <% if @last_year.area_habitats_percent == "-"%>
  <b><font color="gray"> (o)</font></b>
  <%elsif @country_year.area_habitats_percent == "-"%>
  <%else%>
  <% if @country_year.area_habitats_percent > @last_year.area_habitats_percent %> 
  <b><font color="green"> (+)</font></b>
  <% elsif @country_year.area_habitats_percent < @last_year.area_habitats_percent %>
  <b><font color="red"> (-)</font></b>
  <% elsif @country_year.area_habitats_percent = @last_year.area_habitats_percent %>
  <b><font color="gray"> (o)</font></b>
  <% end %>
  <% end %>
  </a>
</p>

<p>
  <img src="/images/scaled_icon.png"> <b>Area of habitats (scaled):</b>
  <%= @country_year.area_habitats_scaled %>
</p>

<% if @country_year.animal_joins != [] %>
<h2>Endangered species, assessed in this year</h2>
<table>
  <tr class="tabhead">
	<th>Scientific name</th>
    <th>Common name</th>
    <th>Category</th>
    <th>Trend</th>
    <th>Links</th>
  </tr>

<%animal_counter = 4%>

<% @country_year.animal_joins.each do |animal_joins| %>
	<%tempname = animal_joins.animal.name.split(" ")%>
	<%image = tempname[0] + "_" + tempname[1] + ".jpeg"%>
	<div id="<%=animal_counter%>" class="tooltip">		
	<%if File.exist? RAILS_ROOT + "/public/images/pictures/" + image%>
	<%= link_to image_tag("/images/pictures/" + image), animal_joins.animal.image_link %><br/>
	Picture by <%=animal_joins.animal.author%><br/>
	<%=link_to animal_joins.animal.author_link, "Link"%><br/>
	License: <%=animal_joins.animal.image_license%>	
	<%elsif animal_joins.animal.image_link != "none" %>
	Due to copyright-restrictions we are not allowed to embed this picture. Just click to see the picture of this animal/plant
	<%else%>
	Sorry, we could not find any picture of this plant/animal. If you've got one, just send us an email.
	<%end%>	
	</div>
	
	
  <tr class="<%= cycle("tabeven","tabodd") %>">
	<td><i><a onmouseover="showWMTT('<%=animal_counter%>')" onmouseout="hideWMTT()" href="<%=animal_joins.animal.image_link%>">
	<%= animal_joins.animal.name%></a></i></td>
    <td><%= animal_joins.animal.common %></td>
    <td><%= animal_joins.animal.category %></td>
    <td><%= animal_joins.animal.trend %></td>
    <td><%= link_to 'Details at IUCN RedList', animal_joins.animal.link %> <a href="http://www.google.com/#q=<%=animal_joins.animal.name%>"><img src="/images/google.png"></a> <a href="http://en.wikipedia.org/w/index.php?title=Special%20Search&search=<%=animal_joins.animal.name%>"><img src="/images/wiki.ico"></a> </td>
  </tr>
<%animal_counter += 1%>
<% end %>
</table>

<%else%>
<h2>No endangered species were assessed in this year</h2>

<%end%>
<br />


<%= link_to @last_year.number,@last_year%> | <%= link_to 'Edit', edit_country_year_path(@country_year) %> |
<%= link_to 'Back', Year.find_by_year(@country_year.number) %> | <%= link_to @next_year.number,@next_year%>

<script type="text/javascript">
<!--
wmtt = null;
document.onmousemove = updateWMTT;
function updateWMTT(e) {
  if (wmtt != null && wmtt.style.display == 'block') {
    x = (e.pageX ? e.pageX : window.event.x);
    y = (e.pageY ? e.pageY : window.event.y);
    wmtt.style.left = x + "px";
	wmtt.style.top  = (y - wmtt.offsetHeight) + "px";
  }
}<commit_msg>Edited show to remove link to edit, only display next/last year link if it actually exists (try with 2010 and 2003)<commit_after><p id="notice"><%= notice %></p><div align="left">
<% country_image = "/images/" + @country_year.country.handle.downcase+".png" %>
<%= image_tag country_image, :align => "left" %>
</div>
<h1>
<%=@country_year.country.name %> 
(<%=@country_year.number%>)
</h1>
<p>
  <img src="/images/gas_icon.png"> <b>Emissions (in thousand tons CO2-Equivalents):</b>
  <%= @country_year.emission %>
  <a onmouseover="showWMTT('1')" onmouseout="hideWMTT()" href="#">
  <% if @last_year.emission == "-"%>
  <b><font color="gray"> (o)</font></b>
  <%elsif @country_year.emission == "-"%>
  <%else%>
  <% if @country_year.emission < @last_year.emission %> 
	<b><font color="green"> (+)</font></b>
  <% elsif @country_year.emission > @last_year.emission %>
  <b><font color="red"> (-)</font></b>
  <% elsif @country_year.emission = @last_year.emission %>
  <b><font color="gray"> (o)</font></b>
  <% end %>
  <% end %>
	</a>
</p>

<p>
  <img src="/images/percent_icon.png"> <b>Sufficiency of habitats:</b>
  <%= @country_year.sufficiency %>%
  <a onmouseover="showWMTT('2')" onmouseout="hideWMTT()" href="#">
  <% if @last_year.sufficiency == "-"%>
  <b><font color="gray"> (o)</font></b>
  <%elsif @country_year.sufficiency == "-"%>
  <%else%>
  <% if @country_year.sufficiency.to_i > @last_year.sufficiency.to_i %> 
  <b><font color="green"> (+)</font></b>
  <% elsif @country_year.sufficiency.to_i < @last_year.sufficiency.to_i %>
  <b><font color="red"> (-)</font></b>
  <% elsif @country_year.sufficiency = @last_year.sufficiency %>
  <b><font color="gray"> (o)</font></b>
  <% end %>
  <% end %>
  </a>
</p>

<p>
  <img src="/images/area_icon.png"> <b>Area of habitats (percent):</b>
  <%= @country_year.area_habitats_percent %>%
  <a onmouseover="showWMTT('3')" onmouseout="hideWMTT()" href="#">
  <% if @last_year.area_habitats_percent == "-"%>
  <b><font color="gray"> (o)</font></b>
  <%elsif @country_year.area_habitats_percent == "-"%>
  <%else%>
  <% if @country_year.area_habitats_percent > @last_year.area_habitats_percent %> 
  <b><font color="green"> (+)</font></b>
  <% elsif @country_year.area_habitats_percent < @last_year.area_habitats_percent %>
  <b><font color="red"> (-)</font></b>
  <% elsif @country_year.area_habitats_percent = @last_year.area_habitats_percent %>
  <b><font color="gray"> (o)</font></b>
  <% end %>
  <% end %>
  </a>
</p>

<p>
  <img src="/images/scaled_icon.png"> <b>Area of habitats (scaled):</b>
  <%= @country_year.area_habitats_scaled %>
</p>

<% if @country_year.animal_joins != [] %>
<h2>Endangered species, assessed in this year</h2>
<table>
  <tr class="tabhead">
	<th>Scientific name</th>
    <th>Common name</th>
    <th>Category</th>
    <th>Trend</th>
    <th>Links</th>
  </tr>

<%animal_counter = 4%>

<% @country_year.animal_joins.each do |animal_joins| %>
	<%tempname = animal_joins.animal.name.split(" ")%>
	<%image = tempname[0] + "_" + tempname[1] + ".jpeg"%>
	<div id="<%=animal_counter%>" class="tooltip">		
	<%if File.exist? RAILS_ROOT + "/public/images/pictures/" + image%>
	<%= link_to image_tag("/images/pictures/" + image), animal_joins.animal.image_link %><br/>
	Picture by <%=animal_joins.animal.author%><br/>
	<%=link_to animal_joins.animal.author_link, "Link"%><br/>
	License: <%=animal_joins.animal.image_license%>	
	<%elsif animal_joins.animal.image_link != "none" %>
	Due to copyright-restrictions we are not allowed to embed this picture. Just click to see the picture of this animal/plant
	<%else%>
	Sorry, we could not find any picture of this plant/animal. If you've got one, just send us an email.
	<%end%>	
	</div>
	
	
  <tr class="<%= cycle("tabeven","tabodd") %>">
	<td><i><a onmouseover="showWMTT('<%=animal_counter%>')" onmouseout="hideWMTT()" href="<%=animal_joins.animal.image_link%>">
	<%= animal_joins.animal.name%></a></i></td>
    <td><%= animal_joins.animal.common %></td>
    <td><%= animal_joins.animal.category %></td>
    <td><%= animal_joins.animal.trend %></td>
    <td><%= link_to 'Details at IUCN RedList', animal_joins.animal.link %> <a href="http://www.google.com/#q=<%=animal_joins.animal.name%>"><img src="/images/google.png"></a> <a href="http://en.wikipedia.org/w/index.php?title=Special%20Search&search=<%=animal_joins.animal.name%>"><img src="/images/wiki.ico"></a> </td>
  </tr>
<%animal_counter += 1%>
<% end %>
</table>

<%else%>
<h2>No endangered species were assessed in this year</h2>

<%end%>
<br />


<%  if @last_year.number != @country_year.number %> <%= link_to @last_year.number,@last_year %> | <%end%> 
	<%= link_to 'Back', Year.find_by_year(@country_year.number) %> 
	<% if @next_year.number != @country_year.number %> | <%= link_to @next_year.number,@next_year%> <% end %>

<script type="text/javascript">
<!--
wmtt = null;
document.onmousemove = updateWMTT;
function updateWMTT(e) {
  if (wmtt != null && wmtt.style.display == 'block') {
    x = (e.pageX ? e.pageX : window.event.x);
    y = (e.pageY ? e.pageY : window.event.y);
    wmtt.style.left = x + "px";
	wmtt.style.top  = (y - wmtt.offsetHeight) + "px";
  }
}
{'fraction_non_alphanumeric': 0.23001872474623042, 'fraction_numerical': 0.0039420518379816695, 'mean_word_length': 4.701123595505618, 'pattern_counts': {'":': 0, '<': 398, '<?xml version=': 0, '>': 398, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '233055', 'n_tokens_mistral': 4291, 'n_tokens_neox': 3922, 'n_words': 691}