165 lines
6.2 KiB
Smarty
165 lines
6.2 KiB
Smarty
[%# shownote_template10.tpl 2018-11-05 -%]
|
|
[%# HTML snippet for insertion into the database -%]
|
|
[%# This one uses the new format for the mailing list data, and partitions -%]
|
|
[%# comments into past and current. It also marks comments that don't need -%]
|
|
[%# to be read when -markcomments is selected. It requires make_shownotes > V0.0.28 -%]
|
|
[%- USE date -%]
|
|
[%- prefix = "http://hackerpublicradio.org"
|
|
correspondents = "$prefix/correspondents.php"
|
|
mailthreads = "$prefix/pipermail/hpr_hackerpublicradio.org/$review_year-$review_month/thread.html" -%]
|
|
[%- DEFAULT skip_comments = 0
|
|
mark_comments = 0 -%]
|
|
[%- IF mark_comments == 1 %]
|
|
<style>
|
|
p#ignore, li#ignore {
|
|
background-color: lightgreen;
|
|
color:maroon;
|
|
}
|
|
</style>
|
|
[%- END %]
|
|
[%# For the '-mailnotes' option without a file we generate our own inclusion. -%]
|
|
[%# We pretend 'default_mail' is a filename in the calling script. Messy. -%]
|
|
[% BLOCK default_mail -%]
|
|
<a href="[% mailthreads %]" target="_blank">[% mailthreads %]</a>
|
|
[% END -%]
|
|
|
|
<h2>New hosts</h2>
|
|
<p>
|
|
[% IF hosts.size > 0 -%]
|
|
Welcome to our new host[%- hosts.size > 1 ? 's' : '' -%]: <br />
|
|
[%- count = 0 %]
|
|
[%# List the new hosts. If a name contains a comma quote it. -%]
|
|
[%- FOREACH row IN hosts %]
|
|
[%- count = count + 1 %]
|
|
[%- hostname = (row.host.search(',') ? row.host.replace('^(.*)$','"$1"') : row.host) %]
|
|
<a href="[% correspondents %]?hostid=[% row.hostid %]" target="_blank">[% hostname %]</a>
|
|
[%- count < hosts.size ? ', ' : '.' %]
|
|
[%- END %]
|
|
[% ELSE -%]
|
|
There were no new hosts this month.
|
|
[% END -%]
|
|
</p>
|
|
|
|
<h2>Last Month's Shows</h2>
|
|
[%# The 'summary' attribute is deprecated in HTML5 but is included here to -%]
|
|
[%# prevent errors being reported in the note checker -%]
|
|
<table id="t01" summary="Last month's shows">
|
|
<tr>
|
|
<th>Id</th>
|
|
<th>Day</th>
|
|
<th>Date</th>
|
|
<th>Title</th>
|
|
<th>Host</th>
|
|
</tr>
|
|
[%- FOREACH row IN shows %]
|
|
<tr valign="top">
|
|
<td><strong><a href="http://hackerpublicradio.org/eps.php?id=[% row.eps_id %]" target="_blank">[% row.eps_id %]</a></strong></td>
|
|
<td>[% date.format(row.date,'%a') %]</td>
|
|
<td>[% date.format(row.date,'%Y-%m-%d') %]</td>
|
|
<td><a href="http://hackerpublicradio.org/eps.php?id=[% row.eps_id %]" target="_blank">[% row.title %]</a></td>
|
|
<td><a href="[% correspondents %]?hostid=[% row.ho_hostid %]" target="_blank">[% row.ho_host FILTER html_entity %]</a></td>
|
|
</tr>
|
|
[%- END %]
|
|
</table>
|
|
|
|
[%# ---------------------------------------------------------------------------------------- -%]
|
|
[%# Skip comments if told to by the caller -%]
|
|
[%- IF skip_comments == 0 -%]
|
|
<h2>Comments this month</h2>
|
|
|
|
[% IF comment_count > 0 -%]
|
|
[%- IF mark_comments == 1 -%]
|
|
<p id="ignore"><b>Note to Volunteers</b>: Comments marked in green were read in the last
|
|
Community News show and should be ignored in this one.</p>
|
|
[%- END -%]
|
|
<p>These are comments which have been made during the past month, either to shows
|
|
released during the month or to past shows.<br/>
|
|
There [%- comment_count == 1 ? "is $comment_count comment" : "are $comment_count comments" -%] in total.</p>
|
|
[% IF past_count > 0 -%]
|
|
<p>There [% past_count == 1 ? "is $past_count comment" : "are $past_count comments" %] on
|
|
[% past.size %] previous [% past.size == 1 ? "show" : "shows" %]:</p>
|
|
<ul>
|
|
[%- FOREACH ep IN past.keys.sort -%]
|
|
[%- arr = past.$ep -%]
|
|
<li><strong><a href="[% arr.0.identifier_url %]#comments" target="_blank">hpr[% arr.0.episode %]</a></strong>
|
|
([% arr.0.date %]) "<em>[% arr.0.title %]</em>"
|
|
by <a href="[% correspondents %]?hostid=[% arr.0.hostid %]" target="_blank">[% arr.0.host %]</a>.</li>
|
|
<li style="list-style: none; display: inline">
|
|
<ul>
|
|
[%- FOREACH row IN arr -%]
|
|
[%- IF mark_comments == 1 && ((row.comment_timestamp_ut <= last_recording) && (arr.0.date.substr(0,7) == last_month)) -%]
|
|
<li id="ignore">
|
|
[%- ELSE %]
|
|
<li>
|
|
[%- END %]
|
|
<a href="[% row.identifier_url %]#[% row.index %]" target="_blank">Comment [% row.index %]</a>:
|
|
[% row.comment_author_name FILTER html_entity -%] on [% date.format(row.comment_timestamp_ut,'%Y-%m-%d','UTC') -%]:
|
|
[%- IF row.comment_title.length > 0 %]
|
|
"[% row.comment_title %]"
|
|
[%- ELSE -%]
|
|
"[no title]"
|
|
[%- END -%]
|
|
</li>
|
|
[%- END -%]
|
|
</ul><br/>
|
|
</li>
|
|
[%- END -%]
|
|
</ul>
|
|
[%- END %]
|
|
[%# ---------------------------------------------------------------------------------------- -%]
|
|
[% cc = (comment_count - past_count) -%]
|
|
[% IF cc > 0 -%]
|
|
<p>There [% cc == 1 ? "is $cc comment" : "are $cc comments" %] on [% current.size %] of this month's shows:</p>
|
|
<ul>
|
|
[%- FOREACH ep IN current.keys.sort -%]
|
|
[%- arr = current.$ep -%]
|
|
<li><strong><a href="[% arr.0.identifier_url %]#comments" target="_blank">hpr[% arr.0.episode %]</a></strong>
|
|
([% arr.0.date %]) "<em>[% arr.0.title %]</em>"
|
|
by <a href="[% correspondents %]?hostid=[% arr.0.hostid %]" target="_blank">[% arr.0.host %]</a>.</li>
|
|
<li style="list-style: none; display: inline">
|
|
<ul>
|
|
[%- FOREACH row IN arr -%]
|
|
<li><a href="[% row.identifier_url %]#[% row.index %]" target="_blank">Comment [% row.index %]</a>:
|
|
[% row.comment_author_name FILTER html_entity -%] on [% date.format(row.comment_timestamp_ut,'%Y-%m-%d','UTC') -%]:
|
|
[%- IF row.comment_title.length > 0 %]
|
|
"[% row.comment_title %]"
|
|
[%- ELSE -%]
|
|
"[no title]"
|
|
[%- END -%]
|
|
</li>
|
|
[%- END -%]
|
|
</ul><br/>
|
|
</li>
|
|
[%- END -%]
|
|
</ul>
|
|
[%- END %]
|
|
[%- ELSE %]
|
|
There were no comments this month.
|
|
[%- END %]
|
|
[%- END %]
|
|
|
|
[%# ---------------------------------------------------------------------------------------- -%]
|
|
[%- IF includefile.defined -%]
|
|
<h2>Mailing List discussions</h2>
|
|
<p>
|
|
Policy decisions surrounding HPR are taken by the community as a whole. This
|
|
discussion takes place on the <a href="http://hackerpublicradio.org/maillist"
|
|
target="_blank">Mail List</a> which is open to all HPR listeners and
|
|
contributors. The discussions are open and available on the HPR server under
|
|
<a href="http://hackerpublicradio.org/pipermail/hpr_hackerpublicradio.org/">Mailman</a>.
|
|
</p>
|
|
<p>The threaded discussions this month can be found here:</p>
|
|
[% INCLUDE $includefile -%]
|
|
[%- END %]
|
|
|
|
[%# ---------------------------------------------------------------------------------------- -%]
|
|
[%# Any other business? -%]
|
|
[% IF aob == 1 -%]
|
|
<h2>Any other business</h2>
|
|
[% INCLUDE $aobfile -%]
|
|
[%- END %]
|
|
[%#
|
|
# vim: syntax=tt2:ts=8:sw=4:ai:et:tw=78:fo=tcrqn21
|
|
-%]
|
|
|