66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
<% # encoding: utf-8 %>
|
|
|
|
|
|
<div class="o-archives layout-table">
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th class="column-ctrl col-title"><%= sortable(:title, t("archive.Title"))%></th>
|
|
<th class="column-ctrl col-file"><%= t("archive.Files")%></th>
|
|
<th class="column-ctrl col-promoter"><%= t(:promoter)%></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<% @archive_files.each_with_index do |post,i| %>
|
|
<tr <% if ( (i + 1) % 2 ) == 0 %> class="even" <% end %>>
|
|
<td class="col-title"><div class="o-archives-title"><%= post.title %></div></td>
|
|
<td class="col-file">
|
|
<div class="o-archives-list-item">
|
|
<% if !post.archive_file_multiples.blank? %>
|
|
<ol>
|
|
<% post.archive_file_multiples.asc(:_id).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 download_count", rel: download_panel_archive_front_end_archive_file_path(afile, inner: true)} %>
|
|
<%= post.get_file_icon(afile.file.url) %>
|
|
</li>
|
|
<% end %>
|
|
<% end %>
|
|
</ol>
|
|
<% end %>
|
|
</div>
|
|
</td>
|
|
<td class="col-promoter">
|
|
<% unless post.get_users.blank? %>
|
|
<div class="promoter-block">
|
|
<ul>
|
|
<% post.get_users.each do |user| %>
|
|
<li class="promoter">
|
|
<p>
|
|
<%= link_to user.name, "mailto:#{user.email}", class: "promoter-name" %> / <span class="promoter-phone"><%= user.office_tel %></span>
|
|
</p>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<%= paginate @archive_files, :param_name => :page_main, :params => {:inner => 'false'} %>
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
$('.download_count').on('click', function(){
|
|
$.getScript($(this).attr('rel'));
|
|
});
|
|
});
|
|
</script>
|