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


<% akat, tok = token_wszi
 @interpretacja_anot = tok.disambs(session[:uzid])[0]
-%>


     <fieldset>
  <% remote_form_for :interpretacja_anot, @interpretacja_anot, 
:url =>  {:action => :nowa_dyzambiguacja, 
  :id =>  tok.id ,
  :status => 0,
  :akat => akat,
  :poziom => :morphosyntactic, :escape => false} do |form| -%>


<% tok.interpretacja.each {|interpr| -%>
<%= radio_button :interpretacja_anot, :interpretacja_id,
  interpr.interpretacja_id, 
  {:onclick => 
    ajax_request("/#{annotation_controller}/nowa_dyzambiguacja/#{tok.id}?status=0&poziom=morphosyntactic&akat=#{akat.id}")}
 %>

<%= "<b>" if interpr.disamb? -%>
<i><%= interpr.leksem.lemat -%></i>
<%= interpr.fulltag -%> 
<% if tok.interpretacja.index(interpr)+1<tok.interpretacja.size
-%>
<br>
<% end -%>
<%= "</b>" if interpr.disamb? -%>
<% } -%>

    <%= ##  submit_tag "zatwierdź" , :class => "submit" 
-%>

<% if DlaEli.nk -%>
<%= link_to_remote 'dodaj',
      :url => {
        :action =>:token_tworz_tag,
        :id => tok.id,
:akat => akat,
:poziom => :morphosyntactic, :escape => false },
        :update => "disa-token_#{akat.id}_#{tok.id}" -%>
<% end -%>
    
    <%=    link_to_remote  'anuluj', 
      :url => {
        :action =>:dyzamb_anulowana, :id => tok.id, :akat => akat, :escape => false
#    :status => params[:status]
}
-%>

<% end #of form 
-%>
  </fieldset>
