Commit ff1ee559 by Kyle Fiedler

Merge

parents d5ce3076 7033359c
No preview for this file type
......@@ -14,6 +14,7 @@ ${ wiki_article.title }
${wiki_form}
<input type="submit" value="Edit article" /></td>
<input type="submit" name="edit" value="Edit article" />
<input type="submit" name="delete" value="Delete article" />
</form>
</%block>
......@@ -18,85 +18,66 @@ ${wiki_error}
%endif
%if wiki_err_notfound is not UNDEFINED:
%if wiki_url is not UNDEFINED:
<p>
The page you requested could not be found.
Click <a href="${reverse("wiki_create", args=[wiki_url])}">here</a> to create it.
</p>
%else:
<p>
Or maybe rather: Congratulations! It seems that there's no root
article, which is probably because you just installed simple-wiki
and your installation is working. Now you can create the root article.
Click <a href="{% url wiki_create "" %}">here</a> to create it.
</p>
%endif
%if wiki_url is not UNDEFINED:
<p>
The page you requested could not be found.
Click <a href="${reverse("wiki_create", args=[wiki_url])}">here</a> to create it.
</p>
%else:
<p>
Or maybe rather: Congratulations! It seems that there's no root
article, which is probably because you just installed simple-wiki
and your installation is working. Now you can create the root article.
Click <a href="{% url wiki_create "" %}">here</a> to create it.
</p>
%endif
%else:
%if wiki_err_noparent is not UNDEFINED:
<p>
You cannot create this page, because its parent
does not exist. Click <a href="${reverse("wiki_create", args=[wiki_url_parent])}">here</a>
to create it.
</p>
%else:
%if wiki_err_keyword is not UNDEFINED:
<p>
The page you're trying to create <b>${wiki_url}</b> starts with <b>_</b>, which is reserved for internal use.
</p>
<p>
You cannot create this page, because its parent
does not exist. Click <a href="${reverse("wiki_create", args=[wiki_url_parent])}">here</a>
to create it.
</p>
%else:
%if wiki_err_locked is not UNDEFINED:
<p>
The article you are trying to modify is locked.
</p>
%else:
%if wiki_err_noread is not UNDEFINED:
<p>
You do not have access to read this article.
</p>
%else:
%if wiki_err_nowrite is not UNDEFINED:
<p>
You do not have access to edit this article.
</p>
%else:
%if wiki_err_noanon is not UNDEFINED:
<p>
Anonymous attachments are not allowed. Try logging in.
</p>
%else:
%if wiki_err_create is not UNDEFINED:
<p>
You do not have access to create this article.
</p>
%if wiki_err_keyword is not UNDEFINED and wiki_err_keyword:
<p>
The page you're trying to create <b>${wiki_url}</b> starts with <b>_</b>, which is reserved for internal use.
</p>
%elif wiki_err_locked is not UNDEFINED and wiki_err_locked:
<p>
The article you are trying to modify is locked.
</p>
%elif wiki_err_noread is not UNDEFINED and wiki_err_noread:
<p>
You do not have access to read this article.
</p>
%elif wiki_err_nowrite is not UNDEFINED and wiki_err_nowrite:
<p>
You do not have access to edit this article.
</p>
%elif wiki_err_noanon is not UNDEFINED and wiki_err_noanon:
<p>
Anonymous attachments are not allowed. Try logging in.
</p>
%elif wiki_err_create is not UNDEFINED and wiki_err_create:
<p>
You do not have access to create this article.
</p>
%elif wiki_err_encode is not UNDEFINED and wiki_err_encode:
<p>
The url you requested could not be handled by the wiki.
Probably you used a bad character in the URL.
Only use digits, English letters, underscore and dash. For instance
/wiki/An_Article-1
</p>
%elif wiki_err_deleted is not UNDEFINED and wiki_err_deleted:
<p>
The article you tried to access has been deleted. You may be able to restore it to an earlier version in its <a href="${reverse("wiki_history", args=[wiki_article.get_url(),1])}">history</a>, or <a href="${reverse("wiki_edit", args=[wiki_article.get_url()])}">create a new version</a>.
</p>
%else:
%if wiki_err_encode is not UNDEFINED:
<p>
The url you requested could not be handled by the wiki.
Probably you used a bad character in the URL.
Only use digits, English letters, underscore and dash. For instance
/wiki/An_Article-1
</p>
%else:
<p>
An error has occured.
</p>
%endif
%endif
%endif
%endif
%endif
%endif
<p>
An error has occured.
</p>
%endif
%endif
%endif
......
......@@ -27,30 +27,32 @@ ${ wiki_article.title }
<tbody>
<% loopCount = 0 %>
%for revision in wiki_history:
<% loopCount += 1 %>
<tr style="border-top: 1px" ${'class="dark"' if (loopCount % 2) == 0 else ''}>
<td width="15px">
<input type="radio" name="revision" id="${revision.id}" value="${revision.id}"${"checked" if wiki_article.current_revision.id == revision.id else ""}/>
<label for="${revision.id}">
${ revision }
%if revision.previous_revision:
%if not revision.counter == revision.previous_revision.counter + 1:
<br/>(based on ${revision.previous_revision})
%endif
%endif
</label>
</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>
%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">
<input type="radio" name="revision" id="${revision.id}" value="${revision.id}"${"checked" if wiki_article.current_revision.id == revision.id else ""}/>
<label for="${revision.id}">
${ revision }
%if revision.previous_revision:
%if not revision.counter == revision.previous_revision.counter + 1:
<br/>(based on ${revision.previous_revision})
%endif
%endif
</label>
</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:
......@@ -68,10 +70,16 @@ ${ wiki_article.title }
</tfoot>
%endif
</table>
<input type="submit" value="Change revision"
<input type="submit" name="change" value="Change revision"
%if not wiki_write:
disabled="true"
%endif
/>
%if show_delete_revision:
<input type="submit" name="delete" value="Admin Delete revision"/>
<input type="submit" name="restore" value="Admin Restore revision"/>
<input type="submit" name="delete_all" value="Admin Delete all revisions">
<input type="submit" name="lock_article" value="${'Lock Article' if not wiki_article.locked else 'Unlock Article'}">
%endif
</form>
</%block>
......@@ -16,7 +16,8 @@
<%block name="wiki_body">
%for article in wiki_search_results:
<a href="${reverse("wiki_view", args=[article.get_url()])}">${article.get_url()}</a><br/>
<% article_deleted = not article.current_revision.deleted == 0 %>
<a href="${reverse("wiki_view", args=[article.get_url()])}">${article.get_url()} ${'(Deleted)' if article_deleted else ''}</a><br/>
%endfor
%if not wiki_search_results:
......
......@@ -3,7 +3,7 @@
<%inherit file="simplewiki_base.html"/>
<%block name="wiki_page_title">
${ wiki_article.title }
${ wiki_article.title } ${'<span style="color: red;">- Deleted Revision!</span>' if wiki_current_revision_deleted else ''}
</%block>
<%block name="wiki_body">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment