Files
fetsite/app/views/themen/_small.html.erb
Andreas Stephanides 58c46375a1 nlinks fetprofile added
2014-04-06 23:01:37 +02:00

21 lines
729 B
Plaintext

<a name="thema_<%=small.id%>" href="#<%=small.id%>">
<h2><%= small.title %></h2>
</a>
<%= raw(small.text) %>
<br/>
<%= raw("<b>FAQs:</b>") unless small.fragen.empty? %>
<br/>
<% small.fragen.each do |frage| %>
<p>
<b> <%= frage.title %> </b> <br/>
<%= raw(frage.text) %>
</p>
<br/>
<% 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? %>