Browse Source

Moving Netzke Admin view to Panel controller

*Moved custom_netzke_helpers code to panel.js
*Added panel controller and index and netzke layout
denney-fix-saving-dates
Jason Denney 11 years ago
parent
commit
a84b0e0fe7
  1. 1
      app/assets/javascripts/application.js
  2. 0
      app/assets/javascripts/panel.js
  3. 7
      app/controllers/panel_controller.rb
  4. 2
      app/controllers/site_controller.rb
  5. 11
      app/views/layouts/netzke.html.haml
  6. 2
      config/routes.rb

1
app/assets/javascripts/application.js

@ -12,4 +12,3 @@
// //
//= require jquery //= require jquery
//= require jquery_ujs //= require jquery_ujs
//= require custom_netzke_helpers

0
app/assets/javascripts/custom_netzke_helpers.js → app/assets/javascripts/panel.js

7
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

2
app/controllers/site_controller.rb

@ -1,7 +1,5 @@
class SiteController < ApplicationController class SiteController < ApplicationController
def index def index
render :inline => "<%= netzke :app_view, :layout => true %>", :layout => "application"
end end
end end

11
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]

2
config/routes.rb

@ -4,6 +4,8 @@ Velocipede::Application.routes.draw do
netzke netzke
root :to => 'site#index' root :to => 'site#index'
get 'admin/index' => 'panel#index', :as => "admin_index"
########################### ###########################
# API Routes # API Routes
scope 'api', :module => :api do scope 'api', :module => :api do

Loading…
Cancel
Save