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

Version Path
talia_core-0.4.22 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.20 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.19 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.18 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.17 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.16 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.15 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.14 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.13 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.12 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.11 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.10 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.9 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.8 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.7 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.6 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.5 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.4 generators/talia_admin/templates/helpers/admin_helper.rb
talia_core-0.4.3 generators/talia_admin/templates/helpers/admin_helper.rb