Compare commits

...
Sign in to create a new pull request.

49 commits

Author SHA1 Message Date
Jeena Paradies
d34735e1de added swedish translation 2012-06-14 15:45:40 +02:00
Uģis Ozols
91114fd837 Refinery::I18n won't be optional in 2.1.x. 2012-06-06 12:01:30 +03:00
Uģis Ozols
81dd47e649 Merge pull request #243 from ryandeussing/master
Hide 'read more' link when it is not needed
2012-06-06 01:59:29 -07:00
Ryan Deussing
30ea168afd Don't show 'read more' link in situations where the full post is already displayed because there is no teaser. 2012-06-05 00:48:54 -03:00
Philip Arndt
976b607ff5 Merge pull request #238 from GeekOnCoffee/fix_count
Adding Finder Method to utilize count
2012-05-19 20:03:36 -07:00
Andrew Hooker
4e8e714099 Removing redundant live method 2012-05-19 21:45:34 -05:00
Philip Arndt
0bb265521c Merge pull request #237 from GeekOnCoffee/eliminate_ternary
Eliminate Ternary
2012-05-19 19:37:59 -07:00
Andrew Hooker
67a177fbb1 Adding Finder Method to utilize count 2012-05-19 21:07:58 -05:00
Rob Yurkowski
f4b647cc93 Merge pull request #236 from GeekOnCoffee/refactor_post_by_archive
Rename ::by_archive to ::to_month for clarity's sake.
2012-05-19 19:06:50 -07:00
Andrew Hooker
c72d5d65f6 Eliminate Ternary 2012-05-19 21:03:36 -05:00
Andrew Hooker
ccf9c0e5c0 Adding Deprecation Version 2012-05-19 20:52:59 -05:00
Andrew Hooker
92d5455d94 Using Standard Refinery Deprecation Method 2012-05-19 20:46:03 -05:00
Andrew Hooker
86fa2d2f5d Renaming Method to better describe use, Including Deprecation Warning on Old Method 2012-05-19 20:00:16 -05:00
Uģis Ozols
6fa5bbdf33 Use 'refinery_login_with :refinery_user' instead of deprecated 'login_refinery_user' in request specs. 2012-05-15 08:22:56 +03:00
Uģis Ozols
538e6653f0 Bump master to 2.1.0.dev. 2012-05-15 08:22:20 +03:00
Philip Arndt
5577b8e701 Do we really need a model called comment_mailer? 2012-05-15 08:03:51 +03:00
Uģis Ozols
1cd514b3c9 Test using rbx-19mode on Travis. 2012-05-05 17:54:54 +03:00
Uģis Ozols
65f84593fa Set published_time as Time.utc to avoid hackery needed later to compare dates. 2012-05-05 17:52:28 +03:00
Uģis Ozols
ab1fa7ec32 Fix millisecond comparison issue in post spec. 2012-04-26 11:44:04 +03:00
Uģis Ozols
d1bfab99ce Changes on Travis:
* Remove Ruby 1.9.2 testing
  * Allow Rubinius to fail
2012-04-26 10:51:50 +03:00
Uģis Ozols
69b9699fca Adjust times for spec to avoid running into DST issues. 2012-04-26 10:50:42 +03:00
Uģis Ozols
7e1b4831f1 Remove testing dependencies. 2012-04-26 10:48:55 +03:00
Philip Arndt
8f6007c2ba Merge pull request #228 from GeekOnCoffee/patch-1
Adding More information to README
2012-04-22 18:29:04 -07:00
Andrew Hooker
976fafb9df Adding More information to README 2012-04-22 20:27:46 -05:00
Uģis Ozols
18065463e6 Notification recipients should be specified using :to instead of :recipients. Fixes #226. 2012-04-19 17:42:03 +03:00
Philip Arndt
8b8ce1f21b Merge pull request #225 from mattsgarrison/master
Fix for Categories and Rails 3.2 Mass Assignment whitelist requirements.
2012-04-18 14:18:39 -07:00
Matt Garrison
dbeed9bb77 Adding attr_accessible for Rails 3.2 mass assignment fixes. 2012-04-18 10:40:04 -05:00
Philip Arndt
70f7be1652 Merge pull request #221 from wakeless/fix-page-caching
Fix page caching on index when pages param is present.
2012-04-10 20:21:06 -07:00
Michael Gall
9a150112ae Fix page caching on index when pages param is present.
fixes #145
2012-04-11 13:13:58 +10:00
Uģis Ozols
981fc6ef68 In #prev and #next specs advance time by days instead of minutes. 2012-04-10 23:28:43 +03:00
Uģis Ozols
d36af516ea Use shorter syntax for render :partial => ... 2012-04-10 23:09:04 +03:00
Uģis Ozols
14cd410324 Fix deprecation warnings. 2012-04-10 23:02:41 +03:00
Uģis Ozols
3627b8f865 Merge pull request #219 from corydeppen/patch-2
Fix reference to ShareThis key.
2012-04-10 12:40:28 -07:00
Cory Deppen
cc6800d17e Fix reference to ShareThis key. 2012-04-10 16:02:54 -03:00
Philip Arndt
3a1c30fa5d We require 2.0.1 at least 2012-04-08 23:56:28 +12:00
Philip Arndt
8584cc942b Merge pull request #215 from resolve/bump_seo_meta_dep
Bump seo_meta for compitiblity with refinerycms 2-0-stable.
2012-04-01 17:52:03 -07:00
Pete Higgins
7f4ac3b6d4 Bump seo_meta for compitiblity with refinerycms 2-0-stable. 2012-04-01 17:45:53 -07:00
Philip Arndt
72375e0a00 Merge pull request #214 from resolve/fix_mass_assignment_error
Fix MassAssignmentSecurity::Error in integration test.
2012-04-01 16:26:46 -07:00
Pete Higgins
6df59131f1 Fix MassAssignmentSecurity::Error in integration test. 2012-04-01 16:23:15 -07:00
Joe Sak
2a00257420 Merge pull request #211 from nicinabox/master
Add draft label
2012-03-26 14:46:49 -07:00
Philip Arndt
cb88d9508e Merge pull request #212 from corydeppen/patch-1
Fixed drop_table for Category.
2012-03-24 12:52:31 -07:00
Cory Deppen
dd3002f8bb Fixed drop_table for Category. 2012-03-24 15:22:58 -03:00
Nic Haynes
0c78cd138d Fix draft translation 2012-03-22 08:41:38 -05:00
Nic Haynes
435763f307 Show published date if not drafted 2012-03-21 00:23:58 -05:00
Nic Haynes
f8e38d516a Fix markup for draft input 2012-03-21 00:23:42 -05:00
Nic Haynes
31bdd586f2 Move draft checkbox for better usability 2012-03-20 19:43:30 -05:00
Nic Haynes
96448fc374 Add draft label to admin index 2012-03-20 19:43:18 -05:00
Philip Arndt
3049816aa9 Don't cache when logged in or there's a flash message. Moved canonical to protected methods. 2012-03-20 15:16:58 +13:00
Uģis Ozols
460351e81f Add rake db:seed to install steps. 2012-03-09 17:07:24 +02:00
41 changed files with 296 additions and 98 deletions

View file

@ -10,9 +10,11 @@ notifications:
env:
- DB=postgresql
- DB=mysql
matrix:
allow_failures:
- rvm: rbx-19mode
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- rbx
- rbx-19mode
- jruby

View file

@ -2,12 +2,14 @@ source "http://rubygems.org"
gemspec
gem 'refinerycms', '~> 2.0.0'
gem 'refinerycms', :git => 'git://github.com/resolve/refinerycms.git'
gem 'refinerycms-i18n', :git => 'git://github.com/parndt/refinerycms-i18n.git'
gem 'refinerycms-settings', :git => 'git://github.com/parndt/refinerycms-settings.git'
group :development, :test do
require 'rbconfig'
gem 'refinerycms-testing', '~> 2.0.0'
gem 'refinerycms-testing', :git => 'git://github.com/resolve/refinerycms.git'
platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'

View file

@ -57,7 +57,7 @@ module Refinery
unless request.xhr?
redirect_to :back
else
render :partial => "/shared/message"
render "/shared/message"
end
end
else

View file

@ -2,7 +2,7 @@ module Refinery
module Blog
class PostsController < BlogController
caches_page :index
caches_page :index, :unless => proc {|c| c.refinery_user_signed_in? || c.flash.any? || params[:page].present? }
before_filter :find_all_blog_posts, :except => [:archive]
before_filter :find_blog_post, :only => [:show, :comment, :update_nav]
@ -23,7 +23,7 @@ module Refinery
@comment = Comment.new
@canonical = url_for(:locale => ::Refinery::I18n.default_frontend_locale) if canonical?
@post.increment!(:access_count, 1)
respond_with (@post) do |format|
@ -60,7 +60,7 @@ module Refinery
date = "#{params[:month]}/#{params[:year]}"
@archive_date = Time.parse(date)
@date_title = @archive_date.strftime('%B %Y')
@posts = Post.live.by_archive(@archive_date).page(params[:page])
@posts = Post.live.by_month(@archive_date).page(params[:page])
else
date = "01/#{params[:year]}"
@archive_date = Time.parse(date)
@ -76,6 +76,7 @@ module Refinery
@posts = Post.tagged_with(@tag_name).page(params[:page])
end
protected
def canonical?
::Refinery.i18n_enabled? && ::Refinery::I18n.default_frontend_locale != ::Refinery::I18n.current_frontend_locale
end

View file

@ -5,7 +5,7 @@ module Refinery
def notification(comment, request)
@comment = comment
mail :subject => Blog::Comment::Notification.subject,
:recipients => Blog::Comment::Notification.recipients,
:to => Blog::Comment::Notification.recipients,
:from => "\"#{Refinery::Core.site_name}\" <no-reply@#{request.domain}>"
end

View file

@ -11,8 +11,10 @@ module Refinery
validates :title, :presence => true, :uniqueness => true
attr_accessible :title
def post_count
posts.select(&:live?).count
posts.live.count
end
# how many items to show per page
@ -20,4 +22,4 @@ module Refinery
end
end
end
end

View file

@ -1 +0,0 @@
require File.expand_path('../../../../mailers/refinery/blog/comment_mailer', __FILE__)

View file

@ -49,14 +49,19 @@ module Refinery
end
def friendly_id_source
custom_url.present? ? custom_url : title
custom_url.presence || title
end
class << self
def by_archive(date)
def by_month(date)
where(:published_at => date.beginning_of_month..date.end_of_month)
end
def by_archive(date)
Refinery.deprecate("Refinery::Blog::Post.by_archive(date)", {:replacement => "Refinery::Blog::Post.by_month(date)", :when => 2.2 })
by_month(date)
end
def by_year(date)
where(:published_at => date.beginning_of_year..date.end_of_year)
end

View file

@ -4,6 +4,7 @@ module Refinery
self.table_name = 'refinery_blog_categories_blog_posts'
belongs_to :blog_post, :class_name => 'Refinery::Blog::Post', :foreign_key => :blog_post_id
belongs_to :blog_category, :class_name => 'Refinery::Blog::Category', :foreign_key => :blog_category_id
attr_accessible :blog_category_id, :blog_post_id
end
end

View file

@ -1 +1 @@
<%= render :partial => "form" %>
<%= render "form" %>

View file

@ -1,4 +1,4 @@
<%= render :partial => '/refinery/blog/admin/submenu' %>
<%= render '/refinery/blog/admin/submenu' %>
<div id='records'>
<% if searching? %>
<h2><%= t('results_for', :scope => 'refinery.admin.search',
@ -13,7 +13,7 @@
<% if @categories.any? %>
<%= will_paginate @categories %>
<%= render :partial => "sortable_list" %>
<%= render "sortable_list" %>
<%= will_paginate @categories %>
<% else %>

View file

@ -1 +1 @@
<%= render :partial => "form" %>
<%= render "form" %>

View file

@ -1,4 +1,4 @@
<%= render :partial => '/refinery/blog/admin/submenu' %>
<%= render '/refinery/blog/admin/submenu' %>
<div id='records'>
<% if searching? %>
<h2><%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %></h2>
@ -18,7 +18,7 @@
<% if @comments.any? %>
<%= will_paginate @comments %>
<%= render :partial => "sortable_list" %>
<%= render "sortable_list" %>
<%= will_paginate @comments %>
<% else %>

View file

@ -9,6 +9,13 @@
<%= f.label :title -%>
<%= f.text_field :title, :class => 'larger widest' -%>
</div>
<div class="field">
<p>
<%= f.check_box :draft %>
<%= f.label :draft, t('.save_as_draft'), :class => "stripped" %>
</p>
</div>
<div class='field'>
<div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
@ -50,10 +57,6 @@
:id => 'toggle_advanced_options',
:title => t('.toggle_advanced_options') %>
</p>
<span id='draft_field'>
<%= f.check_box :draft %>
<%= f.label :draft, t('.save_as_draft'), :class => "stripped" %>
</span>
</div>
<div id='more_options' style="display:none;">
<div class="hemisquare">

View file

@ -2,8 +2,12 @@
<span class='title'>
<%= post.title %>
<span class="preview">
<%= post.published_at.try(:strftime, '%b %d, %Y') || 'draft' %>
<%= " by #{post.author.username}" if post.author.present? %>
<% if post.draft? %>
<span class="label notice"><%= t('refinery.blog.admin.posts.post.draft') %></span>
<% else %>
<%= post.published_at.strftime('%b %d, %Y') %>
<% end %>
</span>
</span>
<span class='actions'>

View file

@ -1 +1 @@
<%= render :partial => "form" %>
<%= render "form" %>

View file

@ -1,4 +1,4 @@
<%= render :partial => '/refinery/blog/admin/submenu' %>
<%= render '/refinery/blog/admin/submenu' %>
<div id='records'>
<% if searching? %>
<h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
@ -13,7 +13,7 @@
<% if @posts.any? %>
<%= will_paginate @posts %>
<%= render :partial => "sortable_list" %>
<%= render "sortable_list" %>
<%= will_paginate @posts %>
<% else %>

View file

@ -1 +1 @@
<%= render :partial => "form" %>
<%= render "form" %>

View file

@ -1,4 +1,4 @@
<%= render :partial => '/refinery/blog/admin/submenu' %>
<%= render '/refinery/blog/admin/submenu' %>
<div id='records'>
<% if searching? %>
<h2><%= t('results_for', :scope => 'refinery.admin.search',
@ -13,7 +13,7 @@
<% if @posts.any? %>
<%= will_paginate @posts %>
<%= render :partial => "sortable_list" %>
<%= render "sortable_list" %>
<%= will_paginate @posts %>
<% else %>

View file

@ -1,6 +1,6 @@
<% content_for :body_content_title, @category.title %>
<% content_for :body_content_left do %>
<% content_for :body do %>
<% if @posts.any? %>
<section id="blog_posts">
<%= render :partial => "/refinery/blog/shared/post", :collection => @posts %>
@ -13,9 +13,9 @@
<% end %>
<% end %>
<% content_for :body_content_right do %>
<%= render :partial => "/refinery/blog/shared/categories" %>
<% content_for :side_body do %>
<%= render "/refinery/blog/shared/categories" %>
<% end %>
<%= render :partial => "/refinery/content_page" %>
<%= render "/refinery/content_page" %>
<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %>

View file

@ -33,5 +33,5 @@
<span class="st_sharethis" displayText="ShareThis"></span>
<% end %>
</article>
<%= render :partial => '/refinery/draft_page_message' unless @post.nil? or @post.live? -%>
<%= render '/refinery/draft_page_message' unless @post.nil? or @post.live? -%>
<%= render 'nav' if next_or_previous?(@post) %>

View file

@ -1,6 +1,6 @@
<% content_for :title, "#{t('.blog_archive_for', :date => @archive_date.strftime('%B %Y'))}" %>
<% content_for :body_content_left do %>
<% content_for :body do %>
<h1><%= t('.blog_archive_for', :date => @archive_date.strftime('%B %Y')) %></h1>
<% if @posts.any? %>
<section id="blog_posts">
@ -11,7 +11,7 @@
<% end %>
<% end %>
<%= render :partial => '/refinery/blog/shared/body_content_right' %>
<%= render '/refinery/blog/shared/body_content_right' %>
<%= render :partial => "/refinery/content_page" %>
<%= render "/refinery/content_page" %>
<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %>

View file

@ -1,4 +1,4 @@
<% content_for :body_content_left do %>
<% content_for :body do %>
<%= raw @page.content_for(Refinery::Pages.default_parts.first.to_sym) if Refinery::Pages.default_parts.any? %>
<% if @posts.any? %>
@ -11,10 +11,10 @@
<% end %>
<% end %>
<% content_for :body_content_right_prepend do -%>
<% content_for :side_body_prepend do -%>
<%= raw @page.content_for(Refinery::Pages.default_parts.second.to_sym) %>
<% end if Refinery::Pages.default_parts.many? -%>
<%= render :partial => '/refinery/blog/shared/body_content_right' %>
<%= render '/refinery/blog/shared/body_content_right' %>
<%= render :partial => "/refinery/content_page" %>
<%= render "/refinery/content_page" %>
<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %>

View file

@ -1,4 +1,4 @@
<% content_for :body_content_left do %>
<% content_for :body do %>
<div id="show_blog_post">
<%= render 'post' %>
</div>
@ -8,7 +8,7 @@
<% end %>
<% end %>
<%= render :partial => '/refinery/blog/shared/body_content_right' %>
<%= render '/refinery/blog/shared/body_content_right' %>
<%= render :partial => "/refinery/content_page", :locals => { :remove_automatic_sections => true } %>
@ -17,5 +17,5 @@
<%# enable AJAX'd post nav at your own risk until html5 history API implemented. %>
<%#= javascript_include_tag('refinery/blog/frontend') %>
<script src="http://w.sharethis.com/button/buttons.js"></script>
<script>stLight.options({publisher:'<%= Blog::Post::ShareThis.key %>'});</script>
<script>stLight.options({publisher:'<%= Refinery::Blog.share_this_key %>'});</script>
<% end if Refinery::Blog::Post::ShareThis.enabled? %>

View file

@ -2,7 +2,7 @@
<% content_for :body_content_title, "#{t('.posts_tagged')} &#8220;#{@tag_name.titleize}&#8221;".html_safe -%>
<% content_for :body_content_left do %>
<% content_for :body do %>
<% if @posts.any? %>
<section id="blog_posts">
<%= render :partial => "/refinery/blog/shared/post", :collection => @posts %>
@ -13,7 +13,7 @@
<% end %>
<% end %>
<%= render :partial => '/refinery/blog/shared/body_content_right' %>
<%= render '/refinery/blog/shared/body_content_right' %>
<%= render :partial => "/refinery/content_page" %>
<%= render "/refinery/content_page" %>
<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %>

View file

@ -1,9 +1,9 @@
<% content_for :body_content_right do %>
<%= yield(:body_content_right_prepend) %>
<%= render :partial => "/refinery/blog/shared/rss_feed" %>
<%= render :partial => "/refinery/blog/shared/categories" %>
<%= render :partial => "/refinery/blog/shared/tags" %>
<%= render :partial => "/refinery/blog/shared/posts" %>
<% content_for :side_body do %>
<%= yield(:side_body_prepend) %>
<%= render "/refinery/blog/shared/rss_feed" %>
<%= render "/refinery/blog/shared/categories" %>
<%= render "/refinery/blog/shared/tags" %>
<%= render "/refinery/blog/shared/posts" %>
<%= blog_archive_widget %>
<%= yield(:body_content_right_append) %>
<%= yield(:side_body_append) %>
<% end %>

View file

@ -30,7 +30,9 @@
</section>
<footer>
<p>
<%= link_to t('read_more', :scope => 'refinery.blog.shared.posts'), refinery.blog_post_path(post) if blog_post_teaser_enabled? %>
<% if blog_post_teaser_enabled? && post.custom_teaser.present? %>
<%= link_to t('read_more', :scope => 'refinery.blog.shared.posts'), refinery.blog_post_path(post) %>
<% end %>
</p>
<aside class='comment_count'>
<% if Refinery::Blog::Post.comments_allowed? %>

View file

@ -57,6 +57,7 @@ en:
view_live_html: 'View this blog post live <br/><em>(opens in a new window)</em>'
edit: Edit this blog post
delete: Remove this blog post forever
draft: Draft
settings:
notification_recipients:
value: Send notifications to

167
config/locales/sv.yml Normal file
View file

@ -0,0 +1,167 @@
sv:
refinery:
plugins:
refinerycms_blog:
title: Blogg
blog:
admin:
categories:
category:
edit: Editera kategori
delete: Radera kategori
index:
no_items_yet: 'Det finns inga kategorier än. Klicka på "%{create}" för att lägga till den första kategorin.'
comments:
approved: 'Kommentaren från "%{author}" Har godkänts.'
comment:
view_live_html: 'Visa kommentaren på webbplatsen. <br/><em>(öppnas i ett nytt fönster)</em>'
read: Läs denna kommentar
reject: Avslå kommentar
approve: Godkänn kommentar
rejected: 'Kommentaren från "%{author}" har avslagits.'
index:
no_items_yet: 'Det finns inga %{type} kommentarer.'
show:
comment: Kommentar
blog_post: Blogg post
from: Postat av
date: Postat
message: Kommentar
details: Detaljer
age: Ålder
actions: Actions
back: Tillbaka till alla kommentarer
reject: Avslå denna kommentar
approve: Godkänn denna kommentar
posts:
form:
advanced_options: Avancerat
toggle_advanced_options: Klicka för att ställa in metataggar och menyinställningar
save_as_draft: Spara som utkast
published_at: Publiceringsdatum
custom_url: Anpassad URL
custom_url_help: Skapa URL för bloggposten med denna text istället för ttieln
source_url: Källans URL
source_url_help: Sparar URL för postens källa
source_url_title: Källhänvisning (titel)
source_url_title_help: Källhänvisning för posten (URL).
author: Författare
author_help: Ställ in författare för denna post.
copy_body: Kopiera innehåll i posten till en teaser.
copy_body_help: Kopierar inneållet i posten till en teaser, lämna tom om du vill att det ska ske automatiskt.
index:
no_items_yet: 'Det finns inga poster än. Klicka "%{create}" för att lägga till din första post.'
uncategorized:
no_items_yet: 'Det finns inga okategoriserade poster.'
post:
view_live_html: 'Visa denna post i en webbläsare <br/><em>(öppnas i ett nytt fönster)</em>'
edit: Redigera denna bloggpost
delete: Ta bort denna bloggpost
draft: Utkast
settings:
notification_recipients:
value: Skicka notis till
explanation: 'Varje gång någon kommenterar på en post, skickas ett mail om kommentaren.'
hint: 'När en kommentar läggs till, så skickar vi en notis till dig.'
example: "Lägg till epostadress(er) i detta format: kalle@home.se, pelle@work.com"
updated: 'Notiser har blivit skickade till: "%{recipients}"'
submenu:
categories:
title: Kategorier
manage: Hantera
new: Skapa ny kategori
comments:
title: Kommentarer
title_with_count: 'Det finns (%{new_count} nya kommentarer)'
new: Ny
unmoderated: Ny
approved: Godkänd
rejected: Avslagen
posts:
title: Poster
manage: Hantera poster
new: Skapa ny post
uncategorized: Okategoriserade poster
settings:
title: Inställningar
moderation: Moderering
update_notified: Uppdarea vilka som får notiser
comments: Kommentarer
teasers: Teasers
comment_mailer:
notification:
greeting: Hej!
you_recieved_new_comment: Du har fått en ny kommentar på bloggenYou just received a new comment on your website.
comment_starts: --- kommentar ---
comment_ends: --- // kommentar ---
from: Från
email: E-post
message: Meddelande
closing_line: Vänliga hälsningar
ps: 'P.S. Alla dina kommentarer finns lagrade i bloggsektionen av ditt CMS i undermenyn kommentarer, om du vill se dem senare.'
shared:
categories:
title: Kategorier
rss_feed:
title: RSS
subscribe: Prenumerera
posts:
other: Övriga poster
created_at: 'Postat den %{when}'
read_more: Läs mer
comments:
singular: Kommentar
none: Inga kommentarer
archives: Arkiv
tags:
title: "Taggar"
categories:
show:
no_posts: Det finns inga poster än.
posts:
post:
filed_in: Kategoriserat som
comment: kommentar
comments:
by: 'Postad av %{who}'
time_ago: 'för %{time} sedan'
thank_you: 'Tack för din kommentar.'
thank_you_moderated: 'Tack för din kommentar. Ditt meddelande har placerats i modereringskön och kommer snart att bli publicerat.'
index:
no_blog_articles_yet: Det finns inga bloggposter än.
show:
blog_home: Blogg hem
comments:
title: Kommentarer
add: Kommentera
other: Andra bloggposter
filed_in: Kategoriserat i
tagged: Taggar
submit: Skicka kommentar
name: Namn
email: E-post
message: Meddelande
by: av
source: Källa
tagged:
no_blog_articles_yet: Det finns inga bloggposter än.
posts_tagged: Poster taggade med
archive:
blog_archive_for: 'Arkiv för %{date}'
no_blog_articles_posted: 'Det finns inga artiklar för %{date}.'
activerecord:
models:
refinery/blog_category: Kategori
refinery/blog_comment: Kommentarer
refinery/blog_post: Bloggposter
attributes:
refinery/blog_category:
title: Titel
refinery/blog_comment:
name: Namn
email: E-post
message: Meddelande
refinery/blog_post:
title: Titel
body: Innehåll
teaser: Teaser

View file

@ -45,7 +45,7 @@ class CreateBlogStructure < ActiveRecord::Migration
drop_table Refinery::Blog::Post.table_name
drop_table Refinery::Blog::Comment.table_name
drop_table Refinery::Category.table_name
drop_table Refinery::Blog::Category.table_name
drop_table Refinery::Categorization.table_name
end

View file

@ -2,6 +2,7 @@ require 'refinerycms-core'
require 'refinerycms-settings'
require 'filters_spam'
require 'rails_autolink'
require 'acts_as_indexed'
module Refinery
autoload :BlogGenerator, 'generators/refinery/blog/blog_generator'

View file

@ -2,16 +2,17 @@ module Refinery
module Blog
class Version
@major = 2
@minor = 0
@tiny = 1
@minor = 1
@tiny = 0
@build = 'dev'
class << self
attr_reader :major, :minor, :tiny
attr_reader :major, :minor, :tiny, :build
def to_s
[@major, @minor, @tiny].compact.join('.')
[@major, @minor, @tiny, @build].compact.join('.')
end
end
end
end
end
end

View file

@ -11,7 +11,7 @@ Options:
## Requirements
Refinery CMS version 2.0.0 or above.
Refinery CMS version 2.0.1 or above.
## Install
@ -27,10 +27,14 @@ Next, to install the blog plugin run:
rails generate refinery:blog
Finally migrate your database and you're done.
Run database migrations:
rake db:migrate
Finally seed your database and you're done.
rake db:seed
## Developing & Contributing
The version of Refinery to develop this engine against is defined in the gemspec. To override the version of refinery to develop against, edit the project Gemfile to point to a local path containing a clone of refinerycms.
@ -48,3 +52,9 @@ Run the test suite with [Guard](https://github.com/guard/guard)
Or just with rake spec
$ bundle exec rake spec
## More Information
* Check out our [Website](http://refinerycms.com/)
* Documentation is available in the [guides](http://refinerycms.com/guides)
* Questions can be asked on our [Google Group](http://group.refinerycms.org)
* Questions can also be asked in our IRC room, [#refinerycms on freenode](irc://irc.freenode.net/refinerycms)

View file

@ -18,13 +18,10 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- spec/*`.split("\n")
# Runtime dependencies
s.add_dependency 'refinerycms-core', '~> 2.0.1'
s.add_dependency 'refinerycms-settings', '~> 2.0.1'
s.add_dependency 'refinerycms-core', '~> 2.1.0.dev'
s.add_dependency 'refinerycms-settings', '~> 2.1.0.dev'
s.add_dependency 'filters_spam', '~> 0.2'
s.add_dependency 'acts-as-taggable-on'
s.add_dependency 'seo_meta', '~> 1.2.0'
s.add_dependency 'rails_autolink'
# Development dependencies
s.add_development_dependency 'refinerycms-testing', '~> 2.0.0'
end
s.add_dependency 'seo_meta', '~> 1.3.0'
s.add_dependency 'rails_autolink', '~> 1.0.7'
end

View file

@ -53,7 +53,7 @@ module Refinery
end
end
describe "by_archive" do
describe "by_month" do
before do
@post1 = FactoryGirl.create(:blog_post, :published_at => Date.new(2011, 3, 11))
@post2 = FactoryGirl.create(:blog_post, :published_at => Date.new(2011, 3, 12))
@ -65,22 +65,22 @@ module Refinery
it "returns all posts from specified month" do
#check for this month
date = "03/2011"
described_class.by_archive(Time.parse(date)).count.should be == 2
described_class.by_archive(Time.parse(date)).should == [@post2, @post1]
described_class.by_month(Time.parse(date)).count.should be == 2
described_class.by_month(Time.parse(date)).should == [@post2, @post1]
end
end
describe ".published_dates_older_than" do
before do
@post1 = FactoryGirl.create(:blog_post, :published_at => Time.now - 2.months)
@post2 = FactoryGirl.create(:blog_post, :published_at => Time.now - 1.month)
@post1 = FactoryGirl.create(:blog_post, :published_at => Time.utc(2012, 05, 01, 15, 20))
@post2 = FactoryGirl.create(:blog_post, :published_at => Time.utc(2012, 05, 01, 15, 30))
FactoryGirl.create(:blog_post, :published_at => Time.now)
end
it "returns all published dates older than the argument" do
expected = [@post2.published_at, @post1.published_at]
described_class.published_dates_older_than(1.day.ago).should eq(expected)
described_class.published_dates_older_than(5.minutes.ago).should eq(expected)
end
end
@ -128,7 +128,7 @@ module Refinery
describe "#next" do
before do
FactoryGirl.create(:blog_post, :published_at => Time.now.advance(:minutes => -1))
FactoryGirl.create(:blog_post, :published_at => Time.now.advance(:days => -1))
@post = FactoryGirl.create(:blog_post)
end
@ -140,7 +140,7 @@ module Refinery
describe "#prev" do
before do
FactoryGirl.create(:blog_post)
@post = FactoryGirl.create(:blog_post, :published_at => Time.now.advance(:minutes => -1))
@post = FactoryGirl.create(:blog_post, :published_at => Time.now.advance(:days => -1))
end
it "returns previous article when called on current article" do

View file

@ -1,8 +1,8 @@
require 'spec_helper'
describe "Categories admin" do
login_refinery_user
refinery_login_with :refinery_user
let(:title) { "lol" }
it "can create categories" do

View file

@ -4,8 +4,8 @@ module Refinery
module Blog
module Admin
describe Comment do
login_refinery_user
refinery_login_with :refinery_user
describe "#index" do
context "when has no new unapproved comments" do
before(:each) do
@ -118,4 +118,4 @@ module Refinery
end
end
end
end
end

View file

@ -1,8 +1,8 @@
require 'spec_helper'
describe "Blog menu entry" do
login_refinery_user
refinery_login_with :refinery_user
it "is highlighted when managing the blog" do
visit refinery.admin_root_path

View file

@ -4,8 +4,8 @@ module Refinery
module Blog
module Admin
describe Post do
login_refinery_user
refinery_login_with :refinery_user
let!(:blog_category) { FactoryGirl.create(:blog_category, :title => "Video Games") }
context "when no blog posts" do
@ -172,4 +172,4 @@ module Refinery
end
end
end
end
end

View file

@ -2,8 +2,8 @@ require "spec_helper"
module Refinery
describe "BlogCategories" do
login_refinery_user
refinery_login_with :refinery_user
context "has one category and post" do
before(:each) do
@post = FactoryGirl.create(:blog_post, :title => "Refinery CMS blog post")

View file

@ -2,8 +2,8 @@ require "spec_helper"
module Refinery
describe "Blog::Posts" do
login_refinery_user
refinery_login_with :refinery_user
context "when has blog posts" do
let!(:blog_post) { FactoryGirl.create(:blog_post, :title => "Refinery CMS blog post") }