<% #
 # This file is part of the Anotatornia suite.
 # 
 # Copyright © 2007, 2008, 2009, 2010 by Instytut Podstaw Informatyki
 # Polskiej Akademii Nauk (IPI PAN; Institute of Computer Science, Polish
 # Academy of Sciences; cf. www.ipipan.waw.pl).  All rights reserved.
 # 
 # This file may be distributed and/or modified under the terms of the
 # GNU General Public License version 3 as published by the Free Software
 # Foundation and appearing in the file COPYING included in the packaging
 # of this file.  (See http://www.gnu.org/licenses/translations.html for
 # unofficial translations.)
 # 
 # A commercial license is available from IPI PAN (contact
 # Michal.Ciesiolka.waw.pl or ipi.waw.pl for more
 # information).  Licensees holding a valid commercial license from IPI
 # PAN may use this file in accordance with that license.
 # 
 # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
 # THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 # PURPOSE.
%>

<%   if session[:odebrania_transz_pokaz] and lista_odebranych and lista_odebranych[0] -%>
<h3> Transze odbierane i odebrane </h3>

<ul>
<% lista_odebranych.each do |odtra| -%>
<li>
<%= odtra.dotyczy.opis + " [" +odtra.created_at.to_s(:db)+"]" -%>

<b><% if odtra.spelniona? -%>
 odebrana <%= odtra.updated_at.to_s(:db) %>
<% else # nie odebrana
-%>
oczekuje na odebranie
<% end # of if odebrana?
   -%>
</b>
<br/>
<%= odtra.opis -%>
<br/>
</li>
<% end # of each odebranie transzy 
-%>
</ul>
         <%= link_to_remote '[ukryj listę odebrań]',
       :url => {:action => 'odebrania_transz_ukryj', 
    :id => lista_odebranych[0].uzytkownik_id}, 
       :update => 'lista_odebranych' %>
         <% elsif lista_odebranych and lista_odebranych[0] # nie pokazuj odebrań 
       -%>
<%= link_to_remote '[pokaż listę odebrań transz]',
    :url => {:action => 'odebrania_transz_pokaz', 
      :id => lista_odebranych.uzytkownik_id}, 
    :update => 'lista_odebranych' %>

<% end # of if session[:odebrania_transz_pokaz]
-%>
