% content_for :caboose_css do %>
<% end %>
<% content_for :caboose_js do %>
<%= javascript_include_tag "caboose/model/all" %>
<% end %>
Edit User - <%= @edituser.first_name %> <%= @edituser.last_name %>
<%
tabs = {
'General' => "/admin/users/#{@edituser.id}",
'Login Logs' => "/admin/login-logs/user/#{@edituser.id}",
'Password' => "/admin/users/#{@edituser.id}/password",
'Roles' => "/admin/users/#{@edituser.id}/roles",
'Delete' => "/admin/users/#{@edituser.id}/delete"
}
if @site.use_store
arr = tabs.to_a.insert(1, ['Payment Method', "/admin/users/#{@edituser.id}/payment-method"])
tabs = Hash[arr]
arr = tabs.to_a.insert(2, ['Invoices', "/admin/users/#{@edituser.id}/invoices"])
tabs = Hash[arr]
arr = tabs.to_a.insert(5, ['Variant Limits', "/admin/users/#{@edituser.id}/variant-limits"])
tabs = Hash[arr]
end
if Caboose::Subscription.where(:site_id => @site.id).exists?
arr = tabs.to_a.insert(6, ['Subscriptions', "/admin/users/#{@edituser.id}/subscriptions"])
tabs = Hash[arr]
end
if @site.use_change_logs && Caboose::ChangeLog.where(:user_id => @edituser.id).exists? && @logged_in_user.is_allowed('logs','view')
arr = tabs.to_a.insert(4, ["Change Logs","/admin/users/#{@edituser.id}/logs"])
tabs = Hash[arr]
end
tabs = Caboose.plugin_hook('admin_user_tabs', tabs, @edituser, @site)
%>
<% tabs.each do |text, href| %>
<% selected = true if request.fullpath == href || (text != 'General' && request.fullpath.starts_with?(href)) %>
- class='selected'<% end %>><%= raw text %>
<% end %>