From 41311c74d072d8d33232d5780f4abaaf2ae00b96 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 21 Mar 2013 14:38:04 +0800 Subject: [PATCH] Spen's changes in archive --- .../archive/app/models/archive_file.rb | 2 +- .../front_end/archive_files/show.html.erb | 45 ++++++++++++------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/vendor/built_in_modules/archive/app/models/archive_file.rb b/vendor/built_in_modules/archive/app/models/archive_file.rb index 75b74bc0a..bb4496906 100644 --- a/vendor/built_in_modules/archive/app/models/archive_file.rb +++ b/vendor/built_in_modules/archive/app/models/archive_file.rb @@ -64,7 +64,7 @@ class ArchiveFile def get_file_icon( file_data ) - file_icon = "#{file_data.split('.')[1]}".html_safe + file_icon = "#{file_data.split('.')[-1]}".html_safe end def save_archive_file_multiples diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/show.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/show.html.erb index 6051eb4c8..fe6994dac 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/show.html.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/show.html.erb @@ -1,19 +1,30 @@ -<% # encoding: utf-8 %> -<% if @title %> -

<%= @title %>

-<% end %> +
+
+
+

<%= @archive_file.archive_file_category.title rescue nil %>

+
+
+
    +
  • +

    <%= @archive_file.title %>

    +
    +
      + <% @archive_file.archive_file_multiples.each do | afile | %> + <% if afile.file.file and afile.choose_lang_display(I18n.locale.to_s) %> +
    1. + <%= link_to afile.file_title, afile.file.url, {:target => '_blank', :title => afile.file_title, :class => "o-archives-file"} %> + <%= @archive_file.get_file_icon(afile.file.url) %> +
    2. + <% end %> + <% end %> +
    +
    +
  • +
+
+
+
+
-

<%= @archive_file.archive_file_category.title rescue nil %>

- -<%= @archive_file.title %> - -
    - <% @archive_file.archive_file_multiples.each do | afile | %> - <% if afile.file.file and afile.choose_lang_display(I18n.locale.to_s) %> -
  1. <%= link_to afile.file_title, afile.file.url, {:target => '_blank', :title => afile.file_title} %>
  2. - <% end %> - <% end %> -
- -<%#= link_back %> +<%= stylesheet_link_tag "archive/archives" %> \ No newline at end of file