It looks like you're offline.
Open Library logo
additional options menu

Recent Changes

This doc was last edited by Anand Chitipothu December 10, 2009.

plugin upstream
Templates in the website are disabled now. Editing them will not have any effect on the live website.
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
$def with (author=None, type=None, limit=50)

$ _ = i18n.get_namespace('/macros/RecentChanges')

$ page = safeint(query_param('page', '0'))
$ ip = query_param('ip', None)

$ bot = query_param('bot') or None
$ bot = bot and bot.lower() == 'true'

$ changes = get_recent_changes(author=author, type=type, ip=ip, bot=bot, limit=limit, offset=page * limit)

$ show_users = (query_param('show_users', 'false').lower() == 'true')

<!--islist-->

<div id="bibliography">
    <div id="browse-rule"></div>
    <div id="biblio-form-body">

        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td class="historyheader">$_.when</td>
                <td class="historyheader">$_.path</td>
                <td class="historyheader">$_.who</td>
                <td class="historyheader" width="100%">$_.what</td>
                <td class="historyheader">$_.actions</td>
            </tr>

            $for v in changes:
                $# ignore user registrations
                $if show_users or not v.key.startswith('/user/'):
                    <tr>
                    <td class="time" valign="top">$datestr(v.created)</td>
                    $# show book title/author name instead of key
                    $if v.thing.type.key == '/type/edition':
                        $ name = v.thing.title
                    $elif v.thing.type.key == '/type/author':
                        $ name = v.thing.name
                    $else:
                        $ name = v.key
                    <td class="path" valign="top"><div class="truncatepath"><a href="$homepath()$v.key" class="datalink" title="$v.key">$:macros.TruncateString(name, 35)</a></div></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" valign="top">$v.comment</td>
                    <td class="buttons" valign="top">
                        <a href="$homepath()$v.key?m=view&v=$v.revision">$_.view</a> -
                        <a href="$homepath()$v.key?m=edit&v=$v.revision">$_.edit</a> - 
                        <a href="$homepath()$v.key?m=diff&b=$v.revision">$_.diff</a>
                    </td>
                    </tr>
        </table>
    </div>
</div>

<div class="copyright-footer">
$if page != 0:
    &larr; <a href="$:changequery(page=page - 1)" class="datalink" rel="nofollow">$_.newer</a>
    
$if len(changes) == limit:
    ... <a href="$:changequery(page=page + 1)" class="datalink" rel="nofollow">$_.older</a> &rarr;
</div>