Breadcrumb for site settings

This commit is contained in:
saurabhbhatia 2013-12-23 18:33:40 +08:00
parent 9a91b2ab27
commit 58dadb07b1
3 changed files with 35 additions and 1 deletions

View File

@ -399,4 +399,37 @@ module OrbitBackendHelper
res.html_safe
end
def site_breadcrumb
res = ''
divider = "<span class='divider'>/</span>"
res << "<li><a href='#{admin_dashboards_path}'>Dashboard</a>#{divider}</li>"
site = Site.first
case controller.controller_name
when 'sites'
res << "<li>Site Settings#{divider}</li>"
case controller.action_name
when 'sitemap'
res << "<li class='active'>#{t(:sitemap)}</li>"
when 'responsive_setting'
res << "<li class='active'>#{t(:mobile_setting) }</li>"
when 'mail_setting'
res << "<li class='active'>#{t(:mail_setting)}</li>"
when 'preference'
res << "<li class='active'>#{t(:preference)}</li>"
when 'search_engine'
res << "<li class='active'>#{t(:search_engine)}</li>"
when 'site_info'
res << "<li class='active'>#{t(:site_info)}</li>"
end
when 'items'
res << "<li>Structure#{divider}</li>"
res << "<li class='active'>#{t(:items)}</li>"
when 'module_stores'
res << "<li class='active'>#{t(:modules)}</li>"
when 'designs'
res << "<li class='active'>#{t(:templates)}</li>"
end
res.html_safe
end
end

View File

@ -27,6 +27,7 @@
<% if @module_app.present?%>
<%= back_end_breadcrumb %>
<%else%>
<%= site_breadcrumb %>
<%end%>
</ul>
<%= yield :right_nav %>

View File

@ -19,7 +19,7 @@
<% unless @no_header %>
<div id="filter" class="topnav clearfix">
<ul class="breadcrumb text-info pull-left">
<li><a href="<%= admin_dashboards_path %>">Dashboard</a> <span class="divider">/</span></li>
<%= site_breadcrumb %>
<li class="active">All</li>
</ul>
<%= yield :right_nav %>