index.html.erb
4.54 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
90
91
92
93
94
95
96
97
<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.control_panel_settings_button[:title],
profile.control_panel_settings_button[:icon],
:controller => 'profile_editor', :action => 'edit') %>
<%= 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 => 'profile_themes', :action => 'index') if @show_appearance_option %>
<%= control_panel_button(_('Edit Header and Footer'), 'header-and-footer', :controller => 'profile_editor', :action => 'header_footer') if @show_header_footer_option %>
<%= control_panel_button(_('Manage Content'), 'cms', :controller => 'cms') %>
<%= control_panel_button(_('Manage Roles'), 'roles', :controller => 'profile_roles') if profile.organization? %>
<% 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/Services'), 'products', :controller => 'manage_products') if profile.enterprise? && environment.enabled?('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'), 'disable', :action => 'disable') %>
<% else %>
<%= control_panel_button(_('Enable'), 'enable', :action => 'enable') %>
<% end %>
<% end %>
<%= control_panel_button(_('Manage my groups'), 'groups', :controller => 'memberships') if profile.person? %>
<%= control_panel_button(_('Manage SPAM'), 'manage-spam', :controller => 'spam', :action => 'index') %>
<%= control_panel_button(_('Edit welcome page'), 'welcome-page', :action => 'welcome_page') if has_welcome_page %>
<%= control_panel_button(_('Email Templates'), 'email-templates', :controller => :profile_email_templates) if profile.organization? %>
<% @plugins.dispatch(:control_panel_buttons).each do |button| %>
<%= control_panel_button(button[:title], button[:icon], button[:url], button[:html_options]) %>
<% 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>