% if can? :show, small %>
<%= small.title %> <%= link_to fa_icon("pencil"), verwalten_thema_path(small) if can? :edit, small %>
<% if small.is_outdated? %>
<%= I18n.t("thema.outdated") %> <%= link_to"Als aktuell markieren",is_updated_thema_path(small), :class=>:btn if can? :is_updated, small%>
<% end %>
<% if small.isdraft %>
<%= I18n.t("thema.isdraft") %>
<% end %>
<%= raw(small.text) %>
<%= raw("FAQs:") unless small.fragen.empty? %>
<% small.fragen.each do |frage| %>
<%= frage.title %>
<%= raw(frage.text) %>
<% end %>
<% if can?(:edit,small) || !small.meetings.empty? %>
Treffen/Sitzungen
<%= link_to "Neues Meeting", new_meeting_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %>
<%= link_to "All", meetings_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %>
<%= link_to "upcomming", meetings_path(:parent_id=>small.id, :parent_type=>"Thema",:filter=>"upcomming"), :remote=>true %>
<%= render :partial=>"meetings/meeting_list", object: small.meetings, locals: {parent: small} %>
<% end %>
<% if can?(:edit,small)|| ! small.documents.empty? %>
Dokumente
<%= link_to "Neues Dokument", new_document_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %>
<% unless small.documents.empty? %>
<% small.documents.each do |d| %>
<%= render d %>
<% end%>
<% end%>
<% end%>
<% unless small.hideattachment %>
<%= render partial: "themen/attachment_list", object: small.attachments, locals:{editor: false} unless small.attachments.empty? %>
<% end %>
<%
@small_elements = []
@small_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('thema.edit'), :path=>small} if can? :edit, small
@small_elements << {:hicon=>'icon-remove-circle',:text=>I18n.t('thema.remove'), :path=>small, :method=>:delete,:confirm=>I18n.t('thema.sure')} if can? :delete, small %>
<% render :partial=>'layouts/pretty_toolbar', :object=>@small_elements unless @small_elements.empty? %>
<% else %>
Error
<% end %>