Spen's changes in archive

This commit is contained in:
chris 2013-03-21 14:38:04 +08:00
parent ee8a78621a
commit 41311c74d0
2 changed files with 29 additions and 18 deletions

View File

@ -64,7 +64,7 @@ class ArchiveFile
def get_file_icon( file_data )
file_icon = "<span class=\"o-archives-file-type\">#{file_data.split('.')[1]}</span>".html_safe
file_icon = "<span class=\"o-archives-file-type\">#{file_data.split('.')[-1]}</span>".html_safe
end
def save_archive_file_multiples

View File

@ -1,19 +1,30 @@
<% # encoding: utf-8 %>
<% if @title %>
<h1 class="h1"><%= @title %></h1>
<% end %>
<h3><%= @archive_file.archive_file_category.title rescue nil %></h3>
<%= @archive_file.title %>
<ol>
<div class="o-archives">
<div class="o-archives-content">
<div class="o-archives-group">
<h2 class="o-archives-category h2"><%= @archive_file.archive_file_category.title rescue nil %></h2>
<div class="o-archives-content">
<div class="o-archives-list">
<ul>
<li>
<h3 class="o-archives-title h3"><%= @archive_file.title %></h3>
<div class="o-archives-list-item">
<ol>
<% @archive_file.archive_file_multiples.each do | afile | %>
<% if afile.file.file and afile.choose_lang_display(I18n.locale.to_s) %>
<li><%= link_to afile.file_title, afile.file.url, {:target => '_blank', :title => afile.file_title} %></li>
<li>
<%= 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) %>
</li>
<% end %>
<% end %>
</ol>
</ol>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<%#= link_back %>
<%= stylesheet_link_tag "archive/archives" %>