diff --git a/app/helpers/enterprise_homepage_helper.rb b/app/helpers/enterprise_homepage_helper.rb index 6a6b799..8ac84df 100644 --- a/app/helpers/enterprise_homepage_helper.rb +++ b/app/helpers/enterprise_homepage_helper.rb @@ -2,34 +2,27 @@ module EnterpriseHomepageHelper def display_profile_info(profile) data = '' - unless profile.contact_person.blank? - data << content_tag('strong', _('Contact person: ')) + profile.contact_person + '
' - end - unless profile.contact_email.blank? - data << content_tag('strong', _('E-Mail: ')) + profile.contact_email + '
' - end - unless profile.contact_phone.blank? - data << content_tag('strong', _('Phone(s): ')) + profile.contact_phone + '
' - end - unless profile.region.nil? - data << content_tag('strong', _('Location: ')) + profile.region.name + '
' - end - unless profile.address.blank? - data << content_tag('strong', _('Address: ')) + profile.address + '
' - end - unless profile.legal_form.blank? - data << content_tag('strong', _('Legal form: ')) + profile.legal_form + '
' - end - unless profile.foundation_year.blank? - data << content_tag('strong', _('Foundation year: ')) + profile.foundation_year + '
' - end - unless profile.economic_activity.blank? - data << content_tag('strong', _('Economic activity: ')) + profile.economic_activity + '
' - end + [ + [ _('Contact person:'), :contact_person ], + [ _('e-Mail:'), :contact_email ], + [ _('Phone(s):'), :contact_phone ], + [ _('Location:'), :location ], + [ _('Address:'), :address ], + [ _('Legal form:'), :legal_form ], + [ _('Foundation year:'), :foundation_year ], + [ _('Economic activity:'), :economic_activity ] + ].each { | name, att | + if profile.send( att ) and not profile.send( att ).blank? + data << content_tag( 'li', content_tag('strong', name) +' '+ profile.send( att ) ) +"\n" + end + } if profile.respond_to?(:distance) and !profile.distance.nil? - data << content_tag('strong', _('Distance: ')) + "%.2f%" % profile.distance + '
' + data << content_tag( 'li', + content_tag('strong',_('Distance:')) +' '+ + "%.2f%" % profile.distance + ) + "\n" end - content_tag('div', data, :class => 'profile-info') + content_tag('div', content_tag('ul', data), :class => 'enterprise-info') end end diff --git a/app/models/profile.rb b/app/models/profile.rb index 6950f07..51334ab 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -104,6 +104,10 @@ class Profile < ActiveRecord::Base has_many :categories, :through => :profile_categorizations belongs_to :region + + def location + self.region.name + end def pending_categorizations @pending_categorizations ||= [] diff --git a/app/views/search/products.rhtml b/app/views/search/products.rhtml index d4a7e76..2272487 100644 --- a/app/views/search/products.rhtml +++ b/app/views/search/products.rhtml @@ -1,8 +1,8 @@

<% if !@query.blank? %> - <%=h @category ? (_('Products results for "%{query}" of enterprises in "%{category}"') % { :query => @query, :category => @category.name}) : (_('Products results for "%s"') % @query) %> + <%=h @category ? (_('Products and Services results for "%{query}" of enterprises in "%{category}"') % { :query => @query, :category => @category.name}) : (_('Products and Services results for "%s"') % @query) %> <% else %> - <%=h @category ? (_('Products of enterprises in "%s"') % @category.name) : _('Products') %> + <%=h @category ? (_('Products and Services of enterprises in "%s"') % @category.name) : _('Products and Services') %> <% end %>

diff --git a/public/designs/themes/ecosol/stylesheets/controller_content_viewer.css b/public/designs/themes/ecosol/stylesheets/controller_content_viewer.css index d49a3fd..c189d6f 100644 --- a/public/designs/themes/ecosol/stylesheets/controller_content_viewer.css +++ b/public/designs/themes/ecosol/stylesheets/controller_content_viewer.css @@ -1,8 +1,18 @@ /************* enterprise homepage style *****************/ -.profile-info { - border: none; +.enterprise-info { background: #B8CFE7; -moz-border-radius: 15px; - padding: 10px; + padding: 5px; + margin-bottom: 10px; } + +.msie6 .enterprise-info { + padding: 1px 5px 0px 5px; + margin-bottom: 20px; +} + +.enterprise-info strong { + color: #058; +} + diff --git a/public/designs/themes/ecosol/stylesheets/controller_search.css b/public/designs/themes/ecosol/stylesheets/controller_search.css index b112f1a..5c986b5 100644 --- a/public/designs/themes/ecosol/stylesheets/controller_search.css +++ b/public/designs/themes/ecosol/stylesheets/controller_search.css @@ -142,7 +142,6 @@ body.category4 .search-results-type-profile.common-profile-list-block li a { #product-categories-menu .cat-parent { background-color: #E0E8F0; - Xborder: 1px solid #729FCF; -moz-border-radius: 10px; padding: 3px 0px 3px 10px; } @@ -152,8 +151,6 @@ body.category4 .search-results-type-profile.common-profile-list-block li a { } #product-categories-menu .sub-opened { background-color: #CDE; - Xborder: 1px solid #3465A4; - X-moz-border-radius: 10px; } diff --git a/public/designs/themes/zen3/stylesheets/controller_content_viewer.css b/public/designs/themes/zen3/stylesheets/controller_content_viewer.css index 8b13789..44c0e5e 100644 --- a/public/designs/themes/zen3/stylesheets/controller_content_viewer.css +++ b/public/designs/themes/zen3/stylesheets/controller_content_viewer.css @@ -1 +1,14 @@ +/************* enterprise homepage style *****************/ + +.enterprise-info { + background: #FEA; + border: 2px solid #fcaf3e; + padding: 5px; + margin-bottom: 10px; +} + +.msie6 .enterprise-info { + padding: 1px 5px 0px 5px; + margin-bottom: 20px; +} diff --git a/public/designs/themes/zen3/stylesheets/controller_search.css b/public/designs/themes/zen3/stylesheets/controller_search.css index 241b7d9..a262db4 100644 --- a/public/designs/themes/zen3/stylesheets/controller_search.css +++ b/public/designs/themes/zen3/stylesheets/controller_search.css @@ -97,6 +97,27 @@ body.category4 .search-results-type-profile.common-profile-list-block li a { background: #F79494; } +#product-categories-menu a { + text-decoration: none; +} +#product-categories-menu a:hover { + text-decoration: underline; +} + +#product-categories-menu .cat-parent { + -moz-border-radius: 10px; + padding: 3px 0px 3px 10px; +} + +#product-categories-menu .sub-opening, +#product-categories-menu .sub-closeing { + background-color: #FFF8B0; +} +#product-categories-menu .sub-opened { + background-color: #FE8; +} + + /* * * Category Page * * * * * * * * * * * * */ #view-category h3 { diff --git a/public/stylesheets/controller_search.css b/public/stylesheets/controller_search.css index 342359a..47f5641 100644 --- a/public/stylesheets/controller_search.css +++ b/public/stylesheets/controller_search.css @@ -40,8 +40,11 @@ width: 100%; } -.has_cat_list .only-one-result-box .search-results-box { - width: 79%; +.has_cat_list #map, +.msie .has_cat_list #map, +.has_cat_list .only-one-result-box .search-results-box, +.msie .has_cat_list .only-one-result-box .search-results-box { + width: 80%; float: right; } @@ -64,6 +67,7 @@ margin: 2px 0px; padding: 5px 0px 0px 10px; list-style: none; + list-style-image: none; } #product-categories-menu .cat-empty { list-style: none; @@ -214,6 +218,9 @@ overflow: hidden; float: left; } +.msie #content .only-one-result-box .search-results-type-product .product-item { + width: 49%; +} .product-pic { display: block; @@ -251,6 +258,7 @@ .pagination { text-align: center; + clear: both; } .pagination .disabled { -- libgit2 0.21.2