Sha256: b464b4463acd9ce42fcf5763ae576cfcd50a252aeb56e1b3305b1ba87c3a8cbf

Contents?: true

Size: 1.02 KB

Versions: 10

Compression:

Stored size: 1.02 KB

Contents

class Layouts::Admin::Header < Minimal::Template
  include do
    def to_html
      render :partial => 'layouts/admin/top'

      div :class => 'header' do
        div :class => 'main' do
        end
        div :class => 'right' do
          right
        end
      end
      
      div :class => 'header' do
        div :class => 'main' do
          menu
        end
        div :class => 'right' do
        end
      end
    end
    
    def breadcrumbs
      div :id => 'breadcrumbs' do
        # breadcrumbs
      end
    end
    
    def menu
      render :partial => "admin/#{controller_name.gsub('_controller', '')}/menu"
    end
    
    def right
      link_to_website
      # language_select
    end
  
    def link_to_website
      site = try(:site)
      link_to(t('.website'), public_url, :id => 'go_to_website') if site && site.persisted?
    end
  
    def language_select
      self << t('.change_language')
      select_tag :lang, options_for_select(I18n.available_locales.map { |l| l.to_s}, I18n.locale.to_s )
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
adva-core-0.0.14 app/views/layouts/admin/_header.rb
adva-core-0.0.13 app/views/layouts/admin/_header.rb
adva-core-0.0.9 app/views/layouts/admin/_header.rb
adva-core-0.0.8 app/views/layouts/admin/_header.rb
adva-core-0.0.7 app/views/layouts/admin/_header.rb
adva-core-0.0.6 app/views/layouts/admin/_header.rb
adva-core-0.0.5 app/views/layouts/admin/_header.rb
adva-core-0.0.4 app/views/layouts/admin/_header.rb
adva-core-0.0.2 app/views/layouts/admin/_header.rb
adva-core-0.0.1 app/views/layouts/admin/_header.rb