From 57d930746426e6ce811c6446770481a243a531e0 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Fri, 15 Feb 2008 17:36:32 +0000 Subject: [PATCH] ActionItem154: using better default images --- app/helpers/application_helper.rb | 13 +++++++++---- app/views/profile_editor/index.rhtml | 11 +++++++---- public/images/icons-app/README | 3 ++- public/images/icons-app/gnome-home.png | Bin 0 -> 3442 bytes public/images/icons-app/temp-home.png | Bin 2486 -> 0 bytes public/images/icons-app/users.png | Bin 0 -> 4588 bytes public/stylesheets/blocks/profile-list-block.css | 3 +-- 7 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 public/images/icons-app/gnome-home.png delete mode 100644 public/images/icons-app/temp-home.png create mode 100644 public/images/icons-app/users.png diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 926310b..dec0f1b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -369,19 +369,24 @@ module ApplicationHelper # # If the profile has no image set yet, then a default image is used. def profile_image(profile) + image_tag(profile_icon(profile)) + end + + def profile_icon(profile) if profile.image - image_tag(profile.image.public_filename(:thumb)) + profile.image.public_filename(:minor) else if profile.organization? if profile.kind_of?(Community) - image_tag('community-default.png') + 'icons-app/users.png' else - image_tag('organization-default.png') + 'icons-app/gnome-home.png' end else - image_tag('person-default.png') + 'icons-app/user_icon.png' end end + end # displays a link to the profile homepage with its image (as generated by diff --git a/app/views/profile_editor/index.rhtml b/app/views/profile_editor/index.rhtml index 7656691..c37c7e9 100644 --- a/app/views/profile_editor/index.rhtml +++ b/app/views/profile_editor/index.rhtml @@ -26,16 +26,19 @@ <% end %> <% if @profile.person? %> -

<%= _('My organizations') %>

+

<%= _('My groups') %>

<% file_manager do %> - <% @profile.enterprise_memberships.each do |em| %> - <%= file_manager_button(em.name, em.image ? em.image.public_filename(:minor) : 'icons-app/organization.png', :profile => em.identifier, :controller => 'profile_editor' ) %> + <% @profile.memberships.each do |group| %> + <%= file_manager_button(group.name, profile_icon(group) , :profile => group.identifier, :controller => 'profile_editor' ) %> <% end %> <% end %> - <%= button(:add, _('Register a new Enterprise'), :controller => 'enterprise_registration') %> + <% button_bar do %> + <%= button(:add, _('Register a new Enterprise'), :controller => 'enterprise_registration') %> + <%= button(:edit, _('Manage my organizations'), :controller => 'memberships') %> + <% end %> <% end %> diff --git a/public/images/icons-app/README b/public/images/icons-app/README index 81567ad..bb3309c 100644 --- a/public/images/icons-app/README +++ b/public/images/icons-app/README @@ -23,8 +23,9 @@ password.png dlg-neu abiword_48.png dlg-neu gnome-other.png Nuovo user_icon.png dlg-neu -temp-home.png Nuovo +gnome-home.png Nuovo gtk-yes.png dlg-neu +users.png dlg-neu Icons rasterization =================== diff --git a/public/images/icons-app/gnome-home.png b/public/images/icons-app/gnome-home.png new file mode 100644 index 0000000..1f14811 Binary files /dev/null and b/public/images/icons-app/gnome-home.png differ diff --git a/public/images/icons-app/temp-home.png b/public/images/icons-app/temp-home.png deleted file mode 100644 index c96f0cd..0000000 Binary files a/public/images/icons-app/temp-home.png and /dev/null differ diff --git a/public/images/icons-app/users.png b/public/images/icons-app/users.png new file mode 100644 index 0000000..68b4d45 Binary files /dev/null and b/public/images/icons-app/users.png differ diff --git a/public/stylesheets/blocks/profile-list-block.css b/public/stylesheets/blocks/profile-list-block.css index 4189411..9c3f944 100644 --- a/public/stylesheets/blocks/profile-list-block.css +++ b/public/stylesheets/blocks/profile-list-block.css @@ -3,11 +3,10 @@ div.profile-list-block div { float: left; width: 100px; - height: 140px; + height: 120px; overflow: hidden; font-size: smaller; text-align: center; - } -- libgit2 0.21.2