[%# Admin page for viewing a user's statushistory. # # Authors: # import r26.1 livejournal -- original page # Jen Griffin -- TT conversion # # Copyright (c) 2008-2020 by Dreamwidth Studios, LLC. # # This code was forked from the LiveJournal project owned and operated # by Live Journal, Inc. The code has been modified and expanded by # Dreamwidth Studios, LLC. These files were originally licensed under # the terms of the license supplied by Live Journal, Inc. # # In accordance with the original license, this code and all its # modifications are provided under the GNU General Public License. # A copy of that license can be found in the LICENSE file included as # part of this distribution. %] [%- sections.title = '.title' | ml -%] [%- CALL dw.active_resource_group( "foundation" ) -%] [%- sections.head = BLOCK %] [% END %]

[% '.intro' | ml %]

[% dw.form_auth %] [%# the hidden form fields below get their values from formdata %] [% form.hidden( name = "orderby" ) %] [% form.hidden( name = "flow" ) %] [% form.textbox( label = dw.ml( '.label.user' ), maxlength = site.maxlength_user, size = site.maxlength_user, name = 'user' ) %] [% form.textbox( label = dw.ml( '.label.admin' ), maxlength = site.maxlength_user, size = site.maxlength_user, name = 'admin' ) %] [% form.textbox( label = dw.ml( '.label.type' ), maxlength = 20, size = 20, name = 'type' ) %]

[% form.submit( name = 'query_submit', value = dw.ml( '.btn.search' ) ) %]

[% IF showtable %]

[% '.label.query' | ml; FOREACH query IN [ 'user', 'admin', 'type' ]; IF formdata.$query; "  ${query}="; formdata.$query | html; END; END %]

[% FOREACH col IN [ 'user', 'admin', 'shtype', 'shdate', 'notes' ]; flow = ( formdata.orderby == col && formdata.flow == 'asc' ) ? 'desc' : 'asc'; link = dw.create_url( '/admin/statushistory', args => { user => formdata.user, admin => formdata.admin, type => formdata.type, orderby = col, flow => flow } ) %] [% END %] [% count = 0; FOREACH row IN rows; NEXT UNLESS canview( row ) %] [% count = count + 1; END %]
[% col %]
[% IF row.user; ljuser( row.user ); END %] [% IF row.admin; ljuser( row.admin ); END %] [% row.shtype | html %] [% format_time( row.shdate ) %] [% format_note( row.notes ) %]
[% '.txt.rowcount' | ml( count = count ); IF rows.size >= 1000; ' '; '.txt.truncated' | ml; END %]
[% END %]