diff options
author | djones <dgjones@gmail.com> | 2010-09-06 16:22:13 +1200 |
---|---|---|
committer | djones <dgjones@gmail.com> | 2010-09-06 16:22:13 +1200 |
commit | bd50bdb415346329e772a90f26828376a6a1cffb (patch) | |
tree | 3722ac255f4b96a0e4adf8ec2493dfbd002ade68 /config | |
parent | 6f342c1314dfbc8a02a2d4276f6ae7b0bc951661 (diff) | |
download | refinerycms-blog-bd50bdb415346329e772a90f26828376a6a1cffb.tar.gz refinerycms-blog-bd50bdb415346329e772a90f26828376a6a1cffb.tar.bz2 refinerycms-blog-bd50bdb415346329e772a90f26828376a6a1cffb.zip |
refactoring the frontend to use more partials, separate out the categories into it's own controller, namespace the blog into it's own folder and create a base blog controller for handling common front end tasks
Diffstat (limited to 'config')
-rw-r--r-- | config/locales/en.yml | 53 | ||||
-rw-r--r-- | config/routes.rb | 21 |
2 files changed, 44 insertions, 30 deletions
diff --git a/config/locales/en.yml b/config/locales/en.yml index 2cd53dc..9d562d7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -9,17 +9,17 @@ en: edit: Edit this category delete: Delete this category forever index: - no_items_yet: There are no categories yet. Click "{{create}}" to add your first category. + no_items_yet: 'There are no categories yet. Click "{{create}}" to add your first category.' comments: - approved: The comment from '{{author}}' has been approved. + approved: 'The comment from "{{author}}" has been approved.' comment: view_live: View this comment live <br/><em>(opens in a new window)</em> read: Read this comment reject: Reject this comment approve: Approve this comment - rejected: The comment from '{{author}}' has been rejected. + rejected: 'The comment from "{{author}}" has been rejected.' index: - no_items_yet: There are no {{type}} comments. + no_items_yet: 'There are no {{type}} comments.' show: comment: Comment blog_post: Blog Post @@ -38,7 +38,7 @@ en: toggle_advanced_options: Click to access meta tag settings and menu options save_as_draft: Save as Draft index: - no_items_yet: There are no Blog Posts yet. Click "{{create}}" to add your first blog post. + no_items_yet: 'There are no Blog Posts yet. Click "{{create}}" to add your first blog post.' post: view_live: View this blog post live <br/><em>(opens in a new window)</em> edit: Edit this blog post @@ -46,10 +46,10 @@ en: settings: notification_recipients: value: Send notifications to - explanation: Every time someone comments on a blog post, Refinery sends out an email to say there is a new comment. - hint: When a new comment is added, Refinery will send an email notification to you. + explanation: 'Every time someone comments on a blog post, Refinery sends out an email to say there is a new comment.' + hint: 'When a new comment is added, Refinery will send an email notification to you.' example: "Enter your email address(es) like: jack@work.com, jill@office.com" - updated: Notification recipients have been set to '{{recipients}}' + updated: 'Notification recipients have been set to "{{recipients}}"' submenu: categories: title: Categories @@ -69,20 +69,31 @@ en: title: Settings moderation: Moderation update_notified: Update who gets notified - blog_posts: - side_bar: - categories: Categories - index: - read_more: Read more - show: + blog: + shared: + categories: + title: Categories + posts: + other: Other Posts + created_at: 'Posted on {{when}}' + read_more: Read more comments: - title: Comments - by: Posted by {{who}} + singular: comment + none: no comments + categories: + show: + no_posts: There are no posts here yet. + posts: + comment: comment + comment: + by: 'Posted by {{who}}' time_ago: '{{time}} ago' thank_you: 'Thank you for commenting.' thank_you_moderated: 'Thank you for commenting. Your message has been placed in the moderation queue and will appear shortly.' - other: Other Blog Posts - filed_in: Filed in - created_at_title: Publishing Date - created_at: Posted on {{when}} - submit: Send comment + show: + comments: + title: Comments + add: Make a Comment + other: Other Blog Posts + filed_in: Filed in + submit: Send comment
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 70406de..f21fbba 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,9 +1,11 @@ if Rails.version < '3.0.0' ActionController::Routing::Routes.draw do |map| - map.blog_post '/blog', :controller => :blog_posts, :action => :index - map.blog_post '/blog/:id', :controller => :blog_posts, :action => :show - map.blog_category '/blog/categories/:category_id', :controller => :blog_posts, :action => :index - map.blog_post_blog_comments '/blog/:id/comments', :controller => :blog_posts, :action => :comment + map.namespace(:blog) do |blog| + blog.root :controller => "posts", :action => 'index' + blog.post '/blog/:id', :controller => "posts", :action => 'show' + blog.category '/blog/categories/:id', :controller => "categories", :action => 'show' + blog.post_blog_comments '/blog/:id/comments', :controller => 'posts', :action => 'comment' + end map.namespace(:admin, :path_prefix => 'refinery') do |admin| admin.namespace :blog do |blog| @@ -28,11 +30,12 @@ if Rails.version < '3.0.0' end else Refinery::Application.routes.draw do - match '/blog', :to => 'blog_posts#index', :as => 'blog_post' - match '/blog/:id', :to => 'blog_posts#show', :as => 'blog_post' - - match '/blog/categories/:category_id', :to => 'blog_posts#index', :as => 'blog_category' - match '/blog/:id/comments', :to => 'blog_posts#comment', :as => 'blog_post_blog_comments' + scope(:path => 'blog') do + root :to => 'posts#index' + match ':id', :to => 'posts#show', :as => 'post' + match 'categories/:id', :to => 'categories#show', :as => 'category' + match ':id/comments', :to => 'posts#comment', :as => 'post_blog_comments' + end scope(:path => 'refinery', :as => 'admin', :module => 'admin') do scope(:path => 'blog', :name_prefix => 'admin', :as => 'blog', :module => 'blog') do |