-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
overriding menu and header views for bootstrap
- Loading branch information
Showing
7 changed files
with
171 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<div class="navbar"> | ||
<div class="navbar-inner"> | ||
<div class="container"> | ||
<a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse"> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</a> | ||
<%= link_to Refinery::Core.site_name, refinery.root_path, :class => 'brand' %> | ||
<%= render(:partial => "/refinery/menu", :locals => { | ||
:dom_id => 'menu', | ||
:css => 'menu' | ||
}) %> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<% | ||
# Collect the root items. | ||
# ::Refinery::Menu is smart enough to remember all of the items in the original collection. | ||
if (roots = local_assigns[:roots] || (collection ||= refinery_menu_pages).roots).present? | ||
dom_id ||= 'menu' | ||
css = [(css || 'menu clearfix')].flatten.join(' ') | ||
hide_children = Refinery::Core.menu_hide_children if hide_children.nil? | ||
-%> | ||
<nav id='<%= dom_id %>' class="container nav-collapse"> | ||
<ul class="nav"> | ||
<%= render :partial => '/refinery/menu_branch', :collection => roots, | ||
:locals => { | ||
:hide_children => hide_children, | ||
:sibling_count => (roots.length - 1), | ||
:menu_levels => local_assigns[:menu_levels], | ||
:apply_css => true #if you don't care about class='first' class='last' or class='selected' set apply_css to false for speed. | ||
} -%> | ||
</ul> | ||
</nav> | ||
<% end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<% | ||
if !!local_assigns[:apply_css] and (classes = menu_branch_css(local_assigns)).any? | ||
css = "class='#{classes.join(' ')}'".html_safe | ||
end | ||
-%> | ||
<li<%= ['', css].compact.join(' ').gsub(/\ *$/, '').html_safe %>> | ||
<%= link_to(menu_branch.title, refinery.url_for(menu_branch.url)) -%> | ||
<% if ( (children = menu_branch.children unless hide_children).present? && | ||
(!local_assigns[:menu_levels] || menu_branch.ancestors.length < local_assigns[:menu_levels]) ) -%> | ||
<ul class='clearfix'> | ||
<%= render :partial => '/refinery/menu_branch', :collection => children, | ||
:locals => { | ||
:apply_css => local_assigns[:apply_css], | ||
:hide_children => !!hide_children, | ||
:menu_levels => local_assigns[:menu_levels] | ||
} -%> | ||
</ul> | ||
<% end -%> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<nav id="menu"> | ||
<% ::Refinery::Plugins.active.in_menu.each do |plugin| -%> | ||
<%= link_to plugin.title, refinery.url_for(plugin.url), | ||
:class => ("active" if plugin.highlighted?(params)), | ||
:id => "plugin_#{plugin.name}" %> | ||
<% end -%> | ||
<% if ::Refinery::Plugins.active.in_menu.many? -%> | ||
<%= link_to refinery_icon_tag('arrow_switch.png'), "", | ||
:id => "menu_reorder", | ||
:title => t('.reorder_menu') %> | ||
<%= link_to refinery_icon_tag('tick.png'), "", | ||
:id => "menu_reorder_done", | ||
:title => t('.reorder_menu_done'), | ||
:style => "display: none;" %> | ||
<% end %> | ||
</nav> |
1 change: 1 addition & 0 deletions
1
app/views/refinery/admin/dashboard/_additional_dashboard_menu_items.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<%# Add items here to have them appear on your dashboard's right hand side menu %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<nav id='actions' class='multilist'> | ||
<ul class='search_list'> | ||
<li class='not_a_link'> | ||
<%= render :partial => "/refinery/admin/search", | ||
:locals => { | ||
:url => refinery.blog_admin_posts_path | ||
} %> | ||
</li> | ||
</ul> | ||
|
||
<ul class='collapsible_menu'> | ||
<li class='not_a_link'> | ||
<%= link_to t('.posts.title'), '#', | ||
:class => 'page_copy_icon' %> | ||
</li> | ||
<li> | ||
<%= link_to t('.posts.manage'), refinery.blog_admin_posts_path, | ||
:class => 'page_icon' %> | ||
</li> | ||
<li> | ||
<%= link_to t('.posts.uncategorized'), refinery.uncategorized_blog_admin_posts_path, | ||
:class => 'page_icon' %> | ||
</li> | ||
<li> | ||
<%= link_to t('.posts.new'), refinery.new_blog_admin_post_path, | ||
:class => 'page_add_icon' %> | ||
</li> | ||
</ul> | ||
<% if Refinery::Blog::Post.comments_allowed? %> | ||
<ul class='collapsible_menu'> | ||
<li class='not_a_link'> | ||
<% if Refinery::Blog::Comment.unmoderated.any? %> | ||
<% title = t('.comments.title_with_count', :new_count => Refinery::Blog::Comment.unmoderated.size) %> | ||
<% else %> | ||
<% title = t('.comments.title') %> | ||
<% end %> | ||
<%= link_to title, '#', | ||
:class => 'comments_icon' %> | ||
</li> | ||
<li> | ||
<%= link_to t('.comments.new'), refinery.blog_admin_comments_path, | ||
:class => 'comment_icon' %> | ||
</li> | ||
<li> | ||
<%= link_to t('.comments.approved'), refinery.approved_blog_admin_comments_path, | ||
:class => 'comment_tick_icon' %> | ||
</li> | ||
<li> | ||
<%= link_to t('.comments.rejected'), refinery.rejected_blog_admin_comments_path, | ||
:class => 'comment_cross_icon' %> | ||
</li> | ||
</ul> | ||
<% end %> | ||
|
||
<ul class='collapsible_menu'> | ||
<li class='not_a_link'> | ||
<%= link_to t('.categories.title'), '#', | ||
:class => 'folder_icon' %> | ||
</li> | ||
<li> | ||
<%= link_to t('.categories.manage'), refinery.blog_admin_categories_path, | ||
:class => 'folder_edit_icon' %> | ||
</li> | ||
<li> | ||
<%= link_to t('.categories.new'), refinery.new_blog_admin_category_path, | ||
:class => 'folder_add_icon' %> | ||
</li> | ||
</ul> | ||
|
||
<ul class='collapsible_menu'> | ||
<li class='not_a_link'> | ||
<%= link_to t('.settings.title'), refinery.blog_admin_settings_path, | ||
:class => 'settings_icon' %> | ||
</li> | ||
<li> | ||
<%= link_to t('.settings.comments'), refinery.comments_blog_admin_settings_path, | ||
:class => "#{Refinery::Blog::Post.comments_allowed? ? 'success' : 'failure'}_icon" %> | ||
</li> | ||
<li> | ||
<%= link_to t('.settings.moderation'), refinery.moderation_blog_admin_settings_path, | ||
:class => "#{Refinery::Blog::Comment::Moderation.enabled? ? 'success' : 'failure'}_icon" %> | ||
</li> | ||
<li> | ||
<%= link_to t('.settings.update_notified'), | ||
refinery.notification_recipients_blog_admin_settings_path(:dialog => true, :height => 400), | ||
:class => 'user_comment_icon' %> | ||
</li> | ||
<li> | ||
<%= link_to t('.settings.teasers'), | ||
refinery.teasers_blog_admin_settings_path, :class => "#{Refinery::Blog::Post.teasers_enabled? ? 'success' : 'failure'}_icon" %> | ||
</li> | ||
</ul> | ||
|
||
</nav> | ||
|
||
<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/backend') %> |