aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/blog_comment.rb7
-rw-r--r--app/models/blog_post.rb2
-rw-r--r--app/views/admin/blog/posts/_form.html.erb52
-rw-r--r--app/views/admin/blog/posts/_form.js.erb19
-rw-r--r--app/views/admin/blog/posts/_form_part.html.erb3
-rw-r--r--app/views/blog/posts/_comment.html.erb5
-rw-r--r--app/views/blog/posts/_post.html.erb4
-rw-r--r--app/views/blog/posts/tagged.html.erb2
-rw-r--r--app/views/blog/shared/_post.html.erb4
-rw-r--r--app/views/blog/shared/_tags.html.erb2
-rw-r--r--changelog.md8
-rw-r--r--config/locales/cs.yml7
-rw-r--r--config/locales/de.yml9
-rw-r--r--config/locales/en.yml29
-rw-r--r--config/locales/es.yml7
-rw-r--r--config/locales/fr.yml40
-rw-r--r--config/locales/it.yml7
-rw-r--r--config/locales/nl.yml7
-rw-r--r--config/locales/pl.yml7
-rw-r--r--config/locales/pt-BR.yml7
-rw-r--r--config/locales/ru.yml7
-rw-r--r--config/locales/sk.yml7
-rw-r--r--config/locales/zh-CN.yml7
-rw-r--r--features/authors.feature2
-rw-r--r--features/tags.feature2
-rw-r--r--lib/gemspec.rb6
-rw-r--r--lib/refinery/blog/tabs.rb28
-rw-r--r--lib/refinery/blog/version.rb4
-rw-r--r--lib/refinerycms-blog.rb7
-rw-r--r--public/stylesheets/refinerycms-blog.css5
-rw-r--r--readme.md4
-rw-r--r--refinerycms-blog.gemspec11
32 files changed, 172 insertions, 146 deletions
diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb
index 13aceb1..6216cc2 100644
--- a/app/models/blog_comment.rb
+++ b/app/models/blog_comment.rb
@@ -19,6 +19,13 @@ class BlogComment < ActiveRecord::Base
scope :approved, :conditions => {:state => 'approved'}
scope :rejected, :conditions => {:state => 'rejected'}
+ def avatar_url(options = {})
+ options = {:size => 60}
+ require 'digest/md5'
+ size = ("?s=#{options[:size]}" if options[:size])
+ "http://gravatar.com/avatar/#{Digest::MD5.hexdigest(self.email.to_s.strip.downcase)}#{size}.jpg"
+ end
+
def approve!
self.update_attribute(:state, 'approved')
end
diff --git a/app/models/blog_post.rb b/app/models/blog_post.rb
index d287c6f..c1b8973 100644
--- a/app/models/blog_post.rb
+++ b/app/models/blog_post.rb
@@ -26,6 +26,8 @@ class BlogPost < ActiveRecord::Base
:approximate_ascii => RefinerySetting.find_or_set(:approximate_ascii, false, :scoping => 'blog'),
:strip_non_ascii => RefinerySetting.find_or_set(:strip_non_ascii, false, :scoping => 'blog')
+ attr_accessible :title, :body, :tag_list, :draft, :published_at, :browser_title, :meta_keywords, :meta_description, :user_id
+
scope :by_archive, lambda { |archive_date|
where(['published_at between ? and ?', archive_date.beginning_of_month, archive_date.end_of_month])
}
diff --git a/app/views/admin/blog/posts/_form.html.erb b/app/views/admin/blog/posts/_form.html.erb
index 9d0e0bd..7d95052 100644
--- a/app/views/admin/blog/posts/_form.html.erb
+++ b/app/views/admin/blog/posts/_form.html.erb
@@ -11,8 +11,33 @@
</div>
<div class='field'>
- <%= f.label :body -%>
- <%= f.text_area :body, :rows => 20, :class => 'wymeditor widest' -%>
+ <div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
+ <ul id='page_parts'>
+ <li class='ui-state-default'>
+ <%= link_to "Body", "#page_part_body" %>
+ </li>
+ <% Refinery::Blog.tabs.each_with_index do |tab, tab_index| %>
+ <li class='ui-state-default' id="custom_<%= tab.name %>_tab">
+ <%= link_to tab.name.titleize, "#custom_tab_#{tab_index}" %>
+ </li>
+ <% end %>
+ </ul>
+
+ <div id='page_part_editors'>
+
+ <% part_index = -1 %>
+ <%= render :partial => 'form_part',
+ :locals => {
+ :f => f,
+ :part_index => (part_index += 1),
+ } -%>
+ <% Refinery::Blog.tabs.each_with_index do |tab, tab_index| %>
+ <div class='page_part' id='<%= "custom_tab_#{tab_index}" %>'>
+ <%= render :partial => tab.partial, :locals => {:f => f} %>
+ </div>
+ <% end %>
+ </div>
+ </div>
</div>
<div class='field'>
@@ -50,28 +75,7 @@
<%= 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>
+ <%= render :partial => '/seo_meta/form', :locals => {:form => f} %>
</div>
</div>
<%= render :partial => "/shared/admin/form_actions",
diff --git a/app/views/admin/blog/posts/_form.js.erb b/app/views/admin/blog/posts/_form.js.erb
index 1d65448..1c030b4 100644
--- a/app/views/admin/blog/posts/_form.js.erb
+++ b/app/views/admin/blog/posts/_form.js.erb
@@ -1,13 +1,16 @@
<script>
- $(document).ready(function(){
- $('#toggle_advanced_options').click(function(e){
- e.preventDefault();
+ (function($) {
+ $(document).ready(function(){
+ $('#toggle_advanced_options').click(function(e){
+ e.preventDefault();
- $('#more_options').animate({opacity: 'toggle', height: 'toggle'}, 250);
+ $('#more_options').animate({opacity: 'toggle', height: 'toggle'}, 250);
- $('html,body').animate({
- scrollTop: $('#toggle_advanced_options').parent().offset().top
- }, 250);
+ $('html,body').animate({
+ scrollTop: $('#toggle_advanced_options').parent().offset().top
+ }, 250);
+ });
});
- });
+ $('#page-tabs').tabs();
+ })(jQuery);
</script>
diff --git a/app/views/admin/blog/posts/_form_part.html.erb b/app/views/admin/blog/posts/_form_part.html.erb
new file mode 100644
index 0000000..114e493
--- /dev/null
+++ b/app/views/admin/blog/posts/_form_part.html.erb
@@ -0,0 +1,3 @@
+<div class='page_part' id='page_part_body'>
+ <%= f.text_area :body, :rows => 20, :class => 'wymeditor widest' -%>
+</div>
diff --git a/app/views/blog/posts/_comment.html.erb b/app/views/blog/posts/_comment.html.erb
index 71eab30..17b2002 100644
--- a/app/views/blog/posts/_comment.html.erb
+++ b/app/views/blog/posts/_comment.html.erb
@@ -1,7 +1,6 @@
<article class='blog_comment_message' id='<%= "comment-#{comment.to_param}" %>'>
- <p>
- <%= simple_format auto_link(comment.message.to_s) %>
- </p>
+ <%= image_tag comment.avatar_url, :alt => comment.name, :class => 'avatar' %>
+ <%= simple_format auto_link(comment.message.to_s) %>
<footer class='blog_comment_author'>
<p>
<%= t('blog.posts.comments.by', :who => comment.name) %>,
diff --git a/app/views/blog/posts/_post.html.erb b/app/views/blog/posts/_post.html.erb
index f589a33..e5aabdb 100644
--- a/app/views/blog/posts/_post.html.erb
+++ b/app/views/blog/posts/_post.html.erb
@@ -8,8 +8,8 @@
<h1><%= @blog_post.title %></h1>
<details>
<time datetime="<%=l @blog_post.published_at.to_date, :format => :default %>" class='posted_at'>
- <%= t('blog.shared.posts.created_at', :when => l(@blog_post.published_at.to_date, :format => :short)) %>.
- </time><%= " by #{@blog_post.author.username}" if @blog_post.author.present? %>
+ <%= t('blog.shared.posts.created_at', :when => l(@blog_post.published_at.to_date, :format => :short)) %>
+ </time><%= "#{t('blog.posts.show.by')} #{@blog_post.author.username}" if @blog_post.author.present? %>.
<% if (categories = @blog_post.categories).any? %>
<aside class='filed_in'>
<%= t('blog.posts.show.filed_in') %>
diff --git a/app/views/blog/posts/tagged.html.erb b/app/views/blog/posts/tagged.html.erb
index 29de791..904150f 100644
--- a/app/views/blog/posts/tagged.html.erb
+++ b/app/views/blog/posts/tagged.html.erb
@@ -1,4 +1,4 @@
-<% content_for :body_content_title, "Posts tagged &#8220;#{@tag_name.titleize}&#8221;".html_safe -%>
+<% content_for :body_content_title, "#{t('.posts_tagged')} &#8220;#{@tag_name.titleize}&#8221;".html_safe -%>
<% content_for :body_content_left do %>
<% if @blog_posts.any? %>
diff --git a/app/views/blog/shared/_post.html.erb b/app/views/blog/shared/_post.html.erb
index 716c1ad..05c6af2 100644
--- a/app/views/blog/shared/_post.html.erb
+++ b/app/views/blog/shared/_post.html.erb
@@ -4,8 +4,8 @@
<h1><%= link_to post.title, blog_post_url(post) %></h1>
<details>
<time datetime="<%=l post.published_at.to_date, :format => :default %>" class='posted_at'>
- <%= t('blog.shared.posts.created_at', :when => l(post.published_at.to_date, :format => :short)) %>.
- </time><%= " by #{post.author.username}" if post.author.present? %>
+ <%= t('blog.shared.posts.created_at', :when => l(post.published_at.to_date, :format => :short)) %>
+ </time><%= "#{t('blog.shared.posts.by')} #{post.author.username}" if post.author.present? %>.
<% if (categories = post.categories).any? %>
<aside class='filed_in'>
<%= t('filed_in', :scope => 'blog.posts.show') %>
diff --git a/app/views/blog/shared/_tags.html.erb b/app/views/blog/shared/_tags.html.erb
index f8833f1..140e60e 100644
--- a/app/views/blog/shared/_tags.html.erb
+++ b/app/views/blog/shared/_tags.html.erb
@@ -1,4 +1,4 @@
-<% unless @tags.nil? %>
+<% if @tags.any? %>
<h2><%= t('.title') %></h2>
<nav id='tags'>
<% tag_cloud(@tags, %w(tag1 tag2 tag3 tag4)) do |tag, css_class| %>
diff --git a/changelog.md b/changelog.md
index e861958..1851d2d 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,9 @@
-## 1.4 [UNRELEASED]
+## 1.5 [28 May 2011]
+
+* Added Gravatar support. [parndt](https://github.com/parndt)
+* Added support for Refinery CMS 1.0.0 and above. [parndt](https://github.com/parndt)
+
+## 1.4 [26 May 2011]
* Spanish language fixes [scambra](https://github.com/scambra)
* Bug fixes [scambra](https://github.com/scambra)
@@ -6,6 +11,7 @@
* Tagged posts route / view [joemsak](https://github.com/joemsak)
* Tag cloud in sidebar
* Czech & slovak translations [karem](https://github.com/keram)
+* SEO fields and migration [parndt](https://github.com/parndt) [ugisozols](https://github.com/ugisozols)
* [See full list](https://github.com/resolve/refinerycms-blog/compare/1.3...1.4)
## 1.3 [03 March 2011]
diff --git a/config/locales/cs.yml b/config/locales/cs.yml
index aee745c..8d8d81d 100644
--- a/config/locales/cs.yml
+++ b/config/locales/cs.yml
@@ -38,13 +38,6 @@ cs:
toggle_advanced_options: Klikni pro přístup k nastavením meta tagů a menu
save_as_draft: Uložit jako koncept
published_at: Datum publikování
- seo: Optimalizace pro vyhledávače
- seo_override_title: Titulek prohlížeče
- seo_override_title_help: Vložte titulek délky 5-10 slov, který vystihuje obsah článek.
- meta_keywords_title: Klíčová slova
- meta_keywords_help: Vložte 5-10 klíčových slov oddělených čárkou, které se vztahují k obsahu článek.
- meta_description_title: Popisek
- meta_description_help: Vložte 2-3 krátké věty shrnující obsah článek.
index:
no_items_yet: 'Nejsou žádné články na blogu. Klikni na "%{create}" pro přidání prvního.'
uncategorized:
diff --git a/config/locales/de.yml b/config/locales/de.yml
index bd47a11..b7927f6 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -38,13 +38,6 @@ de:
toggle_advanced_options: 'Klicken, um auf Meta-Tag-Einstellungen und Menüoptionen zuzugreifen'
save_as_draft: Als Entwurf speichern
published_at: Veröffentlichungsdatum
- seo: Suchmaschinenoptimierung
- seo_override_title: Browsertitel
- seo_override_title_help: Geben Sie einen 5-10 Wörter langen Titel an, den der Inhalt der Seite beschreibt.
- meta_keywords_title: Meta-Schlüsselwörter
- meta_keywords_help: Geben Sie 5-10 Schlüsselwörter für diese Seite an. Trennen Sie Schlüsselwörter mit einem Komma.
- meta_description_title: Meta-Beschreibung
- meta_description_help: Beschreiben Sie in knappen zwei oder drei Sätzen, um was es sich bei dieser Seite handelt.
index:
no_items_yet: 'Es sind noch keine Artikel vorhanden. Klicken Sie auf "%{create}", um Ihren ersten Artikel hinzuzufügen.'
uncategorized:
@@ -108,6 +101,8 @@ de:
singular: Kommentar
none: Keine Kommentare
archives: Archiv
+ tags:
+ title: Kategorien
categories:
show:
no_posts: Es sind noch keine Artikel vorhanden.
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 4bfc962..eb886a9 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -38,13 +38,6 @@ en:
toggle_advanced_options: Click to access meta tag settings and menu options
save_as_draft: Save as Draft
published_at: Publish Date
- seo: Search Engine Optimization
- seo_override_title: Browser title
- seo_override_title_help: Enter a 5-10 word title that summarizes the contents of this post.
- meta_keywords_title: Meta keywords
- meta_keywords_help: Enter 5-10 keywords that relate to this post. Separate keywords by a comma.
- meta_description_title: Meta description
- meta_description_help: Enter a concise two or three sentences describing what this post is about.
index:
no_items_yet: 'There are no Blog Posts yet. Click "%{create}" to add your first blog post.'
uncategorized:
@@ -133,8 +126,28 @@ en:
filed_in: Filed in
tagged: Tagged
submit: Send comment
+ name: Name
+ email: Email
+ message: Message
+ by: by
tagged:
no_blog_articles_yet: There are no blog articles posted yet. Stay tuned.
+ posts_tagged: Posts tagged
archive:
blog_archive_for: 'Blog Archive for %{date}'
- no_blog_articles_posted: 'There are no blog articles posted for %{date}. Stay tuned.'
+ no_blog_articles_posted: 'There are no blog articles posted for %{date}. Stay tuned.'
+ activerecord:
+ models:
+ blog_category: Category
+ blog_comment: Comment
+ blog_post: Blog post
+ attributes:
+ blog_category:
+ title: Title
+ blog_comment:
+ name: Name
+ email: Email
+ message: Message
+ blog_post:
+ title: Title
+ body: Body \ No newline at end of file
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 4191195..bd9c383 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -38,13 +38,6 @@ es:
toggle_advanced_options: Click para acceder a las opciones de menú y etiquetas
save_as_draft: Guardar Borrador
published_at: Fecha de publicación
- seo: Optimización para motores de búsqueda (SEO)
- seo_override_title: Título del navegador
- seo_override_title_help: Introduce un título de 5-10 palabras que resuma los contenidos de la entrada.
- meta_keywords_title: Palabras clave (meta keyboards)
- meta_keywords_help: Introduce 5-10 palabras clave relacionadas con esta entrada, separadas por comas.
- meta_description_title: Meta-descripción
- meta_description_help: Describe en dos o tres frases de qué tema trata esta entrada.
index:
no_items_yet: 'Aún no hay entradas en el Blog. Haz click en "%{create}" para añadir el primero'
uncategorized:
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 9817b4f..272be07 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -38,15 +38,10 @@ fr:
toggle_advanced_options: Cliquez ici pour accéder aux paramêtres des meta-tags et au menu des options
save_as_draft: Enregistrer comme Brouillon
published_at: Date de publication
- seo: Optimisations pour les moteurs de recherche (SEO)
- seo_override_title: Titre du navigateur
- seo_override_title_help: Entrez entre 5 et 10 mots qui résument votre article.
- meta_keywords_title: Mots clefs
- meta_keywords_help: Entrez entre 5 et 10 mots clefs en relation avec votre article (Séparer les mots clefs par des virgules).
- meta_description_title: Description
- meta_description_help: Entrez deux ou trois phrases concises décrivants le sujet de votre article.
index:
no_items_yet: 'Il n''y a aucun article pour l''instant. Cliquez sur "%{create}" pour ajouter votre premier article.'
+ uncategorized:
+ no_items_yet: 'Il n''y a aucun article non catégorisé.'
post:
view_live_html: 'Voir cet article sur le site<br/><em>(Ouvre une nouvelle fenêtre)</em>'
edit: Modifier cet article
@@ -74,6 +69,7 @@ fr:
title: Articles
manage: Gérer les articles
new: Créer un nouvel article
+ uncategorized: Aricles non catégorisés
settings:
title: Paramêtres
moderation: Modération
@@ -95,16 +91,19 @@ fr:
categories:
title: Catégories
rss_feed:
- title: RSS Feed
+ title: Flux RSS
subscribe: Souscrire
posts:
other: Autres articles
created_at: 'Écrit le %{when}'
read_more: Lire la suite
+ by: 'par'
comments:
singular: commentaire
none: aucun commentaire
archives: Archives
+ tags:
+ title: "Mots clés"
categories:
show:
no_posts: 'Il n''y a aucun article pour cette catégorie.'
@@ -126,7 +125,30 @@ fr:
add: Ajouter un commentaire
other: Autres articles
filed_in: Classé dans
+ tagged: Taggé
submit: Envoyer le commentaire
+ name: Nom
+ email: Email
+ message: Message
+ by: par
+ tagged:
+ no_blog_articles_yet: "Il n'y a aucun article pour l'instant. Restez en alerte."
+ posts_tagged: Articles taggés
archive:
blog_archive_for: 'Archive du blog pour le %{date}'
- no_blog_articles_posted: "Il n'y a aucun article pour la date du %{date}. Restez à l'écoute."
+ no_blog_articles_posted: "Il n'y a aucun article pour la date du %{date}. Restez en alerte."
+ activerecord:
+ models:
+ blog_category: Categorie
+ blog_comment: Commentaire
+ blog_post: Article
+ attributes:
+ blog_category:
+ title: Titre
+ blog_comment:
+ name: Nom
+ email: Email
+ message: Message
+ blog_post:
+ title: Titre
+ body: Corps
diff --git a/config/locales/it.yml b/config/locales/it.yml
index 1e4cdcd..24023b6 100644
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -38,13 +38,6 @@ it:
toggle_advanced_options: Clicca per accedere alle impostationi dei meta tag e del menu
save_as_draft: Salva come Bozza
published_at: Data di Pubblicazione
- seo: Ottimizzazione Motori di Ricerca
- seo_override_title: Titolo del Browser
- seo_override_title_help: È possibile inserire un testo per il titolo della barra del browser che sovrascriverà il valore predefinito
- meta_keywords_title: Parole chiave
- meta_keywords_help: Inserisci 5-10 parole chiave che riguardano questa messaggio, separate da una virgola.
- meta_description_title: Descrizione
- meta_description_help: Inserire due o tre frasi concise che descrivono questa messaggio.
index:
no_items_yet: 'Non ci sono ancora Messaggi per questo Blog. Clicca "%{create}" per aggiungere il tuo primo messaggio.'
post:
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index f551670..7a48408 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -38,13 +38,6 @@ nl:
toggle_advanced_options: Klik voor toegang tot meta tag instellingen en menu opties
save_as_draft: Sla op als concept
published_at: Publicatiedatum
- seo: Zoekmachine optimalisatie
- seo_override_title: Browser titel
- seo_override_title_help: Als u de standaard titel van het browservenster wilt wijzigen, kunt u hier een alternatief invullen.
- meta_keywords_title: Meta zoekwoorden
- meta_keywords_help: Voeg 5 tot 10 meta zoekwoorden toe. Gebruik een komma om de zoekwoorden te scheiden.
- meta_description_title: Meta omschrijving
- meta_description_help: Voer een compacte (twee a drie zinnen) pagina beschrijving in.
index:
no_items_yet: 'Er zijn momenteel geen blogposts. Klik op "%{create}" om uw eerste blogpost toe te voegen.'
uncategorized:
diff --git a/config/locales/pl.yml b/config/locales/pl.yml
index 7ff9309..5a9fe9d 100644
--- a/config/locales/pl.yml
+++ b/config/locales/pl.yml
@@ -44,13 +44,6 @@ pl:
toggle_advanced_options: 'Kliknij, aby zarządzać meta-ustawieniami'
save_as_draft: Zapisz jako szkic
published_at: Data publikacji
- seo: Optymalizacja dla wyszukiwarek
- seo_override_title: Tytuł w przeglądarce
- seo_override_title_help: Wpisz 5-10 słów które podsumowują zawartość tej strony.
- meta_keywords_title: Słowa kluczowe meta
- meta_keywords_help: Wpisz 5-10 słów kluczowych związanych z zawartością tej strony. Rozdziel słowa kluczowe przecinkiem.
- meta_description_title: Opis meta
- meta_description_help: Podaj dwu-trzyzdaniowy opis tego, o czym jest ta strona.
index:
no_items_yet: 'Na blogu nie ma jeszcze żadnych wpisów. Kliknij "%{create}" aby dodać pierwszy post.'
uncategorized:
diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml
index dff2133..706f34c 100644
--- a/config/locales/pt-BR.yml
+++ b/config/locales/pt-BR.yml
@@ -38,13 +38,6 @@ pt-BR:
toggle_advanced_options: Clique aqui para acessar as configurações de meta tag e menu
save_as_draft: Salvar como rascunho
published_at: Data de publicação
- seo: Otimização de Motor de Busca
- seo_override_title: Título para a busca
- seo_override_title_help: Digite de 5 a 10 palvras pequenas que resumem o conteúdo desta página.
- meta_keywords_title: Palavras-chave
- meta_keywords_help: Digite de 5 a 10 palavras-chave presentes nesta página. Separe elas com vírgula.
- meta_description_title: Meta descrição
- meta_description_help: Digite duas ou três sentenças concisas descrevendo sobre o que é essa página.
index:
no_items_yet: 'Ainda não há Posts no Blog. Clique em "%{create}" para adicionar o primeiro post.'
uncategorized:
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index 351bcdb..98b22fc 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -38,13 +38,6 @@ ru:
toggle_advanced_options: 'Нажмите, чтобы получить доступ к настройкам мета-тегов и меню'
save_as_draft: Сохранить как черновик
published_at: Дата публикации
- seo: Поисковая оптимизация
- seo_override_title: Заголовок браузера
- seo_override_title_help: "Введите заголовок из 5&ndash;10 слов, которые описывают текст на этой странице."
- meta_keywords_title: Ключевые слова
- meta_keywords_help: "Введите 5&ndash;10 ключевых слов, которые относятся к этой странице, разделяя запятой."
- meta_description_title: Описание
- meta_description_help: "Введите два-три коротких предложения, описывающих страницу."
index:
no_items_yet: 'Записи в блоге отстутствуют. Нажмите "%{create}", чтобы добавить первую запись.'
post:
diff --git a/config/locales/sk.yml b/config/locales/sk.yml
index 3542278..fea514d 100644
--- a/config/locales/sk.yml
+++ b/config/locales/sk.yml
@@ -38,13 +38,6 @@ sk:
toggle_advanced_options: Klikni pre prístup k nastaveniam meta tagov a menu
save_as_draft: Uložiť ako koncept
published_at: Dátum publikovania
- seo: Optimalizácia pre vyhľadávanie
- seo_override_title: Titulok prehliadača
- seo_override_title_help: Vložte titulok dĺžky 5-10 slov, ktorý vystihuje obsah stránky.
- meta_keywords_title: Kľúčové slová (Meta keywords)
- meta_keywords_help: Vložte 5-10 kľúčových slov oddelených čiarkou, ktoré sa vzťahujú k obsahu stránky.
- meta_description_title: Popis (Meta description)
- meta_description_help: Vložte 2-3 krátke vety sumarizujúce obsah stránky.
index:
no_items_yet: 'Niesu žiadne články na blogu. Klikni na "%{create}" pre pridanie prvého.'
uncategorized:
diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml
index 36c8528..a3cafe5 100644
--- a/config/locales/zh-CN.yml
+++ b/config/locales/zh-CN.yml
@@ -38,13 +38,6 @@ zh-CN:
toggle_advanced_options: 点击进入标签详解设置和菜单选项
save_as_draft: 保存为草稿
published_at: 发布日期
- seo: 搜索引擎优化
- seo_override_title: 浏览标题
- seo_override_title_help: 输入 5 到 10 个字的标题去概括这个页面的内容.
- meta_keywords_title: Meta 关键字
- meta_keywords_help: 输入 5 到 10 个与这个页面有关的关键字. 用逗号分开每个关键字.
- meta_description_title: Meta 说明
- meta_description_help: 简洁地输入两三句话来介绍这个页面.
index:
no_items_yet: '目前尚未发博。 点击 "%{create}" 添加您的第一篇博文。'
uncategorized:
diff --git a/features/authors.feature b/features/authors.feature
index 0e17e32..f3fd3ec 100644
--- a/features/authors.feature
+++ b/features/authors.feature
@@ -8,7 +8,7 @@ Feature: Blog Post Authors
When I am on the new blog post form
And I fill in "Title" with "This is my blog post"
- And I fill in "Body" with "And I love it"
+ And I fill in "blog_post_body" with "And I love it"
And I press "Save"
Then there should be 1 blog post
diff --git a/features/tags.feature b/features/tags.feature
index 05d6028..24dff2a 100644
--- a/features/tags.feature
+++ b/features/tags.feature
@@ -12,7 +12,7 @@ Feature: Blog Post Tags
Scenario: The blog post new/edit form saves tag_list
When I am on the new blog post form
And I fill in "Title" with "This is my blog post"
- And I fill in "Body" with "And I love it"
+ And I fill in "blog_post_body" with "And I love it"
And I fill in "Tags" with "chicago, bikes, beers, babes"
And I press "Save"
diff --git a/lib/gemspec.rb b/lib/gemspec.rb
index e347890..25f9157 100644
--- a/lib/gemspec.rb
+++ b/lib/gemspec.rb
@@ -19,10 +19,10 @@ Gem::Specification.new do |s|
s.require_paths = %w(lib)
# Runtime dependencies
- s.add_dependency 'refinerycms-core', '~> 1.0.0'
- s.add_dependency 'filters_spam', '~> 0.2'
+ s.add_dependency 'refinerycms-core', '~> 1.0.0'
+ s.add_dependency 'filters_spam', '~> 0.2'
s.add_dependency 'acts-as-taggable-on'
- s.add_dependency 'seo_meta', '~> 1.0.6'
+ s.add_dependency 'seo_meta', '~> 1.1.0'
# Development dependencies
s.add_development_dependency 'factory_girl'
diff --git a/lib/refinery/blog/tabs.rb b/lib/refinery/blog/tabs.rb
new file mode 100644
index 0000000..083d50b
--- /dev/null
+++ b/lib/refinery/blog/tabs.rb
@@ -0,0 +1,28 @@
+module Refinery
+ module Blog
+ attr_accessor :tabs
+
+ def self.tabs
+ @tabs ||= []
+ end
+
+ class Tab
+ attr_accessor :name, :partial
+
+ def self.register(&block)
+ tab = self.new
+
+ yield tab
+
+ raise "A tab MUST have a name!: #{tab.inspect}" if tab.name.blank?
+ raise "A tab MUST have a partial!: #{tab.inspect}" if tab.partial.blank?
+ end
+
+ protected
+
+ def initialize
+ ::Refinery::Blog.tabs << self # add me to the collection of registered page tabs
+ end
+ end
+ end
+end \ No newline at end of file
diff --git a/lib/refinery/blog/version.rb b/lib/refinery/blog/version.rb
index 6365f94..3899eeb 100644
--- a/lib/refinery/blog/version.rb
+++ b/lib/refinery/blog/version.rb
@@ -2,8 +2,8 @@ module Refinery
module Blog
class Version
@major = 1
- @minor = 4
- @tiny = 0
+ @minor = 5
+ @tiny = 2
class << self
attr_reader :major, :minor, :tiny
diff --git a/lib/refinerycms-blog.rb b/lib/refinerycms-blog.rb
index 901535d..407b840 100644
--- a/lib/refinerycms-blog.rb
+++ b/lib/refinerycms-blog.rb
@@ -2,8 +2,9 @@ require 'filters_spam'
module Refinery
module Blog
-
autoload :Version, File.expand_path('../refinery/blog/version', __FILE__)
+ autoload :Tab, File.expand_path("../refinery/blog/tabs", __FILE__)
+
class << self
def version
::Refinery::Blog::Version.to_s
@@ -15,6 +16,10 @@ module Refinery
app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public"
end
+ config.to_prepare do
+ require File.expand_path('../refinery/blog/tabs', __FILE__)
+ end
+
config.after_initialize do
Refinery::Plugin.register do |plugin|
plugin.name = "refinerycms_blog"
diff --git a/public/stylesheets/refinerycms-blog.css b/public/stylesheets/refinerycms-blog.css
index 73a4e42..ef6f224 100644
--- a/public/stylesheets/refinerycms-blog.css
+++ b/public/stylesheets/refinerycms-blog.css
@@ -1,6 +1,7 @@
+.blog_post header, .blog_post footer {
+ width: auto;
+}
.blog_post .posted_at{
- display:block;
- margin:0 0 10px;
}
.post_categories .filed_in {
display: inline;
diff --git a/readme.md b/readme.md
index d8a07c5..c8b8e3a 100644
--- a/readme.md
+++ b/readme.md
@@ -11,13 +11,13 @@ Options:
## Requirements
-Refinery CMS version 0.9.8 or above.
+Refinery CMS version 1.0.0 or above.
## Install
Open up your ``Gemfile`` and add at the bottom this line:
- gem 'refinerycms-blog', '~> 1.3'
+ gem 'refinerycms-blog', '~> 1.5'
Now, run ``bundle install``
diff --git a/refinerycms-blog.gemspec b/refinerycms-blog.gemspec
index 8070b15..b645f83 100644
--- a/refinerycms-blog.gemspec
+++ b/refinerycms-blog.gemspec
@@ -1,8 +1,8 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-blog}
- s.version = %q{1.4.0}
+ s.version = %q{1.5.2}
s.description = %q{A really straightforward open source Ruby on Rails blog engine designed for integration with RefineryCMS.}
- s.date = %q{2011-05-05}
+ s.date = %q{2011-05-28}
s.summary = %q{Ruby on Rails blogging engine for RefineryCMS.}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com/blog}
@@ -10,10 +10,10 @@ Gem::Specification.new do |s|
s.require_paths = %w(lib)
# Runtime dependencies
- s.add_dependency 'refinerycms-core', '>= 0.9.9.1'
- s.add_dependency 'filters_spam', '~> 0.2'
+ s.add_dependency 'refinerycms-core', '~> 1.0.0'
+ s.add_dependency 'filters_spam', '~> 0.2'
s.add_dependency 'acts-as-taggable-on'
- s.add_dependency 'seo_meta', '~> 1.0.6'
+ s.add_dependency 'seo_meta', '~> 1.1.0'
# Development dependencies
s.add_development_dependency 'factory_girl'
@@ -113,6 +113,7 @@ Gem::Specification.new do |s|
db/migrate/1_create_blog_structure.rb
db/migrate/2_add_user_id_to_blog_posts.rb
db/migrate/3_acts_as_taggable_on_migration.rb
+ db/migrate/4_create_seo_meta_for_blog.rb
db/seeds
db/seeds/refinerycms_blog.rb
features