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 )
|
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
|
end
|
||||||
|
|
||||||
def save_archive_file_multiples
|
def save_archive_file_multiples
|
||||||
|
|
|
@ -1,19 +1,30 @@
|
||||||
<% # encoding: utf-8 %>
|
|
||||||
|
|
||||||
<% if @title %>
|
<div class="o-archives">
|
||||||
<h1 class="h1"><%= @title %></h1>
|
<div class="o-archives-content">
|
||||||
<% end %>
|
<div class="o-archives-group">
|
||||||
|
<h2 class="o-archives-category h2"><%= @archive_file.archive_file_category.title rescue nil %></h2>
|
||||||
<h3><%= @archive_file.archive_file_category.title rescue nil %></h3>
|
<div class="o-archives-content">
|
||||||
|
<div class="o-archives-list">
|
||||||
<%= @archive_file.title %>
|
<ul>
|
||||||
|
<li>
|
||||||
<ol>
|
<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 | %>
|
<% @archive_file.archive_file_multiples.each do | afile | %>
|
||||||
<% if afile.file.file and afile.choose_lang_display(I18n.locale.to_s) %>
|
<% 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 %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ol>
|
</ol>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%#= link_back %>
|
<%= stylesheet_link_tag "archive/archives" %>
|
Loading…
Reference in New Issue