diff options
author | Philip Arndt <parndt@gmail.com> | 2010-08-11 16:39:03 +1200 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2010-08-11 16:39:03 +1200 |
commit | 9dc207fbe54a9df48ad4d903897f1fec37fff392 (patch) | |
tree | 77560be11f2c359443efcb0a4cc88746e1cbbd63 | |
parent | ac0b754237045f6139106bd04e56b398e89ff9bd (diff) | |
download | refinerycms-blog-9dc207fbe54a9df48ad4d903897f1fec37fff392.tar.gz refinerycms-blog-9dc207fbe54a9df48ad4d903897f1fec37fff392.tar.bz2 refinerycms-blog-9dc207fbe54a9df48ad4d903897f1fec37fff392.zip |
Makes menu more flexible.
-rw-r--r-- | app/views/admin/blog/_submenu.html.erb | 63 | ||||
-rw-r--r-- | config/locales/en.yml | 2 |
2 files changed, 57 insertions, 8 deletions
diff --git a/app/views/admin/blog/_submenu.html.erb b/app/views/admin/blog/_submenu.html.erb index 78e4c1d..c9da583 100644 --- a/app/views/admin/blog/_submenu.html.erb +++ b/app/views/admin/blog/_submenu.html.erb @@ -8,12 +8,15 @@ </li> </ul> - <ul> + <ul class='collapsible_menu'> <li> - <%= link_to t('.posts.title'), admin_blog_posts_path, - :class => 'page_icon' %> + <%= 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> @@ -21,7 +24,7 @@ <ul class='collapsible_menu'> <li> - <%= link_to t('.comments.title'), admin_blog_comments_path, + <%= link_to t('.comments.title'), '#', :class => 'comments_icon' %> </li> <li> @@ -41,7 +44,7 @@ <ul class='collapsible_menu'> <li> <%= link_to t('.categories.title'), admin_blog_categories_url, - :class => 'folder_icon'%> + :class => 'folder_icon' %> </li> <li> <%= link_to t('.categories.manage'), admin_blog_categories_url, @@ -71,18 +74,62 @@ </div> <% content_for :head do %> + <!-- uses famfamfam icons and a couple Dave made --> + <style type='text/css'> + .comments_icon { + background-image: url('/images/refinery/icons/comments.png'); + } + .comment_icon { + background-image: url('/images/refinery/icons/comment.png'); + } + .comment_cross_icon { + background-image: url('/images/refinery/icons/comment_cross.png'); + } + .comment_tick_icon { + background-image: url('/images/refinery/icons/comment_tick.png'); + } + .folder_icon { + background-image: url('/images/refinery/icons/folder.png'); + } + .folder_add_icon { + background-image: url('/images/refinery/icons/folder_add.png'); + } + .folder_edit_icon { + background-image: url('/images/refinery/icons/folder_edit.png'); + } + .settings_icon { + background-image: url('/images/refinery/icons/cog.png'); + } + .page_icon { + background-image: url('/images/refinery/icons/page.png'); + } + .page_copy_icon { + background-image: url('/images/refinery/icons/page_copy.png'); + } + .page_add_icon { + background-image: url('/images/refinery/icons/page_add.png'); + } + </style> <script type='text/javascript'> $(document).ready(function(){ $('div#actions.multilist > ul:not(.search_list) li a[href$=' + window.location.pathname + ']') .parent().addClass('selected'); - $('div#actions.multilist > ul:not(.search_list) li > a').bind('click', function(){ - $(this).css('background-image', "url('/images/refinery/ajax-loader.gif') !important"); + $('div#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/ajax-loader.gif') !important"); + }); + } }); $('ul.collapsible_menu').each(function(i, ul) { - (first_li = $(this).children('li:first')).after(div=$("<div style='display: none'></div>")); + (first_li = $(this).children('li:first')).after(div=$("<div></div>")); + if (($(this).children('li.selected')).length == 0) { + div.hide(); + } $(this).children('li:not(:first)').appendTo(div); + first_li.find('> a').click(function(e){ $(this).parent().next('div').animate({ opacity: 'toggle' diff --git a/config/locales/en.yml b/config/locales/en.yml index 9811e1c..3aef157 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -26,10 +26,12 @@ en: comments: title: Comments new: New + unmoderated: New approved: Approved rejected: Rejected posts: title: Posts + manage: Manage posts new: Create new post settings: title: Settings |