Sha256: e710abd0aa9251102111f1c769aa30eebb3eba48e99c23236e17f39066b63220

Contents?: true

Size: 504 Bytes

Versions: 1

Compression:

Stored size: 504 Bytes

Contents

require 'pagy'
module CmAdmin
  module ViewHelpers
    module NavigationHelper
      include Pagy::Frontend
      def sidebar_navigation
        CmAdmin.cm_admin_models.map { |model|
          path = CmAdmin::Engine.mount_path + '/' + model.name.underscore.pluralize
          "<a href=#{path}><div class='menu-item'>
            <span class='menu-icon'><i class='fa fa-th-large'></i></span>
            #{model.name}
          </div></a>".html_safe
        }.join.html_safe
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cm-admin-0.3.0 lib/cm_admin/view_helpers/navigation_helper.rb