added arrows to menu, added new comments count to top level menu item for comments, updated readme with basic install instructions
This commit is contained in:
parent
bc84757e41
commit
18a708984c
8 changed files with 32 additions and 3 deletions
|
@ -24,7 +24,12 @@
|
||||||
|
|
||||||
<ul class='collapsible_menu'>
|
<ul class='collapsible_menu'>
|
||||||
<li>
|
<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' %>
|
:class => 'comments_icon' %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<li>
|
<li class='clearfix'>
|
||||||
<h2><%= link_to post.title, blog_post_url(post) %></h2>
|
<h2><%= link_to post.title, blog_post_url(post) %></h2>
|
||||||
<p class='posted_at'>
|
<p class='posted_at'>
|
||||||
<%= t('blog.shared.posts.created_at', :when => post.created_at.strftime('%d %B %Y')) %>
|
<%= t('blog.shared.posts.created_at', :when => post.created_at.strftime('%d %B %Y')) %>
|
||||||
|
|
|
@ -57,6 +57,7 @@ en:
|
||||||
new: Create new category
|
new: Create new category
|
||||||
comments:
|
comments:
|
||||||
title: Comments
|
title: Comments
|
||||||
|
title_with_count: 'Comments ({{new_count}} new)'
|
||||||
new: New
|
new: New
|
||||||
unmoderated: New
|
unmoderated: New
|
||||||
approved: Approved
|
approved: Approved
|
||||||
|
|
BIN
public/images/refinerycms-blog/icons/down.gif
Normal file
BIN
public/images/refinerycms-blog/icons/down.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 110 B |
BIN
public/images/refinerycms-blog/icons/up.gif
Normal file
BIN
public/images/refinerycms-blog/icons/up.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 111 B |
|
@ -15,12 +15,15 @@ $(document).ready(function(){
|
||||||
|
|
||||||
$('ul.collapsible_menu').each(function(i, ul) {
|
$('ul.collapsible_menu').each(function(i, ul) {
|
||||||
(first_li = $(this).children('li:first')).after(div=$("<div></div>"));
|
(first_li = $(this).children('li:first')).after(div=$("<div></div>"));
|
||||||
|
|
||||||
if (($(this).children('li.selected')).length == 0) {
|
if (($(this).children('li.selected')).length == 0) {
|
||||||
div.hide();
|
div.hide();
|
||||||
|
first_li.addClass("closed");
|
||||||
}
|
}
|
||||||
$(this).children('li:not(:first)').appendTo(div);
|
$(this).children('li:not(:first)').appendTo(div);
|
||||||
|
|
||||||
first_li.find('> a').click(function(e){
|
first_li.find('> a').click(function(e){
|
||||||
|
first_li.toggleClass("closed");
|
||||||
$(this).parent().next('div').animate({
|
$(this).parent().next('div').animate({
|
||||||
opacity: 'toggle'
|
opacity: 'toggle'
|
||||||
, height: 'toggle'
|
, height: 'toggle'
|
||||||
|
|
|
@ -30,4 +30,10 @@
|
||||||
}
|
}
|
||||||
.page_add_icon {
|
.page_add_icon {
|
||||||
background-image: url('/images/refinerycms-blog/icons/page_add.png');
|
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');
|
||||||
}
|
}
|
16
readme.md
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
|
Loading…
Add table
Add a link
Reference in a new issue