diff --git a/app/views/search/_full_folder.html.erb b/app/views/search/_full_folder.html.erb
new file mode 100644
index 0000000..a322481
--- /dev/null
+++ b/app/views/search/_full_folder.html.erb
@@ -0,0 +1,24 @@
+
+ <%= link_to folder.title, folder.view_url, :class => 'search-result-title' %>
+
+ <%= render :partial => 'image', :object => folder %>
+
+
+
+ <%= _("Last items") %> |
+
+ <% r = folder.children.last(3) %>
+ ">
+ <% 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_common', :object => folder %>
+
+ <%= render :partial => 'article_last_change', :object => folder %>
+
+
+
diff --git a/app/views/search/_full_forum.html.erb b/app/views/search/_full_forum.html.erb
new file mode 100644
index 0000000..54df4a2
--- /dev/null
+++ b/app/views/search/_full_forum.html.erb
@@ -0,0 +1,24 @@
+
+ <%= link_to forum.title, forum.view_url, :class => 'search-result-title' %>
+
+ <%= render :partial => 'image', :object => forum %>
+
+
+
+ <%= _("Last topics") %> |
+
+ <% r = forum.children.find(:all, :order => :updated_at, :conditions => ['type != ?', 'RssFeed']).last(3) %>
+ ">
+ <% 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_common', :object => forum %>
+
+ <%= render :partial => 'article_last_change', :object => forum %>
+
+
+
diff --git a/app/views/search/_full_gallery.html.erb b/app/views/search/_full_gallery.html.erb
new file mode 100644
index 0000000..28e2e66
--- /dev/null
+++ b/app/views/search/_full_gallery.html.erb
@@ -0,0 +1,13 @@
+
+ <%= 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/_full_product.rhtml b/app/views/search/_full_product.rhtml
index 680b15f..dcbe8f1 100644
--- a/app/views/search/_full_product.rhtml
+++ b/app/views/search/_full_product.rhtml
@@ -1,4 +1,3 @@
-<% product = item %>
<% extra_content = @plugins.dispatch(:asset_product_extras, product).collect { |content| instance_eval(&content) } %>
<% extra_properties = @plugins.dispatch(:asset_product_properties, product)%>
diff --git a/app/views/search/_full_text_article.html.erb b/app/views/search/_full_text_article.html.erb
new file mode 100644
index 0000000..0f1b746
--- /dev/null
+++ b/app/views/search/_full_text_article.html.erb
@@ -0,0 +1,13 @@
+
+ <%= 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/_full_uploaded_file.html.erb b/app/views/search/_full_uploaded_file.html.erb
new file mode 100644
index 0000000..b8aa1d4
--- /dev/null
+++ b/app/views/search/_full_uploaded_file.html.erb
@@ -0,0 +1,25 @@
+
+ <%= 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? %>
+
+ <%= uploaded_file.parent.gallery? ? _("Gallery") : _("Folder") %> |
+ <%= link_to uploaded_file.parent.name, uploaded_file.parent.url %> |
+
+ <% end %>
+
+ <%= render :partial => 'article_tags', :object => uploaded_file.tags %>
+ <%= render :partial => 'article_categories', :object => uploaded_file.categories %>
+
+ <%= render :partial => 'article_last_change', :object => uploaded_file %>
+
+
+
diff --git a/app/views/search/_gallery.rhtml b/app/views/search/_gallery.rhtml
deleted file mode 100644
index 28e2e66..0000000
--- a/app/views/search/_gallery.rhtml
+++ /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/_image.html.erb b/app/views/search/_image.html.erb
new file mode 100644
index 0000000..be85c67
--- /dev/null
+++ b/app/views/search/_image.html.erb
@@ -0,0 +1,52 @@
+
+
+ <% if image.is_a? UploadedFile and image.filename %>
+ <% extension = image.extension %>
+ <% if ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'svg'].include? extension %>
+ <%= link_to '', image.view_url, :class => "search-image-pic", :style => 'background-image: url(%s)'% image.public_filename(:thumb) %>
+ <% if image.width && image.height %>
+ <% javascript_tag do %>
+ image = jQuery('script').last().parent().find('.search-image-pic');
+ des_width = parseInt(image.css('width'));
+ des_height = parseInt(image.css('height'));
+
+ width = <%= image.width %>;
+ height = <%= image.height %>;
+ scale_factor = width > height ? des_width/width : des_height/height;
+
+ image.css({'width' : scale_factor*width +'px', 'height' : scale_factor*height+'px'});
+ <% end %>
+ <% end %>
+ <% elsif ['pdf'].include? extension %>
+ <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-pdf' %>
+ <% elsif ['doc', 'docx', 'odt', 'rtf', 'txt', 'html', 'htm'].include? extension %>
+ <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-vnd-oasis-opendocument-text' %>
+ <% elsif ['xls', 'xlsx', 'ods', 'csv', 'tsv', 'tab'].include? extension %>
+ <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-vnd-oasis-opendocument-spreadsheet' %>
+ <% end %>
+ <% elsif image.is_a? Gallery %>
+
+ <% r = image.children.find(:all, :order => :updated_at, :conditions => ['type = ?', 'UploadedFile']).last(3) %>
+ <% if r.length > 0 %>
+ <% r.each do |i| %>
+ <%= link_to '', i.view_url, :class => "search-image-pic", :style => 'background-image: url(%s)'% i.public_filename(:thumb) %>
+ <% end %>
+ <% else %>
+
<%= _('No image') %>
+ <% end %>
+
+ <% elsif image.is_a? Product %>
+ <% if image.image %>
+
+ <%= link_to '', product_path(image), :class => "search-image-pic",
+ :style => 'background-image: url(%s)'% image.default_image(:thumb) %>
+ <%= link_to content_tag(:span, _('Zoom in')), image.image.public_filename,
+ :class => 'zoomify-image' %>
+
+ <% else %>
+
<%= _('No image') %>
+ <% end %>
+ <% else %>
+
+ <% end %>
+
diff --git a/app/views/search/_image.rhtml b/app/views/search/_image.rhtml
deleted file mode 100644
index be85c67..0000000
--- a/app/views/search/_image.rhtml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
- <% if image.is_a? UploadedFile and image.filename %>
- <% extension = image.extension %>
- <% if ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'svg'].include? extension %>
- <%= link_to '', image.view_url, :class => "search-image-pic", :style => 'background-image: url(%s)'% image.public_filename(:thumb) %>
- <% if image.width && image.height %>
- <% javascript_tag do %>
- image = jQuery('script').last().parent().find('.search-image-pic');
- des_width = parseInt(image.css('width'));
- des_height = parseInt(image.css('height'));
-
- width = <%= image.width %>;
- height = <%= image.height %>;
- scale_factor = width > height ? des_width/width : des_height/height;
-
- image.css({'width' : scale_factor*width +'px', 'height' : scale_factor*height+'px'});
- <% end %>
- <% end %>
- <% elsif ['pdf'].include? extension %>
- <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-pdf' %>
- <% elsif ['doc', 'docx', 'odt', 'rtf', 'txt', 'html', 'htm'].include? extension %>
- <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-vnd-oasis-opendocument-text' %>
- <% elsif ['xls', 'xlsx', 'ods', 'csv', 'tsv', 'tab'].include? extension %>
- <%= link_to '', image.view_url, :class => 'search-image-pic icon-application-vnd-oasis-opendocument-spreadsheet' %>
- <% end %>
- <% elsif image.is_a? Gallery %>
-
- <% r = image.children.find(:all, :order => :updated_at, :conditions => ['type = ?', 'UploadedFile']).last(3) %>
- <% if r.length > 0 %>
- <% r.each do |i| %>
- <%= link_to '', i.view_url, :class => "search-image-pic", :style => 'background-image: url(%s)'% i.public_filename(:thumb) %>
- <% end %>
- <% else %>
-
<%= _('No image') %>
- <% end %>
-
- <% elsif image.is_a? Product %>
- <% if image.image %>
-
- <%= link_to '', product_path(image), :class => "search-image-pic",
- :style => 'background-image: url(%s)'% image.default_image(:thumb) %>
- <%= link_to content_tag(:span, _('Zoom in')), image.image.public_filename,
- :class => 'zoomify-image' %>
-
- <% else %>
-
<%= _('No image') %>
- <% end %>
- <% else %>
-
- <% end %>
-
diff --git a/app/views/search/_text_article.rhtml b/app/views/search/_text_article.rhtml
deleted file mode 100644
index 0f1b746..0000000
--- a/app/views/search/_text_article.rhtml
+++ /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.rhtml b/app/views/search/_uploaded_file.rhtml
deleted file mode 100644
index b8aa1d4..0000000
--- a/app/views/search/_uploaded_file.rhtml
+++ /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? %>
-
- <%= uploaded_file.parent.gallery? ? _("Gallery") : _("Folder") %> |
- <%= link_to uploaded_file.parent.name, uploaded_file.parent.url %> |
-
- <% end %>
-
- <%= render :partial => 'article_tags', :object => uploaded_file.tags %>
- <%= render :partial => 'article_categories', :object => uploaded_file.categories %>
-
- <%= render :partial => 'article_last_change', :object => uploaded_file %>
-
-
-
--
libgit2 0.21.2