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 @@
<%= 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 Binary files /dev/null and b/public/images/refinerycms-blog/icons/down.gif 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 Binary files /dev/null and b/public/images/refinerycms-blog/icons/up.gif 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=$("
")); + 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