From 8a4cffae8fcd92b2447e5c034111ff947e37ec3c Mon Sep 17 00:00:00 2001 From: ihower Date: Wed, 13 Apr 2011 18:46:15 +0800 Subject: [PATCH] Remove files which should be deleted in previous commit --- .../admin/components_controller.rb | 54 -- app/controllers/announcements_controller.rb | 29 - .../panel/announcements_controller.rb | 49 -- app/helpers/admin/user_attributes_helper.rb | 2 - app/helpers/announcements_helper.rb | 2 - app/helpers/pages_helper.rb | 2 - app/models/announcement.rb | 13 - app/models/assets/asset_image.rb | 3 - app/models/assets/asset_javascript.rb | 3 - app/models/assets/asset_pdf.rb | 2 - app/models/assets/asset_stylesheet.rb | 3 - app/models/component.rb | 22 - app/views/admin/components/_form.html.erb | 32 - app/views/admin/components/edit.html.erb | 10 - app/views/admin/components/new.html.erb | 11 - app/views/panel/announcements/_form.html.erb | 44 -- app/views/panel/announcements/edit.html.erb | 14 - app/views/panel/announcements/index.html.erb | 21 - app/views/panel/announcements/new.html.erb | 13 - config/initializers/mongo.rb | 28 - lib/reroute_middleware.rb | 29 - lib/template/about.page.en | 1 - lib/template/about.page.zh_tw | 1 - lib/template/footer.snippet.en | 1 - lib/template/footer.snippet.zh_tw | 1 - lib/template/locale.snippet.en | 4 - lib/template/locale.snippet.zh_tw | 4 - lib/template/nav.snippet.en | 4 - lib/template/nav.snippet.zh_tw | 4 - lib/template/root.layout.en | 25 - lib/template/root.layout.zh_tw | 25 - lib/template/root.page.en | 1 - lib/template/root.page.zh_tw | 1 - vendor/plugins/liquid/CHANGELOG | 44 -- vendor/plugins/liquid/History.txt | 44 -- vendor/plugins/liquid/MIT-LICENSE | 20 - vendor/plugins/liquid/Manifest.txt | 34 -- vendor/plugins/liquid/README.txt | 38 -- vendor/plugins/liquid/Rakefile | 24 - .../liquid/example/server/example_servlet.rb | 37 -- .../liquid/example/server/liquid_servlet.rb | 28 - .../plugins/liquid/example/server/server.rb | 12 - .../example/server/templates/index.liquid | 6 - .../example/server/templates/products.liquid | 45 -- vendor/plugins/liquid/init.rb | 8 - .../plugins/liquid/lib/extras/liquid_view.rb | 51 -- vendor/plugins/liquid/lib/liquid.rb | 68 --- vendor/plugins/liquid/lib/liquid/block.rb | 97 ---- vendor/plugins/liquid/lib/liquid/condition.rb | 120 ---- vendor/plugins/liquid/lib/liquid/context.rb | 232 -------- vendor/plugins/liquid/lib/liquid/document.rb | 17 - vendor/plugins/liquid/lib/liquid/drop.rb | 51 -- vendor/plugins/liquid/lib/liquid/errors.rb | 11 - .../plugins/liquid/lib/liquid/extensions.rb | 56 -- .../plugins/liquid/lib/liquid/file_system.rb | 62 -- vendor/plugins/liquid/lib/liquid/htmltags.rb | 74 --- vendor/plugins/liquid/lib/liquid/module_ex.rb | 62 -- .../liquid/lib/liquid/standardfilters.rb | 209 ------- vendor/plugins/liquid/lib/liquid/strainer.rb | 51 -- vendor/plugins/liquid/lib/liquid/tag.rb | 26 - .../plugins/liquid/lib/liquid/tags/assign.rb | 33 -- .../plugins/liquid/lib/liquid/tags/capture.rb | 35 -- vendor/plugins/liquid/lib/liquid/tags/case.rb | 83 --- .../plugins/liquid/lib/liquid/tags/comment.rb | 9 - .../plugins/liquid/lib/liquid/tags/cycle.rb | 59 -- vendor/plugins/liquid/lib/liquid/tags/for.rb | 136 ----- vendor/plugins/liquid/lib/liquid/tags/if.rb | 79 --- .../liquid/lib/liquid/tags/ifchanged.rb | 20 - .../plugins/liquid/lib/liquid/tags/include.rb | 55 -- .../plugins/liquid/lib/liquid/tags/unless.rb | 33 -- vendor/plugins/liquid/lib/liquid/template.rb | 146 ----- vendor/plugins/liquid/lib/liquid/variable.rb | 49 -- vendor/plugins/liquid/liquid.gemspec | 29 - vendor/plugins/liquid/test/assign_test.rb | 11 - vendor/plugins/liquid/test/block_test.rb | 58 -- vendor/plugins/liquid/test/condition_test.rb | 109 ---- vendor/plugins/liquid/test/context_test.rb | 480 --------------- vendor/plugins/liquid/test/drop_test.rb | 162 ------ .../liquid/test/error_handling_test.rb | 89 --- .../plugins/liquid/test/extra/breakpoint.rb | 547 ------------------ vendor/plugins/liquid/test/extra/caller.rb | 80 --- .../plugins/liquid/test/file_system_test.rb | 30 - vendor/plugins/liquid/test/filter_test.rb | 95 --- vendor/plugins/liquid/test/helper.rb | 20 - vendor/plugins/liquid/test/html_tag_test.rb | 31 - vendor/plugins/liquid/test/if_else_test.rb | 150 ----- .../plugins/liquid/test/include_tag_test.rb | 115 ---- vendor/plugins/liquid/test/module_ex_test.rb | 89 --- vendor/plugins/liquid/test/output_test.rb | 121 ---- .../liquid/test/parsing_quirks_test.rb | 41 -- vendor/plugins/liquid/test/regexp_test.rb | 40 -- vendor/plugins/liquid/test/security_test.rb | 41 -- .../liquid/test/standard_filter_test.rb | 161 ------ .../plugins/liquid/test/standard_tag_test.rb | 404 ------------- vendor/plugins/liquid/test/statements_test.rb | 137 ----- vendor/plugins/liquid/test/strainer_test.rb | 21 - vendor/plugins/liquid/test/template_test.rb | 26 - vendor/plugins/liquid/test/test_helper.rb | 20 - .../plugins/liquid/test/unless_else_test.rb | 27 - vendor/plugins/liquid/test/variable_test.rb | 135 ----- 100 files changed, 5991 deletions(-) delete mode 100644 app/controllers/admin/components_controller.rb delete mode 100644 app/controllers/announcements_controller.rb delete mode 100644 app/controllers/panel/announcements_controller.rb delete mode 100644 app/helpers/admin/user_attributes_helper.rb delete mode 100644 app/helpers/announcements_helper.rb delete mode 100644 app/helpers/pages_helper.rb delete mode 100644 app/models/announcement.rb delete mode 100644 app/models/assets/asset_image.rb delete mode 100644 app/models/assets/asset_javascript.rb delete mode 100644 app/models/assets/asset_pdf.rb delete mode 100644 app/models/assets/asset_stylesheet.rb delete mode 100644 app/models/component.rb delete mode 100644 app/views/admin/components/_form.html.erb delete mode 100644 app/views/admin/components/edit.html.erb delete mode 100644 app/views/admin/components/new.html.erb delete mode 100644 app/views/panel/announcements/_form.html.erb delete mode 100644 app/views/panel/announcements/edit.html.erb delete mode 100644 app/views/panel/announcements/index.html.erb delete mode 100644 app/views/panel/announcements/new.html.erb delete mode 100644 config/initializers/mongo.rb delete mode 100644 lib/reroute_middleware.rb delete mode 100644 lib/template/about.page.en delete mode 100644 lib/template/about.page.zh_tw delete mode 100644 lib/template/footer.snippet.en delete mode 100644 lib/template/footer.snippet.zh_tw delete mode 100644 lib/template/locale.snippet.en delete mode 100644 lib/template/locale.snippet.zh_tw delete mode 100644 lib/template/nav.snippet.en delete mode 100644 lib/template/nav.snippet.zh_tw delete mode 100644 lib/template/root.layout.en delete mode 100644 lib/template/root.layout.zh_tw delete mode 100644 lib/template/root.page.en delete mode 100644 lib/template/root.page.zh_tw delete mode 100644 vendor/plugins/liquid/CHANGELOG delete mode 100644 vendor/plugins/liquid/History.txt delete mode 100644 vendor/plugins/liquid/MIT-LICENSE delete mode 100644 vendor/plugins/liquid/Manifest.txt delete mode 100644 vendor/plugins/liquid/README.txt delete mode 100755 vendor/plugins/liquid/Rakefile delete mode 100644 vendor/plugins/liquid/example/server/example_servlet.rb delete mode 100644 vendor/plugins/liquid/example/server/liquid_servlet.rb delete mode 100644 vendor/plugins/liquid/example/server/server.rb delete mode 100644 vendor/plugins/liquid/example/server/templates/index.liquid delete mode 100644 vendor/plugins/liquid/example/server/templates/products.liquid delete mode 100644 vendor/plugins/liquid/init.rb delete mode 100644 vendor/plugins/liquid/lib/extras/liquid_view.rb delete mode 100644 vendor/plugins/liquid/lib/liquid.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/block.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/condition.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/context.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/document.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/drop.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/errors.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/extensions.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/file_system.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/htmltags.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/module_ex.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/standardfilters.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/strainer.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/tag.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/tags/assign.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/tags/capture.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/tags/case.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/tags/comment.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/tags/cycle.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/tags/for.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/tags/if.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/tags/ifchanged.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/tags/include.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/tags/unless.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/template.rb delete mode 100644 vendor/plugins/liquid/lib/liquid/variable.rb delete mode 100644 vendor/plugins/liquid/liquid.gemspec delete mode 100644 vendor/plugins/liquid/test/assign_test.rb delete mode 100644 vendor/plugins/liquid/test/block_test.rb delete mode 100644 vendor/plugins/liquid/test/condition_test.rb delete mode 100644 vendor/plugins/liquid/test/context_test.rb delete mode 100644 vendor/plugins/liquid/test/drop_test.rb delete mode 100644 vendor/plugins/liquid/test/error_handling_test.rb delete mode 100755 vendor/plugins/liquid/test/extra/breakpoint.rb delete mode 100755 vendor/plugins/liquid/test/extra/caller.rb delete mode 100644 vendor/plugins/liquid/test/file_system_test.rb delete mode 100644 vendor/plugins/liquid/test/filter_test.rb delete mode 100644 vendor/plugins/liquid/test/helper.rb delete mode 100644 vendor/plugins/liquid/test/html_tag_test.rb delete mode 100644 vendor/plugins/liquid/test/if_else_test.rb delete mode 100644 vendor/plugins/liquid/test/include_tag_test.rb delete mode 100644 vendor/plugins/liquid/test/module_ex_test.rb delete mode 100644 vendor/plugins/liquid/test/output_test.rb delete mode 100644 vendor/plugins/liquid/test/parsing_quirks_test.rb delete mode 100644 vendor/plugins/liquid/test/regexp_test.rb delete mode 100644 vendor/plugins/liquid/test/security_test.rb delete mode 100644 vendor/plugins/liquid/test/standard_filter_test.rb delete mode 100644 vendor/plugins/liquid/test/standard_tag_test.rb delete mode 100644 vendor/plugins/liquid/test/statements_test.rb delete mode 100644 vendor/plugins/liquid/test/strainer_test.rb delete mode 100644 vendor/plugins/liquid/test/template_test.rb delete mode 100644 vendor/plugins/liquid/test/test_helper.rb delete mode 100644 vendor/plugins/liquid/test/unless_else_test.rb delete mode 100644 vendor/plugins/liquid/test/variable_test.rb diff --git a/app/controllers/admin/components_controller.rb b/app/controllers/admin/components_controller.rb deleted file mode 100644 index 07abc711..00000000 --- a/app/controllers/admin/components_controller.rb +++ /dev/null @@ -1,54 +0,0 @@ -class Admin::ComponentsController < ApplicationController - - layout "admin" - before_filter :authenticate_user! - before_filter :find_parent_item - - def show - #TODO - end - - def new - @component = Component.new - @component.is_published = true - @component.parent_name = @parent_item.name - - @component.engine_name = 'Announcement' # only support Announcement now - end - - def edit - @component = Component.find(params[:id]) - end - - def create - @component = Component.new(params[:component]) - - if @component.save - flash[:notice] = 'Component was successfully created.' - redirect_to admin_items_url( :parent_name => @component.parent_name ) - else - render :action => "new" - end - end - - def update - @component = Component.find(params[:id]) - - if @component.update_attributes(params[:component]) - flash[:notice] = 'Component was successfully updated.' - redirect_to admin_items_url( :parent_name => @component.parent_name ) - else - render :action => "edit" - end - end - - def destroy - @component = Component.find(params[:id]) - @component.destroy - - #TODO: destroy engine data - - redirect_to admin_items_url( :parent_name => @component.parent_name ) - end - -end diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb deleted file mode 100644 index 2ba3ad56..00000000 --- a/app/controllers/announcements_controller.rb +++ /dev/null @@ -1,29 +0,0 @@ -class AnnouncementsController < ApplicationController - - def index - @announcements = Announcement.all( :conditions => { :entry_name => params[:entry_name] }) - - respond_to do |format| - format.html { - @page = Page.find_by_name( 'announcement_index') - @page_options = { "announcements" => @announcements.map{ |a| a.to_liquid } } - render_liquid_page - } - format.xml { render :xml => @announcements } - end - end - - def show - @announcement = Announcement.find(params[:id]) - - respond_to do |format| - format.html{ - @page = Page.find_by_name( 'announcement_show') - @page_options = { 'announcement' => @announcement.to_liquid } - render_liquid_page - } - format.xml { render :xml => @announcement } - end - end - -end diff --git a/app/controllers/panel/announcements_controller.rb b/app/controllers/panel/announcements_controller.rb deleted file mode 100644 index 9bbcc051..00000000 --- a/app/controllers/panel/announcements_controller.rb +++ /dev/null @@ -1,49 +0,0 @@ -class Panel::AnnouncementsController < ApplicationController - - before_filter :require_entry_name, :only => [:index, :new] - - layout "admin" - - def index - @announcements = Announcement.all( :conditions => { :entry_name => params[:entry_name] }) - end - - def new - @announcement = Announcement.new - @announcement.entry_name = params[:entry_name] - end - - def edit - @announcement = Announcement.find(params[:id]) - end - - def create - @announcement = Announcement.new(params[:announcement]) - - if @announcement.save - flash[:notice] = 'Announcement was successfully created.' - redirect_to panel_announcements_path( :entry_name => @announcement.entry_name ) - else - render :action => "new" - end - end - - def update - @announcement = Announcement.find(params[:id]) - - if @announcement.update_attributes(params[:announcement]) - flash[:notice] = 'Announcement was successfully updated.' - redirect_to panel_announcements_path( :entry_name => @announcement.entry_name ) - else - render :action => "edit" - end - end - - def destroy - @announcement = Announcement.find(params[:id]) - @announcement.destroy - - redirect_to panel_announcements_path( :entry_name => @announcement.entry_name ) - end - -end diff --git a/app/helpers/admin/user_attributes_helper.rb b/app/helpers/admin/user_attributes_helper.rb deleted file mode 100644 index c60beabb..00000000 --- a/app/helpers/admin/user_attributes_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Admin::UserAttributesHelper -end diff --git a/app/helpers/announcements_helper.rb b/app/helpers/announcements_helper.rb deleted file mode 100644 index beb2d039..00000000 --- a/app/helpers/announcements_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module AnnouncementsHelper -end diff --git a/app/helpers/pages_helper.rb b/app/helpers/pages_helper.rb deleted file mode 100644 index 2c057fd0..00000000 --- a/app/helpers/pages_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module PagesHelper -end diff --git a/app/models/announcement.rb b/app/models/announcement.rb deleted file mode 100644 index e708ce98..00000000 --- a/app/models/announcement.rb +++ /dev/null @@ -1,13 +0,0 @@ -class Announcement - - include MongoMapper::Document - - key :component_name, String, :required => true, :index => true - key_i18n :title, String - key_i18n :content, String - - def to_liquid - { "component_name" => self.entry_name, "id" => self.id.to_s, "title" => self.title, "content" => self.content } - end - -end \ No newline at end of file diff --git a/app/models/assets/asset_image.rb b/app/models/assets/asset_image.rb deleted file mode 100644 index 1dba508e..00000000 --- a/app/models/assets/asset_image.rb +++ /dev/null @@ -1,3 +0,0 @@ -class AssetImage < Asset - -end \ No newline at end of file diff --git a/app/models/assets/asset_javascript.rb b/app/models/assets/asset_javascript.rb deleted file mode 100644 index 5d14b9f3..00000000 --- a/app/models/assets/asset_javascript.rb +++ /dev/null @@ -1,3 +0,0 @@ -class AssetJavascript < Asset - -end \ No newline at end of file diff --git a/app/models/assets/asset_pdf.rb b/app/models/assets/asset_pdf.rb deleted file mode 100644 index 457f438d..00000000 --- a/app/models/assets/asset_pdf.rb +++ /dev/null @@ -1,2 +0,0 @@ -class AssetPdf < Asset -end \ No newline at end of file diff --git a/app/models/assets/asset_stylesheet.rb b/app/models/assets/asset_stylesheet.rb deleted file mode 100644 index f04f37ca..00000000 --- a/app/models/assets/asset_stylesheet.rb +++ /dev/null @@ -1,3 +0,0 @@ -class AssetStylesheet < Asset - -end \ No newline at end of file diff --git a/app/models/component.rb b/app/models/component.rb deleted file mode 100644 index c74ea4c0..00000000 --- a/app/models/component.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Component < Item - - include LayoutSupport - - key :engine_name, String - key :layout_name, String, :required => true - key :layout_id, ObjectId, :required => true - - belongs_to :layout - - protected - - def setup_default_value - super - - if self.layout_name - self.layout_id = Layout.find_by_name( self.layout_name ).id - end - - end - -end \ No newline at end of file diff --git a/app/views/admin/components/_form.html.erb b/app/views/admin/components/_form.html.erb deleted file mode 100644 index ef8a4d56..00000000 --- a/app/views/admin/components/_form.html.erb +++ /dev/null @@ -1,32 +0,0 @@ -<%= f.error_messages %> -<%= f.hidden_field :parent_name %> - -

-<%= f.label :name, "Name" %> -<%= f.text_field :name, :class => 'text' %> -

- -

-<%= f.label :title, "Title en" %> -<%= f.text_field :title_en, :class => 'text' %> -

- -

-<%= f.label :layout_name, "Layout Name" %> -<%= f.select :layout_name, Layout.all.map{ |l| [l.description, l.name] } %> -

- -

-<%= f.label :title, "Title zh_tw" %> -<%= f.text_field :title_zh_tw, :class => 'text' %> -

- -

-<%= f.label :is_published, "Is Published" %> -<%= f.radio_button :is_published, true %>Yes <%= f.radio_button :is_published, false %> No -

- -

-<%= f.label :engine_name, "Choose Engine" %> -<%= f.text_field :engine_name %> -

\ No newline at end of file diff --git a/app/views/admin/components/edit.html.erb b/app/views/admin/components/edit.html.erb deleted file mode 100644 index 6d1e73b1..00000000 --- a/app/views/admin/components/edit.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -

Editing pages

- -<% form_for @component, :url => admin_component_path(@component) do |f| %> - - <%= render :partial => "form", :locals => { :f => f } %> - -

- <%= f.submit 'Update' %> -

-<% end %> \ No newline at end of file diff --git a/app/views/admin/components/new.html.erb b/app/views/admin/components/new.html.erb deleted file mode 100644 index 237d22fc..00000000 --- a/app/views/admin/components/new.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -

<%= t(:new_component, :scope => :admin) %>

- -<% form_for @component, :url => admin_components_path do |f| %> - - <%= render :partial => "form", :locals => { :f => f } %> - -

- <%= f.submit 'Create' %> -

- -<% end %> \ No newline at end of file diff --git a/app/views/panel/announcements/_form.html.erb b/app/views/panel/announcements/_form.html.erb deleted file mode 100644 index ace3e853..00000000 --- a/app/views/panel/announcements/_form.html.erb +++ /dev/null @@ -1,44 +0,0 @@ -<%= f.hidden_field :entry_name %> - -

-<%= f.label "title_zh_tw", "Title (zh_tw)" %> -<%= f.text_field "title_zh_tw" %> -

- -

Edit english

- -

-<%= f.label "title_en", "Title (en)" %> -<%= f.text_field "title_en" %> -

- -<% content_for :page_specific_javascript do %> - -<% end -%> - - -

-<%= f.label "content_zh_tw", "Content (zh_tw)" %> -<%= f.text_area "content_zh_tw", :size => '100x30' %> -

- -

Edit english

- -

-<%= f.label "content_en", "Content (en)" %> -<%= f.text_area "content_en", :size => '100x30' %> -

- -<% content_for :page_specific_javascript do %> - -<% end -%> \ No newline at end of file diff --git a/app/views/panel/announcements/edit.html.erb b/app/views/panel/announcements/edit.html.erb deleted file mode 100644 index 00ce99be..00000000 --- a/app/views/panel/announcements/edit.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -

Editing announcement

- -<% form_for @announcement, :url => panel_announcement_path(@announcement) do |f| %> - <%= f.error_messages %> - - <%= render :partial => "form", :locals => { :f => f } %> - -

- <%= f.submit 'Update' %> -

-<% end %> - -<%= link_to 'Show', @announcement %> | -<%= link_to 'Back', panel_announcements_path %> \ No newline at end of file diff --git a/app/views/panel/announcements/index.html.erb b/app/views/panel/announcements/index.html.erb deleted file mode 100644 index 2d1d1c20..00000000 --- a/app/views/panel/announcements/index.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -

Listing announcements

- - - - - - - -<% @announcements.each do |announcement| %> - - - - -<% end %> -
TitleActions
<%=h announcement.title %><%= link_to 'Show', announcement_path(announcement) %> | - <%= link_to 'Edit', edit_panel_announcement_path(announcement) %> | - <%= link_to 'Destroy', panel_announcement_path(announcement), :confirm => 'Are you sure?', :method => :delete %>
- -
- -<%= link_to 'New announcement', new_panel_announcement_path( :entry_name => params[:entry_name] ) %> \ No newline at end of file diff --git a/app/views/panel/announcements/new.html.erb b/app/views/panel/announcements/new.html.erb deleted file mode 100644 index 207aef11..00000000 --- a/app/views/panel/announcements/new.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -

New announcement

- -<% form_for @announcement, :url => panel_announcements_path do |f| %> - <%= f.error_messages %> - - <%= render :partial => "form", :locals => { :f => f } %> - -

- <%= f.submit 'Create' %> -

-<% end %> - -<%= link_to 'Back', panel_announcements_path %> \ No newline at end of file diff --git a/config/initializers/mongo.rb b/config/initializers/mongo.rb deleted file mode 100644 index 78b4c26f..00000000 --- a/config/initializers/mongo.rb +++ /dev/null @@ -1,28 +0,0 @@ -MongoMapper.connection = Mongo::Connection.new('localhost', 27017) -MongoMapper.database = "r4-#{Rails.env}" - -if defined?(PhusionPassenger) - PhusionPassenger.on_event(:starting_worker_process) do |forked| - MongoMapper.connection.connect_to_master if forked - end -end - -module MongoMapper::Document::ClassMethods - - def key_i18n(key, *options) - VALID_LOCALES.each do |locale| - key "#{key.to_s}_#{locale}".to_sym, *options - end - - define_method(key) do - self.send("#{key.to_s}_#{I18n.locale}") - end - - define_method("#{key}=") do |value| - VALID_LOCALES.each do |locale| - self.send("#{key.to_s}_#{locale}=", value) - end - end - end - -end \ No newline at end of file diff --git a/lib/reroute_middleware.rb b/lib/reroute_middleware.rb deleted file mode 100644 index 1f7f79e0..00000000 --- a/lib/reroute_middleware.rb +++ /dev/null @@ -1,29 +0,0 @@ -class RerouteMiddleware - - def initialize(app) - @app = app - end - - def call(env) - - #Rails.logger.debug env.to_yaml - return @app.call(env) if env['REQUEST_URI'] =~ /^\/admin/ - - env['REQUEST_URI'] =~ /^\/([0-9a-zA-Z\-_\/]*)/ - parsed_entry_name = $1 - - entry = Item.first(:conditions => {:full_name => parsed_entry_name} ) - if entry - case entry.type.to_s - when 'Component' - env['REQUEST_URI'] = env['REQUEST_URI'].sub!(parsed_entry_name, entry.engine_name) - env['QUERY_STRING'] = (env['QUERY_STRING'].blank?)? "entry_name=#{parsed_entry_name}" : "entry_name=#{parsed_entry_name}&#{env['QUERY_STRING']}" - when 'Link' - return [301, {'Location' => entry.url }, ['See Ya!']] - end - end - - @app.call(env) - end - -end diff --git a/lib/template/about.page.en b/lib/template/about.page.en deleted file mode 100644 index 2b081c45..00000000 --- a/lib/template/about.page.en +++ /dev/null @@ -1 +0,0 @@ -

About us

\ No newline at end of file diff --git a/lib/template/about.page.zh_tw b/lib/template/about.page.zh_tw deleted file mode 100644 index d2ecbd83..00000000 --- a/lib/template/about.page.zh_tw +++ /dev/null @@ -1 +0,0 @@ -

關於我們

\ No newline at end of file diff --git a/lib/template/footer.snippet.en b/lib/template/footer.snippet.en deleted file mode 100644 index 1486284b..00000000 --- a/lib/template/footer.snippet.en +++ /dev/null @@ -1 +0,0 @@ -

Footer

\ No newline at end of file diff --git a/lib/template/footer.snippet.zh_tw b/lib/template/footer.snippet.zh_tw deleted file mode 100644 index d8b078c7..00000000 --- a/lib/template/footer.snippet.zh_tw +++ /dev/null @@ -1 +0,0 @@ -

頁尾

\ No newline at end of file diff --git a/lib/template/locale.snippet.en b/lib/template/locale.snippet.en deleted file mode 100644 index 490dd3a5..00000000 --- a/lib/template/locale.snippet.en +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/lib/template/locale.snippet.zh_tw b/lib/template/locale.snippet.zh_tw deleted file mode 100644 index 490dd3a5..00000000 --- a/lib/template/locale.snippet.zh_tw +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/lib/template/nav.snippet.en b/lib/template/nav.snippet.en deleted file mode 100644 index 94d35a67..00000000 --- a/lib/template/nav.snippet.en +++ /dev/null @@ -1,4 +0,0 @@ -