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

<!-- wywołujemy go dla obiektu token klasy Token z~widoku anotuj.rhtml
-->
  <% token, akat, lewy = token_disamb
akath = akat.akat_hash
akat_e = akat_edytowalny?( :morphosyntactic, akat, lewy ) -%>

<b>
  <% tdisambs = token.disambs( akath ) 
-%>
<% interps = ( if tdisambs[ 0 ] : tdisambs
   else token.interpretacja
 end )
   interps.each {|interp| -%>
<span class="sc"><%= interp.leksem.lemat %></span>
<%= interp.fulltag -%> 
<% if interps.index( interp ) + 1< interps.size -%>
<br>
<% end -%>
<% } -%>
</b>

<% if akat_e and
   ((not token.interp?( akath )) or
   (not (di = token.the_disambiguation )) or
   di.dodana? )
 -%>
<%=    link_to_remote  ( if tdisambs.size != 1 : 'dezambiguuj!' else
      'wybierz' end), 
      :url => {
        :action =>:pokaz_interpretacje,
        :id => token.id,
:akat => akat,
:poziom => :morphosyntactic, :escape => false },
        :update => "disa-token_#{akat.id}_#{token.id}" -%>

<%= link_to_remote 'dodaj',
      :url => {
        :action =>:token_tworz_tag,
        :id => token.id,
:akat => akat,
:poziom => :morphosyntactic, :escape => false  },
        :update => "disa-token_#{akat.id}_#{token.id}" -%>

<%= if r_zarzadca?
    link_to_remote  znak_zatwierdź_tę,
    :url => {
:action => :morfoskładnia_zatwierdź_tę,
:id => token.id,
:akat => akat,
:disamb_id => tdisambs[0].id,
:poziom => :morphosyntactic, :escape => false  }
end -%>

<% end # of #{akat_e and not token.interp?} etc.
   -%>

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