mourningdove/views/feeds/index.tt
2026-05-24 01:03:05 +00:00

80 lines
2.7 KiB
Text

[%# Site interface for adding feeds.
#
# Authors:
# Jen Griffin <kareila@livejournal.com>
#
# Copyright (c) 2013 by Dreamwidth Studios, LLC.
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself. For a copy of the license, please
# reference 'perldoc perlartistic' or 'perldoc perlgpl'.
#
%]
[%- sections.title='.title' | ml -%]
<p>[% '.using.text' | ml %]</p>
<p>[% '.top1000.text' | ml(aopts = "href='$site.root/feeds/list'") %]</p>
<h1>[% '.add.byurl.title' | ml %]</h1>
[%- IF remote.can_create_feeds -%]
<p>[% '.add.byurl.text' | ml %]</p>
<form method='post' action='./'><blockquote>
[%- dw.form_auth %]
<input type='hidden' name='userid' value='[% remote.id %]' />
<p>[% '.feed.url' | ml %] <input size='40' maxlength='255' name='synurl' /></p>
<p><input name='action:addcustom' type='submit' value='[% ".add" | ml | html %]' /></p>
</blockquote></form>
[%- ELSE -%]
<p>[% 'cprod.syn.text.v1' | ml %]</p>
[%- END -%]
[%- IF poplist -%]
<h1>[% '.add.pop.title' | ml %]</h1>
<p>[% '.add.pop.text' | ml %]</p>
<form method='post' action='./'>
[%- dw.form_auth %]
<input type='hidden' name='userid' value='[% remote.id %]' />
<table cellpadding='3' style='margin-bottom: 10px; width: 80%;'>
<thead><tr>
<th>[% '.table.account' | ml %]</th>
<th>[% '.table.feed' | ml %]</th>
<th></th>
<th align='right'>[% '.table.watchers' | ml %]</th>
</tr></thead>
<tbody>
[%- FOREACH pop IN poplist -%]
<tr>
<td nowrap='nowrap' valign='top'>
<input type='checkbox' value='1' name='[% "add_${pop.user}" %]' />
[%- pop.u.ljuser_display -%]
</td>
<td valign='top'>[% pop.name %]
[%- IF urlprop == pop.u.prop( 'url' ) -%]
<br />
<a href='[% urlprop %]'>
[%- IF urlprop.length > 60 -%]
[% urlprop.substr( 0, 50 ) %]...
[%- ELSE;
urlprop;
END; -%]
</a>
[%- END -%]
</td>
<td valign='top'><a href='[% pop.url %]'>[% xmlimg %]</a></td>
<td align='right' valign='top'>[% pop.count %]</td>
</tr>
[%- END -%]
</tbody>
</table>
<p><input name='action:add' type='submit' value='[% ".add.selected" | ml | html %]' /></p>
</form>
[%- END -%]