Sha256: 7ad052bc026463cef72b2a8ac85a75d8c6e8207b7749f4b32c31e989e2e03001

Contents?: true

Size: 404 Bytes

Versions: 9

Compression:

Stored size: 404 Bytes

Contents

class Layouts::Default::Menu < Adva::View::Menu
  include do
    def build
      ul(:id => :menu) do
        site.sections.each do |section|
          item(section.name, url_for(section))
        end
        render_items
      end
    end

    protected

      def active?(url, options)
        return false if url =~ %r(/admin/sites(/\d+)?$) && request.fullpath != url
        super
      end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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