Commit c247ec246065b2e64e5ae243729c9637c6a30fef
1 parent
72990039
Exists in
master
and in
28 other branches
ActionItem152: coisas aleatorias
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1315 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
9 changed files
with
98 additions
and
43 deletions
Show diff stats
app/helpers/tags_helper.rb
| @@ -42,13 +42,12 @@ module TagsHelper | @@ -42,13 +42,12 @@ module TagsHelper | ||
| 42 | 42 | ||
| 43 | tags.map do |tag,count| | 43 | tags.map do |tag,count| |
| 44 | v = count.to_f / max | 44 | v = count.to_f / max |
| 45 | - style = <<-EOS | ||
| 46 | - font-size: #{ (v * delta).round + min_size }px; | ||
| 47 | - top: #{ -4 - (v * 4).round }px; | ||
| 48 | - EOS | 45 | + style = ""+ |
| 46 | + "font-size: #{ (v * delta).round + min_size }px;"+ | ||
| 47 | + "top: #{ -4 - (v * 4).round }px;" | ||
| 49 | destination = url.kind_of?(Hash) ? url_for(url.merge(tagname_option => tag)) : (url.to_s + tag) | 48 | destination = url.kind_of?(Hash) ? url_for(url.merge(tagname_option => tag)) : (url.to_s + tag) |
| 50 | 49 | ||
| 51 | - link_to "#{tag} (#{count})", destination, :style => style | 50 | + link_to "#{tag}<small><sup>(#{count})</sup></small>", destination, :style => style |
| 52 | end.join("\n") | 51 | end.join("\n") |
| 53 | end | 52 | end |
| 54 | 53 |
app/models/tags_block.rb
| @@ -13,9 +13,11 @@ class TagsBlock < Block | @@ -13,9 +13,11 @@ class TagsBlock < Block | ||
| 13 | _('The tag is created when you add some one to your article. | 13 | _('The tag is created when you add some one to your article. |
| 14 | Try to add some tags to some articles and see your tag cloud to grow.'), | 14 | Try to add some tags to some articles and see your tag cloud to grow.'), |
| 15 | _('How tags works here?'), :class => 'help_tags' ) + | 15 | _('How tags works here?'), :class => 'help_tags' ) + |
| 16 | + "\n<div class='tag_cloud'>\n"+ | ||
| 16 | tag_cloud( owner.tags, :id, | 17 | tag_cloud( owner.tags, :id, |
| 17 | owner.generate_url(:controller => 'profile', :action => 'tag') + '/', | 18 | owner.generate_url(:controller => 'profile', :action => 'tag') + '/', |
| 18 | - :max_size => 20, :min_size => 10 ) | 19 | + :max_size => 18, :min_size => 9 ) + |
| 20 | + "\n</div><!-- end class='tag_cloud' -->\n"; | ||
| 19 | end | 21 | end |
| 20 | 22 | ||
| 21 | end | 23 | end |
app/views/cms/edit.rhtml
| @@ -11,7 +11,9 @@ | @@ -11,7 +11,9 @@ | ||
| 11 | <%= select_categories(:article) %> | 11 | <%= select_categories(:article) %> |
| 12 | 12 | ||
| 13 | <%# TODO display the tooltip (title below) in a directly visible way %> | 13 | <%# TODO display the tooltip (title below) in a directly visible way %> |
| 14 | - <%= f.text_field('tag_list', :size => 64, :title => _('Separate tags with commas')) %> | 14 | + <%= f.text_field('tag_list', :size => 64) + |
| 15 | + content_tag( 'small', _('Separate tags with commas') ) | ||
| 16 | + %> | ||
| 15 | 17 | ||
| 16 | <% button_bar do %> | 18 | <% button_bar do %> |
| 17 | <%= submit_button('save', _('Save'), :cancel => [:action => (@article.parent ? 'view' : 'index')], :id => @article.parent) %> | 19 | <%= submit_button('save', _('Save'), :cancel => [:action => (@article.parent ? 'view' : 'index')], :id => @article.parent) %> |
app/views/shared/tiny_mce.rhtml
| @@ -10,6 +10,6 @@ tinyMCE.init({ | @@ -10,6 +10,6 @@ tinyMCE.init({ | ||
| 10 | theme_advanced_buttons2 : "bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,image,table,separator,cleanup,code", | 10 | theme_advanced_buttons2 : "bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,image,table,separator,cleanup,code", |
| 11 | theme_advanced_buttons3 : "", | 11 | theme_advanced_buttons3 : "", |
| 12 | apply_source_formatting : true, | 12 | apply_source_formatting : true, |
| 13 | - language: <%= tinymce_language.inspect %>, | 13 | + language: <%= tinymce_language.inspect %> |
| 14 | }); | 14 | }); |
| 15 | </script> | 15 | </script> |
public/500.html
| 1 | -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
| 2 | - "http://www.w3.org/TR/html4/loose.dtd"> | ||
| 3 | <html> | 1 | <html> |
| 2 | +<head> | ||
| 3 | + <title>Noosfero - Application error</title> | ||
| 4 | + <style> | ||
| 5 | + body { | ||
| 6 | + font-family: sans-serif; | ||
| 7 | + padding: 100px 0 0 0; | ||
| 8 | + } | ||
| 9 | + big { | ||
| 10 | + font-size: 30px; | ||
| 11 | + font-weight: bold; | ||
| 12 | + } | ||
| 13 | + h1 { | ||
| 14 | + margin: 0px; | ||
| 15 | + font-size: 50px; | ||
| 16 | + font-weight: bold; | ||
| 17 | + } | ||
| 18 | + p { | ||
| 19 | + margin: 50px 0px 0px 30%; | ||
| 20 | + } | ||
| 21 | + </style> | ||
| 22 | +</head> | ||
| 4 | <body> | 23 | <body> |
| 5 | - <h1>Application error</h1> | ||
| 6 | - <p>Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html</p> | 24 | + |
| 25 | +<center> | ||
| 26 | + | ||
| 27 | +<big>ERROR CODE 500</big> | ||
| 28 | +<h1>Application error</h1> | ||
| 29 | + | ||
| 30 | +</center> | ||
| 31 | + | ||
| 32 | +<p> | ||
| 33 | + Ups... Hããã... Sory. <b>:-(</b> | ||
| 34 | + <br/> | ||
| 35 | + That is a <b>bug</b> in our system! | ||
| 36 | + <br/> | ||
| 37 | + Pleas, help us. | ||
| 38 | + <a href="http://www.colivre.coop.br/Noosfero/BugItem">File this bug.</a> | ||
| 39 | +</p> | ||
| 40 | + | ||
| 7 | </body> | 41 | </body> |
| 8 | </html> | 42 | </html> |
public/designs/templates/default/stylesheets/style.css
| @@ -20,5 +20,15 @@ | @@ -20,5 +20,15 @@ | ||
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | .block { | 22 | .block { |
| 23 | + position: relative; | ||
| 23 | padding: 10px 0px; | 24 | padding: 10px 0px; |
| 25 | + float: none; | ||
| 26 | +} | ||
| 27 | + | ||
| 28 | +.msie .box-2 .block, | ||
| 29 | +.msie .box-3 .block { | ||
| 30 | + /* IE SUX A LOT!!! */ | ||
| 31 | + top: -65px; | ||
| 32 | + left: -2px; | ||
| 24 | } | 33 | } |
| 34 | + |
public/stylesheets/blocks/tags-block.css
| 1 | .tags-block { | 1 | .tags-block { |
| 2 | - position: relative; | ||
| 3 | } | 2 | } |
| 4 | 3 | ||
| 5 | .tags-block .block-title { | 4 | .tags-block .block-title { |
| @@ -11,3 +10,8 @@ | @@ -11,3 +10,8 @@ | ||
| 11 | top: 10px; | 10 | top: 10px; |
| 12 | right: 2px; | 11 | right: 2px; |
| 13 | } | 12 | } |
| 13 | + | ||
| 14 | +.tag_cloud a { | ||
| 15 | + text-decoration: none; | ||
| 16 | + padding: 0px 4px; | ||
| 17 | +} |
public/stylesheets/common.css
| @@ -263,36 +263,6 @@ div.file-manager-button a:hover { | @@ -263,36 +263,6 @@ div.file-manager-button a:hover { | ||
| 263 | text-align: right; | 263 | text-align: right; |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | -/*************************** cms stuff ******************************/ | ||
| 267 | - | ||
| 268 | -#article-subitems-hide.hide-button { | ||
| 269 | - float: right; | ||
| 270 | - color: white; | ||
| 271 | -} | ||
| 272 | -#article-subitems-show.show-button { | ||
| 273 | - float: right; | ||
| 274 | -} | ||
| 275 | -#article-subitems-hide.hide-button:hover { | ||
| 276 | - background-color: transparent; | ||
| 277 | - color: black; | ||
| 278 | -} | ||
| 279 | - | ||
| 280 | -#article-full-path { | ||
| 281 | - border: 1px solid gray; | ||
| 282 | - margin: 0px; | ||
| 283 | - font-size: 120%; | ||
| 284 | - overflow: auto; | ||
| 285 | - padding: 2px; | ||
| 286 | - background: #abc; | ||
| 287 | -} | ||
| 288 | - | ||
| 289 | -#article-controls { | ||
| 290 | - background: white; | ||
| 291 | - border: 1px solid gray; | ||
| 292 | - padding-top: 4px; | ||
| 293 | - padding-bottom: 4px; | ||
| 294 | - margin-bottom: 1em; | ||
| 295 | -} | ||
| 296 | 266 | ||
| 297 | /*********************************************************/ | 267 | /*********************************************************/ |
| 298 | 268 |
public/stylesheets/controller_cms.css
| @@ -8,3 +8,37 @@ | @@ -8,3 +8,37 @@ | ||
| 8 | font-weight: bold; | 8 | font-weight: bold; |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | +#article-subitems-hide.hide-button { | ||
| 12 | + float: right; | ||
| 13 | + color: white; | ||
| 14 | +} | ||
| 15 | +#article-subitems-show.show-button { | ||
| 16 | + float: right; | ||
| 17 | +} | ||
| 18 | +#article-subitems-hide.hide-button:hover { | ||
| 19 | + background-color: transparent; | ||
| 20 | + color: black; | ||
| 21 | +} | ||
| 22 | + | ||
| 23 | +#article-full-path { | ||
| 24 | + border: 1px solid gray; | ||
| 25 | + margin: 0px; | ||
| 26 | + font-size: 120%; | ||
| 27 | + overflow: auto; | ||
| 28 | + padding: 2px; | ||
| 29 | + background: #abc; | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +#article-controls { | ||
| 33 | + background: white; | ||
| 34 | + border: 1px solid gray; | ||
| 35 | + padding-top: 0px; | ||
| 36 | + padding-bottom: 4px; | ||
| 37 | + margin-bottom: 1em; | ||
| 38 | +} | ||
| 39 | + | ||
| 40 | +#article-controls .button { | ||
| 41 | + position: relative; | ||
| 42 | + top: -5px; | ||
| 43 | +} | ||
| 44 | + |