Skip to content
Browse files

added arrows to menu, added new comments count to top level menu item…

… for comments, updated readme with basic install instructions
  • Loading branch information...
1 parent bc84757 commit 18a708984ce40b5053ee6db5ff337e4ea9df986b @djones djones committed Sep 7, 2010
View
7 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>
View
2 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')) %>
View
1 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
View
BIN public/images/refinerycms-blog/icons/down.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/images/refinerycms-blog/icons/up.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
3 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'
View
6 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');
}
View
16 readme.md
@@ -1 +1,15 @@
-Blog plugin redux
+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

0 comments on commit 18a7089

Please sign in to comment.
Something went wrong with that request. Please try again.