index.rhtml
4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<div id="profile-editor-index">
<h1 class="block-title">
<span class='control-panel-title'><%= h profile.short_name %></span>
<span class='control-panel-sep'>–</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(_('Location'), 'edit-location', :controller => 'maps', :action => 'edit_location') %>
<%= 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? %>
<%= case profile.blogs.count
when 0
control_panel_button(_('Create blog'), 'blog-disabled', :controller => 'cms', :action => 'new', :type => 'Blog')
when 1
control_panel_button(_('Configure blog'), 'blog', :controller => 'cms', :action => 'edit', :id => profile.blog)
else
control_panel_button(_('Configure blog'), 'blog', :controller => 'cms')
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? %>
<% @plugins.map(:control_panel_buttons).each do |button| %>
<%= control_panel_button(button[:title], button[:icon], button[:url]) %>
<% end %>
<% end %>
<% if profile.person? && environment.enabled?('enterprise_activation') %>
<div id='activation_enterprise'>
<% form_tag({:controller => 'account', :action => 'activation_question'}, {:method => 'get'}) do %>
<p><strong><%= __('Activate your enterprise') %></strong></p>
<p><%= __("If you received a letter with information about your enterprise activation, add here the activation code that was sent.") %></p>
<p><%= environment.help_message_to_add_enterprise %> </p>
<%= labelled_form_field(__('Enterprise activation code') + ': ', text_field_tag('enterprise_code')) %>
<%= submit_button(:ok, _('Activate')) %>
<% end %>
</div>
<% end %>
</div>