Spen's changes in archive
This commit is contained in:
parent
ee8a78621a
commit
41311c74d0
|
@ -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
|
||||
|
|
|
@ -1,19 +1,30 @@
|
|||
<% # encoding: utf-8 %>
|
||||
|
||||
<% if @title %>
|
||||
<h1 class="h1"><%= @title %></h1>
|
||||
<% end %>
|
||||
<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, :class => "o-archives-file"} %>
|
||||
<%= @archive_file.get_file_icon(afile.file.url) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ol>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3><%= @archive_file.archive_file_category.title rescue nil %></h3>
|
||||
|
||||
<%= @archive_file.title %>
|
||||
|
||||
<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>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ol>
|
||||
|
||||
<%#= link_back %>
|
||||
<%= stylesheet_link_tag "archive/archives" %>
|
Reference in New Issue