forked from bofh/fetsite
fixed toolbar helper
This commit is contained in:
@@ -20,8 +20,10 @@ class StudienController < ApplicationController
|
||||
modulgruppen =[]
|
||||
modulgruppen_phase.each_slice(opts[:slice]) do |s| modulgruppen<<s end
|
||||
@studienphasen << {:modulgruppen=>modulgruppen, :phase => ph}.merge(opts)
|
||||
toolbar_elements=[ link_to('<i class="icon-plus"'.html_safe + I18n.t('studien.new') , new_modul_path)]
|
||||
end
|
||||
@toolbar_elements=[{:text => '<i class="icon-plus"></i> '.html_safe + I18n.t('studien.new') , :path => new_modul_path() }]
|
||||
@toolbar_elements<<{:text => '<i class="icon-pencil"></i> '.html_safe + I18n.t('common.edit'),:path=>edit_studium_path(@studium)}
|
||||
#@toolbar_elements<<{:text ='<i class="icon-cross"></i> '.html_safe +I18n.t('common.delete'),path => delete_studium_path(@studium)}
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
|
||||
@@ -9,7 +9,7 @@ module ApplicationHelper
|
||||
def toolbar_html(elemente)
|
||||
html = ""
|
||||
elemente.each do |e|
|
||||
html =html + e + " | "
|
||||
html = html + link_to(e[:text],e[:path]) + " | "
|
||||
end
|
||||
#html= html + "</ul>"
|
||||
raw(html)
|
||||
|
||||
@@ -25,8 +25,9 @@
|
||||
<%= link_to '<i class="icon-plus-sign"></i>'.html_safe+I18n.t("studien.newmodulgroup"), new_studium_modulgruppe_path(@studium),:class=>"btn" %> |
|
||||
<%= link_to '<i class="icon-pencil"></i>'.html_safe+I18n.t("common.edit"), edit_studium_path(@studium) ,:class=>"btn"%>
|
||||
<%= link_to 'Destroy', @studium, method: :delete, data: { confirm: 'Are you sure?' } %>
|
||||
<%= toolbar_html(toolbar_elements) %>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<%= toolbar_html(@toolbar_elements) %>
|
||||
|
||||
Reference in New Issue
Block a user