forked from bofh/fetsite
FIX: Redirect- und Destroy-Pfad
This commit is contained in:
@@ -15,7 +15,7 @@ class ThemenController < ApplicationController
|
|||||||
def show
|
def show
|
||||||
@thema = Thema.find(params[:id])
|
@thema = Thema.find(params[:id])
|
||||||
@toolbar_elements = [{:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('thema.edit'), :path=>edit_thema_path(@thema)}]
|
@toolbar_elements = [{:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('thema.edit'), :path=>edit_thema_path(@thema)}]
|
||||||
@toolbar_elements << {:hicon=>'icon-remove-circle', :text=>I18n.t('thema.remove'), :path=>themengruppe_thema_path(@thema), :method=>:delete, :confirm=>I18n.t('thema.sure')}
|
@toolbar_elements << {:hicon=>'icon-remove-circle', :text=>I18n.t('thema.remove'), :path=>thema_path(@thema), :method=>:delete, :confirm=>I18n.t('thema.sure')}
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # show.html.erb
|
format.html # show.html.erb
|
||||||
@@ -78,7 +78,7 @@ class ThemenController < ApplicationController
|
|||||||
@thema.destroy
|
@thema.destroy
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to themen_url }
|
format.html { redirect_to themengruppe_path(@thema.themengruppe) }
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -23,10 +23,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</br>
|
</br>
|
||||||
|
|
||||||
|
<% unless @thema.id.nil? %>
|
||||||
<% @att_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('attachment.add'), :path=>new_thema_attachment_path(@thema)}] %>
|
<% @att_elements = [{:icon=>:plus, :hicon=>'icon-plus', :text=>I18n.t('attachment.add'), :path=>new_thema_attachment_path(@thema)}] %>
|
||||||
|
|
||||||
<%= render :partial=>'layouts/pretty_toolbar', :object=>@att_elements %>
|
<%= render :partial=>'layouts/pretty_toolbar', :object=>@att_elements %>
|
||||||
<!--
|
<% end %>
|
||||||
<%= link_to 'Neues Attachment', new_thema_attachment_path(@thema) %>
|
|
||||||
-->
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|||||||
Reference in New Issue
Block a user