Sha256: 4a8684d257a31771d13bc6bd6690a7505b8cd194cbbc3efb8d1e023daa259a83

Contents?: true

Size: 1.47 KB

Versions: 3

Compression:

Stored size: 1.47 KB

Contents

run 'mkdir app/views/admin/shared'

create_file 'app/views/admin/shared/_header.html.haml' do
<<-HAML

.navbar.navbar-fixed-top
  .navbar-inner
    .container
      %a.btn.btn-navbar{ "data-target" => ".nav-collapse", "data-toggle" => "collapse" }
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      %a.brand{ href: root_path } #{app_name.humanize}
      .nav-collapse
        =render partial: 'shared/top_navigation'
  HAML
end

create_file 'app/views/admin/shared/_flash_messages.html.haml' do
<<-HAML
- flash.each do |key, value|
  .alert{ class: "alert-" + key.to_s }
    %button{ type: "button", class: "close", "data-dismiss" => "alert"}
      &times;
    = value
  HAML
end

create_file 'app/views/admin/shared/_footer.html.haml' do
  <<-HAML
  HAML
end

create_file 'app/views/admin/shared/_navigation_menu.html.haml' do
<<-HAML
%ul.nav
  = nav_link "Dashboard", admin_root_path
HAML
end

run 'rm app/views/layouts/admin.html.erb'
create_file 'app/views/layouts/admin.html.haml' do
<<-HAML
!!! 5
%html{ lang: I18n.locale }
  %head
    %meta{ charset: 'utf-8'}
    %title #{app_name.humanize} - AdminPanel
    %link{ rel: "shortcut icon", href: "/favicon.ico" }
    = csrf_meta_tag
    = stylesheet_link_tag "admin"

  %body{ "data-locale" => I18n.locale }

    =render partial: 'admin/shared/header'

    .container
      =render partial: 'admin/shared/flash_messages'

      = yield

    = javascript_include_tag "admin"

    //= debug params if Rails.env.development?
HAML
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails-maker-0.1.11 templates/default/lib/admin/layout.rb
rails-maker-0.1.9 templates/default/lib/admin/layout.rb
rails-maker-0.1.7 templates/default/lib/admin/layout.rb