Commit f0fc4c23282e61aa15818595fbfbf6eb105bdabf
1 parent
fda8b25d
Exists in
staging
and in
42 other branches
ActionItem260: melhorias na apresentação dos recortes
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1683 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
7 changed files
with
156 additions
and
52 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -308,7 +308,7 @@ module ApplicationHelper |
308 | 308 | |
309 | 309 | def link_to_category(category, full = true) |
310 | 310 | return _('Uncategorized product') unless category |
311 | - name = full ? category.full_name : category.name | |
311 | + name = full ? category.full_name(' → ') : category.name | |
312 | 312 | link_to name, :controller => 'search', :action => 'category_index', :category_path => category.path.split('/') |
313 | 313 | end |
314 | 314 | ... | ... |
app/views/content_viewer/_comment.rhtml
1 | -<%= tag('a', :name => comment.anchor) %> | |
1 | +<%= content_tag('a', '', :name => comment.anchor) %> | |
2 | 2 | <div class="article-comment<%= ' comment-from-owner' if ( comment.author && (@page.profile.name == comment.author.name) ) %> comment-logged-<%= comment.author ? 'in' : 'out' %>"> |
3 | 3 | <% if logged_in? && (user == @page.profile || user == comment.author) %> |
4 | 4 | <% button_bar(:style => 'float: right; margin-top: 0;') do %> | ... | ... |
app/views/search/_category.rhtml
1 | -<h2><%= _('Recent articles') %></h2> | |
2 | -<ul class="recent_on_cat recent_articles"> | |
3 | - <%= render :partial => 'article', :collection => @recent_articles %> | |
4 | -</ul> | |
5 | 1 | |
6 | -<h2><%= _('Recent Comments') %></h2> | |
7 | -<ul class="recent_on_cat recent_comments"> | |
8 | -<% @recent_comments.each do |comment| %> | |
9 | - <li> | |
10 | - <strong><%= link_to(comment.title, comment.url) %></strong> | |
11 | - <div class="item_meta"> | |
12 | - <%= _('by %{author} on "%{article}"') % { | |
13 | - :comment => link_to(comment.title, comment.url), | |
14 | - :article => link_to(comment.article.title, comment.article.url), | |
15 | - :author => comment.author_name } %> | |
16 | - </div> | |
17 | - </li> | |
18 | -<% end %> | |
19 | -</ul> | |
2 | +<div id="category-recent-articles"> | |
3 | + <h2><%= _('Recent articles') %></h2> | |
4 | + <div class="category-innerbox"> | |
5 | + <ul class="recent_on_cat recent_articles"> | |
6 | + <%= render :partial => 'article', :collection => @recent_articles %> | |
7 | + </ul> | |
8 | + </div><!-- end class="category-innerbox" --> | |
9 | +</div><!-- end id="category-recent-articles" --> | |
10 | + | |
11 | +<div id="category-comments"> | |
12 | + | |
13 | +<div id="category-recent-comments"> | |
14 | + <h2><%= _('Recent Comments') %></h2> | |
15 | + <div class="category-innerbox"> | |
16 | + <ul class="recent_on_cat recent_comments"> | |
17 | + <% @recent_comments.each do |comment| %> | |
18 | + <li> | |
19 | + <% if comment.author %> | |
20 | + <%= link_to content_tag( 'span', comment.author.name() ), comment.author.url, | |
21 | + :class => 'comment-picture', | |
22 | + :style => 'background-image:url(%s)' % profile_icon(comment.author, :icon) | |
23 | + %> | |
24 | + <% else %> | |
25 | + <%# unauthenticated user: display gravatar icon %> | |
26 | + <%= content_tag 'span', ' ', | |
27 | + :class => 'comment-picture', | |
28 | + :style => 'background-image:url(%s)' % str_gravatar_url_for( comment.email, :size => 20 ) | |
29 | + %> | |
30 | + <% end %> | |
31 | + <strong><%= link_to(comment.title, comment.url) %></strong> | |
32 | + <div class="item_meta"> | |
33 | + <%= _('by %{author} on "%{article}"') % { | |
34 | + :comment => link_to(comment.title, comment.url), | |
35 | + :article => link_to(comment.article.title, comment.article.url), | |
36 | + :author => comment.author_name } %> | |
37 | + </div> | |
38 | + </li> | |
39 | + <% end %> | |
40 | + </ul> | |
41 | + </div><!-- end class="category-innerbox" --> | |
42 | +</div><!-- end id="category-recent-articles" --> | |
43 | + | |
44 | +<div id="most-commented"> | |
45 | + <h2><%= _('Most commented articles') %></h2> | |
46 | + <div class="category-innerbox"> | |
47 | + <ul class="most_commented"> | |
48 | + <%= render :partial => 'article', :collection => @most_commented_articles %> | |
49 | + </ul> | |
50 | + </div><!-- end class="category-innerbox" --> | |
51 | +</div><!-- end id="most-commented" --> | |
52 | + | |
53 | +</div><!-- end id="category-comments" --> | |
20 | 54 | |
21 | -<h2><%= _('Most commented articles') %></h2> | |
22 | -<ul class="most_commented"> | |
23 | - <%= render :partial => 'article', :collection => @most_commented_articles %> | |
24 | -</ul> | ... | ... |
app/views/search/category_index.rhtml
... | ... | @@ -12,18 +12,17 @@ |
12 | 12 | |
13 | 13 | <div id="category-childs"> |
14 | 14 | <h2> <%= _('Sub-categories') %> </h2> |
15 | - | |
16 | 15 | <% if @category.children.empty? %> |
17 | 16 | <strong id="cat-no-child"><%= _('No sub-categories') %></strong> |
18 | 17 | <% else %> |
19 | 18 | <ul> |
20 | 19 | <% @category.children.each do |c| %> |
21 | - <li> <%= link_to_category(c) %> </li> | |
20 | + <li> <%= link_to_category c, false %> </li> | |
22 | 21 | <% end %> |
23 | 22 | </ul> |
24 | 23 | <% end %> |
25 | - | |
26 | 24 | </div><!-- end id="child-categories" --> |
27 | 25 | |
26 | +<br style="clear:both" /> | |
28 | 27 | </div><!-- end id="view-category" --> |
29 | 28 | ... | ... |
public/designs/themes/default/stylesheets/common.css
... | ... | @@ -35,21 +35,6 @@ body.category2 a:visited { color: #8A6 } |
35 | 35 | a:hover, a:active { color: #08F } |
36 | 36 | body.category2 a:hover { color: #5C0 } |
37 | 37 | |
38 | -/* List of Category Item */ | |
39 | - | |
40 | -.category_itens ul a { | |
41 | - text-decoration: none; | |
42 | -} | |
43 | - | |
44 | -.category_itens .item_meta { | |
45 | - font-size: 12px; | |
46 | - padding: 0px 0px 5px 0px; | |
47 | -} | |
48 | - | |
49 | -.category_itens .cat_item_update { | |
50 | - color: #999; | |
51 | -} | |
52 | - | |
53 | 38 | /* file manager (big) style */ |
54 | 39 | |
55 | 40 | div.file-manager { | ... | ... |
public/designs/themes/default/stylesheets/controller_search.css
1 | 1 | |
2 | +.category-innerbox, | |
2 | 3 | .search-results-innerbox { |
4 | + padding: 10px 0px 10px 10px; | |
5 | + overflow: auto; | |
3 | 6 | border: none; |
4 | 7 | background: #B8CFE7; |
5 | 8 | -moz-border-radius: 15px; |
... | ... | @@ -30,3 +33,100 @@ |
30 | 33 | color: #729FCF; |
31 | 34 | } |
32 | 35 | |
36 | +.item_meta { | |
37 | + font-size: 10px; | |
38 | + padding: 0px 0px 5px 0px; | |
39 | +} | |
40 | + | |
41 | +/* * * Category Page * * * * * * * * * * * * */ | |
42 | + | |
43 | +.category_itens ul a { | |
44 | + text-decoration: none; | |
45 | +} | |
46 | + | |
47 | +#view-category h2 { | |
48 | + font-size: 16px; | |
49 | + line-height: 20px; | |
50 | + margin: 0px; | |
51 | + padding: 20px 0px 0px 20px; | |
52 | +} | |
53 | + | |
54 | +#most-commented h2 { | |
55 | + font-size: 14px; | |
56 | +} | |
57 | + | |
58 | +#category-recent-articles { | |
59 | + width: 53%; | |
60 | + float: left; | |
61 | +} | |
62 | + | |
63 | +#category-comments { | |
64 | + margin-left: 55%; | |
65 | +} | |
66 | + | |
67 | +#content #category-comments ul, | |
68 | +#content #category-comments li { | |
69 | + margin: 0px; | |
70 | + padding: 0px; | |
71 | + list-style: none; | |
72 | + color: #888; | |
73 | +} | |
74 | + | |
75 | +.category-innerbox { | |
76 | + height: 170px; | |
77 | +} | |
78 | +#category-recent-articles .category-innerbox { | |
79 | + height: 400px; | |
80 | +} | |
81 | + | |
82 | +body.category1 .category-innerbox { | |
83 | + background: #FDD79E; | |
84 | +} | |
85 | +body.category2 .category-innerbox { | |
86 | + background: #C4F099; | |
87 | +} | |
88 | +body.category3 .category-innerbox { | |
89 | + background: #D6BFD3; | |
90 | +} | |
91 | +body.category4 .category-innerbox { | |
92 | + background: #F79494; | |
93 | +} | |
94 | + | |
95 | +#content #category-recent-articles ul, | |
96 | +#content #category-recent-articles li { | |
97 | + margin: 0px; | |
98 | + padding: 0px; | |
99 | + list-style: none; | |
100 | + color: #888; | |
101 | +} | |
102 | + | |
103 | +#category-childs { | |
104 | + clear: both; | |
105 | +} | |
106 | + | |
107 | +#category-childs ul { | |
108 | + margin: 0px; | |
109 | + padding: 0px 0px 0px 20px; | |
110 | +} | |
111 | + | |
112 | +#category-childs li { | |
113 | + margin: 0px; | |
114 | + padding: 0px; | |
115 | + float: left; | |
116 | + width: 33%; | |
117 | + font-size: 12px; | |
118 | +} | |
119 | + | |
120 | +#category-childs a { | |
121 | + font-weight: bold; | |
122 | + text-decoration: none; | |
123 | +} | |
124 | + | |
125 | +/* * * Comments on Category Page * * * * * * */ | |
126 | + | |
127 | +#view-category .comment-picture { | |
128 | + width: 20px; | |
129 | + height: 20px; | |
130 | + margin: -2px 5px 0px 0px; | |
131 | +} | |
132 | + | ... | ... |
public/stylesheets/common.css
... | ... | @@ -256,16 +256,6 @@ body.category4 #content h4, body.category4 #content h5, body.category4 #content |
256 | 256 | text-decoration: underline; |
257 | 257 | } |
258 | 258 | |
259 | -#category-childs h4, | |
260 | -#category-childs ul { | |
261 | - margin: 0px; | |
262 | -} | |
263 | - | |
264 | -#category-childs a { | |
265 | - font-weight: bold; | |
266 | - text-decoration: none; | |
267 | -} | |
268 | - | |
269 | 259 | #cat-no-child { |
270 | 260 | color: #AAA; |
271 | 261 | } | ... | ... |