app/views/layouts/phcmemberspro/components/backend/sidebars/_left_sidebar.html.erb in phcmemberspro-37.0.0 vs app/views/layouts/phcmemberspro/components/backend/sidebars/_left_sidebar.html.erb in phcmemberspro-37.0.1
- old
+ new
@@ -1,56 +1,62 @@
<div class="sidebar-collapse">
<ul class="nav metismenu" id="side-menu">
- <li class="nav-header">
- <div class="dropdown profile-element">
- <%= link_to '#', class: "dropdown-toggle", :data => { :toggle=> 'dropdown'} do %>
- <span class="clear">
- <span class="block m-t-xs">
- <strong class="font-bold"></strong>
- </span>
- <span class="text-muted text-xs block">User Options <b class="caret"></b>
- </span>
- </span>
- <% end %>
- <ul class="dropdown-menu animated fadeInRight m-t-xs">
- <li></li>
- </ul>
- </div>
- <div class="logo-element">
- PHC
- </div>
- </li>
+ <% if current_user %>
- <% if defined?(phcmemberspro) %>
- <li class="<%= is_active_controller('phcmemberspro/modules/dashboards') %>">
- <%= link_to phcmemberspro.modules_dashboards_index_path do %>
- <i class="fa fa-tachometer"></i>
- <span class="nav-label">Dashboard</span>
- <% end %>
+ <li class="nav-header">
+ <div class="dropdown profile-element">
+ <%= link_to '#', class: "dropdown-toggle", :data => { :toggle=> 'dropdown'} do %>
+ <span class="clear">
+ <span class="block m-t-xs">
+ <strong class="font-bold"><%= current_user.firstname %> <%= current_user.lastname %></strong>
+ </span>
+ <span class="text-muted text-xs block">User Options <b class="caret"></b>
+ </span>
+ </span>
+ <% end %>
+ <ul class="dropdown-menu animated fadeInRight m-t-xs">
+ <li><%= link_to "Account Update", phcaccountspro.edit_user_registration_path %></li>
+ <li class="divider"></li>
+ <li><%= link_to "Logout", phcaccountspro.destroy_user_session_path, method: :delete %></li>
+ </ul>
+ </div>
+ <div class="logo-element">
+ PHC
+ </div>
</li>
- <li class="<%= is_active_controller('phcmemberspro/member/profiles') %>">
- <%= link_to '#' do %>
- <i class="fa fa-users"></i>
- <span class="nav-label">Member Information</span>
- <span class="fa arrow"></span>
- <% end %>
- <ul class="nav nav-second-level collapse">
- <li class=""><%= link_to "Member List", phcmemberspro.member_profiles_path %></li>
- <li class=""><%= link_to "Add a Memmber", phcmemberspro.new_member_profile_path %></li>
- </ul>
- </li>
- <li class="<%= is_active_controller('phcmemberspro/directory/categories') %>">
- <%= link_to '#' do %>
- <i class="fa fa-sitemap"></i>
- <span class="nav-label">Directory Listings</span>
- <span class="fa arrow"></span>
- <% end %>
- <ul class="nav nav-second-level collapse">
- <li class=""><%= link_to "Category List", phcmemberspro.directory_categories_path %></li>
- <li class=""><%= link_to "Add a Category", phcmemberspro.new_directory_category_path %></li>
- </ul>
- </li>
+
+ <% if defined?(phcmemberspro) %>
+ <li class="<%= is_active_controller('phcmemberspro/modules/dashboards') %>">
+ <%= link_to phcmemberspro.modules_dashboards_index_path do %>
+ <i class="fa fa-tachometer"></i>
+ <span class="nav-label">Dashboard</span>
+ <% end %>
+ </li>
+ <li class="<%= is_active_controller('phcmemberspro/member/profiles') %>">
+ <%= link_to '#' do %>
+ <i class="fa fa-users"></i>
+ <span class="nav-label">Member Information</span>
+ <span class="fa arrow"></span>
+ <% end %>
+ <ul class="nav nav-second-level collapse">
+ <li class=""><%= link_to "Member List", phcmemberspro.member_profiles_path %></li>
+ <li class=""><%= link_to "Add a Memmber", phcmemberspro.new_member_profile_path %></li>
+ </ul>
+ </li>
+ <li class="<%= is_active_controller('phcmemberspro/directory/categories') %>">
+ <%= link_to '#' do %>
+ <i class="fa fa-sitemap"></i>
+ <span class="nav-label">Directory Listings</span>
+ <span class="fa arrow"></span>
+ <% end %>
+ <ul class="nav nav-second-level collapse">
+ <li class=""><%= link_to "Category List", phcmemberspro.directory_categories_path %></li>
+ <li class=""><%= link_to "Add a Category", phcmemberspro.new_directory_category_path %></li>
+ </ul>
+ </li>
+ <% end %>
+
<% end %>
</ul>
</div>