diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 1754b20..78ccb72 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -168,21 +168,6 @@ module ApplicationHelper
text_area(object, method, { :rows => 10, :cols => 64 }.merge(options))
end
- def file_manager(&block)
- concat(
- content_tag('div',
- content_tag('div', capture(&block) + '
'),
- :class => 'file-manager'),
- block.binding)
- end
-
- def file_manager_button(title, icon, url)
- content_tag( 'div',
- link_to(image_tag(icon, :alt => title, :title => title) +
- content_tag('span', title),
- url), :class => 'file-manager-button' )
- end
-
def hide(id)
"Element.hide(#{id.inspect});"
end
diff --git a/app/helpers/profile_editor_helper.rb b/app/helpers/profile_editor_helper.rb
index bffa40c..6af24e0 100644
--- a/app/helpers/profile_editor_helper.rb
+++ b/app/helpers/profile_editor_helper.rb
@@ -133,4 +133,17 @@ module ProfileEditorHelper
labelled_form_field(__('Preferred domain name:'), select(object, :preferred_domain_id, domains.map {|item| [item.name, item.id]}, :prompt => '<' + _('Select domain') + '>'))
end
+ def control_panel(&block)
+ concat(
+ content_tag('div',
+ content_tag('div', capture(&block) + '
'),
+ :class => 'control-panel'),
+ block.binding)
+ end
+
+ def control_panel_button(title, icon, url)
+ link_to title, url, :style => 'background-image: url(%s)' % image_path('control-panel/' + 'system-users.png') # TODO use icon argument
+ end
+
+
end
diff --git a/app/views/profile_editor/index.rhtml b/app/views/profile_editor/index.rhtml
index e118074..e5e570f 100644
--- a/app/views/profile_editor/index.rhtml
+++ b/app/views/profile_editor/index.rhtml
@@ -1,67 +1,60 @@
-
-
-
-
<%= profile.name %>
- <%= _('Control Panel') %>
-
+
<%= _('Control Panel') %> — <%= profile.name %>
<%= render :partial => 'pending_tasks' %>
-<% file_manager do %>
+<% control_panel do %>
- <%= file_manager_button(_('Info and settings'), 'icons-app/edit-profile.png', :controller => 'profile_editor', :action => 'edit') %>
+ <%= control_panel_button(_('Info and settings'), 'edit-profile', :controller => 'profile_editor', :action => 'edit') %>
- <%= file_manager_button(_('Mail settings'), 'icons-app/mail.png', :controller => 'mailconf') if profile.person? && MailConf.enabled? %>
+ <%= control_panel_button(_('Mail settings'), 'mail', :controller => 'mailconf') if profile.person? && MailConf.enabled? %>
- <%= file_manager_button(_('Tasks'), 'icons-app/todo.png', :controller => 'tasks', :action => 'index') %>
+ <%= control_panel_button(_('Tasks'), 'todo', :controller => 'tasks', :action => 'index') %>
- <%= file_manager_button(_('Edit sideboxes'), 'icons-app/design-editor.png', :controller => 'profile_design', :action => 'index') %>
+ <%= control_panel_button(_('Edit sideboxes'), 'design-editor', :controller => 'profile_design', :action => 'index') %>
- <%= file_manager_button(_('Edit Appearance'), 'icons-app/design-editor.png', :controller => 'themes', :action => 'index') %>
+ <%= control_panel_button(_('Edit Appearance'), 'design-editor', :controller => 'themes', :action => 'index') %>
- <%= file_manager_button(_('Edit Header and Footer'), 'icons-app/header-and-footer.png', :controller => 'profile_editor', :action => 'header_footer') unless profile.enterprise? && environment.enabled?('disable_header_and_footer') && !user.is_admin?(environment) %>
+ <%= 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) %>
- <%= file_manager_button(_('Manage Content'), 'icons-app/cms.png', :controller => 'cms') if !environment.enabled?('disable_cms') || profile.community? %>
+ <%= control_panel_button(_('Manage Content'), 'cms', :controller => 'cms') if !environment.enabled?('disable_cms') || profile.community? %>
<% unless profile.enterprise? %>
<% if profile.has_blog? %>
- <%= file_manager_button(_('Configure blog'), 'icons-app/blog.png', :controller => 'cms', :action => 'edit', :id => profile.blog) %>
+ <%= control_panel_button(_('Configure blog'), 'blog', :controller => 'cms', :action => 'edit', :id => profile.blog) %>
<% else %>
- <%= file_manager_button(_('Create blog'), 'icons-app/blog-disabled.png', :controller => 'cms', :action => 'new', :type => 'Blog') %>
+ <%= control_panel_button(_('Create blog'), 'blog-disabled', :controller => 'cms', :action => 'new', :type => 'Blog') %>
<% end %>
<% end %>
- <%= file_manager_button(_('Change Password'), 'icons-app/change-password.png', :controller => 'account', :action => 'change_password') if profile.person? %>
+ <%= control_panel_button(_('Change Password'), 'change-password', :controller => 'account', :action => 'change_password') if profile.person? %>
- <%= file_manager_button(__('Manage friends'), 'icons-app/friends.png', :controller => 'friends', :action => 'index') if profile.person? %>
+ <%= control_panel_button(__('Manage friends'), 'friends', :controller => 'friends', :action => 'index') if profile.person? %>
- <%= file_manager_button(_('Manage Members'), 'icons-app/members.png', :controller => 'profile_members') if profile.organization? && user.has_permission?(:manage_memberships, profile) %>
+ <%= control_panel_button(_('Manage Members'), 'members', :controller => 'profile_members') if profile.organization? && user.has_permission?(:manage_memberships, profile) %>
- <%= file_manager_button(_('Manage Products and Services'), 'icons-app/products.png', :controller => 'manage_products') if profile.enterprise? && !environment.enabled?('disable_products_for_enterprises') %>
+ <%= 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? %>
- <%= file_manager_button(__('Enterprise Validation'), 'icons-app/validation.png', :controller => 'enterprise_validation') %>
+ <%= control_panel_button(__('Enterprise Validation'), 'validation', :controller => 'enterprise_validation') %>
<% end %>
<% if profile.person? %>
- <%= file_manager_button(__('Favorite Enterprises'), 'icons-app/favorites.png', :controller => 'favorite_enterprises') %>
+ <%= control_panel_button(__('Favorite Enterprises'), 'favorites', :controller => 'favorite_enterprises') %>
<% end %>
<% end %>
<% if profile.enterprise? %>
<% if profile.enabled? %>
- <%= file_manager_button(__('Disable Enterprise'), 'icons-app/disable.png', :action => 'disable') %>
+ <%= control_panel_button(__('Disable Enterprise'), 'disable', :action => 'disable') %>
<% else %>
- <%= file_manager_button(__('Enable Enterprise'), 'icons-app/enable.png', :action => 'enable') %>
+ <%= control_panel_button(__('Enable Enterprise'), 'enable', :action => 'enable') %>
<% end %>
<% end %>
- <%= file_manager_button(_('Manage my groups'), 'icons-app/groups.png', :controller => 'memberships') if profile.person? %>
+ <%= control_panel_button(_('Manage my groups'), 'groups', :controller => 'memberships') if profile.person? %>
<% end %>
-
-
diff --git a/public/images/icons-app/README b/public/images/icons-app/README
deleted file mode 100644
index edb5fc1..0000000
--- a/public/images/icons-app/README
+++ /dev/null
@@ -1,108 +0,0 @@
-dlg-neu icons in Noosfero
-=========================
-
-The icons in this directory are taken from the icon themes for GNOME.
-We take the SVG files and convert to 64x64 PNG images.
-
-Structure
-=========
-
-To keep a trace back to the theme theme, when rasterizing the SVG files we keep
-the original filenames (replacing .svg by .png, obviously) and create symbolic
-links with names more sensible for Noosfero.
-
-Adding a new icons
-==================
-
-Use the fantastic script get-icon.sh! Suppose you want to add a new icon for
-the "favorites". You find that dlg-neu theme has a nice button under apps,
-called gtk-open.svg. You call the script as follows:
-
-$ sh get-icon.sh favorites dlg-neu apps/epiphany-bookmarks.svg
-
-The script generates the PNG and create symbolic link from PNG using ICON name.
-
-Source for icons
-================
-
-Icon Source Theme
------------------------------- ------------
-gnome-settings-background.png dlg-neu
-gnome-settings-theme.png Nuovo
-password.png dlg-neu
-abiword_48.png dlg-neu
-gnome-other.png Nuovo
-user_icon.png dlg-neu
-gnome-home.png Nuovo
-gtk-yes.png dlg-neu
-users.png (locally modified) dlg-neu
-stock_todo.png Nuovo
-friends.png (modified version of users.png) Nuovo
-gtk-folder.png Nuovo
-epiphany-bookmarks.png dlg-neu
-mozilla-mail.png dlg-neu
-gtk-cancel.png dlg-neu
-emblem-important.png dlg-neu
-gnome-globe.png gnome
-header-and-footer.svg Noosfero team
-livejournal.png dlg-neu
-### END OF ICONS LISTING ###
-
-Icons rasterization
-===================
-
-With rsvg, from the librsvg2-bin package (i.e. we use the same rasterization
-library as GNOME, so the icons must look like they do in GNOME).
-
-$ rsvg -w 64 -h 64 user_icon.svg user_icon.png
-
-Licensing
-=========
-
-dlg-neu and Nuovo
------------------
-
-Their License is as follows (taken from
-/usr/share/doc/gnome-icon-theme-dlg-neu/copyright and
-/usr/share/doc/gnome-icon-theme-nuovo/copyright on a Debian system):
-
- This package is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This package is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this package; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA
-
-On Debian systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
-
-gnome
------
-
-Their License is as follows (taken from
-/usr/share/doc/gnome-icon-theme/copyright on a Debian system):
-
- This package is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 dated June, 1991.
-
- This package is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this package; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
- USA.
-
-On Debian GNU/Linux systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
diff --git a/public/images/icons-app/abiword_48.png b/public/images/icons-app/abiword_48.png
deleted file mode 100644
index 91bff3b..0000000
Binary files a/public/images/icons-app/abiword_48.png and /dev/null differ
diff --git a/public/images/icons-app/blog-disabled.png b/public/images/icons-app/blog-disabled.png
deleted file mode 100644
index 46d0dff..0000000
Binary files a/public/images/icons-app/blog-disabled.png and /dev/null differ
diff --git a/public/images/icons-app/blog.png b/public/images/icons-app/blog.png
deleted file mode 120000
index 08c5686..0000000
--- a/public/images/icons-app/blog.png
+++ /dev/null
@@ -1 +0,0 @@
-livejournal.png
\ No newline at end of file
diff --git a/public/images/icons-app/categories.png b/public/images/icons-app/categories.png
deleted file mode 120000
index 534f32a..0000000
--- a/public/images/icons-app/categories.png
+++ /dev/null
@@ -1 +0,0 @@
-gtk-folder.png
\ No newline at end of file
diff --git a/public/images/icons-app/change-password.png b/public/images/icons-app/change-password.png
deleted file mode 120000
index 42ae8ca..0000000
--- a/public/images/icons-app/change-password.png
+++ /dev/null
@@ -1 +0,0 @@
-password.png
\ No newline at end of file
diff --git a/public/images/icons-app/cms.png b/public/images/icons-app/cms.png
deleted file mode 120000
index 9026bc4..0000000
--- a/public/images/icons-app/cms.png
+++ /dev/null
@@ -1 +0,0 @@
-abiword_48.png
\ No newline at end of file
diff --git a/public/images/icons-app/consumed_product.png b/public/images/icons-app/consumed_product.png
deleted file mode 120000
index 796d046..0000000
--- a/public/images/icons-app/consumed_product.png
+++ /dev/null
@@ -1 +0,0 @@
-fr_stock_add.png
\ No newline at end of file
diff --git a/public/images/icons-app/disable.png b/public/images/icons-app/disable.png
deleted file mode 120000
index e726007..0000000
--- a/public/images/icons-app/disable.png
+++ /dev/null
@@ -1 +0,0 @@
-gtk-cancel.png
\ No newline at end of file
diff --git a/public/images/icons-app/edit-profile.png b/public/images/icons-app/edit-profile.png
deleted file mode 100644
index 5ad1129..0000000
Binary files a/public/images/icons-app/edit-profile.png and /dev/null differ
diff --git a/public/images/icons-app/enable.png b/public/images/icons-app/enable.png
deleted file mode 100644
index 2c0f42b..0000000
Binary files a/public/images/icons-app/enable.png and /dev/null differ
diff --git a/public/images/icons-app/epiphany-bookmarks.png b/public/images/icons-app/epiphany-bookmarks.png
deleted file mode 100644
index f5f000b..0000000
Binary files a/public/images/icons-app/epiphany-bookmarks.png and /dev/null differ
diff --git a/public/images/icons-app/favorites.png b/public/images/icons-app/favorites.png
deleted file mode 120000
index fd8b67a..0000000
--- a/public/images/icons-app/favorites.png
+++ /dev/null
@@ -1 +0,0 @@
-epiphany-bookmarks.png
\ No newline at end of file
diff --git a/public/images/icons-app/fr_stock_add.png b/public/images/icons-app/fr_stock_add.png
deleted file mode 100644
index 1e2666a..0000000
Binary files a/public/images/icons-app/fr_stock_add.png and /dev/null differ
diff --git a/public/images/icons-app/friends.png b/public/images/icons-app/friends.png
deleted file mode 100644
index faedfa0..0000000
Binary files a/public/images/icons-app/friends.png and /dev/null differ
diff --git a/public/images/icons-app/friends.svg b/public/images/icons-app/friends.svg
deleted file mode 100644
index df8717f..0000000
--- a/public/images/icons-app/friends.svg
+++ /dev/null
@@ -1,361 +0,0 @@
-
-
-