Permalink
Browse files

Tweak the namespace

  • Loading branch information...
1 parent 94f62bb commit 438ab62780e4dfa43cbe8c389bd2044abb700043 @TrevorFSmith committed Jan 29, 2011
Showing with 12 additions and 4 deletions.
  1. +12 −4 peach/templates/peach/wiki_render.frag
@@ -9,6 +9,15 @@ $(document).ready(function() {
document.location.href = "{% url peach.mobile_views.wiki_edit page.namespace.name page.name %}";
});
{% else %}
+ $('button[name="edit-button"]').click(function(){
+ document.location.href = "{% url peach.views.wiki_edit page.namespace.name page.name %}";
+ });
+ $('button[name="print-button"]').click(function(){
+ document.location.href = "{% url peach.views.wiki_print page.namespace.name page.name %}";
+ });
+ $('button[name="history-button"]').click(function(){
+ document.location.href = "{% url peach.views.wiki_history page.namespace.name page.name %}";
+ });
{% endif %}
});
</script>
@@ -17,11 +26,10 @@ $(document).ready(function() {
{% if request.user.is_authenticated and page.namespace.owner.username == request.user.username %}
<div class="wiki-control-links">
{% if not is_mobile %}
- <button name="history-button" href="{% url peach.views.wiki_history page.namespace.name page.name %}">history</button>
- <button name="print-button" href="{% url peach.views.wiki_print page.namespace.name page.name %}">print</button>
- {% else %}
- <button name="edit-button" class="positive" href="">edit</button>
+ <button name="history-button">history</button>
+ <button name="print-button">print</button>
{% endif %}
+ <button name="edit-button" class="positive">edit</button>
</div>
{% endif %}

0 comments on commit 438ab62

Please sign in to comment.