Sha256: 18081e95ebe1e5653a2844c32753f1e547b393a69746bf25015538032f0d1a07

Contents?: true

Size: 841 Bytes

Versions: 41

Compression:

Stored size: 841 Bytes

Contents

module Sunrise
  module ApplicationHelper
    def manage_icon(image, options = {})
      options = { :alt => t(image, :scope => 'manage.icons'), :title => t(image, :scope => 'manage.icons') }.merge(options)
      image_tag("sunrise/ico_#{image}.gif", options)
    end
    
    def manage_render_header(options={})
      action = controller.action_name
      action = 'new' if action == 'create'
      action = 'edit' if action == 'update'
    
      partials = options[:partials] || []
      partials << "sunrise/#{controller.controller_name}/header_#{action}"
      partials << "sunrise/#{controller.controller_name}/header"
      partials << "sunrise/shared/header"
      
      partials.each do |pname|
        return render(:partial => pname) if lookup_context.exists?(pname, [], true)
      end
      
      return ''
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
sunrise-cms-1.0.6 app/helpers/sunrise/application_helper.rb
sunrise-cms-1.0.5 app/helpers/sunrise/application_helper.rb
sunrise-cms-1.0.4 app/helpers/sunrise/application_helper.rb
sunrise-cms-1.0.3 app/helpers/sunrise/application_helper.rb
sunrise-cms-1.0.2 app/helpers/sunrise/application_helper.rb
sunrise-cms-1.0.1 app/helpers/sunrise/application_helper.rb
sunrise-cms-1.0.0 app/helpers/sunrise/application_helper.rb
sunrise-cms-1.0.0.rc3 app/helpers/sunrise/application_helper.rb
sunrise-cms-1.0.0.rc2 app/helpers/sunrise/application_helper.rb
sunrise-cms-1.0.0.rc1 app/helpers/sunrise/application_helper.rb
sunrise-cms-0.7.0.rc2 app/helpers/sunrise/application_helper.rb
sunrise-cms-0.7.0.rc1 app/helpers/sunrise/application_helper.rb
sunrise-cms-0.6.11 app/helpers/sunrise/application_helper.rb
sunrise-cms-0.6.10 app/helpers/sunrise/application_helper.rb
sunrise-cms-0.6.9 app/helpers/sunrise/application_helper.rb
sunrise-cms-0.6.8 app/helpers/sunrise/application_helper.rb
sunrise-cms-0.6.7 app/helpers/sunrise/application_helper.rb
sunrise-cms-0.6.6 app/helpers/sunrise/application_helper.rb
sunrise-cms-0.6.5 app/helpers/sunrise/application_helper.rb
sunrise-cms-0.6.4 app/helpers/sunrise/application_helper.rb