index.rhtml 3.41 KB
<div id="profile-editor-index">

  <h1 class="block-title">
    <span class='control-panel-title'><%= profile.name %></span>
    <span class='control-panel-sep'>&#150;</span>
    <span class='control-panel-subtitle'><%= _('Control Panel') %></span>
  </h1>
  
<%= render :partial => 'pending_tasks' %>

<% control_panel do %>

  <%= control_panel_button(_('Profile Info and settings'), 'edit-profile', :controller => 'profile_editor', :action => 'edit') if profile.person? %>
  <%= control_panel_button(__('Community Info and settings'), 'edit-profile-group', :controller => 'profile_editor', :action => 'edit') if profile.community? %>
  <%= control_panel_button(__('Enterprise Info and settings'), 'edit-profile-enterprise', :controller => 'profile_editor', :action => 'edit') if profile.enterprise? %>

  <%= control_panel_button(_('Mail settings'), 'mail', :controller => 'mailconf') if profile.person? && MailConf.enabled? %>

  <%= control_panel_button(_('Tasks'), 'todo', :controller => 'tasks', :action => 'index') %>

  <%= control_panel_button(_('Edit sideboxes'), 'blocks', :controller => 'profile_design', :action => 'index') %>

  <%= control_panel_button(_('Edit Appearance'), 'design-editor', :controller => 'themes', :action => 'index') %>
  
  <%= control_panel_button(_('Edit Header and Footer'), 'header-and-footer', :controller => 'profile_editor', :action => 'header_footer') unless profile.enterprise? && environment.enabled?('disable_header_and_footer') && !user.is_admin?(environment) %>

  <%= control_panel_button(_('Manage Content'), 'cms', :controller => 'cms') if !environment.enabled?('disable_cms') || profile.community? %>

  <% unless profile.enterprise? %>
    <% if profile.has_blog? %>
      <%= control_panel_button(_('Configure blog'), 'blog', :controller => 'cms', :action => 'edit', :id => profile.blog) %>
    <% else %>
      <%= control_panel_button(_('Create blog'), 'blog-disabled', :controller => 'cms', :action => 'new', :type => 'Blog') %>
    <% end %>
  <% end %>

  <%= control_panel_button(_('Change Password'), 'change-password', :controller => 'account', :action => 'change_password') if profile.person? %>

  <%= control_panel_button(__('Manage friends'), 'friends', :controller => 'friends', :action => 'index') if profile.person? %>

  <%= control_panel_button(_('Manage Members'), 'members', :controller => 'profile_members') if profile.organization? && user.has_permission?(:manage_memberships, profile) %>

  <%= control_panel_button(_('Manage Products and Services'), 'products', :controller => 'manage_products') if profile.enterprise? && !environment.enabled?('disable_products_for_enterprises') %>

  <% if !environment.enabled?('disable_asset_enterprises') %>
    <% if profile.is_validation_entity? %>
      <%= control_panel_button(__('Enterprise Validation'), 'validation', :controller => 'enterprise_validation') %>
    <% end %>
    <% if profile.person? %>
      <%= control_panel_button(__('Favorite Enterprises'), 'favorites', :controller => 'favorite_enterprises') %>
    <% end %>
  <% end %>

  <% if profile.enterprise? %>
    <% if profile.enabled? %>
      <%= control_panel_button(__('Disable Enterprise'), 'disable', :action => 'disable') %>
    <% else %>
      <%= control_panel_button(__('Enable Enterprise'), 'enable', :action => 'enable') %>
    <% end %>
  <% end %>

  <%= control_panel_button(_('Manage my groups'), 'groups', :controller => 'memberships') if profile.person? %>

<% end %>


</div>