3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'app/helpers/admin/part_types_helper.rb', line 3
def updated_stamp(model)
unless model.new_record?
updated_by = (model.updated_by || model.created_by) if model.respond_to?(:updated_by)
login = updated_by ? updated_by.login : nil
time = (model.updated_at || model.created_at)
html = %{<p style="clear: left"><small>}
if login or time
html << 'Last updated '
html << %{by #{login} } if login
html << %{at #{ timestamp(time) }} if time
html << '. '
end
html << %{</small></p>}
html
else
%{<p class="clear"> </p>}
end
end
|