mourningdove/views/shop/randomgift.tt
2026-05-24 01:03:05 +00:00

33 lines
2 KiB
Text

[% sections.title = dw.ml( ".title.$type" ) %]
[%- CALL dw.active_resource_group( "foundation" ) -%]
<p><a href='[% site.shoproot %]'>&lt;&lt; [% dw.ml( '.backlink', { sitename => site.nameshort } ) %]</a></p>
[% IF randomu %]
<p>[% dw.ml( ".intro.$type", { aopts => "href='${site.shoproot}/randomgift?type=$type'", aopts2 => "href='${site.shoproot}/account?for=random'" } ) %]</p>
<p><strong>[% dw.ml('.label.username') %]</strong> [% randomu.ljuser_display %]<br />
<strong>[% dw.ml('.label.createdate') %]</strong> [% mysql_time( randomu.timecreate ) %]<br />
<strong>[% dw.ml('.label.lastupdated') %]</strong> [% mysql_time( randomu.timeupdate ).substr( 0, 10 ) %]<br />
<strong>[% dw.ml('.label.numentries') %]</strong> [% randomu.number_of_posts %]<br />
[% IF type == 'P' %]
<strong>[% dw.ml('.label.numcomments') %]</strong> [% randomu.num_comments_posted %]<br />
<strong>[% dw.ml('.label.numcommunities') %]</strong> [% randomu.member_of_userids.size ? randomu.member_of_userids.size : 0 %]<br />
[% ELSE %]
<strong>[% dw.ml('.label.numcomments') %]</strong> [% randomu.num_comments_received %]<br />
<strong>[% dw.ml('.label.nummembers') %]</strong> [% randomu.member_userids.size %]<br />
[% END %]
</p>
<form method='post'>
[% form.hidden( name = 'username', value = randomu.user ) %]
[% form.submit( value = dw.ml( '.form.submit', { username => randomu.user } ) ) %]
<p><a href='[% site.shoproot %]/randomgift?type=[% type %]'>[% dw.ml( ".form.getanother.$type") %]</a>
&nbsp;&nbsp;<a href='[% site.shoproot %]/randomgift?type=[% othertype %]'>[% dw.ml( ".form.switchtype.$type") %]</a></p>
</form><br />
[% ELSE %]
<p>[% dw.ml( ".nousers.$type") %]</p>
&nbsp;&nbsp;<a href='[% site.shoproot %]/randomgift?type=[% othertype %]'>[% dw.ml( ".form.switchtype.$type") %]</a>
[% END %]
<p><a href='[% site.shoproot %]'>&lt;&lt; [% dw.ml( '.backlink', { sitename => site.nameshort } ) %]</a></p>