From 3b9ee2908d792bab2f4177d24b102f6bc88a9ea3 Mon Sep 17 00:00:00 2001 From: AurelioAHeckert Date: Fri, 22 Feb 2008 23:13:38 +0000 Subject: [PATCH] ActionItem183: embelezamento de profile list --- app/helpers/application_helper.rb | 5 +++-- app/models/profile_list_block.rb | 15 ++++++++++----- public/stylesheets/blocks/profile-list-block.css | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- public/stylesheets/common.css | 3 ++- 4 files changed, 79 insertions(+), 9 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1856018..e343ff4 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -356,7 +356,7 @@ 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)) + image_tag(profile_icon(profile), :alt => profile.name(), :title => '' ) end def profile_icon(profile) @@ -379,7 +379,8 @@ module ApplicationHelper # displays a link to the profile homepage with its image (as generated by # #profile_image) and its name below it. def profile_image_link(profile) - link_to(profile_image(profile) + tag('br') + profile.name, profile.url) + link_to( '
'+ profile_image(profile) +'
'+ profile.name() +'', profile.url, + :help => _('Click on this icon to go to the %s\'s home page') % profile.name ) end end diff --git a/app/models/profile_list_block.rb b/app/models/profile_list_block.rb index c9f0d13..233692b 100644 --- a/app/models/profile_list_block.rb +++ b/app/models/profile_list_block.rb @@ -58,12 +58,17 @@ class ProfileListBlock < Block def content profiles = self.profiles title = self.title + nl = "\n" lambda do - block_title(title) + - content_tag( - 'ul', - profiles.map {|item| content_tag('li', profile_image_link(item)) }.join("\n") - ) + list = profiles.map {|item| content_tag( 'li', profile_image_link(item) ) }.join("\n ") + if list.empty? + list = ''+ _('None') +'' + else + list = content_tag( 'ul', nl +' '+ list + nl ) + end + '
' + + nl + block_title(title) + nl + list + nl + + '
' end end diff --git a/public/stylesheets/blocks/profile-list-block.css b/public/stylesheets/blocks/profile-list-block.css index 0e50f84..76e57d9 100644 --- a/public/stylesheets/blocks/profile-list-block.css +++ b/public/stylesheets/blocks/profile-list-block.css @@ -1 +1,64 @@ -/* nothing yet */ +.common-profile-list-block { + text-align: center; + color: #B8CFE7; +} + +#content .common-profile-list-block .block-title { + font-size: 14px; +} + +.common-profile-list-block ul { + margin: 0px; + padding: 0px; +} + +.common-profile-list-block li { + list-style: none; + margin: 0px; + padding: 0px; + float: left; +} + +.common-profile-list-block li a { + border: 2px solid #FFF; + display: block; + height: 100px; + padding-top: 2px; + width: 96px; + overflow: hidden; + text-decoration: none; + font-size: 9px; +} +.msie .common-profile-list-block li a { + width: 100px; + line-height: 10px; + cursor: pointer; +} + +.common-profile-list-block li a:hover { + border: 2px solid #2A5896; + background: #B8CFE7; + color: #035; +} + +.common-profile-list-block li div { + width: 96px; + height: 64px; +} + +.common-profile-list-block li span { + display: block; + width: 92px; +} + +.common-profile-list-block li img { + border: none; +} + +.enterprises-block .block-footer-content, +.communities-block .block-footer-content { + text-align: center; + font-size: 80%; + padding: 10px 0px 0px 0px; +} + diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index 95257a0..e44824d 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -332,7 +332,8 @@ body.category4 #content h1, body.category4 #content h2, body.category4 #content body.category4 #content h4, body.category4 #content h5, body.category4 #content h6 { color: #B80000 } -#content .block-title { +.block-title { + color: red; margin: 0px 0px 10px 0px; } -- libgit2 0.21.2