Add file-date
This commit is contained in:
parent
ee713e442d
commit
085bace552
|
|
@ -37,7 +37,7 @@ class Admin::ArchiveFilesController < OrbitAdminController
|
|||
end
|
||||
end
|
||||
@choose = ArchiveSortOrder.first['sort_order']
|
||||
@table_fields = [:status, :category, :title, :updated_at,:last_modified,"archive.downloaded_times"]
|
||||
@table_fields = [:status, :category, :title, :updated_at,:last_modified,:created_at,"archive.downloaded_times"]
|
||||
@categories = @module_app.categories.enabled
|
||||
@tags = @module_app.tags
|
||||
@filter_fields = filter_fields(@categories, @tags)
|
||||
|
|
|
|||
|
|
@ -297,7 +297,8 @@ class ArchiveFile
|
|||
"file-type" => extension,
|
||||
"file-url" => (file.file.present? ? "/xhr/archive/download?file=#{file.id}" : 'javascript:void(0)'),
|
||||
"target" => "_blank",
|
||||
"serial_number" => serial_number
|
||||
"serial_number" => serial_number,
|
||||
"file-date" => (file.created_at.localtime.strftime("%Y-%m-%d") rescue "")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@
|
|||
<%= t(:no_file) %>
|
||||
<% else %>
|
||||
<%= link_to content_tag(:i) + form_file.file_identifier, form_file.file.url, {:class => 'file-link file-type', :target => '_blank', :title => form_file.file_identifier} %>
|
||||
<% end %>
|
||||
<% # 建議改放這裡:直接跟在檔案連結後面,確保是已存在檔案才顯示 %>
|
||||
<span class="upload_time" style="margin-left: 15px; color: #0088cc; font-size: 0.9em;">
|
||||
<i class="icons-clock"></i>
|
||||
<%= t('file.uploaded_at') rescue 'Uploaded at' %>:
|
||||
<b><%= form_file.created_at.localtime.strftime("%Y-%m-%d %H:%M") rescue "N/A" %></b>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="input-prepend input-append">
|
||||
<label>
|
||||
|
|
|
|||
|
|
@ -131,12 +131,14 @@
|
|||
</td>
|
||||
<td><%= format_value archive.updated_at rescue nil %></td>
|
||||
<td><%= User.find(archive.update_user_id).user_name rescue nil %></td>
|
||||
<td><%= format_value archive.created_at rescue nil %></td>
|
||||
<% download_total = 0
|
||||
archive.archive_file_multiples.each do |afm|
|
||||
download_total = download_total + afm.download_count
|
||||
end
|
||||
%>
|
||||
<td><%= download_total %></td>
|
||||
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Reference in New Issue