Moving Orbit frontend and widget controller to controllers folder
This commit is contained in:
parent
cae3daa9c4
commit
3d9fd359ed
|
@ -1,6 +0,0 @@
|
||||||
class ObitWidgetController< ApplicationController
|
|
||||||
before_filter {|c| c.front_end_available(@app_title)}
|
|
||||||
layout 'production'
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"title": "NewBlog",
|
|
||||||
"version": "0.1",
|
|
||||||
"organization": "Rulingcom",
|
|
||||||
"author": "RD dep",
|
|
||||||
"intro": "A simple blog……",
|
|
||||||
"update_info": "Some info",
|
|
||||||
"create_date": "11-11-2011",
|
|
||||||
"app_pages": ["/panel/blog/front_end/"],
|
|
||||||
"widgets": ["/panel/blog/widget/latest_post","/panel/blog/widget/"]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
class Panel::Blog::FrontEnd::CommentsController < ApplicationController
|
|
||||||
def create
|
|
||||||
@post = Post.find(params[:post_id])
|
|
||||||
@comment = @post.comments.create!(params[:comment])
|
|
||||||
redirect_to panel_blog_front_end_post_url(@post)
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,21 +0,0 @@
|
||||||
class Panel::Blog::FrontEnd::PostsController < ObitWidgetController
|
|
||||||
|
|
||||||
|
|
||||||
def initialize
|
|
||||||
super
|
|
||||||
@app_title = NewBlog::MOUDLEAPP_TITLE
|
|
||||||
end
|
|
||||||
|
|
||||||
# GET /posts
|
|
||||||
# GET /posts.xml
|
|
||||||
|
|
||||||
def index
|
|
||||||
@posts = Post.all
|
|
||||||
end
|
|
||||||
|
|
||||||
def show
|
|
||||||
@post = Post.find(params[:id])
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,18 +0,0 @@
|
||||||
# module NewBlog
|
|
||||||
# class MyEngine < Rails::Engine
|
|
||||||
# # Add a load path for this specific Engine
|
|
||||||
# # config.autoload_paths << File.expand_path("../lib/some/path", __FILE__)
|
|
||||||
# put "ABC"
|
|
||||||
# PrototypeR4::Application::Orbit_Apps << "NewBlog"
|
|
||||||
#
|
|
||||||
# # initializer "my_engine.add_middleware" do |app|
|
|
||||||
# # app.middleware.use MyEngine::Middleware
|
|
||||||
# # end
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# end
|
|
||||||
module NewBlog
|
|
||||||
VERSION = "0.0.1"
|
|
||||||
MOUDLEAPP_TITLE = "NewBlog"
|
|
||||||
end
|
|
||||||
PrototypeR4::Application::Orbit_Apps << "NewBlog"
|
|
|
@ -1,25 +0,0 @@
|
||||||
Rails.application.routes.draw do
|
|
||||||
|
|
||||||
namespace :panel do
|
|
||||||
namespace :blog do
|
|
||||||
namespace :back_end do
|
|
||||||
root :to => "posts#index"
|
|
||||||
resources :posts
|
|
||||||
resources :comments
|
|
||||||
end
|
|
||||||
namespace :front_end do
|
|
||||||
root :to => "posts#index"
|
|
||||||
match "show/:id" => "posts#show" ,:as => :post
|
|
||||||
match "comments" => "comments#create",:as => :comments
|
|
||||||
end
|
|
||||||
namespace :widget do
|
|
||||||
root :to => "posts#index"
|
|
||||||
match "latest_post" => "posts#latest_post"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# match "appfront/blog/front_end/show/:id" => "posts#frontend_show" ,:as => :appfront_blog_show
|
|
||||||
|
|
||||||
match "/appfront/*path" => redirect("/panel/*path")
|
|
||||||
end
|
|
Loading…
Reference in New Issue