Sha256: bf2e6a43efdd981dd3957b0c05aedb876fef940591b13dde8984670a6c94f9b5
Contents?: true
Size: 991 Bytes
Versions: 19
Compression:
Stored size: 991 Bytes
Contents
module AdminHelper def admin_toolbar widget(:toolbar, :buttons => [ ["Home", {:controller => 'source', :action => 'show', :id => 'Lucca'}], ["Admin", {:action => 'index'} ], ["Sources", {:controller => 'admin/sources' }], ["Users", { :controller => 'admin/users'} ], ["Print Page", "javascript:print();"] ] ) end # Returns the title for the whole page. This returns the value # set in the controller, or a default value def page_title @page_title || TaliaCore::SITE_NAME end # Show each <tt>flash</tt> status (<tt>:notice</tt>, <tt>:error</tt>) only if it's present. def show_flash [:notice, :error].collect do |status| %(<div id="#{status}">#{flash[status]}</div>) unless flash[status].nil? end end # Defines the pages that are visible in the menu def active_pages %w(users background sources) # translations not working at the moment, templates not ready for generic use end end
Version data entries
19 entries across 19 versions & 1 rubygems