| author | Production Moz <dev@sopinspace.com> |
| Sat, 19 May 2012 10:21:54 +0200 | |
| changeset 438 | fcc5e2f0befd |
| parent 160 | 0c01050f9717 |
| child 439 | 8994d24e4b2f |
| permissions | -rw-r--r-- |
| 0 | 1 |
{% extends "site/layout/base_text.html" %} |
2 |
{% load com %} |
|
3 |
{% load i18n %} |
|
4 |
{% load local_perms %} |
|
5 |
||
6 |
{% block title %} |
|
| 63 | 7 |
{% blocktrans %}Text followup{% endblocktrans %} |
| 0 | 8 |
{% endblock %} |
9 |
||
10 |
{% block main %} |
|
11 |
{% get_local_perm request can_manage_workspace as can_manage_workspace %} |
|
12 |
{% get_local_perm request can_view_unapproved_comment as can_view_unapproved_comment %} |
|
13 |
||
14 |
<script type="text/javascript"> |
|
15 |
<!-- |
|
| 63 | 16 |
tb_conf['current_tab'] = 'followup'; |
| 0 | 17 |
--> |
18 |
</script> |
|
19 |
||
| 63 | 20 |
<div id="followup_settings" class="tab-meta"> |
| 0 | 21 |
|
| 63 | 22 |
<h2 class="title_first">{% blocktrans %}Feeds{% endblocktrans %}</h2> |
| 0 | 23 |
|
24 |
<h3>{% blocktrans %}Public feed{% endblocktrans %}</h3> |
|
25 |
||
26 |
<div> |
|
27 |
<a href="{{SITE_URL}}{% url text-feed text.key %}" title="{% blocktrans with text.title as title %}Public feed for text {{ title }}{% endblocktrans %}"> |
|
| 160 | 28 |
<img style="vertical-align:middle;" src="{{ CM_MEDIA_PREFIX }}img/xml.gif" /> {{SITE_URL}}{% url text-feed text.key %} |
| 0 | 29 |
</a> |
30 |
</div> |
|
31 |
{% blocktrans %}This is the public feed for the text.{% endblocktrans %} |
|
32 |
||
| 80 | 33 |
{% if user.is_authenticated %} |
|
438
fcc5e2f0befd
Fix side effects with csrf token, add csrf_token to every post form + add ajax (see http://stackoverflow.com/questions/5100539/django-csrf-check-failing-with-an-ajax-post-request), remove django.middleware.csrf.CsrfViewMiddleware ?!
Production Moz <dev@sopinspace.com>
parents:
160
diff
changeset
|
34 |
<form id="notifications" enctype="multipart/form-data" action="." method="post">{% csrf_token %} |
| 80 | 35 |
|
| 0 | 36 |
{% if can_view_unapproved_comment %} |
37 |
<h3>{% blocktrans %}Private feed{% endblocktrans %}</h3> |
|
38 |
||
39 |
{% if text.private_feed_key %} |
|
40 |
<div> |
|
41 |
<a href="{{SITE_URL}}{% url text-private-feed text.key text.private_feed_key %}" title="{% blocktrans %}Private feed for text {% endblocktrans %}"> |
|
| 160 | 42 |
<img style="vertical-align:middle;" src="{{ CM_MEDIA_PREFIX }}img/xml.gif" /> {{SITE_URL}}{% url text-private-feed text.key text.private_feed_key %} |
| 0 | 43 |
</a> |
44 |
</div> |
|
45 |
{% blocktrans %}This is the private feed for the text. Don't share this address with others unless you want them to see all activities on this text.{% endblocktrans %} |
|
46 |
<br /> |
|
47 |
<input name="reset" type="submit" id="reset" value="{% blocktrans %}Reset private feed url{% endblocktrans %}"/> |
|
48 |
||
49 |
{% else %} |
|
50 |
<div> |
|
51 |
<input name="activate" type="submit" id="activate" value="{% blocktrans %}Activate private feed{% endblocktrans %}"/> |
|
52 |
</div> |
|
53 |
{% blocktrans %}The private feed for this text is not yet activated.{% endblocktrans %} |
|
54 |
{% endif %} |
|
55 |
||
56 |
{% endif %} |
|
57 |
||
58 |
<h2>{% blocktrans %}Email notifications{% endblocktrans %}</h2> |
|
| 12 | 59 |
<div> |
60 |
{% if workspace_notify_check %} |
|
61 |
{% blocktrans %}You will receive text notifications because you subscribed to notifications at the workspace level{% endblocktrans %} |
|
62 |
{% else %} |
|
63 |
<input type="checkbox" id="text_notify_check" class="check" {% if text_notify_check %}checked="checked"{% endif %}/> |
|
64 |
{% blocktrans %}Subscribe to all text notifications{% endblocktrans %} |
|
65 |
{% endif %} |
|
66 |
</div> |
|
| 0 | 67 |
<script type="text/javascript"> |
68 |
<!-- |
|
| 12 | 69 |
$(function() { |
70 |
$(".check").click(function(){ |
|
71 |
checked = $(this).attr('checked'); |
|
72 |
id = $(this).attr('id') ; |
|
73 |
post_data = {'notif_id': id} ; |
|
74 |
post_data[id] = checked ; |
|
75 |
$.post('.', post_data, function(data){}); |
|
76 |
}); |
|
77 |
|
|
78 |
}) ; |
|
| 80 | 79 |
--> |
80 |
</script> |
|
81 |
||
82 |
</form> |
|
83 |
{% endif %} |
|
| 0 | 84 |
|
85 |
</div> |
|
86 |
||
87 |
{% endblock %} |
|
88 |