thema verwalten added

This commit is contained in:
Andreas Stephanides
2014-03-29 12:43:08 +01:00
parent a8401391a6
commit 07f53c59bc
8 changed files with 53 additions and 38 deletions

View File

@@ -14,4 +14,4 @@
@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? %>
<% render :partial=>'layouts/pretty_toolbar', :object=>@small_elements unless @small_elements.empty? %>

View File

@@ -1,24 +1,9 @@
<p id="notice"><%= notice %></p>
<%= link_to "Zurück", @thema.themengruppe %>
<br>
<%= render :partial=>"themen/small", :object=>@thema %>
<h1><%= @thema.title %></h1>
<p>
<%= raw(@thema.text) %>
</p>
<!--
<%= link_to 'Edit', edit_thema_path(@thema) %> |
<%= link_to 'Back', themengruppe_path(@thema.themengruppe) %>
-->
<%= render :partial=>'layouts/pretty_toolbar' %>
<%= render :partial=>'themen/fragen' %>
<!--
<%= link_to 'Neue Frage', new_frage_path %> <br/>
-->
<br/>
<h2><%= I18n.t('attachment.title')%>:</h2>
<div id="attachmentform">
</div>
<%= link_to new_thema_attachment_path(@thema) ,:remote=>true do %> new Attachment <% end %>
<%= render :partial => "themen/select", :object => @thema, :locals=>{:editor => :false} %>