fix typos and add lastchange_stamp accessor pon DevicePort

This commit is contained in:
Oliver Gorwits
2012-02-12 16:04:35 +00:00
parent 33ff11fa71
commit 14c034050b
3 changed files with 17 additions and 2 deletions

View File

@@ -288,4 +288,19 @@ sub is_free {
return ($diff_sec >= $total ? 1 : 0); return ($diff_sec >= $total ? 1 : 0);
} }
=head1 ADDITIONAL COLUMNS
=head2 lastchange_stamp
Formatted version of the C<lastchange> field, accurate to the minute.
The format is somewhat like ISO 8601 or RFC3339 but without the middle C<T>
between the date stamp and time stamp. That is:
2012-02-06 12:49
=cut
sub lastchange_stamp { return (shift)->get_column('lastchange_stamp') }
1; 1;

View File

@@ -197,7 +197,7 @@ The following fields are inspected for a match:
sub search_fuzzy { sub search_fuzzy {
my ($rs, $q) = @_; my ($rs, $q) = @_;
die "missing param to search_by_field\n" die "missing param to search_fuzzy\n"
unless $q; unless $q;
$q = "\%$q\%" if $q !~ m/\%/; $q = "\%$q\%" if $q !~ m/\%/;

View File

@@ -41,7 +41,7 @@
</td> </td>
[% END %] [% END %]
[% IF params.c_lastchange %] [% IF params.c_lastchange %]
<td class="center_cell">[% row.get_column('lastchange_stamp') | html_entity %]</td> <td class="center_cell">[% row.lastchange_stamp | html_entity %]</td>
[% END %] [% END %]
[% IF params.c_name %] [% IF params.c_name %]
<td class="center_cell">[% row.name | html_entity %]</td> <td class="center_cell">[% row.name | html_entity %]</td>