Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add topnavbar to theme assets #15

Merged
merged 2 commits into from
Jun 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions app/helpers/radius_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,23 @@ def end_masquerade_path
end
end

def signout_user_path
if respond_to?(:destroy_user_session_path)
destroy_user_session_path
else
"#{kracken_url}/users/sign_out"
end
end

def manage_user_path
if respond_to?(:edit_user_registration_path)
edit_user_registration_path
else
"#{kracken_url}/users/edit"
end
end

def manage_teams_path
"#{kracken_url}/teams"
end
end
112 changes: 112 additions & 0 deletions app/views/radius/_topnavbar.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<!--START Top Navbar-->
<nav class="navbar topnavbar" role="navigation">
<!--START navbar header-->
<div class="navbar-header">
<a class="navbar-brand" href="https://www.radiusnetworks.com/">
<div class="brand-logo">
<img alt="App Logo" class="img-responsive" src="<%= image_path('radius-theme/logo.png') %>" />
</div>
<div class="brand-logo-collapsed">
<img alt="App Logo" class="img-responsive" src="<%= image_path('radius-theme/logo-single.png') %>" />
</div>
</a>
</div>
<!--END navbar header-->
<!--START Nav wrapper-->
<div class="nav-wrapper">
<!--START Left navbar-->
<ul class="nav navbar-nav">
<li>
<!--Button used to collapse the left sidebar. Only visible on tablet and desktops-->
<a class="hidden-xs" data-toggle-state="aside-collapsed" href="#">
<em class="fa fa-navicon">
</em>
</a>
<!--Button to show/hide the sidebar on mobile. Visible on mobile only.-->
<a class="visible-xs sidebar-toggle" data-no-persist="true" data-toggle-state="aside-toggled" href="#">
<em class="fa fa-navicon">
</em>
</a>
</li>
<li>
<a href="https://store.radiusnetworks.com" title="Radius Networks Store">
<em class="icon-basket">
</em>
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<!--Search icon-->
<!--li-->
<!-- a data-search-open="" href="#"-->
<!-- em.icon-magnifier-->
<!--User Drop Down-->
<li class="dropdown dropdown-list">
<a data-toggle="dropdown" href="#">
<em class="icon-user">
</em>
</a>
<!--START Dropdown menu-->
<ul class="dropdown-menu animated flipInX">
<li>
<!--START list group-->
<div class="list-group">
<a class="list-group-item" href="<%= signout_user_path %>">
<div class="media-box">
<div class="pull-left">
<em class="fa fa-sign-out fa-2x text-info">
</em>
</div>
<div class="media-box-body clearfix">
<p class="m0">Sign Out</p>
<p class="m0 text-muted">
<small>Signed in as <%= current_user.email %></small>
</p>
</div>
</div>
</a>
<!--list item-->
<a class="list-group-item" href="<%= manage_user_path %>">
<div class="media-box">
<div class="pull-left">
<em class="fa fa-user fa-2x text-success">
</em>
</div>
<div class="media-box-body clearfix">
<p class="m0">User Account</p>
<p class="m0 text-muted">
<small>Edit Account Details</small>
</p>
</div>
</div>
</a>
<!--list item-->
<% if current_user.respond_to? :teams %>
<a class="list-group-item" href="<%= manage_teams_path %>">
<div class="media-box">
<div class="pull-left">
<em class="fa fa-users fa-2x text-warning">
</em>
</div>
<div class="media-box-body clearfix">
<p class="m0">Teams</p>
<p class="m0 text-muted">
<small>
You belong to <%= pluralize(current_user.teams.count ,"team") %>
</small>
</p>
</div>
</div>
</a>
<% end %>
</div>
</li>
</ul>
</li>
<!--END Contacts menu-->
</ul>
<!--END Right Navbar-->
</div>
<!--END Nav wrapper-->
</nav>
<!--END Top Navbar-->