Show More
Commit Description:
update application.rb
Commit Description:
update application.rb
References:
File last commit:
Show/Diff file:
Action:
app/views/report/login_stat.html.haml
| 36 lines
| 1.3 KiB
| text/x-haml
| HamlLexer
|
r412 | - content_for :header do | |||
r430 | = stylesheet_link_tag 'tablesorter-theme.cafe' | |||
r456 | = javascript_include_tag 'local_jquery' | |||
r412 | ||||
%script{:type=>"text/javascript"} | ||||
$(function () { | ||||
$('#since_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); | ||||
$('#until_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} ); | ||||
r430 | $('#my_table').tablesorter({widthFixed: true, widgets: ['zebra']}); | |||
r412 | }); | |||
r410 | %h1 Login status | |||
r413 | =render partial: 'report_menu' | |||
=render partial: 'date_range', locals: {param_text: 'Login date range:', title: 'Query login stat in the range' } | ||||
r411 | ||||
r430 | %table.tablesorter-cafe#my_table | |||
r410 | %thead | |||
r430 | %tr | |||
r410 | %th login | |||
%th full name | ||||
%th login count | ||||
%th earliest | ||||
%th latest | ||||
r442 | %th IP | |||
r410 | %tbody | |||
- @logins.each do |l| | ||||
%tr{class: cycle('info-even','info-odd')} | ||||
r431 | %td= link_to l[:login], controller: 'users', action: 'profile', id: l[:id] | |||
r410 | %td= l[:full_name] | |||
%td= l[:count] | ||||
r413 | %td= l[:min] ? l[:min].in_time_zone.strftime('%Y-%m-%d %H:%M') : '' | |||
r442 | %td= l[:max] ? "#{l[:max].in_time_zone.strftime('%Y-%m-%d %H:%M.%S')} (#{time_ago_in_words(l[:max].in_time_zone)} ago)" : '' | |||
%td | ||||
- l[:ip].each do |ip| | ||||
#{ip.ip_address} <br/> | ||||