<% #
 # 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.
%>

<div id="fixed_hdr">
  <table class="table-plain">
    <% 
             ##	     logger.info "@@@@ anotuj.rhtml w. 4. #{Time.now}"
       if DlaEli.nk -%>
    <tr>
      <td colspan="2">
	<% form_for :poziomy_anotacji, @poziomy_wybrane, :url =>
	{:action => :poziomuj, :akat => @akapit_transzy, 
	:poziom => :any, :escape => false } do |form| %> 
	<%= submit_tag "Poziomy anotacji" %>
	&nbsp;

	<% PoziomyAnotacji.działające.each do |poziom| 
	## unless poziom == :segmentation and 
	   ## @akapit_transzy.ma_status?( :segmentation, :>=, :zweryfikowany )
	   -%>
	<%= form.check_box  poziom,  {}, true, false  
%>&nbsp;<%= PoziomyAnotacji.nom( poziom ) -%>
	&nbsp;
	<% ## end # of #{unless segmentation}.
end # of #{each poziom}.
	   -%>
	
	<% end # of #{form}.
	   -%>

	<% if r_zarzadca? -%>
	<% form_for :jak_anotator, @użytkownik, :url =>
	{:action => :zarządca_jak_anotator, 
	:akat => @akapit_transzy, 
	:poziom => :any, :escape => false } do |form| %> 
	<%= submit_tag "Zatwierdź" %>
	&nbsp;

	<%= form.check_box :jak_anotator, 
	    { }, true, false -%>
	jak anotator
	<% end # of form
	   end # of if zarządca
	   -%>
      </td>
    </tr>
       <% end # of #{if nk}.
	  -%>
    <tr>
      <td colspan="2">
	<div  class="between-dots">
	  <div   class="akapit-overflow">
	      <span style="font-size: xx-small"><%= @akapit.akapit_id %>
		(tr.&#8201;<%= @akapit_transzy.transza_id %>, at.&#8201;<%= @akapit_transzy.id %>).</span>
	      <%=  @akapit.tresc %>
	  </div>
	</div>
      </td>
    </tr>
    <tr>
      <td id="status_info"> 
	<%= render :partial => 'status_info', :object => @akapit_transzy
	-%>
      </td>
      <td id="zatwod_buttons" align="right">
	  <%= render :partial => "anotuj_zatwod_nk" -%>
      </td>
    </tr>
  </table>
</div>

<div id="main1" >
  
  <%= render :partial => '/layouts/notice' -%>
  
  
  <!-- przerobione /app/views/akapit/show.rhtml
 i app/views/akapit/list.rhtml
 <p><b>Lista tokenów:</b></p>

<div>
weryfikacja: =<%= # @weryfikacja.to_s 
		  %>

status: <%= #	    session[:status] 
	    %>
</div>
--> 
  
  <table>
    <% if @werdykt == -1or r_zarzadca? -%>
    <tr>
      <td colspan="<%=
		   @poziomy.colspan + ( if @do_poprawki : 0 else 2 end )
		   %>">
	<%= uz_login( @anotid ) %> </td>     
<% unless @do_poprawki -%>
      <td colspan="<%=
		   @poziomy.colspan
		   %>">
	<%= render :partial => 'blizniaczy_status' %>
      </td>
<% end # of #{unless @do_poprawki}
   -%>
    </tr>
    <% end  # of if @werdykt ==-1 or r_zarzadca?
       %>


<% 
##     logger.info "@@@@ anotuj.rhtml w. 105. #{Time.now}"
if akat_edytowalny?( :sentences, @akapit_transzy ) 
   -%>
<p id="sentenśnik" style="line-height:230%">
<%= render :partial => 'sentenśnik', :object => @akapit_transzy -%>
</p>
<% end # of if edytowalny #{:sentences}
-%>


    <% @akapit.token.each do |token|%>
    <tr valign="top"  class="<%= cycle('list-line-odd', 'list-line-even') %>" >
      <td>&#8226;</td>
      <td>
<%= render :partial => 'token_td', :object => [ token, @akapit_transzy, true ] -%>
      </td>
      
      <% if (not DlaEli.nk) or @poziomy.syntactic? -%>
      <%= render :partial => 'token_framka', :object => [token,
							 @akat_hash] -%>
      <%= render :partial => 'token_fra', :object => [token, @akat_hash, :lewa] -%>
      <% end# of if syntactic? 
	 -%>      


      <% if (@werdykt == -1 and @pokaż_bliź) or r_zarzadca? -%>
      <td class="gruba-kreska"></td>
      
      <td>
	<%= render :partial => 'token_td', :object => [token,	@akat_bliźniak, false] -%>
      </td>

      </td>

      <% if (not DlaEli.nk)   or @poziomy.syntactic? -%>
      <%= render :partial => 'token_framka', :object => [token, @bliakath] -%>
	    <%= render :partial => 'token_fra', :object => [token, @bliakath] -%>
	    <% end # of #{if nk.syntactic?}
	       -%>	    
	    
	    <% end # of #{if @werdykt== -1  and @pokaż_bliź }.
	       -%>
	    
    </tr>
    <% end # of token.each
##   logger.info "@@@@ anotuj.rhtml w. 157. #{Time.now}"
       -%>
    <tr>
      <td></td>
      <td>
      </td>
<% if @werdykt == -1 or r_zarzadca?-%>
       <%= if DlaEli.nk
 "<td colspan=\"#{@poziomy.colspan+1}\"></td>"
else "<td></td>"
end	      %>
      <% end -%>
<% if (not DlaEli.nk) or @poziomy.syntactic? -%>
<td></td><!-- tylko dla Eli?-->
      <td>
	<% if akat_edytowalny?( :syntactic ) -%>
	<%= button_to('wyczyść frazy', { :action => 'frazy_wyczysc',
	:poziom => :syntactic,  :akat => @akapit_transzy},
	{:confirm => "Czy rzeczywiście chcesz wyczyścić wszystkie frazy?",
	:method => :post}) -%>
	<% end -%>
      </td>
<% end # of if syntactic
-%>
    </tr>
  </table>

  <% if Walencja.x -%>
  <!-- walencje -->
  <div id="walencja">
    <%= render :partial => 'walencja' -%>
  </div>
  <% end -%>
  

  <!-- komentarze -->

<h3> Komentarze, prośby </h3>
  <%= render :partial => 'komentarze', 
  :object => [ @akapit_transzy, :anotacja ] -%>

  <%= render :partial => 'komentarz_dodaj', :object =>  [@akapit_transzy, nil] -%>
  
  <div id="prosby_anotatorek">
    <%= render :partial => 'prosby_anotatorek' -%>
  </div>

<%
##     logger.info "@@@@ anotuj.rhtml w. 204. #{Time.now}"
%>

<%
### Local Variables: 
### mode: mmm
### End:
-%>
