themen fix + remote form für themen

This commit is contained in:
Andreas Stephanides
2014-02-07 22:15:05 +01:00
parent 35cc371d22
commit 48fc0455c7
9 changed files with 41 additions and 12 deletions

View File

@@ -10,6 +10,8 @@
</p>
<br/>
<% end %>
<% @small_elements = [{:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('thema.edit'), :path=>small}]
@small_elements << {:hicon=>'icon-remove-circle',:text=>I18n.t('thema.remove'), :path=>small, :method=>:delete,:confirm=>I18n.t('thema.sure')}%>
<%= render :partial=>'layouts/pretty_toolbar', :object=>@small_elements %>
<%
@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? %>

View File

@@ -12,10 +12,11 @@
<%= render :partial=>'layouts/pretty_toolbar' %>
<h2>FAQs:</h2>
<% @thema.fragen.each do |frage| %>
<%= render frage %>
<% end %>
<div id="fragen">
<%= render :partial=>'fragen/liste' %>
</div>
<% @frage=Frage.new; @frage.thema=@thema %>
<%= render :partial=>'fragen/rform' %>
<% @frage_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('frage.add'), :path=>new_frage_path}] %>
<%= render :partial=>'layouts/pretty_toolbar', :object=>@frage_elements %>
<!--