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

<% #to jest partial używany przez szablon  i szablon admin, a 
   # także zarzadca  
   -%>

  <div id="side" >
    <% if session[ :uzid ] %>

    <b> <%= session[ :login ] %></b>
(<%=
if session[ :drag_queen_id ]
  "DQ jako "
end
%><%=  Rola.nazwa_roli( session[ :rola_id ] )%>)
&nbsp; Anotatornia <b><%= AnoVersion.text %></b>
&nbsp;    
  <% if Rola.anotator?(session[:rola_id]) -%>
      <%= link_to "Zweryfikowane" , :controller => annotation_controller, # zdef. w~\file{application_helper.rb}
       :action => 'ogladactwo' -%>
      <%= link_to "Transze" , :controller => annotation_controller, 
	   :action =>'lista_transz'
      -%>

      <% elsif not Rola.admin?(session[:rola_id]) # to znaczy dla	 gościa, audytora i zarządcy
	 -%>

      <%= link_to "Strona główna" , :controller => annotation_controller, :action => 'ogladactwo' -%>

      <% if Rola.wszewid?(session[:rola_id]) -%>
      <%= link_to "Zweryfikowane" , :controller => annotation_controller, :action => 'zweryf' -%>
      <% end -%>

    <% end # of if Rola.anotator? elsif not Rola.admin?
       -%>

      <% if session[:transza] %>
      <%= link_to "Bieżąca transza" , :controller => annotation_controller, 
	   :action => 'pokaz_transze', :id => session[:transza]
      -%>
      <% end -%>

      <% if DlaEli.x and not Rola.admin?(session[:rola_id]) -%>
      <%= link_to "Wyszukiwanie" , :controller => annotation_controller, 
	   :action =>'wyszukaj_akapity'
      -%>

      <%= if session[:szukaj_akapity_transzy]
	  link_to "Bieżące wyszukanie" , :controller => annotation_controller, :action =>'wyszukaj_akapity'
      end   -%>
      <% end -%>

           <% unless r_admin? -%>
      <%= link_to "Sł. sensów" , :controller => 'anotacja', 
	   :action =>'sense_inventory'
      -%>
<% end -%>

      <% if Rola.admin?(session[:rola_id]) -%>
      <%= link_to "Lista użytkowników" , :controller => 'admin', :action => 'lista_uzytkownikow' -%>

      <%= link_to "Dodaj użytkownika" , :controller => 'admin', :action => 'dodaj_uzytkownika' -%>
      <% else -%>
      <%= link_to "Zmiana hasła" , :controller => 'admin', 
      :action => 'zmien_haslo',  :id => session[:uzid] -%>
      <% end -%>

      <%= link_to "Wyloguj" , :controller => 'logowanie', :action => 'wylogowanie' -%>

    <% end # of if session[:uzid]
 -%>
  </div>



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