Compare commits

..

592 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
Philip Arndt
fccc86e63c Updated to support Refinery CMS 2.0.1 and Rails 3.2.2 2012-03-06 13:17:41 +13:00
Philip Arndt
1a3e0d057c Rephrase slightly 2012-03-03 11:35:34 +13:00
Uģis Ozols
0ea3690741 Test. 2012-03-01 22:22:56 +02:00
Uģis Ozols
52b1fce8aa Don't need testing task if we require refinery-settings. 2012-03-01 14:00:09 +02:00
Uģis Ozols
c6f36117a7 There's already dev, test group in Gemfile so use that. 2012-03-01 08:43:34 +02:00
Philip Arndt
6958ab82df Require seo_meta proper 2012-03-01 17:50:57 +13:00
Philip Arndt
215ea87e45 require refinerycms-settings 2012-03-01 13:48:13 +13:00
Philip Arndt
2e79e4f7a9 No more git sources in the Gemfile. 2012-03-01 13:45:06 +13:00
Philip Arndt
9bcf2b3dda This took code presentation to a new level. 2012-02-29 23:47:15 +13:00
Philip Arndt
70d8f46c12 Don't like having a dialogue for this 2012-02-29 21:26:33 +13:00
Philip Arndt
8edc3ab3dd y u need two lines 2012-02-29 21:23:10 +13:00
Uģis Ozols
4e7847dcbe RefineryCMS -> Refinery CMS. 2012-02-27 22:34:41 +02:00
Philip Arndt
594dd8ca96 Now supporting FriendlyId 4 2012-02-27 17:08:37 +13:00
Uģis Ozols
837ddfe42b There is no bin folder. 2012-02-24 20:49:54 +02:00
Uģis Ozols
44ec487542 Use refinery:testing:setup_extension rake task to copy Refinery::Setting migration file. 2012-02-24 06:39:13 +02:00
Uģis Ozols
bd2bcc0f2a Add Refinery::Setting dependency. 2012-02-23 21:48:37 +02:00
Philip Arndt
98f8d3f515 Merge pull request #203 from substantial/cleanup_models
Cleanup model code
2012-02-23 00:54:43 -08:00
Pete Higgins
d353cd556c Don't need to specify class names here. 2012-02-23 00:29:46 -08:00
Pete Higgins
5eaad8997f Cleanup next and previous stuff. 2012-02-23 00:20:37 -08:00
Pete Higgins
2537923034 Remove functionality provided by rails. 2012-02-23 00:09:09 -08:00
Pete Higgins
c9ff548329 DRY some Refinery::Blog::Post methods. 2012-02-23 00:02:15 -08:00
Pete Higgins
5ea1b7399b Change a .map to a .pluck. 2012-02-22 23:50:05 -08:00
Philip Arndt
f82d2c96e4 Merge pull request #195 from substantial/refactor_archive_widget
Refactor archive widget
2012-02-22 23:43:01 -08:00
Philip Arndt
aa729edc84 Merge pull request #202 from substantial/fix_seeds
Remove position setting from blog seed.
2012-02-22 23:38:07 -08:00
Pete Higgins
c37461cc43 Refinery::Page no longer has a position column. 2012-02-22 23:32:59 -08:00
Philip Arndt
5440fad815 Merge pull request #200 from dmoose/rails-3-1-recent-popular
Rails 3 1 recent popular
2012-02-22 20:11:14 -08:00
Jeff Shumate
602759af1b cleanup 2012-02-22 21:00:45 -07:00
Jeff Shumate
4f0b5f8223 add popularity counter to blog posts as well as accessor for recent posts 2012-02-22 20:37:08 -07:00
Philip Arndt
39fc086982 Merge pull request #199 from markstuart/rails-3-1
Fix error message: "translation missing: en.admin.blog.settings.notification_recipients.updated"
2012-02-22 18:47:06 -08:00
Mark Stuart
29809838f4 Correct translations scope 2012-02-23 15:43:07 +13:00
Uģis Ozols
45cad84f49 Generate blog initializer when running rails g refinery:blog. Closes #196. 2012-02-16 08:12:53 +02:00
Pete Higgins
2bcb7c8551 Fix spec name. 2012-02-12 23:54:07 -08:00
Uģis Ozols
e05fedb9b7 Merge pull request #194 from substantial/redirect_follower_log
Redirect follower log
2012-02-10 01:20:15 -08:00
Pete Higgins
dee1a9d539 Avoid creating some database records. 2012-02-10 01:07:15 -08:00
Pete Higgins
f140ed284f Refactor .by_archive and .by_year. 2012-02-10 01:07:04 -08:00
Pete Higgins
94ae01ce6f These aren't scopes anymore. :trollface: 2012-02-10 01:06:53 -08:00
Pete Higgins
922bc8b98f 'subject.class' -> described_class. 2012-02-10 01:06:41 -08:00
Pete Higgins
aaf26e22d2 Refactor all_previous into published_dates_older_than. 2012-02-10 01:06:05 -08:00
Pete Higgins
80187eac7d Refactor blog archive widget. 2012-02-10 01:05:51 -08:00
Pete Higgins
2275cde2ac Stop logging to stdout. 2012-02-05 23:54:41 -08:00
Uģis Ozols
1af631b501 Refinery::Crud already sets title_attribute and redirect_to_url with the same values. 2012-02-04 22:01:00 +02:00
Uģis Ozols
34fd7b7b89 Move some of the Refinery::Setting's over to Refinery::Blog. 2012-02-04 21:22:51 +02:00
Uģis Ozols
6cfebfae84 Remove rcov.opts. 2012-02-04 20:51:32 +02:00
Philip Arndt
6d06af3400 Converted scopes to class methods. 2012-02-03 11:34:49 +13:00
Uģis Ozols
5691a96a9d No need to specify Devise.stretches in spec_helper because it gets set in devise initializer. 2012-02-02 17:36:41 +02:00
Uģis Ozols
ba9091cd14 Make sure there is seeds.rb file before trying to append to it. 2012-02-02 15:49:07 +02:00
Uģis Ozols
5c3de1175f Don't need to set initializer order anymore. 2012-02-02 15:48:30 +02:00
Uģis Ozols
e1d6605d23 .find(:all) -> .all 2012-02-02 12:55:50 +02:00
Philip Arndt
e63bf074af Does it matter that these are out of order on different rubies? cc @joemsak 2012-02-02 23:16:28 +13:00
Philip Arndt
0df8829a59 Fix routing. 2012-02-02 10:53:57 +13:00
Philip Arndt
1244370bc5 Ignore .rbx 2012-02-02 10:53:53 +13:00
Philip Arndt
c9e5edcf6d Don't need to test on both 1.8.7 and ree and given the choice I'm going with 1.8.7
[ci skip]
2012-02-01 21:11:25 +13:00
Philip Arndt
82a929d60a Don't need to CI sqlite3.
[ci skip]
2012-02-01 21:05:51 +13:00
Philip Arndt
a85aaf6aaa Add jruby compatible DB gems. 2012-02-01 20:53:29 +13:00
Philip Arndt
bd7daa09ae Not postgres but postgresql. 2012-02-01 19:37:43 +13:00
Philip Arndt
76998c2885 I accidentally this twice. 2012-02-01 18:07:27 +13:00
Philip Arndt
33bfa4dd23 Added support for new code in Refinery CMS since resolve/refinerycms#1234 2012-02-01 16:34:06 +13:00
Philip Arndt
30ebf2d338 We don't need to read all about the dummy app or test on rbx-2.0 2012-01-31 18:16:31 +13:00
Philip Arndt
adcf66751c Merge pull request #189 from markstuart/rails-3-1
Fixes for notification settings access in refinery admin area
2012-01-29 20:51:38 -08:00
Mark Stuart
e46f0549c6 New 'main_app.' format. 2012-01-30 17:42:26 +13:00
Mark Stuart
2a672af348 New 'main_app.' format 2012-01-30 17:41:11 +13:00
Mark Stuart
f9d51ed549 Correct path for form tag. Updated cancel_url to new format. 2012-01-30 17:38:48 +13:00
Philip Arndt
44a059a475 Fix for deprecation in Rails 3.2 2012-01-30 11:48:24 +13:00
Philip Arndt
f8cd5804ad Merge pull request #187 from substantial/rails-3-2-compat
Rails 3 2 compat
2012-01-28 20:03:11 -08:00
Philip Arndt
d8bdcb482c Merge pull request #186 from dmoose/add-src-url-3-1
Add src url 3 1
2012-01-28 20:02:13 -08:00
Pete Higgins
c89b4dfc1f attr_accessible :author for Post model. 2012-01-26 16:58:04 -08:00
Pete Higgins
6b1fcc8ea1 Loosen version requirements in Gemfile. 2012-01-26 16:56:22 -08:00
Jeff Shumate
e274bb1757 add source url for post 2012-01-25 22:27:46 -07:00
Philip Arndt
d1ad82d42e Merge pull request #184 from dmoose/fix-issue-175
Fix issue 175
2012-01-25 21:04:17 -08:00
Jeff Shumate
f62ad53f8f really fix issue 175 path error in _nav 2012-01-25 22:00:56 -07:00
Philip Arndt
79a7551e73 Merge pull request #183 from dmoose/fix-issue-175
Fix issue 175
2012-01-25 20:53:10 -08:00
Jeff Shumate
be73028ee8 fix issue 175 2012-01-25 21:45:21 -07:00
Philip Arndt
5eab0be340 Merge pull request #182 from substantial/fix_category_creation
Fix category creation which fixes #179
2012-01-24 20:38:05 -08:00
Pete Higgins
492fd663ca Fix route helper in categories view. 2012-01-24 20:12:45 -08:00
Philip Arndt
ea2f177b0d Merge pull request #181 from enmasse-entertainment/fix_comment_posting
Fix comment posting
2012-01-24 14:45:13 -08:00
Pete Higgins
3abf537eaa Fix comment posting. 2012-01-24 14:42:54 -08:00
Uģis Ozols
ad0b7f6ac8 Don't need to set table_name_prefix because it gets set by isolate_namespace. 2012-01-20 15:34:59 +02:00
Uģis Ozols
083fd20ee5 Don't need to set engine_name because it gets set by isolate_namespace. 2012-01-20 15:27:00 +02:00
Philip Arndt
3dbbbbfdda Merge pull request #174 from tsemana/fixes-posts-helper-namespacing
Fixes posts helper namespacing
2012-01-19 13:02:11 -08:00
Tony Semana
4eb17bb58d Fixed to show the word 'blog' only once in route 2012-01-17 15:17:43 -05:00
Tony Semana
f77592bc05 Fixes posts_helper to use updated refinery namespacing 2012-01-17 12:51:38 -05:00
Philip Arndt
b1e4fd0094 Fixed namespacing for Refinery conventions. 2012-01-17 16:56:24 +13:00
Philip Arndt
b3a25c1b68 Restructured part of the project to Refinery::Blog::Admin not Refinery::Admin::Blog 2012-01-17 16:56:23 +13:00
Philip Arndt
2a2fcca649 Isolate this engine to Refinery::Blog (which, according to my interpretation of the docs, is how it should be) and remove url hack now that resolve/refinerycms#1193 has been fixed. 2012-01-10 17:19:28 +13:00
Philip Arndt
889127a58c ruby highlighting added 2012-01-10 16:30:36 +13:00
Philip Arndt
d642260538 Merge pull request #172 from substantial/fix_for_activity_fix
Fix for activity fix
2012-01-08 16:50:50 -08:00
Pete Higgins
becdbfaa9b Fix typo in activity route. 2012-01-08 16:30:41 -08:00
Philip Arndt
bbc6e90939 Merge pull request #170 from substantial/make_db_seed_idempotent
Make db seed idempotent
2012-01-08 14:29:07 -08:00
Pete Higgins
63b0bec5ff Make DB seed idempotent. 2012-01-08 13:52:44 -08:00
Pete Higgins
e3e5bcffc3 Linux needs a js runtime. 2012-01-08 13:51:51 -08:00
Uģis Ozols
7dd6cb5e60 Merge pull request #169 from substantial/fix_dashboard_activity
Fix dashboard activity
2012-01-06 13:31:07 -08:00
Pete Higgins
edfa8b81e7 Fix activity route generation. Workaround for resolve/refinerycms#1193. 2012-01-06 11:36:27 -08:00
Pete Higgins
4a8a46ccc7 The newest factory_girl apparently doesn't like how this worked. 2012-01-06 11:33:13 -08:00
Uģis Ozols
d6e9af98ef Currently there isn't any template so we don't need this code. 2012-01-03 20:58:25 +02:00
Uģis Ozols
0eb88e2d95 Merge pull request #165 from enmasse-entertainment/rails-3-1
use new syntax for config accessors
2012-01-02 20:23:16 -08:00
Shaun
d108f9c5df use new syntax for config accessors 2012-01-02 15:39:38 -08:00
Uģis Ozols
5e650f6800 No need to use awesome_nested_set edge version anymore. 2012-01-02 15:08:02 +02:00
Uģis Ozols
c84d887187 refinerycms-core requires Rails so don't check if defined?(Rails). 2012-01-02 14:26:49 +02:00
Uģis Ozols
223a719300 Use Refinery::Core.config to get site name. 2012-01-02 14:26:05 +02:00
Uģis Ozols
fd0521bb99 Fix deprecation warning. Closes #164. 2012-01-02 13:52:44 +02:00
Uģis Ozols
26243ddade Don't require rails explicitly because refinerycms-core will do it for us. 2011-12-22 12:10:42 +02:00
Uģis Ozols
567bdd6334 Return correct root path. 2011-12-22 11:36:48 +02:00
Philip Arndt
547c8bcff2 Refinery::Page.default_parts is now Refinery::Pages.config.default_parts 2011-12-17 17:57:26 +13:00
Philip Arndt
de5c02994c Use Refinery::Page APIs (content_for) properly. 2011-12-17 17:43:09 +13:00
Philip Arndt
9a8d38ad78 Merge pull request #159 from substantial/fix_tab_highlighting_again
Fix tab highlighting
2011-12-15 17:31:44 -08:00
Pete Higgins
8cc819aeed Fix tab highlighting in admin interface. 2011-12-15 17:27:18 -08:00
Philip Arndt
7c63d8188e Merge pull request #156 from substantial/fix_spec_setup
Fix spec setup
2011-12-14 18:21:23 -08:00
Philip Arndt
cc316ceb5b Merge pull request #157 from substantial/add_author_attribution
Add author attribution
2011-12-14 15:47:22 -08:00
Pete Higgins
04b49b2371 Allow configurable author for blog posts. 2011-12-14 15:24:20 -08:00
Pete Higgins
3bef84c3f8 Fix spec setup. 2011-12-14 11:51:46 -08:00
Jamie Winsor
3a7a9198a4 Merge branch 'fix-seeds' into rails-3-1 2011-11-14 13:03:55 -08:00
Jamie Winsor
c0cecdaad9 Remove accidentally generated content from end of seed file 2011-11-14 13:03:12 -08:00
Jamie Winsor
9255e1a71e Merge pull request #151 from enmasse-entertainment/page-title-seo-improvements
Page title seo improvements
2011-11-11 12:11:15 -08:00
Shaun
d90c831cca ensure page titles on date-based and tag-based archive views are unique 2011-11-11 12:09:05 -08:00
Shaun
1d5dfb1fdd remove redundancy in page title 2011-11-11 12:08:42 -08:00
Jamie Winsor
92e8230194 gemspec is not regenerated manually anymore 2011-11-11 11:46:06 -08:00
Philip Arndt
f9f56c6f1c Merge branch 'master' into rails-3-1
Conflicts:
	app/controllers/admin/blog/posts_controller.rb
	app/controllers/blog/posts_controller.rb
2011-11-10 09:23:02 +13:00
Philip Arndt
12164fd95a Merge pull request #148 from vertjustin/master
Blog tabs were goobered by some jquery ui CSS.
2011-11-09 12:13:40 -08:00
Justin Edwards
2b045432f9 cleaned up appearance of tabs on blog engine admin 2011-11-09 13:46:28 -06:00
Uģis Ozols
81475ff380 Merge pull request #147 from greendog/rails-3-1
Generator for installing migrations
2011-11-09 10:32:00 -08:00
greendog
f5d94d60b8 added install migratons generator 2011-11-09 22:01:53 +04:00
Philip Arndt
36c005ecd1 Refactored everything (models, helpers) into proper namespace of Refinery::Blog. Requires refinery commit 25162b585b9c4023d39fd1a9796140bfa4ecb909 2011-11-09 22:19:07 +13:00
Uģis Ozols
d18364d359 Use root menthod to set engine factory path. 2011-11-06 21:28:25 +02:00
Uģis Ozols
9936281bb8 Regenerate gemspec. Closes #146. 2011-11-06 07:26:48 +02:00
Uģis Ozols
a85b7ffab0 Specify correct path to factories. 2011-11-04 15:54:12 +02:00
Jamie Winsor
151629f044 Update travis.yml to use dummy app for testing 2011-10-28 13:20:11 -07:00
Jamie Winsor
c2a0ef9f41 Merge branch 'use-generated-dummy-for-testing' into rails-3-1 2011-10-28 13:17:48 -07:00
Jamie Winsor
fd7ce5e692 Update readme on how to test 2011-10-28 13:07:27 -07:00
Jamie Winsor
b1baeba3d2 seo meta table migration removed
We should not generate the seo meta table here - it is handled by refinerycms if the user wants it
2011-10-28 13:05:32 -07:00
Jamie Winsor
be06f1658d Add rspec rake tasks 2011-10-28 13:05:22 -07:00
Jamie Winsor
3165574730 Move blog tab accessor and class array to blog file from tab file 2011-10-28 12:15:07 -07:00
Jamie Winsor
4577f788e5 No need to explicitly call load_factories for Refinery::Testing 2011-10-28 12:13:16 -07:00
Jamie Winsor
e01e9ff9b7 Tabs are autoloaded, don't need to explicitly require 2011-10-27 19:37:38 -07:00
Jamie Winsor
14daff297b Refactor require layout to match other engines 2011-10-27 19:36:54 -07:00
Jamie Winsor
2b73c292c8 Seed data should not be loaded mid migration
Column information is not totally generated and seed will be done at end of migration run
2011-10-27 18:38:48 -07:00
Jamie Winsor
5a958007c5 Update blog generator to use Rails 3.1 base
Seeds will now follow Rails 3.1 conventions
2011-10-27 18:12:32 -07:00
Jamie Winsor
8cd4a282d8 This is the blog engine... not hte resources engine.. 2011-10-27 15:29:02 -07:00
Jamie Winsor
0de4fd9582 Add ENGINE_ROOT constant to Rakefile for refinerycms-testing tasks 2011-10-26 13:50:26 -07:00
Jamie Winsor
4ddc2b3754 Add spec/dummy to git ignore file 2011-10-26 13:29:41 -07:00
Jamie Winsor
5dd11ffc61 Remove Refinery::Application route draw call, it no longer exists 2011-10-26 13:29:01 -07:00
Jamie Winsor
993b4a8b1b Update engine definition
Isolate engine to Refinery
add engine name
Add initializer to register engine with Refinery
Rename plugin init initializer to be more descriptive
Update plugin initializer to conform to latest master of RefineryCMS
2011-10-26 13:28:54 -07:00
Jamie Winsor
db93751fd6 Modify Rakefile to load engine tasks and testing railtie tasks 2011-10-26 13:12:26 -07:00
Jamie Winsor
1b3195bf30 Remove dummy application for testing 2011-10-26 13:11:54 -07:00
Jamie Winsor
4ab9eccdee Add rbenv files to gitignore 2011-10-26 13:07:00 -07:00
Jamie Winsor
64d83c5ce4 Regenerate gemspec 2011-10-11 18:21:49 -07:00
Philip Arndt
eb487f0e4e Merge pull request #144 from resolve/expose-factories
Load refinerycms factories properly
2011-10-10 19:42:38 -07:00
Jamie Winsor
754cddb141 Load refinerycms factories properly
Expose blog factories to other gems
2011-10-10 19:39:51 -07:00
Uģis Ozols
85419ce88e Merge pull request #143 from Kagetsuki/rails-3-1
Rails 3 1 jp to ja correction
2011-10-10 10:46:55 -07:00
Joe Sak
ff960785df Merge pull request #142 from Kagetsuki/master
jp to ja to correct for naming correction
2011-10-10 10:45:17 -07:00
影月 零
19ee4b8f69 jp to ja correction 2011-10-11 02:43:58 +09:00
影月 零
84e1a277cb moved jp to ja to match naming correction 2011-10-11 02:39:44 +09:00
Uģis Ozols
ea4f1961b2 Merge pull request #141 from stanmx/master
Complete traduction of es.yml file
2011-10-05 21:07:49 -07:00
Estanislao
ceaf2a0aa7 complete traduction of es.yml 2011-10-05 17:59:08 -07:00
Jamie Winsor
5e91670a80 Fix draft preview of blog posts 2011-09-21 00:56:54 -07:00
Jamie Winsor
df0664b142 Update gemspec
[ci skip]
2011-09-19 19:11:40 -07:00
Philip Arndt
8a69c623bb Merge pull request #139 from resolve/abstract-filters-into-controller-helper
Abstract filters into controller helper
2011-09-19 19:06:25 -07:00
Jamie Winsor
1b51e2343d setting indentation to 'rails way' for protected and private classes 2011-09-19 18:58:31 -07:00
Jamie Winsor
362088d027 Fix indent on protected methods 2011-09-19 18:50:38 -07:00
Jamie Winsor
be7d341532 Namespace BlogController into Blog::BaseController 2011-09-19 18:48:29 -07:00
Jamie Winsor
de4cc6b9ef Namespace BlogControllerHelper to Blog::ControllerHelper 2011-09-19 18:43:09 -07:00
Jamie Winsor
c40eb83af3 remove duplicate BlogControllerHelper include 2011-09-19 18:35:58 -07:00
Jamie Winsor
d37ef11f63 Abstract filter methods into controller helpers
This will enable users to include the controller helper into their
own controllers to perform common functions - such as finding a blog
post or listing all blog posts.
2011-09-19 15:35:47 -07:00
Jamie Winsor
7fe5fe5de6 Merge pull request #136 from enmasse-entertainment/remove-unnecessary-js-includes
Remove jquery include - now handled by asset pipeline
2011-09-16 18:25:44 -07:00
Jamie Winsor
66b445ad5c Remove jquery include - now handled by asset pipeline 2011-09-16 18:24:34 -07:00
Jamie Winsor
76be452faf Merge pull request #135 from enmasse-entertainment/fix-devise-user
Change current_user to current_refinery_user
2011-09-14 16:28:42 -07:00
Jamie Winsor
65cb81b4c0 Change current_user to current_refinery_user
Fixes for 8294a86c13
2011-09-14 16:25:50 -07:00
Philip Arndt
af16fd8263 Merge pull request #134 from keram/master
re support canonical on multilanguage website
2011-09-10 16:57:27 -07:00
Marek
c1903f5797 fix corrupted indentation 2011-09-11 01:53:01 +02:00
Marek
20cffcee84 canonical tag for posts 2011-09-11 00:10:07 +02:00
Philip Arndt
cc3be37a41 Merge pull request #131 from wakeless/rails-3-1
Fix for ::Refinery::AdminController
2011-09-05 01:37:17 -07:00
Michael Gall
6be013e0c0 Second commit for ::Refinery::AdminController 2011-09-05 15:54:57 +10:00
Philip Arndt
d8f36a4196 Merge pull request #128 from enmasse-entertainment/rails-3-1
Revert sweeper's expiration parameter to strings for now
2011-09-04 15:56:27 -07:00
Jamie Winsor
88556fe709 Revert sweeper's expiration parameter to strings for now 2011-09-04 15:54:51 -07:00
Philip Arndt
f584651b58 Merge pull request #127 from enmasse-entertainment/more-comment-fixes
More comment fixes
2011-09-04 15:28:07 -07:00
Jamie Winsor
b9c44d851e use let instead of let! when we can lazily load these fixtures 2011-09-04 15:10:00 -07:00
Jamie Winsor
4d4ae4e682 accidentally had refinerycms pointing to my local filesystem... 2011-09-04 14:57:38 -07:00
Jamie Winsor
e35e3994d5 convert expire_page parameters in blog sweeper from strings to url helpers 2011-09-04 14:48:35 -07:00
Jamie Winsor
ba38b63370 remove useless comment 2011-09-04 14:47:24 -07:00
Jamie Winsor
3431b15ef3 fix localization string for submit button on comment 2011-09-04 14:46:45 -07:00
Jamie Winsor
ec6ed3f951 accidentally had left perform_caching set to true 2011-09-04 14:40:12 -07:00
Jamie Winsor
7903bdfed2 refactor factories and add #show tests for posts controller
Do not want to cache classes, but do want to reload models after factory girl:

http://groups.google.com/group/factory_girl/browse_thread/thread/daa24556d90c31fc
http://stackoverflow.com/questions/5145165/associationtypemismatch-and-factorygirl

rails_autolink was removed from Rails 3.1 and abstracted to an external gem
fix display author name and post time on comment show
fix namespace for thanking and moderated flash notices
2011-09-04 14:35:03 -07:00
Philip Arndt
40be4f71ee Merge pull request #126 from enmasse-entertainment/fix-comments
Fix comments
2011-09-03 22:09:51 -07:00
Jamie Winsor
6212e60f9e index action of blog post controller now caches and sweeps on changes
fix various views which were broken and untested with rails-3-1 upgrade
add request spec tests for admin blog comments
Factory is now FactoryGirl
Fix multiple issues around listing unmoderated comments
use cleaner definitions to set per_page willpaginate attribute on models
update all paginate calls to use new arel representation
reorganize filter sections to be located at top of controller
modify uncategorized class method to activerecord scope and perform a left outer join instead of iterate through an array to find uncategorized posts
move request specs into their proper places
update guardfile to ensure that request specs get run when their respective controllers are modified
Fix show action for AdminBlogComments and added test
Fix redirection link after approving or rejecting a comment
2011-09-03 21:55:30 -07:00
Philip Arndt
80ca7c1bf9 Config is deprecated, using RbConfig instread. 2011-09-03 16:40:25 +12:00
Philip Arndt
4439f6afda Using edge awesome_nested_set until 2.0.2 gem is released to fix deprecation warnings. 2011-09-03 11:44:35 +12:00
Philip Arndt
0497261f39 Converted Factory to FactoryGirl to fix deprecation warnings. 2011-09-03 11:44:21 +12:00
Philip Arndt
67cc6b4512 Merge pull request #125 from enmasse-entertainment/green-tests
Green tests
2011-09-02 16:05:50 -07:00
Jamie Winsor
2053a022a2 remove accidental inclusion of future feature 2011-09-02 14:21:19 -07:00
Jamie Winsor
fc68f22858 update and import refinerycms migrations and seeds
update Guardfile, spec_helper, and support files to match those generated by refinerycms-testing
2011-09-02 13:35:25 -07:00
Philip Arndt
1779274971 Added sqlite3, pg, mysql2 to the Gemfile and added Jamie to the notifications list for TRavis. 2011-09-02 13:06:38 +12:00
Philip Arndt
97ad55cbf0 Travis is saying that it wants sqlite3, pg and mysql2 gems. 2011-09-02 12:50:56 +12:00
Philip Arndt
05bc8bc962 Merge pull request #124 from enmasse-entertainment/travis-ci
Travis ci
2011-09-01 17:40:22 -07:00
Jamie Winsor
34e5da1347 Disable libnotifications for travis 2011-09-01 16:18:07 -07:00
Uģis Ozols
5e5c6a78af Merge pull request #122 from enmasse-entertainment/revise-gemfile
Revise gemfile for Rails 3.1
2011-08-31 12:02:36 -07:00
Jamie Winsor
2bd8df5d4f Devise edge no longer required for Rails 3-1 branch 2011-08-31 11:59:46 -07:00
Philip Arndt
372235b963 Merge pull request #121 from wakeless/attr_accessible
Attr accessible
2011-08-30 19:22:26 -07:00
Michael Gall
0791d3a2e5 Add attr_accessible to blog posts to interact better with page_images 2011-08-31 12:16:40 +10:00
Philip Arndt
2f695519da Merge pull request #120 from enmasse-entertainment/revise-gemfile
Revise gemfile to support latest master branch of refinerycms
2011-08-29 18:17:11 -07:00
Jamie Winsor
9df6580d9c gemspec revision to support latest master branch of refinerycms 2011-08-29 15:09:53 -07:00
Uģis Ozols
36affef45e will_paginate is back. 2011-08-25 13:57:59 +03:00
Uģis Ozols
33967b1649 Merge pull request #118 from Progressbar/master
minor fix in slovak translation
2011-08-22 10:23:46 -07:00
progressbarsk
32b52f975f fix slovak grammar 2011-08-22 18:51:29 +02:00
Philip Arndt
6b73469c1a Merge pull request #117 from enmasse-entertainment/rails-3-1-rc6-support
Rails 3 1 rc6 support
2011-08-18 15:03:23 -07:00
Jamie Winsor
d0681c273c Update gemspec to require newest version of seo_meta 2011-08-18 14:51:51 -07:00
Philip Arndt
d8f82439eb Merge pull request #116 from enmasse-entertainment/use-fuubar-formatting
Use fuubar formatting
2011-08-15 00:50:56 -07:00
Philip Arndt
5e6f9bc270 Merge pull request #115 from enmasse-entertainment/fix-testing-not-loaded
Fix testing not loaded
2011-08-15 00:49:37 -07:00
Jamie Winsor
9363e8d8c5 Update Gemfile to what would be generated by Refinerycms 2011-08-15 00:37:43 -07:00
Jamie Winsor
8434790df7 Use fuubar formatting for rspec 2011-08-15 00:15:36 -07:00
Jamie Winsor
028489bf15 This will fix the build when runing rspec spec/. If you do not specify refinerycms-testing in the development group of the Gemfile it will not be properly loaded. 2011-08-15 00:13:54 -07:00
Philip Arndt
eaaa351f3a Merge pull request #113 from enmasse-entertainment/ruby-187-support
Ruby 187 support
2011-08-14 23:31:15 -07:00
Jamie Winsor
aed0b8f173 Move gemspec method to top of file
http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
2011-08-14 23:14:46 -07:00
Jamie Winsor
13cafc0947 Syntax fixes for Ruby 1.8.7 2011-08-14 19:32:25 -07:00
Philip Arndt
87bc12a1e4 HI 2 U TRAVIS; This is how to run specs in this engine 2011-08-15 13:07:26 +12:00
Philip Arndt
9b74f31a2a Merge remote-tracking branch 'enmasse-entertainment/fix-gemspec-filelist' into rails-3-1 2011-08-15 13:00:13 +12:00
Philip Arndt
79c63a56e0 Merge pull request #112 from map7/master
Fixed listing of uncategorized posts for Rails 3
2011-08-14 17:57:36 -07:00
Jamie Winsor
cb2bcf387c remove empty directory from gemspec file list 2011-08-14 17:40:50 -07:00
Michael Pope
dbd2561fe6 fixed listing of uncategorized posts 2011-08-15 10:30:59 +10:00
Uģis Ozols
e70193ca11 Update readme. 2011-08-14 00:51:41 +03:00
Uģis Ozols
dbb02d953f Move factories under spec dir so that they get picked up by spec_helper. 2011-08-13 21:57:43 +03:00
Jamie Winsor
fbcf2bd34a Ignore .lock files in Gemspec 2011-08-12 12:44:39 -07:00
Uģis Ozols
d0d5d9eb7d There's no test directory. 2011-08-12 08:59:15 +03:00
Uģis Ozols
7ae6e146b2 Use arel 2.1.4 for now because 2.1.5 got yanked. 2011-08-12 08:55:00 +03:00
Philip Arndt
83d407c8bb Need to use edge everything, excluding spec/dummy from the gemspec. 2011-08-12 11:26:37 +12:00
Jamie Winsor
eca7a1a591 Remove spork as a development dependency
Add spork to development & test group in Gemfile
Fix ControllerMacros and RequestMacros namespace in refinery support file
2011-08-11 03:08:12 -07:00
Jamie Winsor
45d8663de5 Dummy app is no longer a submodule, now part of the projected - generated by testing generator
Remove remaining traces of cucumber
2011-08-10 17:03:37 -07:00
Jamie Winsor
cfba1b86d1 Add Rails3.1 assets gemfile entry into Gemfile (required to start Rails dummy app)
Bump dummy app head
2011-08-06 04:45:27 -07:00
Jamie Winsor
ad784342dd test database will be initialized before rake rspec is run 2011-08-04 17:49:18 -07:00
Jamie Winsor
87f478e664 Update testing setup task to reflect new namespace 2011-08-04 17:38:39 -07:00
Jamie Winsor
0516a2cc00 Update gemspec 2011-08-04 15:54:53 -07:00
Jamie Winsor
82ca14af89 Update Rakefile to include rspec task 2011-08-04 15:53:53 -07:00
Jamie Winsor
ee215655cb Replace cucumber tag features with rspec request tests
Remove cucumber support from project
2011-08-04 15:39:04 -07:00
Jamie Winsor
8bd056e3e8 Replace category.features with capybara rspec requests
Update FactoryGirl factory definition syntax
2011-08-04 15:11:05 -07:00
Jamie Winsor
84a2fcdf08 Replace authors.feature with capybara rspec tests 2011-08-04 13:59:29 -07:00
Jamie Winsor
c3b7d0b1d2 Add request and controller authentication macros to rspec config
refactor request specs to take advantage of authentication macros
2011-08-04 03:21:21 -07:00
Jamie Winsor
a23689a6aa Remove shared functionality that now exists in refinerycms-testing engine 2011-08-04 03:12:38 -07:00
Jamie Winsor
1c186d26d0 Remove (commented out) duplicate refinerycms-testing gem requirement 2011-08-03 22:33:04 -07:00
Jamie Winsor
c481c78afa Require refinerycms-testing framework
Location of testing tasks changed
2011-08-03 22:25:41 -07:00
Jamie Winsor
e85535da5f Refactor testing tasks out of this project and into refinerycms project 2011-08-03 20:56:12 -07:00
Jamie Winsor
d3eff64d19 Add rake tasks to initialize the testing environment
Update README to reflect new functionality
2011-08-03 20:38:41 -07:00
Jamie Winsor
274ba14ea2 refactor dummy application into git submodule 2011-08-03 19:18:19 -07:00
Jamie Winsor
13c35c2620 rename default database for mysql and postgres example databases 2011-08-03 19:02:27 -07:00
Jamie Winsor
00d71519a9 Rid this project of autotest 2011-08-03 19:02:16 -07:00
Jamie Winsor
5e24eeb3d2 Update README with additional development instructions 2011-08-03 18:27:20 -07:00
Jamie Winsor
21b19db5a3 refactor engine testing scenario
Engine is now tested standalone by leveraging a dummy rails app
Enable Guard for speedy testing
Move factories to the more standard location `spec/factories/*`
Update README with a Testing section
Rename migrations to contain datetimestamps for their version to fix migration order issues when migrating the dummy application
2011-08-03 18:01:32 -07:00
Uģis Ozols
3454a9c300 I18n scope fix. 2011-08-03 16:59:31 +03:00
Uģis Ozols
fddcebd878 Make those specs green again. 2011-08-03 13:54:07 +03:00
Uģis Ozols
476ad3f158 WIP - use asset pipeline. 2011-08-03 13:17:16 +03:00
Uģis Ozols
806aef1858 Fix some I18n translations. 2011-08-03 13:09:02 +03:00
Philip Arndt
a86b7698a1 Merge pull request #108 from ricaurte/rails-3-1
Update to Pull Request
2011-07-30 13:39:04 -07:00
Justin Ricaurte
999f9e7c0e Made it so that comments and the body_content_right have been further refactored out, so that they can be easily overridden. body_content_right can also now have things prepended and appended to it. 2011-07-30 13:11:22 -07:00
Justin Ricaurte
bd3591c6d1 Made it so that comments and the body_content_right have been further refactored out, so that they can be easily overridden. body_content_right can also now have things prepended and appended to it. 2011-07-30 13:11:12 -07:00
Philip Arndt
302c1ea05a Merge pull request #107 from enmasse-entertainment/fix-i18n-nested-deprecation
Fix i18n nested deprecation
2011-07-30 02:06:24 -07:00
Jamie Winsor
b70ed6de02 Fix [DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.attributes.refinery" is no longer supported
Fix [DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.models.refinery" is no longer supported
2011-07-30 01:58:48 -07:00
Philip Arndt
28492b69e0 Merge pull request #106 from enmasse-entertainment/refactor-archive-list-to-widget
Refactor archive list to widget
2011-07-29 23:20:22 -07:00
Jamie Winsor
dbedb27c04 Refactor blog_archive_list helper function into blog_archive_widget function (with alias for compatability)
Fix archive view for rails-3-1 support
2011-07-29 15:15:06 -07:00
Uģis Ozols
0f3be1a0b4 DB isn't cleared from previous test data. For now clear it ourselves but as feature todo - fix it. 2011-07-29 14:17:30 +03:00
Uģis Ozols
6e2046f4b9 Need a user first because otherwise it will redirect to first user creation form. 2011-07-29 07:55:13 +03:00
Uģis Ozols
0cf860f577 Manage blog posts request specs are now green. 2011-07-29 06:05:40 +03:00
Philip Arndt
f0c2eb9867 Merge pull request #105 from enmasse-entertainment/rails31-compatability-fixes
Rails31 compatability fixes
2011-07-28 17:49:47 -07:00
Jamie Winsor
a70ea17038 Update translation scopes
Update url helpers in public views
Various uninitialized constant fixes for public views & controllers
Add some request specs to test what was fixed in this commit
2011-07-28 17:29:34 -07:00
Uģis Ozols
17f08ab5cb Update translation scopes and routes. 2011-07-28 13:39:05 +03:00
Uģis Ozols
3475603f72 More request specs and updates to code to make specs pass. 2011-07-28 12:05:43 +03:00
Uģis Ozols
106571cded Start to add request specs. 2011-07-28 11:29:32 +03:00
Uģis Ozols
9d23338de2 Array is paginated differently. 2011-07-28 10:37:36 +03:00
Uģis Ozols
e0714c2ed0 Update some translation scopes. 2011-07-28 06:33:12 +03:00
Uģis Ozols
80048a6a31 Properly namespace translations. 2011-07-27 23:17:43 +03:00
Uģis Ozols
bba9d632d6 will_paginate -> paginate. 2011-07-27 22:53:46 +03:00
Uģis Ozols
d3da59e3f2 Remove per_page pagination code from controllers. 2011-07-27 22:50:02 +03:00
Uģis Ozols
109184377f Move per_page pagination stuff into model to dry up posts controller. 2011-07-27 22:41:42 +03:00
Uģis Ozols
164dc27a42 Cucumber tag steps now pass. 2011-07-27 22:32:26 +03:00
Uģis Ozols
ded42bc691 Cucumber category steps now pass. 2011-07-27 21:25:56 +03:00
Uģis Ozols
b5646a35c9 Cucumber author steps now pass. 2011-07-27 21:22:19 +03:00
Uģis Ozols
06071e5580 Wip. 2011-07-27 17:28:09 +03:00
Uģis Ozols
3fa8937b95 Rails 3.1 - wip. 2011-07-27 13:46:24 +03:00
Joe Sak
e5db679226 Merge pull request #103 from jackkinsella/master
Rss feed now shows all posts instead of a small number limited by pagination
2011-07-22 07:29:59 -07:00
Jack Kinsella
216959f3b4 Blog:PostsController#index doesn't paginate the blog posts if an rss feed is requested. 2011-07-22 06:56:46 -07:00
Jack Kinsella
d8a2fe3eec Using preferred "defaults" hash to set format of blog/feed.rss to "rss". 2011-07-22 06:54:28 -07:00
Joe Sak
5d493b154c maybe do this through a migration? 2011-07-18 15:24:30 -05:00
Joe Sak
b78486ce1e categorization has_many :through should have an ID, and the relationship should be destroyed if the blog post or category is 2011-07-18 14:56:51 -05:00
Joe Sak
98b6052f1f readonly author just for safety's sake 2011-07-18 14:55:47 -05:00
Uģis Ozols
4718d03a87 Merge pull request #100 from mirosr/i18n_bg
Revision for Bulgarian translation mainly for consistency
2011-07-15 03:08:55 -07:00
Miroslav Rachev
43ed7f3107 Revision for Bulgarian translation mainly for consistency 2011-07-15 12:50:12 +03:00
Joe Sak
9c93abc466 weird sentence fix and that RAW thing with mailer 2011-07-13 16:40:17 -05:00
Joe Sak
146eeb00aa I don't know, it looks like before_filters are down here 2011-07-12 16:40:12 -05:00
Joe Sak
c82a32ed3e this is the 'railscasts' way of handling the category checkboxes 2011-07-12 16:39:33 -05:00
Uģis Ozols
8aad45e5b0 Merge pull request #97 from kennyadsl/master
just updated the italian locale
2011-07-05 06:49:18 -07:00
Alberto Vena
465861f05f Added some missing keywords and edited others 2011-07-05 06:40:24 -07:00
Philip Arndt
3d9f6319b4 Merge pull request #96 from Kagetsuki/master
Added Japanese locale
2011-07-04 20:18:08 -07:00
ゼロ
62186bd4dd added Japanese locale. 日本語の翻訳を追加した。 2011-07-05 12:15:05 +09:00
Uģis Ozols
16984d7a1f Spec context is about false. 2011-07-04 19:26:04 +03:00
Joe Sak
ef71ace6ac Merge pull request #94 from JohanB/feature/disable_teaser_if_length_zero
Added ability to disable teaser independent of teaser length
2011-07-04 09:04:56 -07:00
Johan Bruning
412d542817 Copy / Paste mistake fixed 2011-07-04 16:33:01 +02:00
Johan Bruning
cacb6a57fa Forgot to add translations for languages I know 2011-07-04 16:30:34 +02:00
Johan Bruning
8d031ed0c7 Added ability to disable teaser independent of teaser length
I prefer full length articles at all times on blogs and don't like teasers. I added the ability for people to disable teasers so full articles will be shown by default. The teasers can e enabled just like comments from the admin page or trough the normal settings.

However not sure if the post partial now is conform standards. Maybe the helper method "blog_post_teaser" could encapsulate the check which is now done in the view and return the full length article instead of a teaser if the teasers are disabled.
2011-07-04 16:22:48 +02:00
Philip Arndt
0e4dbb28e9 Fixed indentation, use spaces not tabs. 2011-07-02 11:58:26 +12:00
Uģis Ozols
0076d0a9fa Merge pull request #92 from ruprict/master
Fix plugin pathname
2011-07-01 09:22:59 -07:00
Glenn Goodrich
80c7cd4fd1 Fix plugin pathname so refinery:override tasks work 2011-07-01 12:20:28 -04:00
Joe Sak
ba071d3776 don't know how we got away with this not being here 2011-06-30 16:40:59 -05:00
Philip Arndt
aa727f6ccf fix my typos 2011-07-01 09:32:40 +12:00
Philip Arndt
7028ef3ddd Making use of modules and putting classes under modules. 2011-07-01 09:14:46 +12:00
Philip Arndt
47a71b309f Making use of translation scopes. 2011-07-01 09:12:27 +12:00
Joe Sak
46021c66f4 wanna keep track of ideas, i guess 2011-06-30 15:30:14 -05:00
Joe Sak
6cb45c9963 just remove this and it's fine, we won't have to remember to use it for future attrs 2011-06-30 15:25:22 -05:00
Joe Sak
346584ff42 Merge pull request #90 from mirosr/i18n_bg
Added translation for teaser's title
2011-06-30 12:50:46 -07:00
Joe Sak
22d3be7099 Merge pull request #89 from ugisozols/master
Remove old code.
2011-06-30 12:50:35 -07:00
Miroslav Rachev
49d180fda2 Added translation for teaser's title 2011-06-30 22:11:41 +03:00
Uģis Ozols
dbe5e07341 Remove old code. 2011-06-30 21:55:31 +03:00
Joe Sak
d71252420e Edited changelog.md via GitHub 2011-06-30 10:35:22 -07:00
Joe Sak
f251f7d016 Merge pull request #88 from mirosr/master
Fixed some embeded strings in English in admin/blog/posts/_form partial (Issue #86)
2011-06-30 10:32:54 -07:00
Miroslav Rachev
0825e0af44 Fixed some embeded strings in English in admin/blog/posts/_form partial (Issue #86) 2011-06-30 20:05:53 +03:00
Joe Sak
7fa3b30509 make the tag_name optional for crazy languages 2011-06-30 09:37:55 -05:00
Joe Sak
b5727f78e1 Merge pull request #87 from mirosr/i18n_bg
Added Bulgarian translation
2011-06-30 07:34:29 -07:00
Miroslav Rachev
f70faba8da Added Bulgarian translation 2011-06-30 15:51:16 +03:00
Joe Sak
ea1c6650b0 the checkbox list for categories was out of hand 2011-06-29 12:02:25 -05:00
Philip Arndt
462d81882e We released 1.6.2. 2011-06-29 16:25:42 +12:00
Philip Arndt
699d916480 Requiring at least refinerycms-core 1.0.3 2011-06-29 16:17:31 +12:00
Philip Arndt
b725799fef Refactored the spec suite to be consistent. 2011-06-29 13:23:48 +12:00
Joe Sak
cf335800da Edited changelog.md via GitHub 2011-06-28 12:57:22 -07:00
Joe Sak
82be905a7e This should be a slash to further clear up confusion on which param is which 2011-06-28 09:35:07 -07:00
Philip Arndt
bbfc87e4d9 Fixed failing tag feature. 2011-06-27 11:40:59 +12:00
Philip Arndt
d70e39c789 Only use custom_teaser if the migration has run 2011-06-27 10:53:31 +12:00
Philip Arndt
e7d107ca4f We will have to push a version 1.6.2 to fix 1.6.1 tag_list bug. 2011-06-27 10:26:23 +12:00
Philip Arndt
eb4b64a65b Ensure that the custom_teaser column exists before trying to use it incase the migration hasn't been generated/run. 2011-06-27 10:25:44 +12:00
Philip Arndt
05731559a0 Merge pull request #81 from ruprict/master
Bug in _post.html.erb (I think)
2011-06-26 15:05:17 -07:00
Glenn Goodrich
66d35b52f7 Fix error in views/blog/posts/_post, looping over tag_list, should loop over tags 2011-06-25 11:51:27 -04:00
Joe Sak
6ce56a33a0 Edited readme.md via GitHub 2011-06-23 16:52:59 -07:00
Joe Sak
7ec374e8c9 Merge pull request #79 from ivanoats/master
fixed trivial warnings
2011-06-23 15:14:13 -07:00
Ivan Storck
a011527cb9 fixed ruby 1.9.2 warnings about useless use of == in boid context 2011-06-23 10:21:26 -07:00
Joe Sak
bb09ca4e44 changelog upkeep 2011-06-23 10:01:01 -05:00
Joe Sak
4f61104623 this needs html_safe 2011-06-23 09:59:35 -05:00
Joe Sak
787a0916b1 Merge branch 'custom_teasers' of https://github.com/wikyd/refinerycms-blog into wikyd-custom-teasers 2011-06-23 09:43:53 -05:00
Philip Arndt
e906ed2eca A new day, a new release. 2011-06-22 17:11:49 +12:00
Joe Sak
0c077c63a7 changelog 2011-06-21 23:11:27 -05:00
Joe Sak
39a5167c20 tag url strategy updated 2011-06-21 23:09:18 -05:00
Joe Sak
074f8cf67b Needs to use ~* operator 2011-06-21 22:59:09 -05:00
Joe Sak
3b975e0d77 postgreSQL is picky about doing a LIKE query 2011-06-21 22:52:21 -05:00
Kyle Wilkinson
767346b694 Add button to copy the blog post's body to the teaser editor to get started on creating a custom teaser. 2011-06-21 15:45:56 -07:00
Kyle Wilkinson
e23af6bca7 Call tabs() method on admin tabs section only after the document is ready. This fixes the problem where the teaser editor was showing with a width of 0. Set the active tab to the initial tab on the blog post editor. 2011-06-21 03:13:28 -07:00
Kyle Wilkinson
6086e618c3 Add helper for finding the teaser to display for a blog post. Use this when displaying short version of blog posts. 2011-06-21 02:49:28 -07:00
Kyle Wilkinson
3c0412bfaa Add tab field for the custom teaser. Currently, width is set to zero for teaser editor... need to debug. 2011-06-21 02:48:48 -07:00
Kyle Wilkinson
610cd865f2 Allow custom_teaser field to be updated via forms. 2011-06-21 02:48:07 -07:00
Kyle Wilkinson
70e8d3c49c Add migration to create a new field on BlogPosts for custom teasers. 2011-06-21 02:09:16 -07:00
Philip Arndt
bce2877b2a Fixed migration numbering, regenerated gemspec. 2011-06-21 13:43:22 +12:00
Philip Arndt
584aeecc29 Using <section class='details'> instead of <details> to avoid this: https://skitch.com/parndt/ffa3d/refinery-cms-1.0-released-refinery-cms 2011-06-21 13:41:35 +12:00
Joe Sak
d32ae47b01 1.6 released 2011-06-20 20:02:00 -05:00
Philip Arndt
ab57edba40 Fix failure on Ruby 1.8.7 where lines can't begin with a . (it has to be on the previous line) 2011-06-21 12:21:13 +12:00
Joe Sak
9edadabd56 Edited changelog.md via GitHub 2011-06-17 07:46:08 -07:00
Joe Sak
6c14d65673 Merge pull request #76 from wikyd/custom_urls
Allow users to set a custom url for a blog post independent of the title
2011-06-17 07:45:16 -07:00
Kyle Wilkinson
e1390a0d72 Add field to edit custom url on BlogPosts. 2011-06-16 22:52:40 -07:00
Kyle Wilkinson
ec405cdbea Make blog_post custom_url field updatable. 2011-06-16 22:52:30 -07:00
Kyle Wilkinson
9320a6a608 Add logic to allow users to override the url for a post from just a title. 2011-06-16 22:52:21 -07:00
Kyle Wilkinson
07a1a81b95 Add migration to add custom_url field to BlogPost. 2011-06-16 22:52:11 -07:00
Joe Sak
b3c06562a4 you have to specify .css for some filenames 2011-06-15 11:24:40 -05:00
Joe Sak
9fbe0a644c changelog upkeep 2011-06-15 11:03:38 -05:00
Joe Sak
b8d2bcb913 autocomplete added for tags 2011-06-15 11:02:59 -05:00
Joe Sak
687ffb6286 changelog upkeep 2011-06-14 17:50:26 -05:00
Joe Sak
434ad6535e cached slugs speed things up 2011-06-14 13:53:22 -05:00
Joe Sak
0fb08973fd Merge pull request #75 from wikyd/upstream
Fix bug preventing updating of blog post categories
2011-06-14 07:29:33 -07:00
Kyle Wilkinson
117de953b7 Make category_ids attribute accessible so that blog categories can be updated. 2011-06-14 02:47:23 -07:00
Joe Sak
db82149876 Merge pull request #74 from wikyd/master
Add Paging to Category Show View
2011-06-13 20:23:40 -07:00
Kyle Wilkinson
a31f28126a Use the correct message for no posts on category show page. 2011-06-13 18:12:51 -07:00
Kyle Wilkinson
9310b41760 Modify the category view of the blog to show a paged view, rather than all blog posts. 2011-06-13 18:06:26 -07:00
Joe Sak
b91b381e8e this functionality exists in refinery, so the double bind makes it scroll right back up 2011-06-13 17:22:51 -05:00
Michael Gall
63ec02d44e Add spec for blog post categories 2011-06-08 10:57:15 +10:00
Joe Sak
5f31b50b61 Merge pull request #72 from ugisozols/master
Remove old code. (SO into this)
2011-06-03 12:31:42 -07:00
Uģis Ozols
aefcf291a9 Remove old code (< 0.9.9). 2011-06-03 22:25:01 +03:00
Joe Sak
7c36aa87f0 Merge pull request #71 from cerebroso/6511748e8d8c7b7da44d4b6f8592daf5e8cf451e
pt-BR translations
2011-06-03 11:17:54 -07:00
Ravi
6511748e8d pt-BR translation for some model attributes 2011-06-03 13:29:36 -03:00
Joe Sak
ff3134ab6b Merge pull request #70 from peresleguine/patch-1
Added translation for uncategorized posts.
2011-06-02 08:56:44 -07:00
Andrey
777ab482d0 Added translation for uncategorized posts. 2011-06-02 08:51:53 -07:00
Joe Sak
8a8980f74e Merge pull request #68 from ugisozols/master
Fix psyck yaml parse errors.
2011-06-01 08:25:45 -07:00
Uģis Ozols
e05d9665cb Fix psyck yaml parse errors. Should fix #64. 2011-06-01 16:17:06 +03:00
David Jones
ee47505833 fix locale key. 'i18n' was showing up in the blog index output 2011-05-31 14:57:05 +12:00
Philip Arndt
f0e4b6c8c1 This will have to be 1.6.0 when it's released. 2011-05-31 14:45:36 +12:00
Philip Arndt
8087ff5133 Merged remote branch 'keram/master'. 2011-05-31 14:39:31 +12:00
Philip Arndt
4f45963b9e Merged remote branch 'Dougui/add_translation' 2011-05-31 14:27:33 +12:00
Philip Arndt
8fc9af832c Wrapped javascript inside a jQuery wrapper. 2011-05-31 14:21:45 +12:00
Resolve Digital
e382521a7d Make the blog stylesheet work better with the default Refinery frontend stylesheet. Without this all posts displayed have a 1000px wide header and footer. 2011-05-30 19:18:48 -07:00
Philip Arndt
2dc08f3a49 tab -> tabs and requiring the file on to_prepare so that it actually loads. Fixed specs now that the form 'looks' different. 2011-05-31 14:16:04 +12:00
Michael Gall
60fc7839f8 Add page-like tab functionality 2011-05-31 13:53:56 +12:00
David Jones
7bb8b056f5 Merge branch 'master' of github.com:resolve/refinerycms-blog 2011-05-31 13:52:48 +12:00
David Jones
b7894a900b fixed issue where the tags heading was showing up even though there are no tags 2011-05-31 13:52:30 +12:00
Philip Arndt
8482525f22 Merge pull request #66 from Tranquility/patch-1
add missing translation
2011-05-30 13:09:35 -07:00
Ole Reifschneider
bc4158de0f add missing translation 2011-05-30 04:57:36 -07:00
Guirec CORBEL
d5f35854ba add some options for translation and translate in french 2011-05-29 14:42:14 -04:00
Guirec CORBEL
0582c00133 add some options for translation and translate in french 2011-05-29 14:35:40 -04:00
Guirec CORBEL
0310b48954 add some options for translation and translate in french 2011-05-29 14:34:53 -04:00
Philip Arndt
3a5d3f56f3 Wow, I'm getting good at releasing new versions of this. Fixes size (again). 2011-05-28 00:32:20 +12:00
Philip Arndt
2d41081770 use options[:size] not size. 2011-05-28 00:28:31 +12:00
David Jones
6287603a2b Updated readme to latest versions 2011-05-27 05:24:19 -07:00
Philip Arndt
5cc058dfe1 Documented changes in this very small 1.5.0 release. 2011-05-27 23:43:14 +12:00
Philip Arndt
ff795b2ab0 Added avatar to blog comments based on email address associated with a gravatar. 2011-05-27 23:41:56 +12:00
David Jones
92e128d2fb don't need p tags here because simple_format already renders those for us 2011-05-27 21:51:34 +12:00
Philip Arndt
f88cd445a1 Allow plugin to work on Refinery CMS ~> 1.0.0 again, rebranded as 1.5.0 2011-05-26 14:15:56 +12:00
Philip Arndt
e7a9a0a7bb Decrement the required RefineryCMS version back down to 0.9.9.22 so that we can release 1.4.0. 2011-05-26 14:07:32 +12:00
Philip Arndt
083c6d21a7 Target RefineryCMS ~> 1.0.0. 2011-05-22 18:31:16 +12:00
Marek
5c58ba20b0 For backwards compatibility must be approximate_ascii and strip_non_ascii by default false 2011-05-19 11:56:46 +02:00
Marek
2d37cbf479 Approximate ascii on blog slugs. For: GH-60 2011-05-19 01:11:45 +02:00
Joe Sak
4cb096d256 Edited lib/generators/refinerycms_blog_generator.rb via GitHub 2011-05-10 15:48:52 -07:00
Joe Sak
18f0f69810 Edited app/models/blog_post.rb via GitHub 2011-05-10 15:46:36 -07:00
Joe Sak
887251e53c Edited lib/generators/refinerycms_blog_generator.rb via GitHub 2011-05-10 15:38:30 -07:00
Joe Sak
55e0382220 Edited refinerycms-blog.gemspec via GitHub 2011-05-10 15:22:50 -07:00
Philip Arndt
a9a0c5a385 Tag all blog features with @blog. 2011-05-09 10:50:19 +12:00
Marc Remolt
f917935994 I hate string evals 2011-05-09 10:47:10 +12:00
Marc Remolt
fe39fc757a Model spec filenames should be singular 2011-05-09 10:47:10 +12:00
Marc Remolt
fa9e6dae6d Fixes for blog_post specs
* spec "returns all posts from specified month" failed on the second day of a month
* refactorings and cleanups (while I'm at it)
2011-05-09 10:47:10 +12:00
Philip Arndt
76708704c8 seo_meta 1.0.6 creates & saves more consistently so let's use it. 2011-05-06 01:21:28 +12:00
Philip Arndt
37de337eaf Present the blog post's meta information now. This will require refinerycms-core 1.0.0 2011-05-06 00:48:22 +12:00
Philip Arndt
45bbd56a51 Added form fields for SEO and translations. 2011-05-06 00:28:14 +12:00
Philip Arndt
e6af3d9c1a Add is_seo_meta call to blog posts. 2011-05-05 23:46:28 +12:00
Philip Arndt
1ae97bb9b1 Depend on seo_meta and create a migration for it unless it already exists. 2011-05-05 23:44:05 +12:00
Philip Arndt
03e105b9e0 Ensure that the seeds don't blow up when either 'User' or 'Page' are not defined. 2011-04-27 22:17:30 -07:00
Philip Arndt
1f72e3d90a Made version code more accessible and fixed up lib/gemspec.rb 2011-04-25 13:43:14 +12:00
Joe Sak
5e69fdac17 use factory_girl in development 2011-04-22 16:13:28 -05:00
Joe Sak
7746f86dbf have to explicitly require factory girl 2011-04-22 16:05:08 -05:00
Joe Sak
fe3bb08fcf tests were failing all over the place 2011-04-22 15:05:55 -05:00
Joe Sak
b0d7a687b7 Revert "bumping to 1.4 released"
This reverts commit 57b79b7508.
2011-04-22 13:48:50 -05:00
Joe Sak
57b79b7508 bumping to 1.4 released 2011-04-22 13:44:29 -05:00
Robin Wenglewski
688e7002ed fix for issue 58 2011-04-04 19:11:24 +02:00
Philip Arndt
f38e8750ea Made the distinction between branches supporting rails 3.0.x and rails 2.3.x clearer. 2011-04-03 16:18:26 -07:00
Philip Arndt
b20ac15c52 Define acts-as-taggable-on in the lib/gemspec.rb so that it's recreated every time. 2011-04-03 14:56:23 +12:00
Philip Arndt
8c8539d0de Merge remote branch 'michaek/master' 2011-04-03 14:55:59 +12:00
Philip Arndt
5e00a69f8a Added friendly_id to categories so instead of /categories/1 we get, say, /categories/news 2011-04-02 12:10:59 +13:00
Philip Arndt
0d76f30fa3 mild refactor, one line if statement and decreased an indent one level. 2011-04-02 12:10:42 +13:00
Michael Hellein
a581629adb removed nonexistent files from gemspec 2011-03-29 11:18:13 -04:00
Joe Sak
0f789a77a5 acts-as-taggable-on is a dependency, yo 2011-03-28 21:10:11 -05:00
Joe Sak
1568c66cd0 Merge branch 'master' of https://github.com/natebird/refinerycms-blog into natebird-master 2011-03-27 17:04:33 -05:00
Philip Arndt
aed62fa7a0 We need to start targeting refinerycms-core not refinerycms because this would prevent people building their own stack and using this engine. 2011-03-28 08:55:15 +13:00
Nate Bird
c583f930e8 Fixed for failed migration when installing refinery_cms_blog. Also makes it consistent with generated engine format. 2011-03-25 08:18:57 -07:00
Leonard Punt
3642dfbe31 improved and completed the Dutch translation 2011-03-24 18:49:55 +01:00
Joe Sak
390adb6134 Merge branch 'master' of https://github.com/MarceloCajueiro/refinerycms-blog into MarceloCajueiro-master 2011-03-15 11:57:51 -05:00
Marcelo Griggio Cajueiro
6b6179fafe Added pt-Br translations to uncategorized. 2011-03-15 15:06:03 +13:00
Marcelo Griggio Cajueiro
8621b468ed Added pt-Br translations to uncategorized. 2011-03-14 23:02:40 -03:00
Joe Sak
5eac0f349b changelog update 2011-03-13 10:44:23 -05:00
Joe Sak
c5691be23c Merge branch 'i18n_sk_cs' of https://github.com/keram/refinerycms-blog into keram-i18n_sk_cs 2011-03-13 10:42:03 -05:00
keram
af4fabe1c5 Slovak and Czech translation 2011-03-13 16:25:08 +01:00
Joe Sak
418244ff52 Changelog udpated to reflect tags 2011-03-11 14:26:10 -06:00
Joe Sak
3748c1d9ef Closes GH-29. Blog posts act as taggable. rspec & cukes passing 2011-03-11 14:23:44 -06:00
Joe Sak
b3f95341c3 More test coverage for tags: can fill tags in on admin form 2011-03-11 13:21:24 -06:00
Joe Sak
ac7a6f6636 Acts as taggable installed 2011-03-11 12:58:58 -06:00
Nick Plante
bd2802161a chinese locale data 2011-03-11 09:55:38 -05:00
Philip Arndt
6241c9f72d Incremented version to 1.3.2 2011-03-09 10:21:40 +13:00
Joe Sak
858e5ead77 test fixing 2011-03-08 15:01:39 -06:00
Joe Sak
2c1943260b Edited changelog.md via GitHub 2011-03-07 10:54:58 -08:00
Joe Sak
06c2abc043 Update changelog 2011-03-07 12:54:33 -06:00
scambra
95aee80a01 fix searching: use _post partial and put inside ul 2011-03-07 17:36:40 +01:00
Joe Sak
2907a619a4 <aside> can't be inside <p> (thanks IRC channel member t4nkD) 2011-03-04 12:46:53 -06:00
Joe Sak
a2c0a7122a Changelog updated 2011-03-04 10:47:29 -06:00
scambra
121d0682dd update spanish translation 2011-03-04 17:23:04 +01:00
scambra
4048b03d6f fix no results message 2011-03-04 16:48:24 +01:00
Philip Arndt
dedf3e3910 Improved the YAML to support Psych better. Closes GH-46. 2011-03-04 18:47:56 +13:00
Philip Arndt
e5c0e2b0e9 We're at version 1.3. Closes GH-38. Closes GH-45. Closes GH-35. 2011-03-04 12:30:31 +13:00
Philip Arndt
a058a24e90 Renamed seed and blog structure migration, removed name option from generator, regenerated gemspec. 2011-03-04 12:25:18 +13:00
Philip Arndt
7ac190f9dd Moved the generic blog tables code into the migration itself. 2011-03-04 11:56:38 +13:00
Philip Arndt
5a59510eed Renamed migrations with ordering migration numbers. 2011-03-04 11:54:46 +13:00
Philip Arndt
234a7d74d5 Moved most of the code toward EngineInstaller. 2011-03-04 11:54:12 +13:00
Philip Arndt
1e6190b58c No longer need rails/init.rb due to not supporting Rails 2. 2011-03-04 11:51:03 +13:00
Philip Arndt
0f84b63639 We no longer support Rails 2 on this engine so I'm removing the old generator. 2011-03-04 11:45:41 +13:00
Joe Sak
1b33909b91 Just so people can see we're on 1.2 ;) 2011-03-02 07:19:05 -08:00
Philip Arndt
6d5e5e5ba8 Regenerated gemspec 2011-03-02 16:06:39 +13:00
Philip Arndt
4e73a81ccd Hi, my name is... 2011-03-02 16:05:31 +13:00
Joe Sak
6db3f44398 Changelog started 2011-03-01 21:02:41 -06:00
Joe Sak
65c1836df4 Merge branch 'master' of github.com:resolve/refinerycms-blog 2011-03-01 20:34:00 -06:00
Joe Sak
4df785af45 Kill AJAX based post nav -- let's shoot for HTML5 History API soon 2011-03-01 20:33:40 -06:00
Philip Arndt
559ef9b3cb Added new migration to add the user_id column to blog_posts. The madness must end, we must move to EngineInstaller in the next version. 2011-03-02 15:32:20 +13:00
Joe Sak
2cfc0c142c Merge branch 'i18n_de' of https://github.com/gern/refinerycms-blog into gern-i18n_de 2011-02-24 22:36:52 -06:00
Joe Sak
ed95360b7c Whups. Wrong variable name pasted in 2011-02-24 22:34:58 -06:00
Joe Sak
c9c38df5ba Closes GH-44. Authors are now associated with blog posts by current_user Merge branch 'addingusers'
Conflicts:
	app/models/blog_post.rb
2011-02-24 22:29:41 -06:00
Joe Sak
2b322a7bf4 ALL CUKES PASS: Show author login in view templates (if author present?) 2011-02-24 22:28:47 -06:00
Joe Sak
be7763d8d2 Fix bad syntax in cukes 2011-02-24 22:28:23 -06:00
Joe Sak
0455eb155e Wrong syntax for AR association 2011-02-24 22:28:04 -06:00
Joe Sak
d23c10db70 A little refactor and language change due to core auth steps & factories 2011-02-24 22:14:35 -06:00
Joe Sak
518ee00e0c WIP- just stuck on the uninitialized Constant weirdness 2011-02-24 22:12:20 -06:00
Joe Sak
e218c8fc5b just a lil' reminder 2011-02-24 21:38:24 -06:00
Joe Sak
6a3cf5d6a6 WIP: trying to test user association as author 2011-02-24 21:32:37 -06:00
Joe Sak
c75cf8a00e Blog Posts belong to an author ("user_id") 2011-02-24 20:46:20 -06:00
Gerhard Neugschwandtner
3f1144eedf added de.yml translation 2011-02-24 19:25:27 +01:00
Marcin Urbanski
56df60d80a Polish translation 2011-02-21 12:41:19 +01:00
Philip Arndt
ce9c663631 Only show these sections when there is relevant information to show. 2011-02-21 13:24:31 +13:00
Philip Arndt
f221da62cd Added settings click-button functionality for toggling comments being enabled, with translations. 2011-02-21 13:21:56 +13:00
Philip Arndt
4228fa4146 Fix constant ajax-loader spinning. 2011-02-21 12:58:09 +13:00
Simon Hambly
8c01bcece4 tidy up views, removing reference to comments when comments disable 2011-02-20 22:11:45 +00:00
Philip Arndt
6fda9d4fa7 Chrome (atleast) got more strict about this and if you have a / in the selector then you need quotation marks. Closes GH-39 2011-02-17 14:55:54 +13:00
Philip Arndt
78e5eeb624 No more gemfile in the gemspec 2011-02-17 11:05:43 +13:00
Philip Arndt
46372aab0e Not sure why we were getting bundler involved. Regeneraed gemspec 2011-02-17 11:03:09 +13:00
Joe Sak
f466091561 lambda is necessary to keep Time.now from becoming a constant, which allows .uncategorized to use .live posts again 2011-02-16 08:28:51 -06:00
Joe Sak
69d65032f8 The first shall be the .last, and the last shall be the .first
thanks to the default_scope :order_by published_at DESC
2011-02-16 01:22:29 -06:00
Joe Sak
a4b02b13c3 Previous scope test wasn't testing BlogPost.previous 2011-02-16 01:18:37 -06:00
Joe Sak
6f9de45019 Closes GH-34. Pagination was already in the public controller, the index view template "just" needed will_paginate
Should probably add basic CSS style or make it say older / newer? Open to suggestions
2011-02-16 01:17:05 -06:00
Joe Sak
5bf1926ec7 This is probably just faster 2011-02-16 01:16:24 -06:00
Joe Sak
4fe4a7ff24 Show publish date in preview data of admin index 2011-02-16 01:15:52 -06:00
Joe Sak
7046ba73fe default_scope :order => 'published_at DESC'
move "next" to << self to use exclusive scope
2011-02-16 01:15:05 -06:00
Joe Sak
d5ffea8e88 test coverage for uncategorized blog posts scope 2011-02-16 00:29:36 -06:00
Joe Sak
d668800767 Closes GH-30. Link uncategorized posts in the blog admin menu 2011-02-16 00:14:13 -06:00
Joe Sak
28b02370ec Update english language file for uncategorized posts 2011-02-16 00:14:01 -06:00
Joe Sak
a045cc11fe Add controller action and view template for uncategorized posts 2011-02-16 00:13:46 -06:00
Joe Sak
eac7a05f93 Add route for uncategorized posts index in blog admin 2011-02-16 00:13:00 -06:00
Joe Sak
f520d6c6e7 Add class method to find uncategorized posts 2011-02-16 00:12:40 -06:00
Joe Sak
3ecdeae3b0 test coverage for previous changes 2011-02-15 23:48:46 -06:00
Joe Sak
652ecc4707 Closes GH-37. Move habtm assn to a has_many :through so posts can be ordered by published_at DESC on category#show view 2011-02-15 23:23:17 -06:00
Joe Sak
2b86be50d2 .html_safe failed on empty body & sidebody content 2011-02-15 23:19:08 -06:00
Vitaly Ishkulov
8649dc7ff3 Russian localization added.
Signed-off-by: Vitaly Ishkulov <vit@iva-soft.com>
2011-01-26 19:44:01 +05:00
Adrien Giboire
9d03b0c677 Missed translation blog.posts.post.filed_in in translation files 2011-01-25 14:14:42 +01:00
Adrien Giboire
375fb27fc8 Added French Translations 2011-01-25 13:31:37 +01:00
Philip Arndt
eb7e23d665 redo gemspec. 2011-01-11 11:36:26 +13:00
Joe Sak
41d94df0df BlogPost != NewsItem 2011-01-10 16:26:22 -06:00
Joe Sak
bf74b32f3f Archives group by year after 2 years 2011-01-10 16:11:53 -06:00
Marcelo Griggio Cajueiro
b29b7df9ac Used internationalization for the months in the file list. 2011-01-03 12:21:13 -02:00
Marcelo Griggio Cajueiro
17c27b01c2 Added file for internationalization of the Brazilian Portuguese. 2011-01-03 12:17:06 -02:00
Marcelo Griggio Cajueiro
4a3a0fe250 Use i18n to display the post created_at. 2010-12-30 14:58:22 -02:00
Joe Sak
ff0bd433c5 The blog nav should not grab next & previous drafts :) 2010-12-15 19:41:08 -06:00
Philip Arndt
2a0dc92538 Make the body content work when there are not this many parts. 2010-12-13 11:02:29 +13:00
Phil Spitler
170753fbd7 Set page output to html_safe. 2010-12-12 16:52:19 -05:00
Philip Arndt
cf08283ccd << is much faster than += 2010-12-10 23:48:36 +13:00
Uģis Ozols
6b9b639fd4 Move 'Archives' text to locale. 2010-12-10 11:11:02 +02:00
Uģis Ozols
58da388652 Cleanup views as will_paginate link labels gets set in core. 2010-12-10 08:58:42 +02:00
Uģis Ozols
5c5ed009cc Prevent mass assignment. 2010-12-08 09:24:24 +02:00
Philip Arndt
01925ea2a8 Merge remote branch 'seasonlabs/master' 2010-12-08 09:13:44 +13:00
Xavi Blanch
51a36a6e0c fine tuning 2010-12-07 17:15:41 +01:00
Xavi Blanch
ea9b3e1fd5 translations 2010-12-07 16:46:51 +01:00
Uģis Ozols
f8dde9b3cf Added some rspec tests for blog category model. 2010-12-07 16:21:20 +02:00
Victor Castell
0bce34678a Translating progress 2010-12-07 13:48:58 +01:00
Uģis Ozols
9ff63388f3 Added some rspec tests for blog post model. 2010-12-07 09:09:55 +02:00
Uģis Ozols
ffa7b65e82 Use rails naming convention for translations that contain html markup. 2010-12-03 13:57:39 +02:00
Uģis Ozols
a914c2721e Fix translation path. 2010-12-03 13:47:32 +02:00
Uģis Ozols
329f39a37d Optimised post_count method. See gist for benchmarks - https://gist.github.com/726844 2010-12-03 13:25:58 +02:00
Uģis Ozols
deca138ec9 Reduce db queries. 2010-12-03 13:01:12 +02:00
Uģis Ozols
0dc56cc017 When we delete blog post it should delete associated comments too. 2010-12-03 11:31:21 +02:00
Uģis Ozols
1d7a814fb1 Rails 3 validation style. 2010-12-03 10:55:09 +02:00
Uģis Ozols
51095b8091 Moved some text to locale. 2010-12-03 09:58:16 +02:00
Uģis Ozols
2db680dd98 Refactored nav partial, added 'blog home' to locale and removed unneeded <nav></nav> tags. 2010-12-03 09:48:47 +02:00
Uģis Ozols
a0ec0bce14 Added missing </li> tag. 2010-12-03 09:17:25 +02:00
Uģis Ozols
420afaf199 Fix deprecation warnings. 2010-12-03 09:13:38 +02:00
Uģis Ozols
1167a1d6a9 We don't need those h in Rails 3. 2010-12-03 09:08:07 +02:00
Uģis Ozols
fef6dc47a6 Use symbol instead of string. 2010-12-03 09:05:09 +02:00
Uģis Ozols
447bbb5eb2 Use :confirm and :method link_to methods. 2010-12-03 09:03:54 +02:00
Uģis Ozols
7da21ab480 Moved 'no blog posts' text to locale file. 2010-12-03 08:38:30 +02:00
Philip Arndt
75e9940a80 Version 1.1 which supports Rails3 versions of RefineryCMS (1.0.1 etc are for Rails 2) 2010-12-03 17:02:26 +13:00
Philip Arndt
8bbb30aa3e RC versions driving me crazy, let's use 1.0 2010-12-03 16:40:35 +13:00
Philip Arndt
c038feb88a rc.17 is the proper format apparently (rc.xx rather than rcxx). Closes GH-20 2010-12-01 13:46:32 +13:00
Amanda Wagener
b4284b3a75 Now dependent on Refinery 0.9.8 (and thus Rails 3) 2010-12-01 11:48:14 +13:00
Amanda Wagener
c38d9c3da5 Remove all Rails2/Rails3 checks as master is now Rails3 only 2010-12-01 11:43:26 +13:00
Amanda Wagener
a1f7ea061e WARNING: Rails 2 users should move to the rails2-stable branch. This commit moves to the new i18n string interpolation used in Rails 3. 2010-12-01 11:27:26 +13:00
217 changed files with 5964 additions and 2064 deletions

10
.gitignore vendored
View file

@ -14,6 +14,7 @@ doc/*
*.autobackupbyrefinery.* *.autobackupbyrefinery.*
/refinerycms-blog*.gem /refinerycms-blog*.gem
.autotest .autotest
spec/dummy
# Mac # Mac
.DS_Store .DS_Store
@ -42,3 +43,12 @@ nbproject
# Capybara Bug # Capybara Bug
capybara-*html capybara-*html
# rvm
.rvmrc
#rbenv
.rbenv-version
Gemfile.lock
.rbx

1
.rspec Normal file
View file

@ -0,0 +1 @@
--colour

20
.travis.yml Normal file
View file

@ -0,0 +1,20 @@
before_script:
- "bundle exec rake refinery:testing:dummy_app > /dev/null"
script: "bundle exec rake spec"
notifications:
email:
- parndt@gmail.com
- ugis.ozolss@gmail.com
- joe@joesak.com
- jamie@enmasse.com
env:
- DB=postgresql
- DB=mysql
matrix:
allow_failures:
- rvm: rbx-19mode
rvm:
- 1.8.7
- 1.9.3
- rbx-19mode
- jruby

72
Gemfile
View file

@ -1,2 +1,70 @@
gem 'filters_spam', '~> 0.3' source "http://rubygems.org"
gem "will_paginate", ">= 2.3.14"
gemspec
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', :git => 'git://github.com/resolve/refinerycms.git'
platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
gem 'activerecord-jdbcmysql-adapter'
gem 'activerecord-jdbcpostgresql-adapter'
gem 'jruby-openssl'
end
unless defined?(JRUBY_VERSION)
gem 'sqlite3'
gem 'mysql2'
gem 'pg'
end
platforms :mswin, :mingw do
gem 'win32console'
gem 'rb-fchange', '~> 0.0.5'
gem 'rb-notifu', '~> 0.0.4'
end
platforms :ruby do
gem 'spork', '0.9.0.rc9'
gem 'guard-spork'
unless ENV['TRAVIS']
if RbConfig::CONFIG['target_os'] =~ /darwin/i
gem 'rb-fsevent', '>= 0.3.9'
gem 'growl', '~> 1.0.3'
end
if RbConfig::CONFIG['target_os'] =~ /linux/i
gem 'rb-inotify', '>= 0.5.1'
gem 'libnotify', '~> 0.1.3'
gem 'therubyracer', '~> 0.9.9'
end
end
end
platforms :jruby do
unless ENV['TRAVIS']
if RbConfig::CONFIG['target_os'] =~ /darwin/i
gem 'growl', '~> 1.0.3'
end
if RbConfig::CONFIG['target_os'] =~ /linux/i
gem 'rb-inotify', '>= 0.5.1'
gem 'libnotify', '~> 0.1.3'
end
end
end
end
# Refinery/rails should pull in the proper versions of these
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
end
gem 'jquery-rails'

View file

@ -1,11 +0,0 @@
GEM
specs:
filters_spam (0.3)
will_paginate (2.3.14)
PLATFORMS
ruby
DEPENDENCIES
filters_spam (~> 0.3)
will_paginate (>= 2.3.14)

20
Guardfile Normal file
View file

@ -0,0 +1,20 @@
guard 'rspec', :version => 2, :cli => "--format Fuubar --color --drb" do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/controllers/#{m[1]}_#{m[2]}_spec.rb", "spec/requests/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
watch('spec/spec_helper.rb') { "spec" }
watch('config/routes.rb') { "spec/routing" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
# Capybara request specs
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
end
guard 'spork', :wait => 60, :cucumber => false, :rspec_env => { 'RAILS_ENV' => 'test' } do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$})
watch('spec/spec_helper.rb')
end

19
Rakefile Normal file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env rake
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
ENGINE_PATH = File.dirname(__FILE__)
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
if File.exists?(APP_RAKEFILE)
load 'rails/tasks/engine.rake'
end
require "refinerycms-testing"
Refinery::Testing::Railtie.load_tasks
Refinery::Testing::Railtie.load_dummy_tasks(ENGINE_PATH)
load File.expand_path('../tasks/rspec.rake', __FILE__)

View file

Before

Width:  |  Height:  |  Size: 512 B

After

Width:  |  Height:  |  Size: 512 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 413 B

After

Width:  |  Height:  |  Size: 413 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 557 B

After

Width:  |  Height:  |  Size: 557 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 110 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 668 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 733 B

After

Width:  |  Height:  |  Size: 733 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 635 B

After

Width:  |  Height:  |  Size: 635 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 739 B

After

Width:  |  Height:  |  Size: 739 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 663 B

After

Width:  |  Height:  |  Size: 663 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 111 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 689 B

After

Width:  |  Height:  |  Size: 689 B

Before After
Before After

View file

@ -0,0 +1,115 @@
$(document).ready(function(){
$('nav#actions.multilist > ul:not(.search_list) li a[href$="' + window.location.pathname + '"]')
.parent().addClass('selected');
if($('nav#actions.multilist > ul:not(.search_list) li.selected').length == 0) {
$('nav#actions.multilist > ul:not(.search_list) li a:nth(1)').parent().addClass('selected');
}
$('nav#actions.multilist > ul:not(.search_list) li > a').each(function(i,a){
if ($(this).data('dialog-title') == null) {
$(this).bind('click', function(){
$(this).css('background-image', "url('/images/refinery/icons/ajax-loader.gif') !important");
});
}
});
$('ul.collapsible_menu').each(function(i, ul) {
(first_li = $(this).children('li:first')).after(div=$("<div></div>"));
$("<span class='arrow'>&nbsp;</span>").appendTo(first_li)
if (($(this).children('li.selected')).length == 0) {
div.hide();
first_li.addClass("closed");
}
$(this).children('li:not(:first)').appendTo(div);
first_li.find('> a, > span.arrow').click(function(e){
$(this).parent().toggleClass("closed");
$(this).parent().toggleClass("open");
$(this).parent().next('div').animate({
opacity: 'toggle'
, height: 'toggle'
}, 250, $.proxy(function(){
$(this).css('background-image', null);
}, $(this))
);
e.preventDefault();
});
});
$('.success_icon, .failure_icon').bind('click', function(e) {
$.get($(this).attr('href'), $.proxy(function(data){
$(this).css('background-image', null)
.removeClass('failure_icon').removeClass('success_icon')
.addClass(data.enabled ? 'success_icon' : 'failure_icon');
}, $(this)));
e.preventDefault();
});
$(function() {
$('#page-tabs').tabs();
$('#copy_body_link').click(function(event) {
// Find the WYMEditor that maps to the custom_teaser field
var teaserTextArea = $('#blog_post_custom_teaser')[0];
var teaserEditor = null;
$.each(WYMeditor.INSTANCES, function(index, editor) {
if (editor._element[0] == teaserTextArea) {
teaserEditor = editor;
}
});
if (teaserEditor) {
teaserEditor.html($('#blog_post_body').attr('value'));
}
event.preventDefault();
});
});
function split( val ) {
return val.split( /,\s*/ );
}
function extractLast( term ) {
return split( term ).pop();
}
page_options.init(false, '', '')
$('<%= dom_id %>').bind( "keydown", function( event ) {
if ( event.keyCode === $.ui.keyCode.TAB && $( this ).data( "autocomplete" ).menu.active ) {
event.preventDefault()
}
}).autocomplete({
source: function( request, response ) {
$.getJSON( "<%= url %>", {
term: extractLast( request.term )
}, response );
},
search: function() {
// custom minLength
var term = extractLast( this.value );
if ( term.length < 2 ) {
return false;
}
},
focus: function() {
// prevent value inserted on focus
return false;
},
select: function( event, ui ) {
var terms = split( this.value );
// remove the current input
terms.pop();
// add the selected item
terms.push( ui.item.value );
// add placeholder to get the comma-and-space at the end
terms.push( "" );
this.value = terms.join( ", " );
return false;
}
})
});

View file

@ -0,0 +1,73 @@
.comments_icon {
background-image: image_url('refinery/blog/icons/comments.png');
}
.comment_icon {
background-image: image_url('refinery/blog/icons/comment.png');
}
.comment_cross_icon {
background-image: image_url('refinery/blog/icons/comment_cross.png');
}
.comment_tick_icon {
background-image: image_url('refinery/blog/icons/comment_tick.png');
}
.folder_icon {
background-image: image_url('refinery/blog/icons/folder.png');
}
.folder_add_icon {
background-image: image_url('refinery/blog/icons/folder_add.png');
}
.folder_edit_icon {
background-image: image_url('refinery/blog/icons/folder_edit.png');
}
.settings_icon {
background-image: image_url('refinery/blog/icons/cog.png');
}
.page_icon {
background-image: image_url('refinery/blog/icons/page.png');
}
.page_copy_icon {
background-image: image_url('refinery/blog/icons/page_copy.png');
}
.page_add_icon {
background-image: image_url('refinery/blog/icons/page_add.png');
}
ul.collapsible_menu li {
position: relative;
}
ul.collapsible_menu li span.arrow {
background-repeat: no-repeat;
position: absolute;
right: 10px;
top: 13px;
width: 11px;
height: 7px;
cursor: pointer;
}
ul.collapsible_menu li span.arrow {
background-image: image_url('refinery/blog/icons/up.gif');
}
ul.collapsible_menu li.closed span.arrow {
background-image: image_url('refinery/blog/icons/down.gif');
}
ul.collapsible_menu > div {
width: 93%;
margin: 0px auto;
}
ul.blog_categories{
height:200px;
overflow:auto;
border:1px solid #ccc;
padding:5px;
}
ul.blog_categories, ul.blog_categories li {
list-style: none;
margin:5px 0;
}
a#copy_body_link {
background: image_url('refinery/blog/icons/add.png') no-repeat scroll 0 6px transparent;
border-bottom: 0 none;
display: inline;
line-height: 29px;
margin-top: 0;
padding-left: 20px;
}

View file

@ -1,6 +1,7 @@
.blog_post header, .blog_post footer {
width: auto;
}
.blog_post .posted_at{ .blog_post .posted_at{
display:block;
margin:0 0 10px;
} }
.post_categories .filed_in { .post_categories .filed_in {
display: inline; display: inline;
@ -21,7 +22,7 @@
#rss_feed_subscribe { #rss_feed_subscribe {
display: block; display: block;
padding-left: 25px; padding-left: 25px;
background: url('/images/refinerycms-blog/rss-feed.png') no-repeat; background: image_url('refinery/blog/rss-feed.png') no-repeat;
} }
#next_prev_article{ #next_prev_article{
overflow:hidden; overflow:hidden;
@ -57,7 +58,7 @@
.flash_notice, .flash_message { .flash_notice, .flash_message {
border: 1px solid #00A017; border: 1px solid #00A017;
color: #00A017; color: #00A017;
background: 7px 7px no-repeat url('/images/refinery/icons/accept.png') #E0F5E0; background: 7px 7px no-repeat image_url('refinery/blog/icons/accept.png') #E0F5E0;
} }
.flash_notice, .flash_notice * { .flash_notice, .flash_notice * {
color: #00A017; color: #00A017;
@ -65,7 +66,7 @@
.flash_error { .flash_error {
border: 1px solid #A00027; border: 1px solid #A00027;
color: #A00027; color: #A00027;
background: 7px 7px no-repeat url('/images/refinery/icons/cancel.png') #FFB1B1; background: 7px 7px no-repeat image_url('refinery/blog/icons/cancel.png') #FFB1B1;
} }
.flash.flash_notice #flash_close, .flash.flash_error #flash_close { .flash.flash_notice #flash_close, .flash.flash_error #flash_close {
text-transform: lowercase; text-transform: lowercase;

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View file

@ -0,0 +1,330 @@
/*
* jQuery UI CSS Framework 1.8.13
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.ui-autocomplete{ background:#fff; border:solid #ccc; border-width:0 1px 1px; }
/*
* jQuery UI CSS Framework 1.8.13
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
*/
/* Interaction states
----------------------------------*/
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
/* Overlays */
.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
* jQuery UI Autocomplete 1.8.13
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Autocomplete#theming
*/
.ui-autocomplete { position: absolute; cursor: default; }
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/*
* jQuery UI Menu 1.8.13
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Menu#theming
*/
.ui-menu {
list-style:none;
padding: 2px;
margin: 0;
display:block;
float: left;
}
.ui-menu .ui-menu {
margin-top: -3px;
}
.ui-menu .ui-menu-item {
margin:0;
padding: 0;
zoom: 1;
float: left;
clear: left;
width: 100%;
}
.ui-menu .ui-menu-item a {
text-decoration:none;
display:block;
padding:.2em .4em;
line-height:1.5;
zoom:1;
}
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px;
}

0
app/controllers/.gitkeep Normal file
View file

View file

@ -1,7 +0,0 @@
class Admin::Blog::CategoriesController < Admin::BaseController
crudify :blog_category,
:title_attribute => :title,
:order => 'title ASC'
end

View file

@ -1,36 +0,0 @@
class Admin::Blog::CommentsController < Admin::BaseController
crudify :blog_comment,
:title_attribute => :name,
:order => 'published_at DESC'
def index
@blog_comments = BlogComment.unmoderated
render :action => 'index'
end
def approved
unless params[:id].present?
@blog_comments = BlogComment.approved
render :action => 'index'
else
@blog_comment = BlogComment.find(params[:id])
@blog_comment.approve!
flash[:notice] = t('admin.blog.comments.approved', :author => @blog_comment.name)
redirect_to :action => params[:return_to] || 'index'
end
end
def rejected
unless params[:id].present?
@blog_comments = BlogComment.rejected
render :action => 'index'
else
@blog_comment = BlogComment.find(params[:id])
@blog_comment.reject!
flash[:notice] = t('admin.blog.comments.rejected', :author => @blog_comment.name)
redirect_to :action => params[:return_to] || 'index'
end
end
end

View file

@ -1,14 +0,0 @@
class Admin::Blog::PostsController < Admin::BaseController
crudify :blog_post,
:title_attribute => :title,
:order => 'published_at DESC'
before_filter :find_all_categories,
:only => [:new, :edit, :create, :update]
protected
def find_all_categories
@blog_categories = BlogCategory.find(:all)
end
end

View file

@ -1,27 +0,0 @@
class Admin::Blog::SettingsController < Admin::BaseController
def notification_recipients
@recipients = BlogComment::Notification.recipients
if request.post?
BlogComment::Notification.recipients = params[:recipients]
flash[:notice] = t('admin.blog.settings.notification_recipients.updated',
:recipients => BlogComment::Notification.recipients)
unless request.xhr? or from_dialog?
redirect_back_or_default(admin_blog_posts_path)
else
render :text => "<script type='text/javascript'>parent.window.location = '#{admin_blog_posts_path}';</script>"
end
end
end
def moderation
enabled = BlogComment::Moderation.toggle!
unless request.xhr?
redirect_back_or_default(admin_blog_posts_path)
else
render :json => {:enabled => enabled}
end
end
end

View file

@ -1,7 +0,0 @@
class Blog::CategoriesController < BlogController
def show
@category = BlogCategory.find(params[:id])
end
end

View file

@ -1,68 +0,0 @@
class Blog::PostsController < BlogController
before_filter :find_all_blog_posts, :except => [:archive]
before_filter :find_blog_post, :only => [:show, :comment, :update_nav]
def index
# TODO: respond_to block
end
def show
@blog_comment = BlogComment.new
# TODO: respond_to block
end
def comment
if (@blog_comment = @blog_post.comments.create(params[:blog_comment])).valid?
if BlogComment::Moderation.enabled? or @blog_comment.ham?
begin
Blog::CommentMailer.deliver_notification(@blog_comment, request)
rescue
logger.warn "There was an error delivering a blog comment notification.\n#{$!}\n"
end
end
if BlogComment::Moderation.enabled?
flash[:notice] = t('blog.posts.comments.thank_you_moderated')
redirect_to blog_post_url(params[:id])
else
flash[:notice] = t('blog.posts.comments.thank_you')
redirect_to blog_post_url(params[:id],
:anchor => "comment-#{@blog_comment.to_param}")
end
else
render :action => 'show'
end
end
def archive
date = "#{params[:month]}/#{params[:year]}"
@archive_date = Time.parse(date)
@blog_posts = BlogPost.live.by_archive(@archive_date).paginate({
:page => params[:page],
:per_page => RefinerySetting.find_or_set(:blog_posts_per_page, 10)
})
# TODO: respond_to block
end
protected
def find_blog_post
unless (@blog_post = BlogPost.find(params[:id])).try(:live?)
if refinery_user? and current_user.authorized_plugins.include?("refinerycms_blog")
@blog_post = BlogPost.find(params[:id])
else
error_404
end
end
end
def find_all_blog_posts
@blog_posts = BlogPost.live.paginate({
:page => params[:page],
:per_page => RefinerySetting.find_or_set(:blog_posts_per_page, 10)
})
end
end

View file

@ -1,16 +0,0 @@
class BlogController < ApplicationController
helper :blog_posts
before_filter :find_page, :find_all_blog_categories
protected
def find_page
@page = Page.find_by_link_url("/blog")
end
def find_all_blog_categories
@blog_categories = BlogCategory.all
end
end

View file

@ -0,0 +1,12 @@
module Refinery
module Blog
module Admin
class CategoriesController < ::Refinery::AdminController
crudify :'refinery/blog/category',
:order => 'title ASC'
end
end
end
end

View file

@ -0,0 +1,49 @@
module Refinery
module Blog
module Admin
class CommentsController < ::Refinery::AdminController
cache_sweeper Refinery::BlogSweeper
crudify :'refinery/blog/comment',
:title_attribute => :name,
:order => 'published_at DESC'
def index
@comments = Refinery::Blog::Comment.unmoderated.page(params[:page])
render :action => 'index'
end
def approved
unless params[:id].present?
@comments = Refinery::Blog::Comment.approved.page(params[:page])
render :action => 'index'
else
@comment = Refinery::Blog::Comment.find(params[:id])
@comment.approve!
flash[:notice] = t('approved', :scope => 'refinery.blog.admin.comments', :author => @comment.name)
redirect_to refinery.url_for(:action => params[:return_to] || 'index', :id => nil)
end
end
def rejected
unless params[:id].present?
@comments = Refinery::Blog::Comment.rejected.page(params[:page])
render :action => 'index'
else
@comment = Refinery::Blog::Comment.find(params[:id])
@comment.reject!
flash[:notice] = t('rejected', :scope => 'refinery.blog.admin.comments', :author => @comment.name)
redirect_to refinery.url_for(:action => params[:return_to] || 'index', :id => nil)
end
end
end
end
end
end

View file

@ -0,0 +1,90 @@
module Refinery
module Blog
module Admin
class PostsController < ::Refinery::AdminController
cache_sweeper Refinery::BlogSweeper
crudify :'refinery/blog/post',
:order => 'published_at DESC'
before_filter :find_all_categories,
:only => [:new, :edit, :create, :update]
before_filter :check_category_ids, :only => :update
def uncategorized
@posts = Refinery::Blog::Post.uncategorized.page(params[:page])
end
def tags
if ActiveRecord::Base.connection.adapter_name.downcase == 'postgresql'
op = '~*'
wildcard = '.*'
else
op = 'LIKE'
wildcard = '%'
end
@tags = Refinery::Blog::Post.tag_counts_on(:tags).where(
["tags.name #{op} ?", "#{wildcard}#{params[:term].to_s.downcase}#{wildcard}"]
).map { |tag| {:id => tag.id, :value => tag.name}}
render :json => @tags.flatten
end
def new
@post = ::Refinery::Blog::Post.new(:author => current_refinery_user)
end
def create
# if the position field exists, set this object as last object, given the conditions of this class.
if Refinery::Blog::Post.column_names.include?("position")
params[:post].merge!({
:position => ((Refinery::Blog::Post.maximum(:position, :conditions => "")||-1) + 1)
})
end
if (@post = Refinery::Blog::Post.create(params[:post])).valid?
(request.xhr? ? flash.now : flash).notice = t(
'refinery.crudify.created',
:what => "'#{@post.title}'"
)
unless from_dialog?
unless params[:continue_editing] =~ /true|on|1/
redirect_back_or_default(refinery.blog_admin_posts_path)
else
unless request.xhr?
redirect_to :back
else
render "/shared/message"
end
end
else
render :text => "<script>parent.window.location = '#{refinery.blog_admin_posts_url}';</script>"
end
else
unless request.xhr?
render :action => 'new'
else
render :partial => "/refinery/admin/error_messages",
:locals => {
:object => @post,
:include_object_name => true
}
end
end
end
protected
def find_all_categories
@categories = Refinery::Blog::Category.find(:all)
end
def check_category_ids
params[:post][:category_ids] ||= []
end
end
end
end
end

View file

@ -0,0 +1,55 @@
module Refinery
module Blog
module Admin
class SettingsController < ::Refinery::AdminController
def notification_recipients
@recipients = Refinery::Blog::Comment::Notification.recipients
if request.post?
Refinery::Blog::Comment::Notification.recipients = params[:recipients]
flash[:notice] = t('updated', :scope => 'refinery.blog.admin.settings.notification_recipients',
:recipients => Refinery::Blog::Comment::Notification.recipients)
unless request.xhr? or from_dialog?
redirect_back_or_default(refinery.blog_admin_posts_path)
else
render :text => "<script type='text/javascript'>parent.window.location = '#{refinery.blog_admin_posts_path}';</script>",
:layout => false
end
end
end
def moderation
enabled = Refinery::Blog::Comment::Moderation.toggle!
unless request.xhr?
redirect_back_or_default(refinery.blog_admin_posts_path)
else
render :json => {:enabled => enabled},
:layout => false
end
end
def comments
enabled = Refinery::Blog::Comment.toggle!
unless request.xhr?
redirect_back_or_default(refinery.blog_admin_posts_path)
else
render :json => {:enabled => enabled},
:layout => false
end
end
def teasers
enabled = Refinery::Blog::Post.teaser_enabled_toggle!
unless request.xhr?
redirect_back_or_default(refinery.blog_admin_posts_path)
else
render :json => {:enabled => enabled},
:layout => false
end
end
end
end
end
end

View file

@ -0,0 +1,17 @@
module Refinery
module Blog
class BlogController < ::ApplicationController
include ControllerHelper
helper :'refinery/blog/posts'
before_filter :find_page, :find_all_blog_categories
protected
def find_page
@page = Refinery::Page.find_by_link_url("/blog")
end
end
end
end

View file

@ -0,0 +1,12 @@
module Refinery
module Blog
class CategoriesController < BlogController
def show
@category = Refinery::Blog::Category.find(params[:id])
@posts = @category.posts.live.includes(:comments, :categories).page(params[:page])
end
end
end
end

View file

@ -0,0 +1,85 @@
module Refinery
module Blog
class PostsController < BlogController
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]
before_filter :find_tags
respond_to :html, :js, :rss
def index
# Rss feeders are greedy. Let's give them every blog post instead of paginating.
(@posts = Post.live.includes(:comments, :categories).all) if request.format.rss?
respond_with (@posts) do |format|
format.html
format.rss
end
end
def show
@comment = Comment.new
@canonical = url_for(:locale => ::Refinery::I18n.default_frontend_locale) if canonical?
@post.increment!(:access_count, 1)
respond_with (@post) do |format|
format.html { present(@post) }
format.js { render :partial => 'post', :layout => false }
end
end
def comment
if (@comment = @post.comments.create(params[:comment])).valid?
if Comment::Moderation.enabled? or @comment.ham?
begin
CommentMailer.notification(@comment, request).deliver
rescue
logger.warn "There was an error delivering a blog comment notification.\n#{$!}\n"
end
end
if Comment::Moderation.enabled?
flash[:notice] = t('thank_you_moderated', :scope => 'refinery.blog.posts.comments')
redirect_to refinery.blog_post_url(params[:id])
else
flash[:notice] = t('thank_you', :scope => 'refinery.blog.posts.comments')
redirect_to refinery.blog_post_url(params[:id],
:anchor => "comment-#{@comment.to_param}")
end
else
render :action => 'show'
end
end
def archive
if params[:month].present?
date = "#{params[:month]}/#{params[:year]}"
@archive_date = Time.parse(date)
@date_title = @archive_date.strftime('%B %Y')
@posts = Post.live.by_month(@archive_date).page(params[:page])
else
date = "01/#{params[:year]}"
@archive_date = Time.parse(date)
@date_title = @archive_date.strftime('%Y')
@posts = Post.live.by_year(@archive_date).page(params[:page])
end
respond_with (@posts)
end
def tagged
@tag = ActsAsTaggableOn::Tag.find(params[:tag_id])
@tag_name = @tag.name
@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
end
end
end

0
app/helpers/.gitkeep Normal file
View file

View file

@ -1,28 +0,0 @@
module BlogPostsHelper
def blog_archive_list
posts = BlogPost.select('published_at').all_previous
return nil if posts.blank?
html = '<section id="blog_archive_list"><h2>Archives</h2><nav><ul>'
links = []
posts.each do |e|
links << e.published_at.strftime('%m/%Y')
end
links.uniq!
links.each do |l|
year = l.split('/')[1]
month = l.split('/')[0]
count = BlogPost.by_archive(Time.parse(l)).size
text = "#{Date::MONTHNAMES[month.to_i]} #{year} (#{count})"
html += "<li>"
html += link_to(text, archive_blog_posts_path(:year => year, :month => month))
html += "</li>"
end
html += '</ul></nav></section>'
html.html_safe
end
def next_or_previous?(post)
post.next.present? or post.prev.present?
end
end

View file

@ -0,0 +1,29 @@
module Refinery
module Blog
module ControllerHelper
protected
def find_blog_post
unless (@post = Refinery::Blog::Post.find(params[:id])).try(:live?)
if refinery_user? and current_refinery_user.authorized_plugins.include?("refinerycms_blog")
@post = Refinery::Blog::Post.find(params[:id])
else
error_404
end
end
end
def find_all_blog_posts
@posts = Refinery::Blog::Post.live.includes(:comments, :categories).page(params[:page])
end
def find_tags
@tags = Refinery::Blog::Post.tag_counts_on(:tags)
end
def find_all_blog_categories
@categories = Refinery::Blog::Category.all
end
end
end
end

View file

@ -0,0 +1,72 @@
module Refinery
module Blog
module PostsHelper
def next_or_previous?(post)
post.next.present? or post.prev.present?
end
def blog_post_teaser_enabled?
Refinery::Blog::Post.teasers_enabled?
end
def blog_post_teaser(post)
if post.respond_to?(:custom_teaser) && post.custom_teaser.present?
post.custom_teaser.html_safe
else
truncate(post.body, {
:length => Refinery::Blog.post_teaser_length,
:preserve_html_tags => true
}).html_safe
end
end
def blog_archive_widget(dates=blog_archive_dates)
ArchiveWidget.new(dates, self).display
end
def blog_archive_dates(cutoff=Time.now.beginning_of_month)
Refinery::Blog::Post.published_dates_older_than(cutoff)
end
class ArchiveWidget
delegate :t, :link_to, :refinery, :render, :to => :view_context
attr_reader :view_context
def initialize(dates, view_context, cutoff=3.years.ago.end_of_year)
@recent_dates, @old_dates = dates.sort_by {|date| -date.to_i }.
partition {|date| date > cutoff }
@view_context = view_context
end
def recent_links
@recent_dates.group_by {|date| [date.year, date.month] }.
map {|(year, month), dates| recent_link(year, month, dates.count) }
end
def recent_link(year, month, count)
link_to "#{t("date.month_names")[month]} #{year} (#{count})",
refinery.blog_archive_posts_path(:year => year, :month => month)
end
def old_links
@old_dates.group_by {|date| date.year }.
map {|year, dates| old_link(year, dates.size) }
end
def old_link(year, count)
link_to "#{year} (#{count})", refinery.blog_archive_posts_path(:year => year)
end
def links
recent_links + old_links
end
def display
return "" if links.empty?
render "refinery/blog/widgets/blog_archive", :links => links
end
end
end
end
end

View file

@ -1,11 +0,0 @@
class Blog::CommentMailer < ActionMailer::Base
def notification(comment, request)
subject BlogComment::Notification.subject
recipients BlogComment::Notification.recipients
from "\"#{RefinerySetting[:site_name]}\" <no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}>"
sent_on Time.now
@comment = comment
end
end

View file

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

0
app/models/.gitkeep Normal file
View file

View file

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

View file

@ -1,23 +0,0 @@
class BlogCategory < ActiveRecord::Base
has_and_belongs_to_many :posts, :class_name => 'BlogPost'
acts_as_indexed :fields => [:title]
validates_presence_of :title
validates_uniqueness_of :title
has_friendly_id :title, :use_slug => true
# this might be able to be optimised a little more
def post_count
count = 0
self.posts.each do |p|
count += 1 if p.live?
end
count
end
end

View file

@ -1,116 +0,0 @@
class BlogComment < ActiveRecord::Base
filters_spam :author_field => :name,
:email_field => :email,
:message_field => :body
belongs_to :post, :class_name => 'BlogPost', :foreign_key => 'blog_post_id'
acts_as_indexed :fields => [:name, :email, :message]
alias_attribute :message, :body
validates_presence_of :name, :message
validates_format_of :email,
:with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
named_scope :unmoderated, :conditions => {:state => nil}
named_scope :approved, :conditions => {:state => 'approved'}
named_scope :rejected, :conditions => {:state => 'rejected'}
def approve!
self.update_attribute(:state, 'approved')
end
def reject!
self.update_attribute(:state, 'rejected')
end
def rejected?
self.state == 'rejected'
end
def approved?
self.state == 'approved'
end
def unmoderated?
self.state.nil?
end
before_create do |comment|
unless BlogComment::Moderation.enabled?
comment.state = comment.ham? ? 'approved' : 'rejected'
end
end
module Moderation
class << self
def enabled?
RefinerySetting.find_or_set(:comment_moderation, true, {
:scoping => 'blog',
:restricted => false
})
end
def toggle!
new_value = {
:value => !BlogComment::Moderation.enabled?,
:scoping => 'blog',
:restricted => false
}
if RefinerySetting.respond_to?(:set)
RefinerySetting.set(:comment_moderation, new_value)
else
RefinerySetting[:comment_moderation] = new_value
end
end
end
end
module Notification
class << self
def recipients
RefinerySetting.find_or_set(:comment_notification_recipients, (Role[:refinery].users.first.email rescue ''),
{
:scoping => 'blog',
:restricted => false
})
end
def recipients=(emails)
new_value = {
:value => emails,
:scoping => 'blog',
:restricted => false
}
if RefinerySetting.respond_to?(:set)
RefinerySetting.set(:comment_notification_recipients, new_value)
else
RefinerySetting[:comment_notification_recipients] = new_value
end
end
def subject
RefinerySetting.find_or_set(:comment_notification_subject, "New inquiry from your website", {
:scoping => 'blog',
:restricted => false
})
end
def subject=(subject_line)
new_value = {
:value => subject_line,
:scoping => 'blog',
:restricted => false
}
if RefinerySetting.respond_to?(:set)
RefinerySetting.set(:comment_notification_subject, new_value)
else
RefinerySetting[:comment_notification_subject] = new_value
end
end
end
end
end

View file

@ -1,65 +0,0 @@
class BlogPost < ActiveRecord::Base
has_many :comments, :class_name => 'BlogComment'
has_and_belongs_to_many :categories, :class_name => 'BlogCategory'
acts_as_indexed :fields => [:title, :body]
validates_presence_of :title
validates_uniqueness_of :title
has_friendly_id :title, :use_slug => true
named_scope :by_archive, lambda { |archive_date| {:conditions => ['published_at between ? and ?', archive_date.beginning_of_month, archive_date.end_of_month], :order => "published_at DESC"} }
named_scope :all_previous, :conditions => ['published_at <= ?', Time.now.beginning_of_month], :order => "published_at DESC"
named_scope :live, lambda { {:conditions => ["published_at < ? and draft = ?", Time.now, false], :order => "published_at DESC"} }
named_scope :previous, lambda { |i| { :conditions => ["published_at < ?", i.published_at], :order => "published_at DESC", :limit => 1 } }
named_scope :next, lambda { |i| { :condtions => ["published_at > ?", i.published_at], :order => "published_at ASC", :limit => 1 } }
def next
self.class.next(self).first
end
def prev
self.class.previous(self).first
end
def live?
!draft and published_at <= Time.now
end
def category_ids=(ids)
self.categories = ids.reject{|id| id.blank?}.collect {|c_id|
BlogCategory.find(c_id.to_i) rescue nil
}.compact
end
class << self
def comments_allowed?
RefinerySetting.find_or_set(:comments_allowed, true, {
:scoping => 'blog'
})
end
end
module ShareThis
DEFAULT_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
class << self
def key
RefinerySetting.find_or_set(:share_this_key, BlogPost::ShareThis::DEFAULT_KEY, {
:scoping => 'blog'
})
end
def enabled?
key = BlogPost::ShareThis.key
key.present? and key != BlogPost::ShareThis::DEFAULT_KEY
end
end
end
end

View file

@ -0,0 +1,25 @@
module Refinery
module Blog
class Category < ActiveRecord::Base
extend FriendlyId
friendly_id :title, :use => [:slugged]
has_many :categorizations, :dependent => :destroy, :foreign_key => :blog_category_id
has_many :posts, :through => :categorizations, :source => :blog_post
acts_as_indexed :fields => [:title]
validates :title, :presence => true, :uniqueness => true
attr_accessible :title
def post_count
posts.live.count
end
# how many items to show per page
self.per_page = Refinery::Blog.posts_per_page
end
end
end

View file

@ -0,0 +1,135 @@
module Refinery
module Blog
class Comment < ActiveRecord::Base
attr_accessible :name, :email, :message
filters_spam :author_field => :name,
:email_field => :email,
:message_field => :body
belongs_to :post, :foreign_key => 'blog_post_id'
acts_as_indexed :fields => [:name, :email, :message]
alias_attribute :message, :body
validates :name, :message, :presence => true
validates :email, :format => { :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i }
class << self
def unmoderated
where(:state => nil)
end
def approved
where(:state => 'approved')
end
def rejected
where(:state => 'rejected')
end
end
self.per_page = Refinery::Blog.comments_per_page
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
def reject!
self.update_attribute(:state, 'rejected')
end
def rejected?
self.state == 'rejected'
end
def approved?
self.state == 'approved'
end
def unmoderated?
self.state.nil?
end
def self.toggle!
currently = Refinery::Setting.find_or_set(:comments_allowed, true, {
:scoping => 'blog'
})
Refinery::Setting.set(:comments_allowed, {:value => !currently, :scoping => 'blog'})
end
before_create do |comment|
unless Moderation.enabled?
comment.state = comment.ham? ? 'approved' : 'rejected'
end
end
module Moderation
class << self
def enabled?
Refinery::Setting.find_or_set(:comment_moderation, true, {
:scoping => 'blog',
:restricted => false
})
end
def toggle!
new_value = {
:value => !Blog::Comment::Moderation.enabled?,
:scoping => 'blog',
:restricted => false
}
Refinery::Setting.set(:comment_moderation, new_value)
end
end
end
module Notification
class << self
def recipients
Refinery::Setting.find_or_set(:comment_notification_recipients, (Refinery::Role[:refinery].users.first.email rescue ''),
{
:scoping => 'blog',
:restricted => false
})
end
def recipients=(emails)
new_value = {
:value => emails,
:scoping => 'blog',
:restricted => false
}
Refinery::Setting.set(:comment_notification_recipients, new_value)
end
def subject
Refinery::Setting.find_or_set(:comment_notification_subject, "New inquiry from your website", {
:scoping => 'blog',
:restricted => false
})
end
def subject=(subject_line)
new_value = {
:value => subject_line,
:scoping => 'blog',
:restricted => false
}
Refinery::Setting.set(:comment_notification_subject, new_value)
end
end
end
end
end
end

View file

@ -0,0 +1,120 @@
require 'acts-as-taggable-on'
require 'seo_meta'
module Refinery
module Blog
class Post < ActiveRecord::Base
extend FriendlyId
friendly_id :friendly_id_source, :use => [:slugged]
is_seo_meta if self.table_exists?
default_scope :order => 'published_at DESC'
belongs_to :author, :class_name => 'Refinery::User', :foreign_key => :user_id, :readonly => true
has_many :comments, :dependent => :destroy, :foreign_key => :blog_post_id
acts_as_taggable
has_many :categorizations, :dependent => :destroy, :foreign_key => :blog_post_id
has_many :categories, :through => :categorizations, :source => :blog_category
acts_as_indexed :fields => [:title, :body]
validates :title, :presence => true, :uniqueness => true
validates :body, :presence => true
validates :source_url, :url => { :if => 'Refinery::Blog.validate_source_url',
:update => true,
:allow_nil => true,
:allow_blank => true,
:verify => [:resolve_redirects]}
attr_accessible :title, :body, :custom_teaser, :tag_list, :draft, :published_at, :custom_url, :author
attr_accessible :browser_title, :meta_keywords, :meta_description, :user_id, :category_ids
attr_accessible :source_url, :source_url_title
self.per_page = Refinery::Blog.posts_per_page
def next
self.class.next(self)
end
def prev
self.class.previous(self)
end
def live?
!draft and published_at <= Time.now
end
def friendly_id_source
custom_url.presence || title
end
class << self
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
def published_dates_older_than(date)
published_before(date).pluck(:published_at)
end
def recent(count)
live.limit(count)
end
def popular(count)
unscoped.order("access_count DESC").limit(count)
end
def previous(item)
published_before(item.published_at).first
end
def uncategorized
live.includes(:categories).where(:categories => { Refinery::Categorization.table_name => { :blog_category_id => nil } })
end
def next(current_record)
where(["published_at > ? and draft = ?", current_record.published_at, false]).first
end
def published_before(date=Time.now)
where("published_at < ? and draft = ?", date, false)
end
alias_method :live, :published_before
def comments_allowed?
Refinery::Setting.find_or_set(:comments_allowed, true, :scoping => 'blog')
end
def teasers_enabled?
Refinery::Setting.find_or_set(:teasers_enabled, true, :scoping => 'blog')
end
def teaser_enabled_toggle!
currently = Refinery::Setting.find_or_set(:teasers_enabled, true, :scoping => 'blog')
Refinery::Setting.set(:teasers_enabled, :value => !currently, :scoping => 'blog')
end
end
module ShareThis
def self.enabled?
Refinery::Blog.share_this_key != "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
end
end
end
end
end

View file

@ -0,0 +1,10 @@
module Refinery
class Categorization < ActiveRecord::Base
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

@ -0,0 +1,26 @@
module Refinery
class BlogSweeper < ActionController::Caching::Sweeper
observe Blog::Post, Blog::Comment
def after_create(record)
expire_cache_for(record)
end
def after_update(record)
expire_cache_for(record)
end
def after_destroy(record)
expire_cache_for(record)
end
private
def expire_cache_for(record)
# TODO: Convert these to url helpers
expire_page '/blog'
expire_page '/blog/feed.rss'
end
end
end

0
app/views/.gitkeep Normal file
View file

View file

@ -1,89 +0,0 @@
<nav id='actions' class='multilist'>
<ul class='search_list'>
<li>
<%= render :partial => "/shared/admin/search",
:locals => {
:url => admin_blog_posts_url
} %>
</li>
</ul>
<ul class='collapsible_menu'>
<li>
<%= link_to t('.posts.title'), '#',
:class => 'page_copy_icon' %>
</li>
<li>
<%= link_to t('.posts.manage'), admin_blog_posts_path,
:class => 'page_icon' %>
<li>
<%= link_to t('.posts.new'), new_admin_blog_post_url,
:class => 'page_add_icon' %>
</li>
</ul>
<ul class='collapsible_menu'>
<li>
<% if BlogComment.unmoderated.any? %>
<% title = t('.comments.title_with_count', :new_count => BlogComment.unmoderated.size) %>
<% else %>
<% title = t('.comments.title') %>
<% end %>
<%= link_to title, '#',
:class => 'comments_icon' %>
</li>
<li>
<%= link_to t('.comments.new'), admin_blog_comments_path,
:class => 'comment_icon' %>
</li>
<li>
<%= link_to t('.comments.approved'), approved_admin_blog_comments_path,
:class => 'comment_tick_icon' %>
</li>
<li>
<%= link_to t('.comments.rejected'), rejected_admin_blog_comments_path,
:class => 'comment_cross_icon' %>
</li>
</ul>
<ul class='collapsible_menu'>
<li>
<%= link_to t('.categories.title'), '#',
:class => 'folder_icon' %>
</li>
<li>
<%= link_to t('.categories.manage'), admin_blog_categories_url,
:class => 'folder_edit_icon' %>
</li>
<li>
<%= link_to t('.categories.new'), new_admin_blog_category_url(:dialog => true, :height => 325),
:class => 'folder_add_icon' %>
</li>
</ul>
<ul class='collapsible_menu'>
<li>
<%= link_to t('.settings.title'), admin_blog_settings_path,
:class => 'settings_icon' %>
</li>
<li>
<%= link_to t('.settings.moderation'), moderation_admin_blog_settings_url,
:class => "#{BlogComment::Moderation.enabled? ? 'success' : 'failure'}_icon" %>
</li>
<li>
<%= link_to t('.settings.update_notified'),
notification_recipients_admin_blog_settings_url(:dialog => true, :height => 400),
:class => 'user_comment_icon' %>
</li>
</ul>
</nav>
<% if Refinery.version < '0.9.9' %>
<% content_for :head do %>
<%= stylesheet_link_tag('refinery/refinerycms-blog') %>
<%# this javascript is not even required in >= 0.9.9 because we made this sort of menu core. %>
<%= javascript_include_tag('refinery/refinerycms-blog') %>
<% end %>
<% else %>
<% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-blog')%>
<% end %>

View file

@ -1,15 +0,0 @@
<% form_for [:admin, @blog_category] do |f| -%>
<%= f.error_messages %>
<div class='field'>
<%= f.label :title -%>
<%= f.text_field :title, :class => 'larger widest' -%>
</div>
<%= render :partial => "/shared/admin/form_actions",
:locals => {
:f => f,
:continue_editing => false,
:delete_title => t('admin.blog.categories.category.delete')
} %>
<% end %>

View file

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

View file

@ -1,30 +0,0 @@
<%= render :partial => '/admin/blog/submenu' %>
<div id='records'>
<% if searching? %>
<h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2>
<% if @blog_categories.any? %>
<%= render :partial => "blog_categories",
:collection => @blog_categories %>
<% else %>
<p><%= t('admin.search_no_results') %></p>
<% end %>
<% else %>
<% if @blog_categories.any? %>
<%= will_paginate @blog_categories,
:previous_label => '&laquo;',
:next_label => '&raquo;' %>
<%= render :partial => "sortable_list" %>
<%= will_paginate @blog_categories,
:previous_label => '&laquo;',
:next_label => '&raquo;' %>
<% else %>
<p>
<strong>
<%= t('.no_items_yet', :create => t('admin.blog.submenu.categories.new')) %>
</strong>
</p>
<% end %>
<% end %>
</div>

View file

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

View file

@ -1,35 +0,0 @@
<%= render :partial => '/admin/blog/submenu' %>
<div id='records'>
<% if searching? %>
<h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2>
<% if @blog_comments.any? %>
<%=# will_paginate @blog_comments
%>
<ul>
<%= render :partial => "blog_comments",
:collection => @blog_comments %>
</ul>
<%=# will_paginate @blog_comments
%>
<% else %>
<p><%= t('admin.search_no_results') %></p>
<% end %>
<% else %>
<% if @blog_comments.any? %>
<%=# will_paginate @blog_comments
%>
<%= render :partial => "sortable_list" %>
<%=# will_paginate @blog_comments
%>
<% else %>
<h3>
<%= t('.no_items_yet',
:type => t("admin.blog.submenu.comments.#{action_name.gsub('index', 'new')}").downcase) %>
</h3>
<% end %>
<% end %>
</div>

View file

@ -1,66 +0,0 @@
<div id='actions'>
<h2><%= t('.details')%></h2>
<p>
<strong><%= t('.age') %>:</strong> <%= time_ago_in_words(@blog_comment.created_at) %>
</p>
<h2><%= t('.actions') %></h2>
<ul>
<li>
<%= link_to t('.back'), {:action => 'index'}, :class => "back_icon" %>
</li>
<li>
<%= link_to t('.reject'), rejected_admin_blog_comment_path(@blog_comment, :return_to => 'rejected'),
:class => 'comment_cross_icon' unless @blog_comment.rejected? %>
</li>
<li>
<%= link_to t('.approve'), approved_admin_blog_comment_path(@blog_comment, :return_to => 'approved'),
:class => 'comment_tick_icon' unless @blog_comment.approved? %>
</li>
</ul>
</div>
<div id='records'>
<h2><%= t('.comment') %></h2>
<table id='inquiry'>
<tr>
<td>
<strong><%= t('.blog_post') %></strong>
</td>
<td>
<%= link_to @blog_comment.post.title,
blog_post_url(@blog_comment.post, :anchor => "comment-#{@blog_comment.to_param}"),
:target => '_blank' %>
</td>
</tr>
<tr>
<td>
<strong><%= t('.from') %></strong>
</td>
<td>
<%= @blog_comment.name %> [<%= mail_to @blog_comment.email, @blog_comment.email, {:title => t('.click_to_email')} %>]
</td>
</tr>
<tr>
<td>
<strong><%= t('.date') %></strong>
</td>
<td>
<%= l(Date.parse(@blog_comment.created_at.to_s), :format => :long) %>
</td>
</tr>
<tr>
<td valign='top'>
<strong><%= t('.message') %></strong>
</td>
<td>
<p style='margin-top: 0px'>
<%= @blog_comment.message.gsub("\r\n\r\n", "\r\n").gsub("\r\n", "</p><p>") %>
</p>
</td>
</tr>
</table>
</div>
<% if Refinery.version < '0.9.9' %>
<% content_for :head, stylesheet_link_tag('refinery/refinerycms-blog') %>
<% else %>
<% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-blog') %>
<% end %>

View file

@ -1,7 +0,0 @@
<style type='text/css'>
ul.blog_categories, ul.blog_categories li {
list-style: none;
margin: 0px;
padding: 0px;
}
</style>

View file

@ -1,61 +0,0 @@
<% form_for [:admin, @blog_post] do |f| -%>
<%= f.error_messages %>
<div class='field'>
<%= f.label :title -%>
<%= f.text_field :title, :class => 'larger widest' -%>
</div>
<div class='field'>
<%= f.label :body -%>
<%= f.text_area :body, :rows => 20, :class => 'wymeditor widest' -%>
</div>
<div id='more_options_field'>
<p>
<%= link_to t('.advanced_options'), "#",
: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">
<h3><%= t('admin.blog.submenu.categories.title') %></h3>
<ul class='blog_categories'>
<% @blog_categories.each do |category| %>
<li>
<%= check_box_tag 'blog_post[category_ids][]', category.id,
@blog_post.categories.include?(category),
:id => (id="blog_post_category_ids_#{category.id}") %>
<%= label_tag 'blog_post[category_ids][]', category.title,
:class => 'stripped',
:for => id %>
</li>
<% end %>
</ul>
<h3><%= t('admin.blog.posts.form.published_at') %></h3>
<%= f.datetime_select :published_at %>
</div>
<div class='hemisquare right_side'>
</div>
</div>
<%= render :partial => "/shared/admin/form_actions",
:locals => {
:f => f,
:continue_editing => true,
:delete_title => t('admin.blog.posts.post.delete')
} %>
<% end -%>
<% if Refinery.version < '0.9.9' %>
<% content_for :head do %>
<%= render :partial => 'form.css' %>
<%= render :partial => 'form.js' %>
<% end %>
<% else %>
<% content_for :stylesheets, render(:partial => 'form.css') -%>
<% content_for :javascripts, render(:partial => 'form.js') -%>
<% end %>

View file

@ -1,13 +0,0 @@
<script>
$(document).ready(function(){
$('#toggle_advanced_options').click(function(e){
e.preventDefault();
$('#more_options').animate({opacity: 'toggle', height: 'toggle'}, 250);
$('html,body').animate({
scrollTop: $('#toggle_advanced_options').parent().offset().top
}, 250);
});
});
</script>

View file

@ -1,18 +0,0 @@
<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(post) -%>">
<span class='title'>
<%=h post.title %>
<span class="preview">&nbsp;</span>
</span>
<span class='actions'>
<%= link_to refinery_icon_tag("application_go.png"), blog_post_url(post),
:title => t('.view_live'),
:target => "_blank" %>
<%= link_to refinery_icon_tag("application_edit.png"), edit_admin_blog_post_path(post),
:title => t('.edit') %>
<%= link_to refinery_icon_tag("delete.png"), admin_blog_post_path(post),
:class => "cancel confirm-delete",
:title => t('.delete'),
:'data-method' => 'delete',
:'data-confirm' => t('shared.admin.delete.message', :title => post.title) %>
</span>
</li>

View file

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

View file

@ -1,30 +0,0 @@
<%= render :partial => '/admin/blog/submenu' %>
<div id='records'>
<% if searching? %>
<h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2>
<% if @blog_posts.any? %>
<%= render :partial => "blog_posts",
:collection => @blog_posts %>
<% else %>
<p><%= t('admin.search_no_results') %></p>
<% end %>
<% else %>
<% if @blog_posts.any? %>
<%= will_paginate @blog_posts,
:previous_label => '&laquo;',
:next_label => '&raquo;' %>
<%= render :partial => "sortable_list" %>
<%= will_paginate @blog_posts,
:previous_label => '&laquo;',
:next_label => '&raquo;' %>
<% else %>
<p>
<strong>
<%= t('.no_items_yet', :create => t('admin.blog.submenu.posts.new')) %>
</strong>
</p>
<% end %>
<% end %>
</div>

View file

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

View file

@ -1,20 +0,0 @@
<% content_for :body_content_title, @category.title %>
<% content_for :body_content_left do %>
<% if @category.posts.any? %>
<article id="blog_posts">
<%= render :partial => "/blog/shared/post", :collection => @category.posts %>
</article>
<% else %>
<p>
<%= t('.no_posts') %>
</p>
<% end %>
<% end %>
<% content_for :body_content_right do %>
<%= render :partial => "/blog/shared/categories" %>
<% end %>
<%= render :partial => "/shared/content_page" %>
<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %>

View file

@ -1,17 +0,0 @@
<%= t('.greeting') %>,
<%= t('.you_recieved_new_comment') %>
<%= t('.comment_starts') %>
<%= t('.from') %>: <%= @comment.name %>
<%= t('.email') %>: <%= @comment.email %>
<%= t('.message') %>:
<%= @comment.body %>
<%= t('.comment_ends') %>
<%= t('.closing_line') %>,
<%= RefinerySetting[:site_name] %>
<%= t('.ps') %>

View file

@ -1,11 +0,0 @@
<article class='blog_comment_message' id='<%= "comment-#{comment.to_param}" %>'>
<p>
<%= simple_format auto_link(comment.message.to_s) %>
</p>
<footer class='blog_comment_author'>
<p>
<%= t('blog.posts.comments.by', :who => comment.name) %>,
<%= t('blog.posts.comments.time_ago', :time => time_ago_in_words(comment.created_at)) %>
</p>
</footer>
</article>

View file

@ -1,13 +0,0 @@
<% if next_or_previous?(@blog_post) -%>
<nav id="next_prev_article">
<% if @blog_post.next.present? -%>
<%= link_to raw(truncate(@blog_post.next.title) + "&nbsp;&#187;"), @blog_post.next, :class => 'next' %>
<% end -%>
<%= link_to 'Blog Home', blog_root_path, :class => 'home' %>
<% if @blog_post.prev.present? -%>
<%= link_to "&#171;&nbsp;".html_safe + truncate(@blog_post.prev.title), @blog_post.prev, :class => 'prev' %>
<% end -%>
</nav><!-- /next_prev_article -->
<% end -%>

View file

@ -1,34 +0,0 @@
<% flash.each do |key, value| %>
<div id='flash' class="flash flash_<%= key %>">
<%= value %>
</div>
<% end %>
<article id="blog_post">
<header>
<h1><%= @blog_post.title %></h1>
<details>
<time datetime="<%= @blog_post.published_at.strftime('%Y-%m-%d') %>" class='posted_at'>
<%= t('blog.shared.posts.created_at', :when => @blog_post.published_at.strftime('%d %B %Y')) %>.
</time>
<% if (categories = @blog_post.categories).any? %>
<aside class='filed_in'>
<%= t('.filed_in') %>
<% categories.each_with_index do |category, index| %>
<%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
<% end %>
</aside>
<% end %>
</details>
</header>
<%= @blog_post.body.html_safe %>
<% if BlogPost::ShareThis.enabled? %>
<span class="st_sharethis" displayText="ShareThis"></span>
<% end %>
</article>
<%= render :partial => '/shared/draft_page_message' unless @blog_post.nil? or @blog_post.live? -%>
<% if next_or_previous?(@blog_post) -%>
<nav id="next_prev_article">
<%= render 'nav' %>
</nav><!-- /next_prev_article -->
<% end -%>

View file

@ -1,19 +0,0 @@
<% content_for :body_content_left do %>
<%= @page[Page.default_parts.first.to_sym] %>
<h1>Blog Archive for <%= @archive_date.strftime('%B %Y') %></h1>
<section id="blog_posts">
<%= render :partial => "/blog/shared/post", :collection => @blog_posts %>
</section>
<%= "There are no blog articles posted for #{@archive_date.strftime('%B %Y')}. Stay tuned." unless @blog_posts.any? %>
<%# TODO: Add locale logic here - hubble is a n00b at that %>
<% end %>
<% content_for :body_content_right do %>
<%= @page[Page.default_parts.second.to_sym] %>
<%= render :partial => "/blog/shared/categories" %>
<%= render :partial => "/blog/shared/rss_feed" %>
<%= blog_archive_list %>
<% end %>
<%= render :partial => "/shared/content_page" %>
<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %>

View file

@ -1,20 +0,0 @@
<% content_for :body_content_left do %>
<%= @page[Page.default_parts.first.to_sym] %>
<section id="blog_posts">
<%= render :partial => "/blog/shared/post", :collection => @blog_posts %>
</section>
<%= "<p>There are no blog articles posted yet. Stay tuned.</p>".html_safe unless @blog_posts.any? %>
<%# TODO: Add locale logic here - hubble is a n00b at that %>
<% end %>
<% content_for :body_content_right do %>
<%= @page[Page.default_parts.second.to_sym] %>
<%= render :partial => "/blog/shared/categories" %>
<%= render :partial => "/blog/shared/rss_feed" %>
<%= blog_archive_list %>
<% end %>
<%= render :partial => "/shared/content_page" %>
<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %>

View file

@ -1,17 +0,0 @@
xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
xml.title RefinerySetting.find_or_set(:site_name, "Company Name")
xml.description RefinerySetting.find_or_set(:site_name, "Company Name") + " Blog Posts"
xml.link blog_root_url
@blog_posts.each do |post|
xml.item do
xml.title post.title
xml.description post.body
xml.pubDate post.published_at.to_s(:rfc822)
xml.link blog_post_url(post)
end
end
end
end

View file

@ -1,75 +0,0 @@
<% content_for :body_content_left do %>
<div id="show_blog_post">
<%= render 'post' %>
</div>
<% if BlogPost.comments_allowed? %>
<aside id="comments">
<h2><%= t('.comments.title') %></h2>
<% if (comments = @blog_post.comments.approved).any? %>
<%= render :partial => "comment", :collection => comments %>
<% else %>
<p>
<%= t('blog.shared.comments.none') %>.
</p>
<% end %>
<% flash.each do |key, value| %>
<div id='flash' class="flash flash_<%= key %>">
<%= value %>
</div>
<% end %>
<h2><%= t('.comments.add') %></h2>
<% form_for [:blog_post, @blog_comment] do |f| %>
<%= f.error_messages %>
<div class='field'>
<%= f.label :name %>
<%= f.text_field :name %>
</div>
<div class='field'>
<%= f.label :email %>
<%= f.text_field :email %>
</div>
<div class='field message_field'>
<%= f.label :message %>
<%= f.text_area :message, :rows => 6 %>
</div>
<div class='field form-actions'>
<%= f.submit t('.submit') %>
</div>
<% end %>
</aside>
<% end %>
<% end %>
<% content_for :body_content_right do %>
<%= render :partial => "/blog/shared/categories" %>
<%= render :partial => "/blog/shared/posts" %>
<%= render :partial => "/blog/shared/rss_feed" %>
<%= blog_archive_list %>
<% end %>
<%= render :partial => "/shared/content_page", :locals => { :remove_automatic_sections => true } %>
<% if Refinery.version < '0.9.9' %>
<% content_for :head_libraries, jquery_include_tags(:jquery_ui => false) %>
<% content_for :head do %>
<%= stylesheet_link_tag 'refinerycms-blog' %>
<%= javascript_include_tag('refinerycms-blog') %>
<% if BlogPost::ShareThis.enabled? %>
<script src="http://w.sharethis.com/button/buttons.js"></script>
<script>stLight.options({publisher:'<%= BlogPost::ShareThis.key %>'});</script>
<% end %>
<% end %>
<% else %>
<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %>
<% content_for :before_javascript_libraries, jquery_include_tags(:jquery_ui => false) %>
<% content_for :javascripts do %>
<%= javascript_include_tag 'refinerycms-blog' %>
<script src="http://w.sharethis.com/button/buttons.js"></script>
<script>stLight.options({publisher:'<%= BlogPost::ShareThis.key %>'});</script>
<% end if BlogPost::ShareThis.enabled? %>
<% end %>

View file

@ -1,8 +0,0 @@
<h2><%= t('.title') %></h2>
<ul id='categories'>
<% @blog_categories.each do |category| %>
<li<%= " class='selected'" if @category.present? and @category.id == category.id %>>
<%= link_to "#{category.title} (#{category.post_count})", blog_category_url(category) %>
</li>
<% end %>
</ul>

View file

@ -1,38 +0,0 @@
<% if post.live? %>
<article class="blog_post" id="<%= dom_id(post) %>">
<header>
<h1><%= link_to post.title, blog_post_url(post) %></h1>
<details>
<time datetime="<%= post.published_at.strftime('%Y-%m-%d') %>" class='posted_at'>
<%= t('blog.shared.posts.created_at', :when => post.published_at.strftime('%d %B %Y')) %>.
</time>
<% if (categories = post.categories).any? %>
<aside class='filed_in'>
<%= t('filed_in', :scope => 'blog.posts.show') %>
<% categories.each_with_index do |category, index| %>
<%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
<% end %>
</aside>
<% end %>
</details>
</header>
<section class='clearfix'>
<%= truncate(post.body,
:length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250),
:preserve_html_tags => true) %>
</section>
<footer>
<p>
<%= link_to t('blog.shared.posts.read_more'), blog_post_url(post) %>
<aside class='comment_count'>
<% if post.comments.any? %>
(<%= pluralize(post.comments.approved.count, t('blog.shared.comments.singular')) %>)
<% else %>
(<%= t('blog.shared.comments.none') %>)
<% end %>
</aside>
</p>
</footer>
</article>
<% end %>

Some files were not shown because too many files have changed in this diff Show more