diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 7cec09e..fb7cad7 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,4 +12,3 @@ // //= require jquery //= require jquery_ujs -//= require custom_netzke_helpers diff --git a/app/assets/javascripts/custom_netzke_helpers.js b/app/assets/javascripts/panel.js similarity index 100% rename from app/assets/javascripts/custom_netzke_helpers.js rename to app/assets/javascripts/panel.js diff --git a/app/controllers/panel_controller.rb b/app/controllers/panel_controller.rb new file mode 100644 index 0000000..097d1de --- /dev/null +++ b/app/controllers/panel_controller.rb @@ -0,0 +1,7 @@ +class PanelController < ApplicationController + + def index + render :inline => "<%=netzke :app_view, :layout => true %>", :layout => "netzke" + end + +end diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 0263ee0..9004665 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -1,7 +1,5 @@ class SiteController < ApplicationController def index - render :inline => "<%= netzke :app_view, :layout => true %>", :layout => "application" end - end diff --git a/app/views/layouts/netzke.html.haml b/app/views/layouts/netzke.html.haml new file mode 100644 index 0000000..e7db693 --- /dev/null +++ b/app/views/layouts/netzke.html.haml @@ -0,0 +1,11 @@ +!!! 5 +%html{:lang => "en"} + %head + %meta{:charset => "utf-8"}/ + %title= content_for?(:title) ? yield(:title) : "Velocipede" + = load_netzke + = csrf_meta_tags + %body + = yield + = javascript_include_tag "application" + = javascript_include_tag params[:controller] diff --git a/config/routes.rb b/config/routes.rb index 1e005fb..ecc2dec 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,6 +4,8 @@ Velocipede::Application.routes.draw do netzke root :to => 'site#index' + get 'admin/index' => 'panel#index', :as => "admin_index" + ########################### # API Routes scope 'api', :module => :api do