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