Commit 91bf3f94898f496af824b8a3a3b97ee9ead6c0d2

Authored by Daniela Feitosa
1 parent 2468db59

Some enhancements on solr

Removed whitespaces
Recovered schema.rb without plugins fields
Included info about solr support of multitenancy on solr.yml.dist
@@ -13,7 +13,7 @@ You need to install some packages Noosfero depends on. On Debian GNU/Linux or @@ -13,7 +13,7 @@ You need to install some packages Noosfero depends on. On Debian GNU/Linux or
13 Debian-based systems, all of these packages are available through the Debian 13 Debian-based systems, all of these packages are available through the Debian
14 archive. You can install them with the following command: 14 archive. You can install them with the following command:
15 15
16 - # apt-get install ruby rake po4a libgettext-ruby-util libgettext-ruby-data libgettext-ruby1.8 libsqlite3-ruby rcov librmagick-ruby libredcloth-ruby libwill-paginate-ruby iso-codes libfeedparser-ruby openjdk-6-jre libdaemons-ruby thin tango-icon-theme libhpricot-ruby 16 + # apt-get install ruby rake po4a libgettext-ruby-util libgettext-ruby1.8 libsqlite3-ruby rcov librmagick-ruby libredcloth-ruby libwill-paginate-ruby iso-codes libfeedparser-ruby openjdk-6-jre libdaemons-ruby thin tango-icon-theme libhpricot-ruby
17 17
18 On other systems, they may or may not be available through your regular package 18 On other systems, they may or may not be available through your regular package
19 management system. Below are the links to their homepages. 19 management system. Below are the links to their homepages.
app/controllers/application.rb
1 require 'application_controller' 1 require 'application_controller'
2 -  
app/controllers/public/search_controller.rb
@@ -46,7 +46,7 @@ class SearchController < PublicController @@ -46,7 +46,7 @@ class SearchController < PublicController
46 def products 46 def products
47 public_filters = ['public:true', 'enabled:true'] 47 public_filters = ['public:true', 'enabled:true']
48 if !@empty_query 48 if !@empty_query
49 - full_text_search public_filters 49 + full_text_search public_filters
50 else 50 else
51 @one_page = true 51 @one_page = true
52 @geosearch = logged_in? && current_user.person.lat && current_user.person.lng 52 @geosearch = logged_in? && current_user.person.lat && current_user.person.lng
@@ -183,7 +183,7 @@ class SearchController < PublicController @@ -183,7 +183,7 @@ class SearchController < PublicController
183 @asset = params[:action].to_sym 183 @asset = params[:action].to_sym
184 @order ||= [@asset] 184 @order ||= [@asset]
185 @results ||= {} 185 @results ||= {}
186 - @filter = filter 186 + @filter = filter
187 @filter_title = filter_description(@asset, @filter) 187 @filter_title = filter_description(@asset, @filter)
188 188
189 @query = params[:query] || '' 189 @query = params[:query] || ''
@@ -198,7 +198,7 @@ class SearchController < PublicController @@ -198,7 +198,7 @@ class SearchController < PublicController
198 @category = environment.categories.find_by_path(path) 198 @category = environment.categories.find_by_path(path)
199 if @category.nil? 199 if @category.nil?
200 render_not_found(path) 200 render_not_found(path)
201 - else 201 + else
202 @category_id = @category.id 202 @category_id = @category.id
203 end 203 end
204 end 204 end
@@ -220,12 +220,12 @@ class SearchController < PublicController @@ -220,12 +220,12 @@ class SearchController < PublicController
220 def filter_description(asset, filter) 220 def filter_description(asset, filter)
221 { 221 {
222 'articles_more_recent' => _('More recent contents from network'), 222 'articles_more_recent' => _('More recent contents from network'),
223 - 'articles_more_popular' => _('More read contents from network'), 223 + 'articles_more_popular' => _('More viewed contents from network'),
224 'people_more_recent' => _('More recent people from network'), 224 'people_more_recent' => _('More recent people from network'),
225 'people_more_active' => _('More active people from network'), 225 'people_more_active' => _('More active people from network'),
226 'people_more_popular' => _('More popular people from network'), 226 'people_more_popular' => _('More popular people from network'),
227 - 'communities_more_recent' => _('More recent communities from network'),  
228 - 'communities_more_active' => _('More active communities from network'), 227 + 'communities_more_recent' => _('More recent communities from network'),
  228 + 'communities_more_active' => _('More active communities from network'),
229 'communities_more_popular' => _('More popular communities from network'), 229 'communities_more_popular' => _('More popular communities from network'),
230 'products_more_recent' => _('Highlights'), 230 'products_more_recent' => _('Highlights'),
231 }[asset.to_s + '_' + filter] 231 }[asset.to_s + '_' + filter]
app/helpers/application_helper.rb
@@ -1088,7 +1088,7 @@ module ApplicationHelper @@ -1088,7 +1088,7 @@ module ApplicationHelper
1088 def search_contents_menu 1088 def search_contents_menu
1089 links = [ 1089 links = [
1090 {s_('contents|More Recent') => {:href => url_for({:controller => 'search', :action => 'contents', :filter => 'more_recent'})}}, 1090 {s_('contents|More Recent') => {:href => url_for({:controller => 'search', :action => 'contents', :filter => 'more_recent'})}},
1091 - {s_('contents|More Read') => {:href => url_for({:controller => 'search', :action => 'contents', :filter => 'more_popular'})}} 1091 + {s_('contents|More Viewed') => {:href => url_for({:controller => 'search', :action => 'contents', :filter => 'more_popular'})}}
1092 ] 1092 ]
1093 if logged_in? 1093 if logged_in?
1094 links.push(_('New Content') => lightbox_options({:href => url_for({:controller => 'cms', :action => 'new', :profile => current_user.login, :cms => true})})) 1094 links.push(_('New Content') => lightbox_options({:href => url_for({:controller => 'cms', :action => 'new', :profile => current_user.login, :cms => true})}))
app/helpers/lightbox_helper.rb
@@ -22,7 +22,10 @@ module LightboxHelper @@ -22,7 +22,10 @@ module LightboxHelper
22 def lightbox_options(options, lightbox_type = 'lbOn') 22 def lightbox_options(options, lightbox_type = 'lbOn')
23 the_class = lightbox_type 23 the_class = lightbox_type
24 the_class << " #{options[:class]}" if options.has_key?(:class) 24 the_class << " #{options[:class]}" if options.has_key?(:class)
25 - options.merge(:class => the_class) 25 + options.merge(
  26 + :class => the_class,
  27 + :onclick => 'alert("%s"); return false' % _('Please, try again when the page loading completes.')
  28 + )
26 end 29 end
27 30
28 def lightbox? 31 def lightbox?
app/helpers/search_helper.rb
@@ -77,9 +77,9 @@ module SearchHelper @@ -77,9 +77,9 @@ module SearchHelper
77 end 77 end
78 78
79 def city_with_state(city) 79 def city_with_state(city)
80 - if city and city.kind_of?(City) 80 + if city and city.kind_of?(City)
81 s = city.parent 81 s = city.parent
82 - if s and s.kind_of?(State) and s.acronym 82 + if s and s.kind_of?(State) and s.acronym
83 city.name + ', ' + s.acronym 83 city.name + ', ' + s.acronym
84 else 84 else
85 city.name 85 city.name
@@ -140,7 +140,7 @@ module SearchHelper @@ -140,7 +140,7 @@ module SearchHelper
140 def facet_selecteds_html_for(environment, klass, params) 140 def facet_selecteds_html_for(environment, klass, params)
141 def name_with_extra(klass, facet, value) 141 def name_with_extra(klass, facet, value)
142 name = klass.facet_result_name(facet, value) 142 name = klass.facet_result_name(facet, value)
143 - name = name[0] + name[1] if name.kind_of?(Array) 143 + name = name[0] + name[1] if name.kind_of?(Array)
144 name 144 name
145 end 145 end
146 146
@@ -165,7 +165,7 @@ module SearchHelper @@ -165,7 +165,7 @@ module SearchHelper
165 end 165 end
166 166
167 ret.map do |label, name, url| 167 ret.map do |label, name, url|
168 - content_tag('div', content_tag('span', label, :class => 'facet-selected-label') + 168 + content_tag('div', content_tag('span', label, :class => 'facet-selected-label') +
169 content_tag('span', name, :class => 'facet-selected-name') + 169 content_tag('span', name, :class => 'facet-selected-name') +
170 link_to('', url, :class => 'facet-selected-remove', :title => 'remove facet'), :class => 'facet-selected') 170 link_to('', url, :class => 'facet-selected-remove', :title => 'remove facet'), :class => 'facet-selected')
171 end.join 171 end.join
@@ -199,7 +199,7 @@ module SearchHelper @@ -199,7 +199,7 @@ module SearchHelper
199 def asset_class(asset) 199 def asset_class(asset)
200 asset.to_s.singularize.camelize.constantize 200 asset.to_s.singularize.camelize.constantize
201 end 201 end
202 - 202 +
203 def asset_table(asset) 203 def asset_table(asset)
204 asset_class(asset).table_name 204 asset_class(asset).table_name
205 end 205 end
app/models/article.rb
@@ -661,8 +661,8 @@ class Article &lt; ActiveRecord::Base @@ -661,8 +661,8 @@ class Article &lt; ActiveRecord::Base
661 661
662 acts_as_faceted :fields => { 662 acts_as_faceted :fields => {
663 :f_type => {:label => _('Type'), :proc => proc{|klass| f_type_proc(klass)}}, 663 :f_type => {:label => _('Type'), :proc => proc{|klass| f_type_proc(klass)}},
664 - :f_published_at => {:type => :date, :label => _('Published date'), :queries => {'[* TO NOW-1YEARS/DAY]' => _("Older than one year"),  
665 - '[NOW-1YEARS TO NOW/DAY]' => _("Last year"), '[NOW-1MONTHS TO NOW/DAY]' => _("Last month"), '[NOW-7DAYS TO NOW/DAY]' => _("Last week"), '[NOW-1DAYS TO NOW/DAY]' => _("Last day")}, 664 + :f_published_at => {:type => :date, :label => _('Published date'), :queries => {'[* TO NOW-1YEARS/DAY]' => _("Older than one year"),
  665 + '[NOW-1YEARS TO NOW/DAY]' => _("In the last year"), '[NOW-1MONTHS TO NOW/DAY]' => _("In the last month"), '[NOW-7DAYS TO NOW/DAY]' => _("In the last week"), '[NOW-1DAYS TO NOW/DAY]' => _("In the last day")},
666 :queries_order => ['[NOW-1DAYS TO NOW/DAY]', '[NOW-7DAYS TO NOW/DAY]', '[NOW-1MONTHS TO NOW/DAY]', '[NOW-1YEARS TO NOW/DAY]', '[* TO NOW-1YEARS/DAY]']}, 666 :queries_order => ['[NOW-1DAYS TO NOW/DAY]', '[NOW-7DAYS TO NOW/DAY]', '[NOW-1MONTHS TO NOW/DAY]', '[NOW-1YEARS TO NOW/DAY]', '[* TO NOW-1YEARS/DAY]']},
667 :f_profile_type => {:label => _('Profile'), :proc => proc{|klass| f_profile_type_proc(klass)}}, 667 :f_profile_type => {:label => _('Profile'), :proc => proc{|klass| f_profile_type_proc(klass)}},
668 :f_category => {:label => _('Categories')}, 668 :f_category => {:label => _('Categories')},
app/models/domain.rb
@@ -8,7 +8,7 @@ class Domain &lt; ActiveRecord::Base @@ -8,7 +8,7 @@ class Domain &lt; ActiveRecord::Base
8 # validations 8 # validations
9 ############# 9 #############
10 10
11 - # <tt>name</tt> must be sequences of alphanumeric characters (a to z, 11 + # <tt>name</tt> must be sequences of alphanumeric characters (a to z,
12 # 0 to 9), plus '_' or '-', separated by dots. Letters must be lowercase. 12 # 0 to 9), plus '_' or '-', separated by dots. Letters must be lowercase.
13 validates_format_of :name, :with => /^([a-z0-9_-]+\.)+[a-z0-9_-]+$/, :message => N_('%{fn} must be composed of sequences of lowercase letters (a to z), numbers (0 to 9), "_" and "-", separated by dots.').fix_i18n 13 validates_format_of :name, :with => /^([a-z0-9_-]+\.)+[a-z0-9_-]+$/, :message => N_('%{fn} must be composed of sequences of lowercase letters (a to z), numbers (0 to 9), "_" and "-", separated by dots.').fix_i18n
14 14
app/models/enterprise.rb
@@ -162,9 +162,9 @@ class Enterprise &lt; Organization @@ -162,9 +162,9 @@ class Enterprise &lt; Organization
162 end 162 end
163 end 163 end
164 164
165 - def control_panel_settings_button  
166 - {:title => __('Enterprise Info and settings'), :icon => 'edit-profile-enterprise'}  
167 - end 165 + def control_panel_settings_button
  166 + {:title => __('Enterprise Info and settings'), :icon => 'edit-profile-enterprise'}
  167 + end
168 168
169 settings_items :enable_contact_us, :type => :boolean, :default => true 169 settings_items :enable_contact_us, :type => :boolean, :default => true
170 170
app/models/environment.rb
@@ -365,11 +365,11 @@ class Environment &lt; ActiveRecord::Base @@ -365,11 +365,11 @@ class Environment &lt; ActiveRecord::Base
365 end 365 end
366 366
367 def terminology 367 def terminology
368 - #if self.settings[:terminology]  
369 - #self.settings[:terminology].constantize.instance  
370 - #else 368 + if self.settings[:terminology]
  369 + self.settings[:terminology].constantize.instance
  370 + else
371 Noosfero.terminology 371 Noosfero.terminology
372 - #end 372 + end
373 end 373 end
374 374
375 def terminology=(value) 375 def terminology=(value)
app/models/product.rb
@@ -219,7 +219,7 @@ class Product &lt; ActiveRecord::Base @@ -219,7 +219,7 @@ class Product &lt; ActiveRecord::Base
219 def self.f_region_proc(id) 219 def self.f_region_proc(id)
220 c = Region.find(id) 220 c = Region.find(id)
221 s = c.parent 221 s = c.parent
222 - if c and c.kind_of?(City) and s and s.kind_of?(State) and s.acronym 222 + if c and c.kind_of?(City) and s and s.kind_of?(State) and s.acronym
223 [c.name, ', ' + s.acronym] 223 [c.name, ', ' + s.acronym]
224 else 224 else
225 c.name 225 c.name
app/models/profile.rb
@@ -239,7 +239,7 @@ class Profile &lt; ActiveRecord::Base @@ -239,7 +239,7 @@ class Profile &lt; ActiveRecord::Base
239 self.categories(true) 239 self.categories(true)
240 self.solr_save 240 self.solr_save
241 end 241 end
242 - self.categories(reload) 242 + self.categories(reload)
243 end 243 end
244 244
245 def category_ids=(ids) 245 def category_ids=(ids)
@@ -544,7 +544,7 @@ private :generate_url, :url_options @@ -544,7 +544,7 @@ private :generate_url, :url_options
544 other.top_level_articles.each do |a| 544 other.top_level_articles.each do |a|
545 copy_article_tree a 545 copy_article_tree a
546 end 546 end
547 - self.articles.reload 547 + self.articles.reload
548 end 548 end
549 549
550 def copy_article_tree(article, parent=nil) 550 def copy_article_tree(article, parent=nil)
@@ -864,7 +864,7 @@ private :generate_url, :url_options @@ -864,7 +864,7 @@ private :generate_url, :url_options
864 def self.f_region_proc(id) 864 def self.f_region_proc(id)
865 c = Region.find(id) 865 c = Region.find(id)
866 s = c.parent 866 s = c.parent
867 - if c and c.kind_of?(City) and s and s.kind_of?(State) and s.acronym 867 + if c and c.kind_of?(City) and s and s.kind_of?(State) and s.acronym
868 [c.name, ', ' + s.acronym] 868 [c.name, ', ' + s.acronym]
869 else 869 else
870 c.name 870 c.name
@@ -872,7 +872,7 @@ private :generate_url, :url_options @@ -872,7 +872,7 @@ private :generate_url, :url_options
872 end 872 end
873 873
874 def self.f_enabled_proc(enabled) 874 def self.f_enabled_proc(enabled)
875 - enabled = enabled == "true" ? true : false 875 + enabled = enabled == "true" ? true : false
876 enabled ? _('Enabled') : _('Not enabled') 876 enabled ? _('Enabled') : _('Not enabled')
877 end 877 end
878 def f_enabled 878 def f_enabled
@@ -920,8 +920,8 @@ private :generate_url, :url_options @@ -920,8 +920,8 @@ private :generate_url, :url_options
920 after_save_reindex [:articles], :with => :delayed_job 920 after_save_reindex [:articles], :with => :delayed_job
921 handle_asynchronously :solr_save 921 handle_asynchronously :solr_save
922 922
923 - def control_panel_settings_button  
924 - {:title => _('Profile Info and settings'), :icon => 'edit-profile'} 923 + def control_panel_settings_button
  924 + {:title => _('Profile Info and settings'), :icon => 'edit-profile'}
925 end 925 end
926 926
927 def followed_by?(person) 927 def followed_by?(person)
app/views/layouts/_javascript.rhtml
1 -<%= javascript_include_tag :defaults, 'jquery-latest.js', 1 +<%= javascript_include_tag :defaults, 'jquery-latest.js',
2 'jquery.noconflict.js', 'jquery.cycle.all.min.js', 'thickbox.js', 'lightbox', 'colorbox', 2 'jquery.noconflict.js', 'jquery.cycle.all.min.js', 'thickbox.js', 'lightbox', 'colorbox',
3 'jquery-ui-1.8.2.custom.min', 'jquery.scrollTo', 'jquery.form.js', 'jquery-validation/jquery.validate', 3 'jquery-ui-1.8.2.custom.min', 'jquery.scrollTo', 'jquery.form.js', 'jquery-validation/jquery.validate',
4 -'jquery.cookie', 'jquery.ba-bbq.min.js', 'reflection', 'jquery.tokeninput', 4 +'jquery.cookie', 'jquery.ba-bbq.min.js', 'reflection', 'jquery.tokeninput',
5 'add-and-join', 'report-abuse', 'catalog', 'manage-products', :cache => 'cache-general' %> 5 'add-and-join', 'report-abuse', 'catalog', 'manage-products', :cache => 'cache-general' %>
6 6
7 <% language = FastGettext.locale %> 7 <% language = FastGettext.locale %>
app/views/layouts/application-ng.rhtml
@@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
62 </div> 62 </div>
63 </span> 63 </span>
64 <form action="/search" class="search_form" method="get" class="clean"> 64 <form action="/search" class="search_form" method="get" class="clean">
65 - <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" /> 65 + <input name="query" size="15" title="<%=_('Search...')%>" onfocus="this.form.className='focused';" onblur="this.form.className=''" />
66 <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div> 66 <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div>
67 <%= javascript_tag 'jQuery("#user form input").hint();' %> 67 <%= javascript_tag 'jQuery("#user form input").hint();' %>
68 </form> 68 </form>
app/views/manage_products/_display_image.rhtml
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 </div> 3 </div>
4 4
5 <% if @product.image %> 5 <% if @product.image %>
6 - <%= link_to content_tag(:span, _('Zoom in')), @product.image.public_filename, 6 + <%= link_to content_tag(:span, _('Zoom in')), @product.image.public_filename,
7 :class => 'zoomify-image' %> 7 :class => 'zoomify-image' %>
8 <% end %> 8 <% end %>
9 <%= add_zoom_to_images %> 9 <%= add_zoom_to_images %>
app/views/maps/_google_map.js.erb
@@ -16,7 +16,7 @@ function getAddress(latlng) { @@ -16,7 +16,7 @@ function getAddress(latlng) {
16 16
17 function codeAddress() { 17 function codeAddress() {
18 $('location-fields').addClassName("loading"); 18 $('location-fields').addClassName("loading");
19 - 19 +
20 var country_option = $('profile_data_country').value; 20 var country_option = $('profile_data_country').value;
21 var address = $('profile_data_address').value + "-" + $('profile_data_zip_code').value + "," + $('profile_data_city').value+ "-" + $('profile_data_state').value + "," + country_option; 21 var address = $('profile_data_address').value + "-" + $('profile_data_zip_code').value + "," + $('profile_data_city').value+ "-" + $('profile_data_state').value + "," + country_option;
22 22
@@ -78,7 +78,7 @@ function getAddressData() { @@ -78,7 +78,7 @@ function getAddressData() {
78 } 78 }
79 79
80 function showAddress(results, status) { 80 function showAddress(results, status) {
81 - 81 +
82 if (status == google.maps.GeocoderStatus.OK) { 82 if (status == google.maps.GeocoderStatus.OK) {
83 map.setCenter(results[0].geometry.location); 83 map.setCenter(results[0].geometry.location);
84 updateFields(results[0]); 84 updateFields(results[0]);
@@ -113,10 +113,10 @@ function updateFields(place) { @@ -113,10 +113,10 @@ function updateFields(place) {
113 var state = ""; 113 var state = "";
114 var country_code = ""; 114 var country_code = "";
115 var i = 0; 115 var i = 0;
116 - 116 +
117 for( i =0 ; i < components_len; i ++) 117 for( i =0 ; i < components_len; i ++)
118 { 118 {
119 - 119 +
120 if (components[i].types[0] == 'country') 120 if (components[i].types[0] == 'country')
121 country_code = components[i].short_name; 121 country_code = components[i].short_name;
122 else if (components[i].types[0] == 'administrative_area_level_1') 122 else if (components[i].types[0] == 'administrative_area_level_1')
@@ -132,7 +132,7 @@ function updateFields(place) { @@ -132,7 +132,7 @@ function updateFields(place) {
132 else if (components[i].types[0] == 'postal_code') 132 else if (components[i].types[0] == 'postal_code')
133 zip_code = components[i].short_name; 133 zip_code = components[i].short_name;
134 } 134 }
135 - 135 +
136 $('profile_data_country').value = country_code; 136 $('profile_data_country').value = country_code;
137 $('profile_data_state').value = state; 137 $('profile_data_state').value = state;
138 $('profile_data_address').value = address; 138 $('profile_data_address').value = address;
app/views/maps/edit_location.rhtml
@@ -26,9 +26,8 @@ @@ -26,9 +26,8 @@
26 26
27 <%= f.hidden_field :lat %> 27 <%= f.hidden_field :lat %>
28 <%= f.hidden_field :lng %> 28 <%= f.hidden_field :lng %>
29 - 29 +
30 <% end %> 30 <% end %>
31 31
32 <%= content_tag('script', '', :src => "http://maps.googleapis.com/maps/api/js?sensor=false", :type => 'text/javascript') %> 32 <%= content_tag('script', '', :src => "http://maps.googleapis.com/maps/api/js?sensor=false", :type => 'text/javascript') %>
33 <%= content_tag('script', '', :src => url_for(:controller => :maps, :action => :google_map), :type => 'text/javascript') %> 33 <%= content_tag('script', '', :src => url_for(:controller => :maps, :action => :google_map), :type => 'text/javascript') %>
34 -  
app/views/search/_blog.rhtml
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 <%= _('None') if r.empty? %> 15 <%= _('None') if r.empty? %>
16 </td> 16 </td>
17 </tr> 17 </tr>
18 - 18 +
19 <%= render :partial => 'article_common', :object => blog %> 19 <%= render :partial => 'article_common', :object => blog %>
20 </table> 20 </table>
21 <%= render :partial => 'article_last_change', :object => blog %> 21 <%= render :partial => 'article_last_change', :object => blog %>
app/views/search/_display_results.rhtml
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 <% end %> 31 <% end %>
32 </div> 32 </div>
33 <% end %> 33 <% end %>
34 - 34 +
35 <div style="clear:both"></div> 35 <div style="clear:both"></div>
36 36
37 <%= add_zoom_to_images %> 37 <%= add_zoom_to_images %>
app/views/search/_image.rhtml
1 <div class="search-image-container"> 1 <div class="search-image-container">
2 - 2 +
3 <% if image.is_a? UploadedFile and image.filename %> 3 <% if image.is_a? UploadedFile and image.filename %>
4 <% extension = image.filename[(image.filename.rindex('.')+1)..-1].downcase %> 4 <% extension = image.filename[(image.filename.rindex('.')+1)..-1].downcase %>
5 <% if ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'svg'].include? extension %> 5 <% if ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'svg'].include? extension %>
@@ -38,9 +38,9 @@ @@ -38,9 +38,9 @@
38 <% elsif image.is_a? Product %> 38 <% elsif image.is_a? Product %>
39 <% if image.image %> 39 <% if image.image %>
40 <div class="zoomable-image"> 40 <div class="zoomable-image">
41 - <%= link_to '', product_path(image), :class => "search-image-pic", 41 + <%= link_to '', product_path(image), :class => "search-image-pic",
42 :style => 'background-image: url(%s)'% image.default_image(:thumb) %> 42 :style => 'background-image: url(%s)'% image.default_image(:thumb) %>
43 - <%= link_to content_tag(:span, _('Zoom in')), image.image.public_filename, 43 + <%= link_to content_tag(:span, _('Zoom in')), image.image.public_filename,
44 :class => 'zoomify-image' %> 44 :class => 'zoomify-image' %>
45 </div> 45 </div>
46 <% else %> 46 <% else %>
app/views/search/_product.rhtml
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 <% end %> 20 <% end %>
21 <div class="search-product-inputs-info"> 21 <div class="search-product-inputs-info">
22 <% if p = product.percentage_from_solidarity_economy %> 22 <% if p = product.percentage_from_solidarity_economy %>
23 - <div class="search-product-percentage-from-solidarity-economy search-product-ecosol-percentage-icon-<%= p[0].to_s %>" 23 + <div class="search-product-percentage-from-solidarity-economy search-product-ecosol-percentage-icon-<%= p[0].to_s %>"
24 title="<%=_('Percentage of inputs from solidarity economy')%>"> 24 title="<%=_('Percentage of inputs from solidarity economy')%>">
25 <%= p[1] %> 25 <%= p[1] %>
26 </div> 26 </div>
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 <% if product.price_described? %> 29 <% if product.price_described? %>
30 <% title = (product.inputs + product.price_details).map{ |i| 30 <% title = (product.inputs + product.price_details).map{ |i|
31 '<div class="search-product-input-dots-to-price">' + 31 '<div class="search-product-input-dots-to-price">' +
32 - '<div class="search-product-input-name">' + i.product_category.name + '</div>' + 32 + '<div class="search-product-input-name">' + i.product_category.name + '</div>' +
33 price_span(i.price, :class => 'search-product-input-price') + 33 price_span(i.price, :class => 'search-product-input-price') +
34 '</div>' }.join('') %> 34 '</div>' }.join('') %>
35 <%= link_to_function _("Open Price"), '', :title => title, :class => "search-product-price-details" %> 35 <%= link_to_function _("Open Price"), '', :title => title, :class => "search-product-price-details" %>
app/views/search/_profile.rhtml
@@ -26,14 +26,12 @@ @@ -26,14 +26,12 @@
26 26
27 <div class="search-enterprise-categorization"> 27 <div class="search-enterprise-categorization">
28 <% profile.top_level_categorization.each do |parent, children| %> 28 <% profile.top_level_categorization.each do |parent, children| %>
29 - <% if parent.name != "Territórios" %>  
30 - <div class="search-enterprise-category-<%=parent.id%> search-enterprise-category">  
31 - <span class="search-enterprise-categorization-parent"><%= parent.name %></span>  
32 - <span class="search-enterprise-categorization-children">  
33 - <%= children.collect(&:name).join(', ') %>  
34 - </span>  
35 - </div>  
36 - <% end %> 29 + <div class="search-enterprise-category-<%=parent.id%> search-enterprise-category">
  30 + <span class="search-enterprise-categorization-parent"><%= parent.name %></span>
  31 + <span class="search-enterprise-categorization-children">
  32 + <%= children.collect(&:name).join(', ') %>
  33 + </span>
  34 + </div>
37 <% end %> 35 <% end %>
38 </div> 36 </div>
39 </div> 37 </div>
app/views/search/_results_header.rhtml
1 <div class="search-results-header <%= "search-no-results" if @results[@asset].nil? or @results[@asset].length == 0 %>"> 1 <div class="search-results-header <%= "search-no-results" if @results[@asset].nil? or @results[@asset].length == 0 %>">
2 <% if !@empty_query %> 2 <% if !@empty_query %>
3 - <div class="search-results-header-information"> 3 + <div class="search-results-header-information">
4 <% if @results[@asset].total_entries > 0 %> 4 <% if @results[@asset].total_entries > 0 %>
5 <%= label_total_found(@asset, @results[@asset].total_entries) %> 5 <%= label_total_found(@asset, @results[@asset].total_entries) %>
6 <% if params[:display] != 'map' %> 6 <% if params[:display] != 'map' %>
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <% end %> 9 <% end %>
10 </div> 10 </div>
11 11
12 - <div class="search-results-header-facets-order-by"> 12 + <div class="search-results-header-facets-order-by">
13 <%= facets_unselect_menu(@asset) %> 13 <%= facets_unselect_menu(@asset) %>
14 <%= order_by(@asset) if params[:display] != 'map' %> 14 <%= order_by(@asset) if params[:display] != 'map' %>
15 </div> 15 </div>
app/views/search/_search_form.rhtml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 <% form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.explode_path : [] ) }, 3 <% form_tag( { :controller => 'search', :action => @asset ? @asset : 'index', :asset => nil, :category_path => ( @category ? @category.explode_path : [] ) },
4 :method => 'get', :class => 'search_form' ) do %> 4 :method => 'get', :class => 'search_form' ) do %>
5 - 5 +
6 <%= hidden_field_tag :display, params[:display] %> 6 <%= hidden_field_tag :display, params[:display] %>
7 7
8 <% params_uri = CGI::unescape(request.request_uri) %> 8 <% params_uri = CGI::unescape(request.request_uri) %>
@@ -14,18 +14,18 @@ @@ -14,18 +14,18 @@
14 <% end %> 14 <% end %>
15 <% end %> 15 <% end %>
16 <% end %> 16 <% end %>
17 - 17 +
18 <div class="search-field"> 18 <div class="search-field">
19 <span class="formfield"> 19 <span class="formfield">
20 <%= text_field_tag 'query', @query, :id => 'search-input', :size => 50 %> 20 <%= text_field_tag 'query', @query, :id => 'search-input', :size => 50 %>
21 <%= javascript_tag "jQuery('#search-input').attr('title', \"#{hint}\").hint()" if defined?(hint) %> 21 <%= javascript_tag "jQuery('#search-input').attr('title', \"#{hint}\").hint()" if defined?(hint) %>
22 </span> 22 </span>
23 - 23 +
24 <%= submit_button(:search, _('Search')) %> 24 <%= submit_button(:search, _('Search')) %>
25 </div> 25 </div>
26 26
27 <% end %> 27 <% end %>
28 - 28 +
29 <% if @empty_query %> 29 <% if @empty_query %>
30 <% hint = environment.search_hints[@asset] %> 30 <% hint = environment.search_hints[@asset] %>
31 <% if hint and !hint.blank? %> 31 <% if hint and !hint.blank? %>
app/views/search/index.rhtml
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <%= render :partial => 'search_form', :locals => { :hint => '' } %> 8 <%= render :partial => 'search_form', :locals => { :hint => '' } %>
9 <%= category_context(@category, params) %> 9 <%= category_context(@category, params) %>
10 <%= display_results %> 10 <%= display_results %>
11 - 11 +
12 <div id="category-childs"> 12 <div id="category-childs">
13 <% if @category %> 13 <% if @category %>
14 <h2> <%= _('Sub-categories') %> </h2> 14 <h2> <%= _('Sub-categories') %> </h2>
config/environments/cucumber.rb
@@ -18,11 +18,3 @@ config.action_controller.allow_forgery_protection = false @@ -18,11 +18,3 @@ config.action_controller.allow_forgery_protection = false
18 # The :test delivery method accumulates sent emails in the 18 # The :test delivery method accumulates sent emails in the
19 # ActionMailer::Base.deliveries array. 19 # ActionMailer::Base.deliveries array.
20 config.action_mailer.delivery_method = :test 20 config.action_mailer.delivery_method = :test
21 -  
22 -config.gem 'cucumber', :lib => false, :version => '0.4.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber'))  
23 -config.gem 'webrat', :lib => false, :version => '0.5.1' unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat'))  
24 -config.gem 'rspec', :lib => 'spec', :version => '1.2.9' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec'))  
25 -config.gem 'rspec-rails', :lib => 'spec/rails', :version => '1.2.9' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))  
26 -config.gem 'Selenium', :lib => 'selenium', :version => '>= 1.1.14' unless File.directory?(File.join(Rails.root, 'vendor/plugins/selenium'))  
27 -config.gem 'selenium-client', :lib => 'selenium/client', :version => '>= 1.2.17' unless File.directory?(File.join(Rails.root, 'vendor/plugins/selenium-client'))  
28 -config.gem 'database_cleaner', :lib => 'database_cleaner'  
config/solr.yml.dist
1 # Config file for the acts_as_solr plugin. 1 # Config file for the acts_as_solr plugin.
2 # 2 #
3 -# If you change the host or port number here, make sure you update 3 +# If you change the host or port number here, make sure you update
4 # them in your Solr config file 4 # them in your Solr config file
5 5
6 -development:  
7 - url: http://0.0.0.0:8982/solr  
8 - jvm_options: -server -Xmx128M -Xms16M  
9 - timeout: 0  
10 - 6 +# This file must follow a structure in order to achieve multitenancy
  7 +# support. In this example, we will configure solr to support 3
  8 +# different schemas: env1, env2 and env3.
  9 +#
  10 +# Each "hosted" environment must have an entry like this:
  11 +#
  12 +# production: &PRODUCTION
  13 +# url: http://127.0.0.1:8983/solr
  14 +# jvm_options: -server -Xmx192M -Xms64M
  15 +# timeout: 0
  16 +#
  17 +# env1_production:
  18 +# <<: *PRODUCTION
  19 +#
  20 +# env2_production:
  21 +# <<: *PRODUCTION
  22 +#
  23 +# env3_production:
  24 +# <<: *PRODUCTION
  25 +
11 production: 26 production:
12 url: http://127.0.0.1:8983/solr 27 url: http://127.0.0.1:8983/solr
13 jvm_options: -server -Xmx192M -Xms64M 28 jvm_options: -server -Xmx192M -Xms64M
14 timeout: 0 29 timeout: 0
15 30
  31 +development:
  32 + url: http://0.0.0.0:8982/solr
  33 + jvm_options: -server -Xmx128M -Xms16M
  34 + timeout: 0
  35 +
16 test: &TEST 36 test: &TEST
17 url: http://0.0.0.0:8981/solr 37 url: http://0.0.0.0:8981/solr
18 jvm_options: -server -Xmx128M -Xms16M 38 jvm_options: -server -Xmx128M -Xms16M
db/migrate/20120402205653_remove_broken_references_to_category.rb
1 class RemoveBrokenReferencesToCategory < ActiveRecord::Migration 1 class RemoveBrokenReferencesToCategory < ActiveRecord::Migration
2 def self.up 2 def self.up
3 execute <<-SQL 3 execute <<-SQL
4 - delete from articles_categories where category_id not in (select id from categories); 4 + delete from articles_categories where category_id not in (select id from categories);
5 SQL 5 SQL
6 execute <<-SQL 6 execute <<-SQL
7 delete from categories_profiles where category_id not in (select id from categories); 7 delete from categories_profiles where category_id not in (select id from categories);
@@ -161,36 +161,6 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do @@ -161,36 +161,6 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do
161 161
162 add_index "boxes", ["owner_id", "owner_type"], :name => "index_boxes_on_owner_type_and_owner_id" 162 add_index "boxes", ["owner_id", "owner_type"], :name => "index_boxes_on_owner_type_and_owner_id"
163 163
164 - create_table "bsc_plugin_contracts", :force => true do |t|  
165 - t.string "client_name"  
166 - t.integer "client_type"  
167 - t.integer "business_type"  
168 - t.string "state"  
169 - t.string "city"  
170 - t.integer "status", :default => 0  
171 - t.integer "number_of_producers", :default => 0  
172 - t.datetime "supply_start"  
173 - t.datetime "supply_end"  
174 - t.text "annotations"  
175 - t.integer "bsc_id"  
176 - t.datetime "created_at"  
177 - t.datetime "updated_at"  
178 - end  
179 -  
180 - create_table "bsc_plugin_contracts_enterprises", :id => false, :force => true do |t|  
181 - t.integer "contract_id"  
182 - t.integer "enterprise_id"  
183 - end  
184 -  
185 - create_table "bsc_plugin_sales", :force => true do |t|  
186 - t.integer "product_id", :null => false  
187 - t.integer "contract_id", :null => false  
188 - t.integer "quantity", :null => false  
189 - t.decimal "price"  
190 - t.datetime "created_at"  
191 - t.datetime "updated_at"  
192 - end  
193 -  
194 create_table "categories", :force => true do |t| 164 create_table "categories", :force => true do |t|
195 t.string "name" 165 t.string "name"
196 t.string "slug" 166 t.string "slug"
@@ -284,7 +254,6 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do @@ -284,7 +254,6 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do
284 t.datetime "created_at" 254 t.datetime "created_at"
285 t.datetime "updated_at" 255 t.datetime "updated_at"
286 t.integer "reports_lower_bound", :default => 0, :null => false 256 t.integer "reports_lower_bound", :default => 0, :null => false
287 - t.text "send_email_plugin_allow_to"  
288 end 257 end
289 258
290 create_table "external_feeds", :force => true do |t| 259 create_table "external_feeds", :force => true do |t|
@@ -308,10 +277,6 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do @@ -308,10 +277,6 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do
308 t.integer "enterprise_id" 277 t.integer "enterprise_id"
309 end 278 end
310 279
311 - create_table "foo_plugin_bars", :force => true do |t|  
312 - t.string "name"  
313 - end  
314 -  
315 create_table "friendships", :force => true do |t| 280 create_table "friendships", :force => true do |t|
316 t.integer "person_id" 281 t.integer "person_id"
317 t.integer "friend_id" 282 t.integer "friend_id"
@@ -432,7 +397,7 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do @@ -432,7 +397,7 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do
432 t.string "type" 397 t.string "type"
433 t.string "identifier" 398 t.string "identifier"
434 t.integer "environment_id" 399 t.integer "environment_id"
435 - t.boolean "active", :default => true 400 + t.boolean "active", :default => true
436 t.string "address" 401 t.string "address"
437 t.string "contact_phone" 402 t.string "contact_phone"
438 t.integer "home_page_id" 403 t.integer "home_page_id"
@@ -443,26 +408,19 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do @@ -443,26 +408,19 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do
443 t.float "lat" 408 t.float "lat"
444 t.float "lng" 409 t.float "lng"
445 t.integer "geocode_precision" 410 t.integer "geocode_precision"
446 - t.boolean "enabled", :default => true  
447 - t.string "nickname", :limit => 16 411 + t.boolean "enabled", :default => true
  412 + t.string "nickname", :limit => 16
448 t.text "custom_header" 413 t.text "custom_header"
449 t.text "custom_footer" 414 t.text "custom_footer"
450 t.string "theme" 415 t.string "theme"
451 - t.boolean "public_profile", :default => true 416 + t.boolean "public_profile", :default => true
452 t.date "birth_date" 417 t.date "birth_date"
453 t.integer "preferred_domain_id" 418 t.integer "preferred_domain_id"
454 t.datetime "updated_at" 419 t.datetime "updated_at"
455 - t.boolean "visible", :default => true 420 + t.boolean "visible", :default => true
456 t.integer "image_id" 421 t.integer "image_id"
457 - t.boolean "validated", :default => true 422 + t.boolean "validated", :default => true
458 t.string "cnpj" 423 t.string "cnpj"
459 - t.boolean "shopping_cart", :default => true  
460 - t.boolean "shopping_cart_delivery", :default => false  
461 - t.decimal "shopping_cart_delivery_price", :default => 0.0  
462 - t.string "usp_id"  
463 - t.integer "bar_id"  
464 - t.integer "bsc_id"  
465 - t.string "company_name"  
466 t.string "national_region_code" 424 t.string "national_region_code"
467 end 425 end
468 426
@@ -526,15 +484,6 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do @@ -526,15 +484,6 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do
526 t.datetime "updated_at" 484 t.datetime "updated_at"
527 end 485 end
528 486
529 - create_table "shopping_cart_plugin_purchase_orders", :force => true do |t|  
530 - t.integer "customer_id"  
531 - t.integer "seller_id"  
532 - t.text "data"  
533 - t.integer "status"  
534 - t.datetime "created_at"  
535 - t.datetime "updated_at"  
536 - end  
537 -  
538 create_table "taggings", :force => true do |t| 487 create_table "taggings", :force => true do |t|
539 t.integer "tag_id" 488 t.integer "tag_id"
540 t.integer "taggable_id" 489 t.integer "taggable_id"
@@ -562,7 +511,6 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do @@ -562,7 +511,6 @@ ActiveRecord::Schema.define(:version =&gt; 20120411132751) do
562 t.datetime "created_at" 511 t.datetime "created_at"
563 t.string "target_type" 512 t.string "target_type"
564 t.integer "image_id" 513 t.integer "image_id"
565 - t.integer "bsc_id"  
566 end 514 end
567 515
568 create_table "thumbnails", :force => true do |t| 516 create_table "thumbnails", :force => true do |t|
debian/solr.yml
1 # Config file for the acts_as_solr plugin. 1 # Config file for the acts_as_solr plugin.
2 # 2 #
3 -# If you change the host or port number here, make sure you update 3 +# If you change the host or port number here, make sure you update
4 # them in your Solr config file 4 # them in your Solr config file
5 5
6 development: 6 development:
7 url: http://0.0.0.0:8982/solr 7 url: http://0.0.0.0:8982/solr
8 jvm_options: -server -Xmx128M -Xms16M 8 jvm_options: -server -Xmx128M -Xms16M
9 timeout: 0 9 timeout: 0
10 - 10 +
11 production: 11 production:
12 url: http://127.0.0.1:8983/solr 12 url: http://127.0.0.1:8983/solr
13 jvm_options: -server -Xmx192M -Xms64M 13 jvm_options: -server -Xmx192M -Xms64M
features/step_definitions/create_community_steps.rb
@@ -25,8 +25,7 @@ Given /^I reject community &quot;(.+)&quot;$/ do |community| @@ -25,8 +25,7 @@ Given /^I reject community &quot;(.+)&quot;$/ do |community|
25 end 25 end
26 26
27 Then /^I should see "([^\"]*)"'s creation date$/ do |community| 27 Then /^I should see "([^\"]*)"'s creation date$/ do |community|
28 - com = Community.find_by_name community 28 + com = Community.find_by_name community
29 text = "Created at: #{show_date(com.created_at)}" 29 text = "Created at: #{show_date(com.created_at)}"
30 response.should contain(text) 30 response.should contain(text)
31 end 31 end
32 -  
gitignore.example
@@ -12,9 +12,9 @@ config/mongrel_cluster.yml @@ -12,9 +12,9 @@ config/mongrel_cluster.yml
12 config/solr.yml 12 config/solr.yml
13 config/plugins 13 config/plugins
14 config/thin.yml 14 config/thin.yml
15 -/index  
16 -/locale  
17 -/log 15 +index
  16 +locale
  17 +log
18 public/articles 18 public/articles
19 public/image_uploads 19 public/image_uploads
20 public/thumbnails 20 public/thumbnails
@@ -29,9 +29,9 @@ db/production.db @@ -29,9 +29,9 @@ db/production.db
29 db/test.db 29 db/test.db
30 doc/noosfero/*.xhtml 30 doc/noosfero/*.xhtml
31 doc/noosfero/*/*.xhtml 31 doc/noosfero/*/*.xhtml
32 -/tags  
33 -/pkg  
34 -/solr 32 +tags
  33 +pkg
  34 +solr
35 *~ 35 *~
36 *.swp 36 *.swp
37 debian/*.log 37 debian/*.log
lib/acts_as_searchable.rb
@@ -47,7 +47,7 @@ module ActsAsSearchable @@ -47,7 +47,7 @@ module ActsAsSearchable
47 options[:facets][:browse] = nil 47 options[:facets][:browse] = nil
48 all_facets = find_by_solr(query, options.merge(:per_page => 0)).facets 48 all_facets = find_by_solr(query, options.merge(:per_page => 0)).facets
49 end 49 end
50 - 50 +
51 if !solr_result.nil? 51 if !solr_result.nil?
52 facets = options.include?(:facets) ? solr_result.facets : [] 52 facets = options.include?(:facets) ? solr_result.facets : []
53 53
public/images/icons-app/product-default-pic-big.png 0 → 100644

20.1 KB

public/javascripts/application.js
@@ -719,14 +719,14 @@ Array.min = function(array) { @@ -719,14 +719,14 @@ Array.min = function(array) {
719 (function ($) { 719 (function ($) {
720 720
721 $.fn.hint = function (blurClass) { 721 $.fn.hint = function (blurClass) {
722 - if (!blurClass) { 722 + if (!blurClass) {
723 blurClass = 'blur'; 723 blurClass = 'blur';
724 } 724 }
725 - 725 +
726 return this.each(function () { 726 return this.each(function () {
727 // get jQuery version of 'this' 727 // get jQuery version of 'this'
728 var $input = $(this), 728 var $input = $(this),
729 - 729 +
730 // capture the rest of the variable to allow for reuse 730 // capture the rest of the variable to allow for reuse
731 title = $input.attr('title'), 731 title = $input.attr('title'),
732 $form = $(this.form), 732 $form = $(this.form),
@@ -739,14 +739,14 @@ $.fn.hint = function (blurClass) { @@ -739,14 +739,14 @@ $.fn.hint = function (blurClass) {
739 } 739 }
740 740
741 // only apply logic if the element has the attribute 741 // only apply logic if the element has the attribute
742 - if (title) { 742 + if (title) {
743 // on blur, set value to title attr if text is blank 743 // on blur, set value to title attr if text is blank
744 $input.blur(function () { 744 $input.blur(function () {
745 if (this.value === '') { 745 if (this.value === '') {
746 $input.val(title).addClass(blurClass); 746 $input.val(title).addClass(blurClass);
747 } 747 }
748 }).focus(remove).blur(); // now change all inputs to title 748 }).focus(remove).blur(); // now change all inputs to title
749 - 749 +
750 // clear the pre-defined text when form is submitted 750 // clear the pre-defined text when form is submitted
751 $form.submit(remove); 751 $form.submit(remove);
752 $win.unload(remove); // handles Firefox's autocomplete 752 $win.unload(remove); // handles Firefox's autocomplete
public/javascripts/google_maps.js
@@ -8,7 +8,7 @@ function mapOpenBalloon(marker, html) { @@ -8,7 +8,7 @@ function mapOpenBalloon(marker, html) {
8 infoWindow.setContent(html); 8 infoWindow.setContent(html);
9 infoWindow.open(map, marker); 9 infoWindow.open(map, marker);
10 } 10 }
11 - 11 +
12 function mapPutMarker(lat, lng, title, icon, url_or_function) { 12 function mapPutMarker(lat, lng, title, icon, url_or_function) {
13 var point_str = lat + ":" + lng; 13 var point_str = lat + ":" + lng;
14 14
@@ -18,7 +18,7 @@ function mapPutMarker(lat, lng, title, icon, url_or_function) { @@ -18,7 +18,7 @@ function mapPutMarker(lat, lng, title, icon, url_or_function) {
18 } else { 18 } else {
19 mapPoints[point_str] = true; 19 mapPoints[point_str] = true;
20 } 20 }
21 - 21 +
22 var point = new google.maps.LatLng(lat, lng); 22 var point = new google.maps.LatLng(lat, lng);
23 var options = { map: map, title: title, icon: icon, position: point }; 23 var options = { map: map, title: title, icon: icon, position: point };
24 var marker = new google.maps.Marker(options); 24 var marker = new google.maps.Marker(options);
vendor/plugins/acts_as_solr_reloaded/config/solr.yml
1 # Config file for the acts_as_solr plugin. 1 # Config file for the acts_as_solr plugin.
2 # 2 #
3 -# If you change the host or port number here, make sure you update 3 +# If you change the host or port number here, make sure you update
4 # them in your Solr config file 4 # them in your Solr config file
5 5
6 development: 6 development:
7 url: http://0.0.0.0:8982/solr 7 url: http://0.0.0.0:8982/solr
8 jvm_options: -server -Xmx128M -Xms16M 8 jvm_options: -server -Xmx128M -Xms16M
9 timeout: 0 9 timeout: 0
10 - 10 +
11 production: 11 production:
12 url: http://127.0.0.1:8983/solr 12 url: http://127.0.0.1:8983/solr
13 jvm_options: -server -Xmx192M -Xms64M 13 jvm_options: -server -Xmx192M -Xms64M