aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjones <dgjones@gmail.com>2010-09-07 16:17:26 +1200
committerdjones <dgjones@gmail.com>2010-09-07 16:17:26 +1200
commit18a708984ce40b5053ee6db5ff337e4ea9df986b (patch)
treebcedb70a39d28798f4717dbefd54150ca03d2e4c
parentbc84757e41578d68e12dc813d9be0c12ca191175 (diff)
downloadrefinerycms-blog-18a708984ce40b5053ee6db5ff337e4ea9df986b.tar.gz
refinerycms-blog-18a708984ce40b5053ee6db5ff337e4ea9df986b.tar.bz2
refinerycms-blog-18a708984ce40b5053ee6db5ff337e4ea9df986b.zip
added arrows to menu, added new comments count to top level menu item for comments, updated readme with basic install instructions
-rw-r--r--app/views/admin/blog/_submenu.html.erb7
-rw-r--r--app/views/blog/shared/_post.html.erb2
-rw-r--r--config/locales/en.yml1
-rw-r--r--public/images/refinerycms-blog/icons/down.gifbin0 -> 110 bytes
-rw-r--r--public/images/refinerycms-blog/icons/up.gifbin0 -> 111 bytes
-rw-r--r--public/javascripts/refinery/refinerycms-blog.js3
-rw-r--r--public/stylesheets/refinery/refinerycms-blog.css6
-rw-r--r--readme.md16
8 files changed, 32 insertions, 3 deletions
diff --git a/app/views/admin/blog/_submenu.html.erb b/app/views/admin/blog/_submenu.html.erb
index 246488a..5c93891 100644
--- a/app/views/admin/blog/_submenu.html.erb
+++ b/app/views/admin/blog/_submenu.html.erb
@@ -24,7 +24,12 @@
<ul class='collapsible_menu'>
<li>
- <%= link_to t('.comments.title'), '#',
+ <% 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>
diff --git a/app/views/blog/shared/_post.html.erb b/app/views/blog/shared/_post.html.erb
index d8194d3..56ac89c 100644
--- a/app/views/blog/shared/_post.html.erb
+++ b/app/views/blog/shared/_post.html.erb
@@ -1,4 +1,4 @@
-<li>
+<li class='clearfix'>
<h2><%= link_to post.title, blog_post_url(post) %></h2>
<p class='posted_at'>
<%= t('blog.shared.posts.created_at', :when => post.created_at.strftime('%d %B %Y')) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index c3fd8a4..9f82fbc 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -57,6 +57,7 @@ en:
new: Create new category
comments:
title: Comments
+ title_with_count: 'Comments ({{new_count}} new)'
new: New
unmoderated: New
approved: Approved
diff --git a/public/images/refinerycms-blog/icons/down.gif b/public/images/refinerycms-blog/icons/down.gif
new file mode 100644
index 0000000..990bd87
--- /dev/null
+++ b/public/images/refinerycms-blog/icons/down.gif
Binary files differ
diff --git a/public/images/refinerycms-blog/icons/up.gif b/public/images/refinerycms-blog/icons/up.gif
new file mode 100644
index 0000000..1edf617
--- /dev/null
+++ b/public/images/refinerycms-blog/icons/up.gif
Binary files differ
diff --git a/public/javascripts/refinery/refinerycms-blog.js b/public/javascripts/refinery/refinerycms-blog.js
index c92ba3e..fdbf392 100644
--- a/public/javascripts/refinery/refinerycms-blog.js
+++ b/public/javascripts/refinery/refinerycms-blog.js
@@ -15,12 +15,15 @@ $(document).ready(function(){
$('ul.collapsible_menu').each(function(i, ul) {
(first_li = $(this).children('li:first')).after(div=$("<div></div>"));
+
if (($(this).children('li.selected')).length == 0) {
div.hide();
+ first_li.addClass("closed");
}
$(this).children('li:not(:first)').appendTo(div);
first_li.find('> a').click(function(e){
+ first_li.toggleClass("closed");
$(this).parent().next('div').animate({
opacity: 'toggle'
, height: 'toggle'
diff --git a/public/stylesheets/refinery/refinerycms-blog.css b/public/stylesheets/refinery/refinerycms-blog.css
index cc6f582..bede6ce 100644
--- a/public/stylesheets/refinery/refinerycms-blog.css
+++ b/public/stylesheets/refinery/refinerycms-blog.css
@@ -30,4 +30,10 @@
}
.page_add_icon {
background-image: url('/images/refinerycms-blog/icons/page_add.png');
+}
+.collapsible_menu li:first {
+ background-image: url('/images/refinerycms-blog/icons/up.png');
+}
+.collapsible_menu li.closed {
+ background-image: url('/images/refinerycms-blog/icons/down.png');
} \ No newline at end of file
diff --git a/readme.md b/readme.md
index a82b4dc..5a3c2a6 100644
--- a/readme.md
+++ b/readme.md
@@ -1 +1,15 @@
-Blog plugin redux \ No newline at end of file
+Install
+
+Open up your GemFile and add at the bottom this line
+
+gem 'refinerycms-blog', '= 1.0.rc6'
+
+Now run ``bundle install``
+
+Next to install it run:
+
+ruby script/generate refinery_blog
+
+Finally migration your database and you're done.
+
+rake db:migrate \ No newline at end of file