/templates/history.tmpl
Type: /type/template
body: value: $def with (page, h)

$ _ = i18n.get_namespace('/mode/history')

$ __x = ctx.setdefault("robots", "noindex,nofollow,noarchive")

$var title: $page.name

$:macros.databar(page)

<div id="header">
    <div style="float:left;padding-left:10px;padding-right:15px;"></div>
    <span class="pretitle">$_.viewing_history<br /></span>
    <div id="title">$page.key</div>
</div>

<div id="bibliography">
    <div id="browse-rule"></div>
    <div id="biblio-form-body">

        <form>
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td class="numberhead" colspan="3">$_.number</td>
                <td class="historyheader"></td>
                <td class="historyheader">$_.who</td>
                <td class="historyheader">$_.what</td>
                <td class="historyheader">$_.when</td>
            </tr>
            <tr>
            $for v in h:
                <tr>
                    <td class="number">$v.revision</td>
                    <td class="compare"><input type="radio" id="a$v.revision" name="a" value="$v.revision" selected=></td>
                    <td class="compare"><input type="radio" id="b$v.revision" name="b" value="$v.revision"></td>
                    <td class="history"><a href="$changequery(m='edit', v=v.revision)" rel="nofollow">$_.edit</a></td>
                    $if v.author:
                        <td class="displayname" valign="top"><div class="truncatedisplayname"><a href="$homepath()$v.author.key" class="truncate" title="$v.author.displayname">$v.author.displayname</a></div></td>
                    $elif v.ip and v.ip != '127.0.0.1':
                        <td class="history" valign="top"><a href="/recentchanges?ip=$v.ip">$v.ip</a></td>
                    $else:
                        <td class="history" valign="top">$v.ip</td>
                    <td class="comment">$v.comment
					$if v.get('machine_comment'): (<a href="/show-marc/$v.machine_comment">view MARC</a>)
					</td>
                    <td class="history"><a href="$changequery(m=None, v=v.revision)" rel="nofollow">$datestr(v.created)</a></td>
                </tr>
        </table>
        <input type="hidden" name='m' value="diff">

        <br />
        <div class="button-border"><img src="/static/images/flourish.left.gif"  alt="[" /><button class="action" type="submit"  value="$_.compare"  name="_save" title="$_.compare">$_.compare</button><img src="/static/images/flourish.gif"  alt="]" /></div>
        <br /><br />

        </form>

        <script>
            var a = document.getElementById("a${page.revision - 1}");
            var a2 = document.getElementById("a$page.revision");
            var b = document.getElementById("b$page.revision");

            if (a) 
                a.checked = true;
            else
                a2.checked = true;
            b.checked = true;
        </script>
    </div>


<div class="copyright-footer">
$ page = safeint(query_param("page", "0"))
$if page != 0:
    &larr; <a href="$:changequery(page=page - 1)" rel="nofollow">$_.prev</a>

$if len(h) == 20:
    ... <a href="$:changequery(page=page + 1)" rel="nofollow">$_.next</a> &rarr;
<div>