cartodb-4.42/app/views/admin/shared/_pages_subheader.html.erb
2024-04-06 05:25:13 +00:00

24 lines
2.3 KiB
Plaintext

<div class="SideMenu CDB-Text CDB-Size-medium">
<div class="SideMenu-type">
<ul class="SideMenu-list">
<li class="SideMenu-typeItem"><a href="<%= CartoDB.url(self, 'profile_user', user: current_user) %>" class="SideMenu-typeLink <%= 'is-selected' if "#{params[:controller]}_#{params[:action]}" == "admin/users_profile" %>">Profile</a></li>
<li class="SideMenu-typeItem"><a href="<%= CartoDB.url(self, 'account_user', user: current_user) %>" class="SideMenu-typeLink <%= 'is-selected' if "#{params[:controller]}_#{params[:action]}" == "admin/users_account" %>">Account</a></li>
<li class="SideMenu-typeItem"><a href="<%= CartoDB.url(self, 'app_permissions_user', user: current_user) %>" class="SideMenu-typeLink">App permissions</a></li>
<% if !Cartodb.config[:cartodb_com_hosted].present? && !current_user.organization.present? %>
<li class="SideMenu-typeItem"><a href="<%= current_user.plan_url(request.protocol) %>" class="SideMenu-typeLink">Billing</a></li>
<% end %>
<% if current_user.organization_admin? %>
<li class="SideMenu-typeItem"><a href="<%= CartoDB.url(self, current_user.organization_owner? ? 'organization_settings' : 'organization', user: current_user) %>" class="SideMenu-typeLink <%= 'is-selected' if ["admin/organizations", "admin/organization", "admin/organization_users"].include?("#{params[:controller]}") %>" class="SideMenu-typeLink">Organization settings</a></li>
<% end %>
<% pages_subheader_instance.links(self).each do |link| %>
<li class="SideMenu-typeItem"><a href="<%= link.path %>" class="SideMenu-typeLink <%= 'is-selected' if [link.controller].include?("#{params[:controller]}") %>" class="SideMenu-typeLink"><%= link.text %></a></li>
<% end %>
<span class="SideMenu-separator"></span>
<% if current_user.has_feature_flag?('dbdirect') %>
<li class="SideMenu-typeItem"><a href="<%= CartoDB.url(self, 'connections_user', user: current_user) %>" class="SideMenu-typeLink">Connections</a></li>
<% end %>
<li class="SideMenu-typeItem"><a href="<%= CartoDB.url(self, 'api_key_credentials', user: current_user) %>" class="SideMenu-typeLink <%= 'is-selected' if "#{params[:controller]}" == "admin/client_applications" || "#{params[:controller]}" == "carto/admin/mobile_apps" %>">Developer Settings</a></li>
</ul>
</div>
</div>