themen ueberarbeitet attachments verwalten

This commit is contained in:
2014-06-09 23:14:05 +05:30
parent babbfb7d73
commit 6451c0f175
22 changed files with 245 additions and 38 deletions

View File

@@ -1,18 +1,22 @@
<a name="thema_<%=small.id%>" href="#<%=small.id%>">
<h2><%= small.title %></h2>
</a>
<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? %>
<%= raw("<b>FAQs:</b>") unless small.fragen.empty? %>
<br/>
<% small.fragen.each do |frage| %>
<p>
<b> <%= frage.title %> </b> <br/>
<%= raw(frage.text) %>
<b> <%= frage.title %> </b> <br/>
<%= raw(frage.text) %>
</p>
<br/>
<% end %>
<%= render partial: "themen/attachment_list", object: small.attachments, locals:{editor: false} unless small.attachments.empty? %>
<br/>
<%
@small_elements = []
@small_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('thema.edit'), :path=>small} if can? :edit, small