diff --git a/app/views/search/_article.html.erb b/app/views/search/_article.html.erb deleted file mode 100644 index 25c2a41..0000000 --- a/app/views/search/_article.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -
  • - <%= link_to(article.title, article.url, :class => "search-result-title") %> -
    - <%= render :partial => 'image', :object => article %> -
    - - <%= render :partial => 'article_common', :object => article %> -
    - <%= render :partial => 'article_last_change', :object => article %> - -
    -
  • diff --git a/app/views/search/_blog.html.erb b/app/views/search/_blog.html.erb deleted file mode 100644 index e96a519..0000000 --- a/app/views/search/_blog.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -
  • - <%= link_to blog.title, blog.view_url, :class => 'search-result-title' %> -
    - <%= render :partial => 'image', :object => blog %> -
    - - - - - <% r = blog.children.find(:all, :order => :updated_at, :conditions => ['type != ?', 'RssFeed']).last(3) %> - - - - <%= render :partial => 'article_common', :object => blog %> -
    <%= _("Last posts") %>"> - <% r.each do |a| %> - <%= link_to a.title, a.view_url, :class => 'search-blog-sample-item '+icon_for_article(a) %> - <% end %> - <%= _('None') if r.empty? %> -
    - <%= render :partial => 'article_last_change', :object => blog %> - -
    -
  • diff --git a/app/views/search/_content.html.erb b/app/views/search/_content.html.erb deleted file mode 120000 index 54e6981..0000000 --- a/app/views/search/_content.html.erb +++ /dev/null @@ -1 +0,0 @@ -_article.rhtml \ No newline at end of file diff --git a/app/views/search/_event.html.erb b/app/views/search/_event.html.erb deleted file mode 100644 index eacbf2e..0000000 --- a/app/views/search/_event.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -
  • -<%= link_to(event.title, event.url, :class => "search-result-title") %> -
    - <%= render :partial => 'image', :object => event %> -
    - - <% if event.start_date %> - - - - - <% end %> - <% if event.end_date %> - - - - - <% end %> - - <%= render :partial => 'article_common', :object => event %> -
    <%= _('Start date') %><%= event.start_date %>
    <%= _('End date') %><%= event.end_date %>
    -<%= render :partial => 'article_last_change', :object => event %> - -
    -
  • diff --git a/app/views/search/_facets_menu.html.erb b/app/views/search/_facets_menu.html.erb deleted file mode 100644 index 1893876..0000000 --- a/app/views/search/_facets_menu.html.erb +++ /dev/null @@ -1,36 +0,0 @@ -<% less_options_limit = 8 %> - -
    - <% @asset_class.map_facets_for(environment).each do |facet| %> - -
    -
    - <%= @asset_class.facet_label(facet) %> -
    - - <% results = @asset_class.map_facet_results(facet, params[:facet], @facets, @all_facets, :limit => less_options_limit) %> - <% facet_count = results.total_entries %> - - <% if facet_count > 0 %> - - -
    - <% results.each do |id, label, count| %> - <%= facet_link_html(facet, params, id, label, count) %>
    - <% end %> -

    - - <% if facet_count > less_options_limit %> - <%= link_to_function _("Options"), - "facet_options_toggle('#{facet[:id].to_s}', '#{url_for(params.merge(:action => 'facets_browse', :facet_id => facet[:id], :asset => @asset, :escape => false))}'); " + - "jQuery(this).toggleClass('facet-less-options')", :class => "facet-options-toggle" %> -
    - <% end %> - - <% else %> - <%= _("No filter available") %> - <% end %> -
    - <% end %> -
    diff --git a/app/views/search/_facets_unselect_menu.html.erb b/app/views/search/_facets_unselect_menu.html.erb deleted file mode 100644 index db1393b..0000000 --- a/app/views/search/_facets_unselect_menu.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
    - <% if params[:facet] and params[:facet].count > 0 %> - <%= _("Applied filters") %> - <%= facet_selecteds_html_for(environment, asset_class(@asset), params) %> - <% end %> -
    diff --git a/app/views/search/_folder.html.erb b/app/views/search/_folder.html.erb deleted file mode 100644 index a322481..0000000 --- a/app/views/search/_folder.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -
  • - <%= link_to folder.title, folder.view_url, :class => 'search-result-title' %> -
    - <%= render :partial => 'image', :object => folder %> -
    - - - - - <% r = folder.children.last(3) %> - - - - <%= render :partial => 'article_common', :object => folder %> -
    <%= _("Last items") %>"> - <% r.each do |a| %> - <%= link_to a.title, a.view_url, :class => 'search-folder-sample-item '+icon_for_article(a) %> - <% end %> - <%= _('None') if r.empty? %> -
    - <%= render :partial => 'article_last_change', :object => folder %> - -
    -
  • diff --git a/app/views/search/_forum.html.erb b/app/views/search/_forum.html.erb deleted file mode 100644 index 54df4a2..0000000 --- a/app/views/search/_forum.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -
  • - <%= link_to forum.title, forum.view_url, :class => 'search-result-title' %> -
    - <%= render :partial => 'image', :object => forum %> -
    - - - - - <% r = forum.children.find(:all, :order => :updated_at, :conditions => ['type != ?', 'RssFeed']).last(3) %> - - - - <%= render :partial => 'article_common', :object => forum %> -
    <%= _("Last topics") %>"> - <% r.each do |a| %> - <%= link_to a.title, a.view_url, :class => 'search-forum-sample-item '+icon_for_article(a) %> - <% end %> - <%= _('None') if r.empty? %> -
    - <%= render :partial => 'article_last_change', :object => forum %> - -
    -
  • diff --git a/app/views/search/_gallery.html.erb b/app/views/search/_gallery.html.erb deleted file mode 100644 index 28e2e66..0000000 --- a/app/views/search/_gallery.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -
  • - <%= link_to gallery.title, gallery.view_url, :class => 'search-result-title' %> -
    - <%= render :partial => 'image', :object => gallery %> -
    - - <%= render :partial => 'article_common', :object => gallery %> -
    - <%= render :partial => 'article_last_change', :object => gallery %> - -
    -
  • - diff --git a/app/views/search/_product.html.erb b/app/views/search/_product.html.erb deleted file mode 100644 index 0a73f7b..0000000 --- a/app/views/search/_product.html.erb +++ /dev/null @@ -1,85 +0,0 @@ -<% extra_content = @plugins.dispatch(:asset_product_extras, product, product.enterprise).collect { |content| instance_eval(&content) } %> -<% extra_properties = @plugins.dispatch(:asset_product_properties, product)%> - -
  • - -
    - <%= render :partial => 'search/image', :object => product %> - - <% if product.available %> - <% if product.price && product.price > 0 %> - <% has_discount = product.discount && product.discount > 0 %> - <% if product.price %> - <%=_("from") if has_discount %><%= price_span(product.price, :class => "search-product-price " + (has_discount ? 'with-discount' : '')) %> - <% if has_discount %> - <%=_("by")%><%= price_span(product.price_with_discount, :class => "search-product-price") %> - <% end %> - <% if product.unit %> -  <%= _('/') %> <%= product.unit.name %> - <% end %> - <% end %> -
    - <% if p = product.percentage_from_solidarity_economy %> -
    - <%= p[1] %> -
    - <% end %> - - <% if product.price_described? %> - <% title = (product.inputs.relevant_to_price + product.price_details).map{ |i| - '
    ' + - '
    ' + i.name + '
    ' + - price_span(i.price, :class => 'search-product-input-price') + - '
    ' }.join('') %> - <%= link_to_function _("Open Price"), '', :title => title, :class => "search-product-price-details" %> - <% end %> -
    - <% end %> - <% else %> - <%= _('Not available') %>
    - <% end %> - - -
    - <%= link_to_product product, :class => 'search-result-title' %> -
    - <%= _('Supplier') %> <%= link_to_homepage(product.enterprise.name, product.enterprise.identifier) %> -
    -
    - <% if product.description %> - <% desc_stripped = strip_tags(product.description) %> - <%= _('Description') %> <%= excerpt(desc_stripped, desc_stripped.first(3), 300) %> - <% end %> -
    -
    -
    -
    - <% if product.enterprise.region %> - <%= _('City') %> -
    <%= city_with_state(product.enterprise.region) %> - <% end %> -
    -
    - <% if product.product_qualifiers.count > 0 %> - <%= _('Qualifiers') %> - <% product.product_qualifiers.each do |pq| %> - <% if pq.qualifier %> - <%= pq.qualifier.name + (pq.certifier.nil? ? _(";") : '') %> - <% end %> - <% if pq.certifier %> -  <%= _('cert. ') + pq.certifier.name + _(";") %> - <% end %> - <% end %> - <% end %> -
    -
    - -
    - - <%= extra_content.join('\n') %> - <% extra_properties.each do |property| %> -
    <%= property[:name] + ': ' + instance_eval(&property[:content]) %>
    - <% end %> - -
  • diff --git a/app/views/search/_profile.html.erb b/app/views/search/_profile.html.erb deleted file mode 100644 index c0daf94..0000000 --- a/app/views/search/_profile.html.erb +++ /dev/null @@ -1,42 +0,0 @@ -
  • -<% if @empty_query or multiple_search? or !profile.enterprise? %> - <%= profile_image_link profile, :portrait, 'div', - @filter == 'more_recent' ? profile.send(@filter + '_label') + show_date(profile.created_at) : profile.send(@filter + '_label') %> -<% else %> -
    -
    - <%= profile_image_link profile, :portrait, 'div' %> -
    -
    - <%= link_to_homepage(profile.name, profile.identifier, :class => "search-result-title") %> -
    - <% if profile.description %> - <% body_stripped = strip_tags(profile.description) %> - <% elsif profile.home_page and profile.home_page.body %> - <% body_stripped = strip_tags(profile.home_page.body) %> - <% end %> - <%= excerpt(body_stripped, body_stripped.first(3), 200) if body_stripped %> -
    -
    - <%= _("City") %> - <% if profile.region %> - <%= city_with_state(profile.region) %> - <% end %> -
    - -
    - <% profile.top_level_categorization.each do |parent, children| %> -
    - <%= parent.name %> - - <%= children.collect(&:name).join(', ') %> - -
    - <% end %> -
    -
    - -
    -
    -<% end %> -
  • diff --git a/app/views/search/_sellers_form.html.erb b/app/views/search/_sellers_form.html.erb index 40a5534..c21b293 100644 --- a/app/views/search/_sellers_form.html.erb +++ b/app/views/search/_sellers_form.html.erb @@ -4,7 +4,7 @@
    <%= _('Search in:') %> - <%= labelled_radio_button _('Enterprises'), 'asset', 'enterprises', true %>
    + <%= labelled_radio_button __('Enterprises'), 'asset', 'enterprises', true %>
    <%= labelled_radio_button _('Products'), 'asset', 'products', false %>
    diff --git a/app/views/search/_text_article.html.erb b/app/views/search/_text_article.html.erb deleted file mode 100644 index 0f1b746..0000000 --- a/app/views/search/_text_article.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -
  • - <%= link_to(text_article.title, text_article.url, :class => "search-result-title") %> - -
    - <%= render :partial => 'image', :object => text_article %> -
    - - <%= render :partial => 'article_common', :object => text_article %> -
    - <%= render :partial => 'article_last_change', :object => text_article %> - -
    -
  • diff --git a/app/views/search/_uploaded_file.html.erb b/app/views/search/_uploaded_file.html.erb deleted file mode 100644 index b8aa1d4..0000000 --- a/app/views/search/_uploaded_file.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -
  • - <%= link_to uploaded_file.filename, uploaded_file.view_url, :class => 'search-result-title' %> - -
    - <%= render :partial => 'image', :object => uploaded_file %> -
    - - - <%= render :partial => 'article_author', :object => uploaded_file %> - <%= render :partial => 'article_description', :object => uploaded_file %> - - <% if uploaded_file.parent and uploaded_file.parent.published? %> - - - - - <% end %> - - <%= render :partial => 'article_tags', :object => uploaded_file.tags %> - <%= render :partial => 'article_categories', :object => uploaded_file.categories %> -
    <%= uploaded_file.parent.gallery? ? _("Gallery") : _("Folder") %><%= link_to uploaded_file.parent.name, uploaded_file.parent.url %>
    - <%= render :partial => 'article_last_change', :object => uploaded_file %> - -
    -
  • diff --git a/app/views/search/articles.html.erb b/app/views/search/articles.html.erb deleted file mode 100644 index ee20056..0000000 --- a/app/views/search/articles.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -<%= search_page_title( @titles[:articles], @category ) %> - -
    - <% if !@empty_query %> - <%= facets_menu(:articles, @facets) %> - <% end %> -
    - -
    - <%= render :partial => 'search_form', :locals => { :hint => _('Type the title, author or content desired') } %> - <%= render :partial => 'results_header' %> - - <%= display_results %> - <%= pagination_links @results[:articles] %> -
    - -
    diff --git a/app/views/search/articles.html.erb b/app/views/search/articles.html.erb new file mode 120000 index 0000000..46521ac --- /dev/null +++ b/app/views/search/articles.html.erb @@ -0,0 +1 @@ +search_page.html.erb \ No newline at end of file diff --git a/app/views/search/communities.html.erb b/app/views/search/communities.html.erb deleted file mode 100644 index 95c7c59..0000000 --- a/app/views/search/communities.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -<%= search_page_title( @titles[:communities], @category ) %> - -
    - <% if logged_in? %> - <% button_bar do %> - <%# FIXME shouldn't the user create the community in the current environment instead of going to its home environment? %> - <%= button(:add, _('New community'), user.url.merge(:controller => 'memberships', :action => 'new_community', :profile => user.identifier)) %> - <% end %> - <% end %> - - <% if !@empty_query %> - <%= facets_menu(:communities, @facets) %> - <% end %> -
    - -
    - <%= render :partial => 'search_form', :locals => { :hint => _("Type words about the community you're looking for") } %> - <%= render :partial => 'results_header' %> - - <%= display_results %> - <%= pagination_links @results.values.first %> -
    - -
    - diff --git a/app/views/search/communities.html.erb b/app/views/search/communities.html.erb new file mode 120000 index 0000000..46521ac --- /dev/null +++ b/app/views/search/communities.html.erb @@ -0,0 +1 @@ +search_page.html.erb \ No newline at end of file diff --git a/app/views/search/contents.html.erb b/app/views/search/contents.html.erb deleted file mode 120000 index 3015e62..0000000 --- a/app/views/search/contents.html.erb +++ /dev/null @@ -1 +0,0 @@ -articles.rhtml \ No newline at end of file diff --git a/app/views/search/enterprises.html.erb b/app/views/search/enterprises.html.erb deleted file mode 100644 index 3ffd68c..0000000 --- a/app/views/search/enterprises.html.erb +++ /dev/null @@ -1,28 +0,0 @@ -<%= search_page_title( @titles[:enterprises], @category ) %> - -
    - <% if logged_in? && environment.enabled?('enterprise_registration') %> - <% button_bar do %> - <%= button(:add, _('New enterprise'), {:controller => 'enterprise_registration'}) %> - <% end %> - <% end %> - - <% if !@empty_query %> - <% button_bar do %> - <%= display_map_list_button %> - <% end %> - <%= facets_menu(:enterprises, @facets) %> - <% end %> -
    - -
    - <%= render :partial => 'search_form', :locals => { :hint => _("Type words about the enterprise you're looking for") } %> - <%= render :partial => 'results_header' %> - - <%= display_results(true) %> - <% if params[:display] != 'map' %> - <%= pagination_links @results[:enterprises] %> - <% end %> -
    - -
    diff --git a/app/views/search/enterprises.html.erb b/app/views/search/enterprises.html.erb new file mode 120000 index 0000000..46521ac --- /dev/null +++ b/app/views/search/enterprises.html.erb @@ -0,0 +1 @@ +search_page.html.erb \ No newline at end of file diff --git a/app/views/search/events.html.erb b/app/views/search/events.html.erb index 133ae77..ad01a31 100644 --- a/app/views/search/events.html.erb +++ b/app/views/search/events.html.erb @@ -1,3 +1,2 @@ -<%= search_page_title( Environment.default.name + "'s " + @titles[:events], @category ) %> - +<%= search_page_title( Environment.default.name + "'s " + _('Events'), @category ) %> <%= render :partial => 'events/agenda' %> diff --git a/app/views/search/facets_browse.html.erb b/app/views/search/facets_browse.html.erb deleted file mode 100644 index 7178788..0000000 --- a/app/views/search/facets_browse.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<% results = @asset_class.map_facet_results(@facet, params[:facet], @facets, @all_facets) %> - -<% array = [] %> -<% @asset_class.facet_result_sort(@facet, results, :alphabetically).each do |id, label, count| %> - <% array << {:id => id, :name => facet_link_html(@facet, params.merge(:controller => 'search', :action => @asset), id, label, count)} %> -<% end %> - -<%= facet_javascript('facet-input-'+@facet[:id].to_s, @facet, array) %> diff --git a/app/views/search/people.html.erb b/app/views/search/people.html.erb deleted file mode 100644 index adb29fd..0000000 --- a/app/views/search/people.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -<%= search_page_title( @titles[:people], @category ) %> - -
    - <% if !@empty_query %> - <%= facets_menu(:people, @facets) %> - <% end %> -
    - -
    - <%= render :partial => 'search_form', :locals => { :hint => _("Type words about the person you're looking for") } %> - <%= render :partial => 'results_header' %> - - <%= display_results %> - <% if params[:display] != 'map' %> - <%= pagination_links @results.values.first %> - <% end %> -
    - -
    diff --git a/app/views/search/people.html.erb b/app/views/search/people.html.erb new file mode 120000 index 0000000..46521ac --- /dev/null +++ b/app/views/search/people.html.erb @@ -0,0 +1 @@ +search_page.html.erb \ No newline at end of file diff --git a/app/views/search/products.html.erb b/app/views/search/products.html.erb deleted file mode 100644 index 74e8f02..0000000 --- a/app/views/search/products.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -<%= search_page_title( @titles[:products], @category ) %> - -
    - <% if !@empty_query %> - <% button_bar do %> - <%= display_map_list_button %> -<% end %> - <%= facets_menu(:products, @facets) %> -<% end %> -
    - -
    - <%= render :partial => 'search_form', :locals => { :hint => _('Type the product, service, city or qualifier desired') } %> - <%= render :partial => 'results_header' %> - - <%= display_results(true) %> - <% if !@one_page and params[:display] != 'map' %> - <%= pagination_links @results[:products] %> -<% end %> -
    - -<% javascript_tag do %> - jQuery('.search-product-price-details').altBeautify(); -<% end %> - -
    diff --git a/app/views/search/products.html.erb b/app/views/search/products.html.erb new file mode 120000 index 0000000..46521ac --- /dev/null +++ b/app/views/search/products.html.erb @@ -0,0 +1 @@ +search_page.html.erb \ No newline at end of file -- libgit2 0.21.2