aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2011-05-06 00:28:14 +1200
committerPhilip Arndt <parndt@gmail.com>2011-05-06 00:28:14 +1200
commit45bbd56a51c6793af576198a2e9137cfcb88f30b (patch)
tree1ac678665c257a70e5b11022f519238b6495c118 /app
parente6af3d9c1af4d7d88e041dc65991ab59e33a9fce (diff)
downloadrefinerycms-blog-45bbd56a51c6793af576198a2e9137cfcb88f30b.tar.gz
refinerycms-blog-45bbd56a51c6793af576198a2e9137cfcb88f30b.tar.bz2
refinerycms-blog-45bbd56a51c6793af576198a2e9137cfcb88f30b.zip
Added form fields for SEO and translations.
Diffstat (limited to 'app')
-rw-r--r--app/models/blog_post.rb3
-rw-r--r--app/views/admin/blog/posts/_form.html.erb24
2 files changed, 25 insertions, 2 deletions
diff --git a/app/models/blog_post.rb b/app/models/blog_post.rb
index f95f81a..b738018 100644
--- a/app/models/blog_post.rb
+++ b/app/models/blog_post.rb
@@ -1,8 +1,9 @@
require 'acts-as-taggable-on'
+require 'seo_meta'
class BlogPost < ActiveRecord::Base
- is_seo_meta if self.respond_to?(:is_seo_meta)
+ is_seo_meta
default_scope :order => 'published_at DESC'
#.first & .last will be reversed -- consider a with_exclusive_scope on these?
diff --git a/app/views/admin/blog/posts/_form.html.erb b/app/views/admin/blog/posts/_form.html.erb
index 3c0a351..9d0e0bd 100644
--- a/app/views/admin/blog/posts/_form.html.erb
+++ b/app/views/admin/blog/posts/_form.html.erb
@@ -46,10 +46,32 @@
</li>
<% end %>
</ul>
- <h3><%= t('admin.blog.posts.form.published_at') %></h3>
+ <h3><%= t('.published_at') %></h3>
<%= f.datetime_select :published_at %>
</div>
<div class='hemisquare right_side'>
+ <h2><%= t('.seo') %></h2>
+ <div class='field'>
+ <span class='label_with_help'>
+ <%= f.label :browser_title, t('.seo_override_title') %>
+ <%= refinery_help_tag t('.seo_override_title_help')%>
+ </span>
+ <%= f.text_field :browser_title, :class => 'widest' %>
+ </div>
+ <div class='field'>
+ <span class='label_with_help'>
+ <%= f.label :meta_keywords, t('.meta_keywords_title') %>
+ <%= refinery_help_tag t('.meta_keywords_help') %>
+ </span>
+ <%= f.text_field :meta_keywords, :class => 'widest' %>
+ </div>
+ <div class='field'>
+ <span class='label_with_help'>
+ <%= f.label :meta_description, t('.meta_description_title') %>
+ <%= refinery_help_tag t('.meta_description_help') %>
+ </span>
+ <%= f.text_area :meta_description, :class => 'widest', :rows => 7 %>
+ </div>
</div>
</div>
<%= render :partial => "/shared/admin/form_actions",