themengruppe verwalten fix link

This commit is contained in:
Andreas Stephanides
2014-09-14 02:00:21 +02:00
parent 974fcaf3d0
commit fce2b0a02a
2 changed files with 6 additions and 7 deletions

View File

@@ -63,9 +63,8 @@ class ThemengruppenController < ApplicationController
@toolbar_elements =[] @toolbar_elements =[]
@toolbar_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('themengruppe.edit'), :path=>edit_themengruppe_path(@themengruppe)} if can? :edit, @themengruppe @toolbar_elements << {:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('themengruppe.edit'), :path=>edit_themengruppe_path(@themengruppe)} if can? :edit, @themengruppe
@toolbar_elements << {:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('thema.add'), :path=>new_themengruppe_thema_path(@themengruppe)} if can? :new, Themengruppe @toolbar_elements << {:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('thema.add'), :path=>new_themengruppe_thema_path(@themengruppe), :remote=>true} if can? :new, Thema
@toolbar_elements << {:hicon=>'icon-remove-circle',:text=>I18n.t('themengruppe.remove'), :path=>themengruppe_path(@themengruppe), :method=>:delete,:confirm=>I18n.t('themengruppe.sure')} if can? :delete, @themengruppe @toolbar_elements << {:hicon=>'icon-remove-circle',:text=>I18n.t('themengruppe.remove'), :path=>themengruppe_path(@themengruppe), :method=>:delete,:confirm=>I18n.t('themengruppe.sure')} if can? :delete, @themengruppe
end end
def sort_themengruppen def sort_themengruppen

View File

@@ -11,7 +11,7 @@
<ul id="themen" class="sort" > <ul id="themen" class="sort" >
<%= render partial:"themen/verw_liste", object: @themen %> <%= render partial:"themen/verw_liste", object: @themen %>
</ul> </ul>
<%= link_to new_themengruppe_thema_path(@themengruppe),:remote=>true do %> New Thema <% end %>
</div> </div>
<div class="span8"> <div class="span8">
<div id="themaview"></div> <div id="themaview"></div>