Fixes #24 Dynamic columns are forced into timestamp with zone the same as ActiveRecord, views have been updated to use format_date which converts time to local timezone based on preferences.
This commit is contained in:
parent
523b43b4e1
commit
96084390fd
@ -106,7 +106,7 @@ class DmsfFileRevision < ActiveRecord::Base
|
|||||||
# custom SQL into a temporary object
|
# custom SQL into a temporary object
|
||||||
#
|
#
|
||||||
def access_grouped
|
def access_grouped
|
||||||
access.select("user_id, count(*) as count, min(created_at) as min, max(created_at) as max").group("user_id")
|
access.select("user_id, count(*) as count, min(created_at) as first_at, max(created_at) as last_at").group("user_id")
|
||||||
end
|
end
|
||||||
|
|
||||||
def version
|
def version
|
||||||
|
|||||||
@ -81,7 +81,7 @@
|
|||||||
<%= render "custom_fields", :object => subfolder %>
|
<%= render "custom_fields", :object => subfolder %>
|
||||||
</td>
|
</td>
|
||||||
<td class="size" title="<%= l(:title_total_size_of_all_files)%>"><%= number_to_human_size(subfolder.deep_size) %></td>
|
<td class="size" title="<%= l(:title_total_size_of_all_files)%>"><%= number_to_human_size(subfolder.deep_size) %></td>
|
||||||
<td class="modified"><%= subfolder.updated_at.strftime("%Y-%m-%d %H:%M") %>
|
<td class="modified"><%= format_time(subfolder.updated_at) %>
|
||||||
<% if subfolder.locked_for_user? %>
|
<% if subfolder.locked_for_user? %>
|
||||||
<%= link_to(image_tag("locked.png", :plugin => :redmine_dmsf),
|
<%= link_to(image_tag("locked.png", :plugin => :redmine_dmsf),
|
||||||
{:controller => "users", :action => "show", :id => subfolder.lock.reverse[0].user },
|
{:controller => "users", :action => "show", :id => subfolder.lock.reverse[0].user },
|
||||||
@ -159,7 +159,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="size"><%= number_to_human_size(file.last_revision.size) %></td>
|
<td class="size"><%= number_to_human_size(file.last_revision.size) %></td>
|
||||||
<td class="modified">
|
<td class="modified">
|
||||||
<%= file.last_revision.updated_at.strftime("%Y-%m-%d %H:%M") %>
|
<%= format_time(file.last_revision.updated_at) %>
|
||||||
<% if file.locked_for_user? %>
|
<% if file.locked_for_user? %>
|
||||||
<%= link_to(image_tag("locked.png", :plugin => :redmine_dmsf),
|
<%= link_to(image_tag("locked.png", :plugin => :redmine_dmsf),
|
||||||
{:controller => "users", :action => "show", :id => file.lock.reverse[0].user },
|
{:controller => "users", :action => "show", :id => file.lock.reverse[0].user },
|
||||||
|
|||||||
@ -13,8 +13,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><%=link_to_user(access.user)%></td>
|
<td><%=link_to_user(access.user)%></td>
|
||||||
<td><%=access["count"]%></td>
|
<td><%=access["count"]%></td>
|
||||||
<td><%=access.min.to_s%></td>
|
<td><%=format_time(access.first_at.to_time(ActiveRecord::Base.default_timezone))%></td>
|
||||||
<td><%=access.max.to_s%></td>
|
<td><%=format_time(access.last_at.to_time(ActiveRecord::Base.default_timezone))%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@ -71,7 +71,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<p class="no-ident">
|
<p class="no-ident">
|
||||||
<%=label_tag("", (revision.source_revision.nil? ? l(:label_created) : l(:label_changed)) + ":")%>
|
<%=label_tag("", (revision.source_revision.nil? ? l(:label_created) : l(:label_changed)) + ":")%>
|
||||||
<%= l(:info_changed_by_user, :changed => revision.updated_at.strftime("%Y-%m-%d %H:%M:%S"), :user => h(revision.user)) %>
|
<%= l(:info_changed_by_user, :changed => format_time(revision.updated_at), :user => h(revision.user)) %>
|
||||||
</p>
|
</p>
|
||||||
<div class="clear">
|
<div class="clear">
|
||||||
<div class="splitcontentleft">
|
<div class="splitcontentleft">
|
||||||
|
|||||||
@ -14,8 +14,8 @@ table.entries {
|
|||||||
}
|
}
|
||||||
|
|
||||||
table.entries td.modified {
|
table.entries td.modified {
|
||||||
min-width: 120px;
|
min-width: 140px;
|
||||||
width: 120px;
|
width: 140px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.entries td.actions {
|
table.entries td.actions {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user