module ApplicationHelper

def updated_stamp(model)

def updated_stamp(model)
  unless model.new_record?
    updated_by = (model.updated_by || model.created_by)
    name = updated_by ? updated_by.name : nil
    time = (model.updated_at || model.created_at)
    if name or time
      html = %{<p class="updated_line">#{t('timestamp.last_updated')} }
      html << %{#{t('timestamp.by')} <strong>#{name}</strong> } if name
      html << %{#{t('timestamp.at')} #{timestamp(time)}} if time
      html << %{</p>}
      html.html_safe
    end
  end
end