diff --git a/app/views/search/_blog.rhtml b/app/views/search/_blog.rhtml deleted file mode 100644 index e96a519..0000000 --- a/app/views/search/_blog.rhtml +++ /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/_display_results.rhtml b/app/views/search/_display_results.rhtml index 04b0bd8..a01f100 100644 --- a/app/views/search/_display_results.rhtml +++ b/app/views/search/_display_results.rhtml @@ -15,7 +15,9 @@
    diff --git a/app/views/search/_folder.rhtml b/app/views/search/_folder.rhtml deleted file mode 100644 index a322481..0000000 --- a/app/views/search/_folder.rhtml +++ /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.rhtml b/app/views/search/_forum.rhtml deleted file mode 100644 index 54df4a2..0000000 --- a/app/views/search/_forum.rhtml +++ /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/_full_article.html.erb b/app/views/search/_full_article.html.erb index 8cbf5f7..25c2a41 100644 --- a/app/views/search/_full_article.html.erb +++ b/app/views/search/_full_article.html.erb @@ -1,4 +1,3 @@ -<% article = item %>
  • <%= link_to(article.title, article.url, :class => "search-result-title") %>
    diff --git a/app/views/search/_full_blog.html.erb b/app/views/search/_full_blog.html.erb new file mode 100644 index 0000000..e96a519 --- /dev/null +++ b/app/views/search/_full_blog.html.erb @@ -0,0 +1,24 @@ +
  • + <%= 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/_full_enterprise.html.erb b/app/views/search/_full_enterprise.html.erb index fdea014..278a5c5 100644 --- a/app/views/search/_full_enterprise.html.erb +++ b/app/views/search/_full_enterprise.html.erb @@ -1,4 +1,3 @@ -<% profile = item %>
  • diff --git a/app/views/search/_full_event.html.erb b/app/views/search/_full_event.html.erb index d63bac5..eacbf2e 100644 --- a/app/views/search/_full_event.html.erb +++ b/app/views/search/_full_event.html.erb @@ -1,4 +1,3 @@ -<% event = item %>
  • <%= link_to(event.title, event.url, :class => "search-result-title") %>
    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 %> +
    + + + + + <% 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/_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 %> +
    + + + + + <% 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/_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? %> + + + + + <% 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/_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 %> + + <% 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 %> - - <% 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? %> - - - - - <% 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 %> - -
    -
  • -- libgit2 0.21.2