simplewiki_revision_feed.html 2.15 KB
Newer Older
1 2 3 4
##This file is based on the template from the SimpleWiki source which carries the GPL license

<%inherit file="simplewiki_base.html"/>

5
<%block name="title"><title>Wiki - Revision feed - MITx 6.002x</title></%block>
6 7

<%!
8
    from simplewiki.views import wiki_reverse
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
%>

<%block name="wiki_page_title">
<h1>Revision Feed - Page ${wiki_page}</h1>
</%block>

<%block name="wiki_body">
<table id="wiki_history_table" class="wiki-history">
    <thead>
        <tr>
            <th id="revision">Revision</th>
            <th id="comment">Comment</th>
            <th id="diff">Diff</th>
            <th id="modified">Modified</th>
        </tr>
    </thead>
    <tbody>
      <% loopCount = 0 %>
      %for revision in wiki_history:
      %if revision.deleted < 2 or show_delete_revision:
      <% loopCount += 1 %>
      <tr style="border-top: 1px" class="${'dark ' if (loopCount % 2) == 0 else ''}${'deleted ' if (revision.deleted==2) else ''}" >
        <td width="15px">
32
        <a href="${wiki_reverse('wiki_view_revision', revision.article, course, kwargs={'revision_number' : revision.counter})}"> ${revision.article.title} - ${revision}</a>
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
        </td>
        <td>
          ${ revision.revision_text if revision.revision_text else "<i>None</i>" }</td>
        <td class="diff">
          %for x in revision.get_diff():
          ${x|h}<br/>
          %endfor </td>
        <td>${revision.get_user()}
          <br/>
          ${revision.revision_date.strftime("%b %d, %Y, %I:%M %p")}
        </td>
      </tr>
      %endif
        %endfor
    </tbody>
    %if wiki_prev_page or wiki_next_page:
        <tfoot>
            <tr>
                <td colspan="4">
                    %if wiki_prev_page:
53
                        <a href="${wiki_reverse("wiki_revision_feed", course=course, namespace=namespace, kwargs={'page': wiki_prev_page})}">Previous page</a>
54 55
                    %endif
                    %if wiki_next_page:
56
                        <a href="${wiki_reverse("wiki_revision_feed", course=course, namespace=namespace, kwargs={'page': wiki_next_page})}">Next page</a>
57 58 59 60 61 62 63
                    %endif
                </td>
            </tr>
        </tfoot>
    %endif
</table>
</%block>