diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9574a6c..9199bd4 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -332,7 +332,7 @@ module ApplicationHelper if File.exists?(File.join(RAILS_ROOT, 'public', filename)) "@import url(#{filename});\n" else - '' + "/* Not included: url(#{filename}) */\n" end end.join(), { "type" => "text/css" }.merge(options) @@ -342,7 +342,7 @@ module ApplicationHelper def filename_for_stylesheet(name, in_theme) result = '' if in_theme - result << '/designs/templates/' + current_theme + result << '/designs/themes/' + current_theme end result << '/stylesheets/' << name << '.css' end diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb index ca25343..3f112a1 100644 --- a/app/helpers/tags_helper.rb +++ b/app/helpers/tags_helper.rb @@ -40,12 +40,17 @@ module TagsHelper delta = max_size - min_size max = tags.values.max.to_f + min = tags.values.min.to_f tags.map do |tag,count| - v = count.to_f / max + if ( max == min ) + v = 0.5 + else + v = (count.to_f - min) / (max - min) + end style = ""+ "font-size: #{ (v * delta).round + min_size }px;"+ - "top: #{ -4 - (v * 4).round }px;" + "top: #{ -(delta/2) - (v * (delta/2)).round }px;" destination = url.kind_of?(Hash) ? url_for(url.merge(tagname_option => tag)) : (url.to_s + tag) display_count = options[:show_count] ? "(#{count})" : "" diff --git a/app/models/profile_info_block.rb b/app/models/profile_info_block.rb index aed8457..6679132 100644 --- a/app/models/profile_info_block.rb +++ b/app/models/profile_info_block.rb @@ -4,6 +4,10 @@ class ProfileInfoBlock < Block _('Profile information block') end + def help + _('Basic information about %{user}. Here you see how much time %{user} is part of the %{env} enviroment, and useful links.') % { :user => self.owner.name(), :env => self.owner.environment.name() } + end + def content block = self lambda do diff --git a/app/models/profile_list_block.rb b/app/models/profile_list_block.rb index a7cdd10..913c921 100644 --- a/app/models/profile_list_block.rb +++ b/app/models/profile_list_block.rb @@ -66,7 +66,7 @@ class ProfileListBlock < Block lambda do list = profiles.map {|item| content_tag( 'li', profile_image_link(item) ) }.join("\n ") if list.empty? - list = ''+ _('None') +'' + list = '
'+ _('None') +'
' else list = content_tag( 'ul', nl +' '+ list + nl ) end diff --git a/app/models/tags_block.rb b/app/models/tags_block.rb index fb28ca2..795c1a5 100644 --- a/app/models/tags_block.rb +++ b/app/models/tags_block.rb @@ -18,7 +18,7 @@ class TagsBlock < Block "\n
\n"+ tag_cloud( owner.tags, :id, owner.generate_url(:controller => 'profile', :action => 'tag'), - :max_size => 18, :min_size => 9 ) + + :max_size => 16, :min_size => 9 ) + "\n
\n"; end diff --git a/app/views/blocks/profile_info.rhtml b/app/views/blocks/profile_info.rhtml index 5a08cf0..1176044 100644 --- a/app/views/blocks/profile_info.rhtml +++ b/app/views/blocks/profile_info.rhtml @@ -1,14 +1,14 @@

<%= block.owner.name %>

-<%= profile_image(block.owner) %> +
<%= profile_image(block.owner) %>
-