Commit e7c62647c535d0d0441decf950dd4de190fcca7a
1 parent
e73f1a42
Exists in
master
and in
28 other branches
ActionItem507: category working on IE and some other little things
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2159 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
8 changed files
with
82 additions
and
36 deletions
Show diff stats
app/helpers/enterprise_homepage_helper.rb
| ... | ... | @@ -2,34 +2,27 @@ module EnterpriseHomepageHelper |
| 2 | 2 | |
| 3 | 3 | def display_profile_info(profile) |
| 4 | 4 | data = '' |
| 5 | - unless profile.contact_person.blank? | |
| 6 | - data << content_tag('strong', _('Contact person: ')) + profile.contact_person + '<br/>' | |
| 7 | - end | |
| 8 | - unless profile.contact_email.blank? | |
| 9 | - data << content_tag('strong', _('E-Mail: ')) + profile.contact_email + '<br/>' | |
| 10 | - end | |
| 11 | - unless profile.contact_phone.blank? | |
| 12 | - data << content_tag('strong', _('Phone(s): ')) + profile.contact_phone + '<br/>' | |
| 13 | - end | |
| 14 | - unless profile.region.nil? | |
| 15 | - data << content_tag('strong', _('Location: ')) + profile.region.name + '<br/>' | |
| 16 | - end | |
| 17 | - unless profile.address.blank? | |
| 18 | - data << content_tag('strong', _('Address: ')) + profile.address + '<br/>' | |
| 19 | - end | |
| 20 | - unless profile.legal_form.blank? | |
| 21 | - data << content_tag('strong', _('Legal form: ')) + profile.legal_form + '<br/>' | |
| 22 | - end | |
| 23 | - unless profile.foundation_year.blank? | |
| 24 | - data << content_tag('strong', _('Foundation year: ')) + profile.foundation_year + '<br/>' | |
| 25 | - end | |
| 26 | - unless profile.economic_activity.blank? | |
| 27 | - data << content_tag('strong', _('Economic activity: ')) + profile.economic_activity + '<br/>' | |
| 28 | - end | |
| 5 | + [ | |
| 6 | + [ _('Contact person:'), :contact_person ], | |
| 7 | + [ _('e-Mail:'), :contact_email ], | |
| 8 | + [ _('Phone(s):'), :contact_phone ], | |
| 9 | + [ _('Location:'), :location ], | |
| 10 | + [ _('Address:'), :address ], | |
| 11 | + [ _('Legal form:'), :legal_form ], | |
| 12 | + [ _('Foundation year:'), :foundation_year ], | |
| 13 | + [ _('Economic activity:'), :economic_activity ] | |
| 14 | + ].each { | name, att | | |
| 15 | + if profile.send( att ) and not profile.send( att ).blank? | |
| 16 | + data << content_tag( 'li', content_tag('strong', name) +' '+ profile.send( att ) ) +"\n" | |
| 17 | + end | |
| 18 | + } | |
| 29 | 19 | if profile.respond_to?(:distance) and !profile.distance.nil? |
| 30 | - data << content_tag('strong', _('Distance: ')) + "%.2f%" % profile.distance + '<br/>' | |
| 20 | + data << content_tag( 'li', | |
| 21 | + content_tag('strong',_('Distance:')) +' '+ | |
| 22 | + "%.2f%" % profile.distance | |
| 23 | + ) + "\n" | |
| 31 | 24 | end |
| 32 | - content_tag('div', data, :class => 'profile-info') | |
| 25 | + content_tag('div', content_tag('ul', data), :class => 'enterprise-info') | |
| 33 | 26 | end |
| 34 | 27 | |
| 35 | 28 | end | ... | ... |
app/models/profile.rb
| ... | ... | @@ -104,6 +104,10 @@ class Profile < ActiveRecord::Base |
| 104 | 104 | has_many :categories, :through => :profile_categorizations |
| 105 | 105 | |
| 106 | 106 | belongs_to :region |
| 107 | + | |
| 108 | + def location | |
| 109 | + self.region.name | |
| 110 | + end | |
| 107 | 111 | |
| 108 | 112 | def pending_categorizations |
| 109 | 113 | @pending_categorizations ||= [] | ... | ... |
app/views/search/products.rhtml
| 1 | 1 | <h1> |
| 2 | 2 | <% if !@query.blank? %> |
| 3 | - <%=h @category ? (_('Products results for "%{query}" of enterprises in "%{category}"') % { :query => @query, :category => @category.name}) : (_('Products results for "%s"') % @query) %> | |
| 3 | + <%=h @category ? (_('Products and Services results for "%{query}" of enterprises in "%{category}"') % { :query => @query, :category => @category.name}) : (_('Products and Services results for "%s"') % @query) %> | |
| 4 | 4 | <% else %> |
| 5 | - <%=h @category ? (_('Products of enterprises in "%s"') % @category.name) : _('Products') %> | |
| 5 | + <%=h @category ? (_('Products and Services of enterprises in "%s"') % @category.name) : _('Products and Services') %> | |
| 6 | 6 | <% end %> |
| 7 | 7 | </h1> |
| 8 | 8 | ... | ... |
public/designs/themes/ecosol/stylesheets/controller_content_viewer.css
| 1 | 1 | /************* enterprise homepage style *****************/ |
| 2 | 2 | |
| 3 | -.profile-info { | |
| 4 | - border: none; | |
| 3 | +.enterprise-info { | |
| 5 | 4 | background: #B8CFE7; |
| 6 | 5 | -moz-border-radius: 15px; |
| 7 | - padding: 10px; | |
| 6 | + padding: 5px; | |
| 7 | + margin-bottom: 10px; | |
| 8 | 8 | } |
| 9 | + | |
| 10 | +.msie6 .enterprise-info { | |
| 11 | + padding: 1px 5px 0px 5px; | |
| 12 | + margin-bottom: 20px; | |
| 13 | +} | |
| 14 | + | |
| 15 | +.enterprise-info strong { | |
| 16 | + color: #058; | |
| 17 | +} | |
| 18 | + | ... | ... |
public/designs/themes/ecosol/stylesheets/controller_search.css
| ... | ... | @@ -142,7 +142,6 @@ body.category4 .search-results-type-profile.common-profile-list-block li a { |
| 142 | 142 | |
| 143 | 143 | #product-categories-menu .cat-parent { |
| 144 | 144 | background-color: #E0E8F0; |
| 145 | - Xborder: 1px solid #729FCF; | |
| 146 | 145 | -moz-border-radius: 10px; |
| 147 | 146 | padding: 3px 0px 3px 10px; |
| 148 | 147 | } |
| ... | ... | @@ -152,8 +151,6 @@ body.category4 .search-results-type-profile.common-profile-list-block li a { |
| 152 | 151 | } |
| 153 | 152 | #product-categories-menu .sub-opened { |
| 154 | 153 | background-color: #CDE; |
| 155 | - Xborder: 1px solid #3465A4; | |
| 156 | - X-moz-border-radius: 10px; | |
| 157 | 154 | } |
| 158 | 155 | |
| 159 | 156 | ... | ... |
public/designs/themes/zen3/stylesheets/controller_content_viewer.css
public/designs/themes/zen3/stylesheets/controller_search.css
| ... | ... | @@ -97,6 +97,27 @@ body.category4 .search-results-type-profile.common-profile-list-block li a { |
| 97 | 97 | background: #F79494; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | +#product-categories-menu a { | |
| 101 | + text-decoration: none; | |
| 102 | +} | |
| 103 | +#product-categories-menu a:hover { | |
| 104 | + text-decoration: underline; | |
| 105 | +} | |
| 106 | + | |
| 107 | +#product-categories-menu .cat-parent { | |
| 108 | + -moz-border-radius: 10px; | |
| 109 | + padding: 3px 0px 3px 10px; | |
| 110 | +} | |
| 111 | + | |
| 112 | +#product-categories-menu .sub-opening, | |
| 113 | +#product-categories-menu .sub-closeing { | |
| 114 | + background-color: #FFF8B0; | |
| 115 | +} | |
| 116 | +#product-categories-menu .sub-opened { | |
| 117 | + background-color: #FE8; | |
| 118 | +} | |
| 119 | + | |
| 120 | + | |
| 100 | 121 | /* * * Category Page * * * * * * * * * * * * */ |
| 101 | 122 | |
| 102 | 123 | #view-category h3 { | ... | ... |
public/stylesheets/controller_search.css
| ... | ... | @@ -40,8 +40,11 @@ |
| 40 | 40 | width: 100%; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | -.has_cat_list .only-one-result-box .search-results-box { | |
| 44 | - width: 79%; | |
| 43 | +.has_cat_list #map, | |
| 44 | +.msie .has_cat_list #map, | |
| 45 | +.has_cat_list .only-one-result-box .search-results-box, | |
| 46 | +.msie .has_cat_list .only-one-result-box .search-results-box { | |
| 47 | + width: 80%; | |
| 45 | 48 | float: right; |
| 46 | 49 | } |
| 47 | 50 | |
| ... | ... | @@ -64,6 +67,7 @@ |
| 64 | 67 | margin: 2px 0px; |
| 65 | 68 | padding: 5px 0px 0px 10px; |
| 66 | 69 | list-style: none; |
| 70 | + list-style-image: none; | |
| 67 | 71 | } |
| 68 | 72 | #product-categories-menu .cat-empty { |
| 69 | 73 | list-style: none; |
| ... | ... | @@ -214,6 +218,9 @@ |
| 214 | 218 | overflow: hidden; |
| 215 | 219 | float: left; |
| 216 | 220 | } |
| 221 | +.msie #content .only-one-result-box .search-results-type-product .product-item { | |
| 222 | + width: 49%; | |
| 223 | +} | |
| 217 | 224 | |
| 218 | 225 | .product-pic { |
| 219 | 226 | display: block; |
| ... | ... | @@ -251,6 +258,7 @@ |
| 251 | 258 | |
| 252 | 259 | .pagination { |
| 253 | 260 | text-align: center; |
| 261 | + clear: both; | |
| 254 | 262 | } |
| 255 | 263 | |
| 256 | 264 | .pagination .disabled { | ... | ... |