36 lines
1.5 KiB
Plaintext
Executable File
36 lines
1.5 KiB
Plaintext
Executable File
<div class="entry-suggestion">
|
|
<strong><%= entry.column_entries.first.try(:text).to_s %></strong>
|
|
|
|
<% entry.column_entries.each do |ce| %>
|
|
<% if ce.type == "file" %>
|
|
<ul class="column_entry_files">
|
|
<% ce.column_entry_files.desc(:sort_number).each do |file| %>
|
|
<% next unless file.choose_lang_display(I18n.locale.to_s) %>
|
|
<% file_title = file.get_file_title %>
|
|
<% size = number_to_human_size(file.file.size) %>
|
|
<% link = file.get_link %>
|
|
<% if file.file.content_type.start_with?('audio/') %>
|
|
<div class="voice-player">
|
|
<span class="voice-title"><%= file_title %></span>
|
|
<a class="voice-player" data-content="<%= file.file.url %>" href="#" title="<%= file_title %>">
|
|
<i class="fa fa-play" aria-hidden="true"></i>
|
|
</a>
|
|
</div>
|
|
<% else %>
|
|
<li class="column_entry_file">
|
|
<a class="column_entry_file_link" href="<%= link %>" title="<%= file_title %>" target="_blank">
|
|
<%= file_title %>
|
|
</a>
|
|
<span class="file_size">(<%= size %>)</span>
|
|
<span class="view_count">
|
|
<i class="fa fa-eye" title="<%= t("universal_table.downloaded_times") %>"></i>
|
|
<span class="view-count"><%= file.download_count %></span>
|
|
</span>
|
|
</li>
|
|
<% end %>
|
|
<% end %>
|
|
</ul>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|