1 {% extends "site/layout/base_text.html" %} |
|
2 {% load com %} |
|
3 {% load i18n %} |
|
4 {% load local_perms %} |
|
5 |
|
6 {% block title %} |
|
7 {% blocktrans %}Text notifications{% endblocktrans %} |
|
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 <!-- |
|
16 tb_conf['current_tab'] = 'notifications'; |
|
17 --> |
|
18 </script> |
|
19 |
|
20 <div id="notifications_settings" class="tab-meta"> |
|
21 |
|
22 <form id="notifications" enctype="multipart/form-data" action="." method="post"> |
|
23 |
|
24 <h2>{% blocktrans %}Feeds{% endblocktrans %}</h2> |
|
25 |
|
26 <h3>{% blocktrans %}Public feed{% endblocktrans %}</h3> |
|
27 |
|
28 <div> |
|
29 <a href="{{SITE_URL}}{% url text-feed text.key %}" title="{% blocktrans with text.title as title %}Public feed for text {{ title }}{% endblocktrans %}"> |
|
30 <img style="vertical-align:middle;" src="{{ MEDIA_URL }}img/xml.gif" /> {{SITE_URL}}{% url text-feed text.key %} |
|
31 </a> |
|
32 </div> |
|
33 {% blocktrans %}This is the public feed for the text.{% endblocktrans %} |
|
34 |
|
35 {% if can_view_unapproved_comment %} |
|
36 <h3>{% blocktrans %}Private feed{% endblocktrans %}</h3> |
|
37 |
|
38 {% if text.private_feed_key %} |
|
39 <div> |
|
40 <a href="{{SITE_URL}}{% url text-private-feed text.key text.private_feed_key %}" title="{% blocktrans %}Private feed for text {% endblocktrans %}"> |
|
41 <img style="vertical-align:middle;" src="{{ MEDIA_URL }}img/xml.gif" /> {{SITE_URL}}{% url text-private-feed text.key text.private_feed_key %} |
|
42 </a> |
|
43 </div> |
|
44 {% 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 %} |
|
45 <br /> |
|
46 <input name="reset" type="submit" id="reset" value="{% blocktrans %}Reset private feed url{% endblocktrans %}"/> |
|
47 |
|
48 {% else %} |
|
49 <div> |
|
50 <input name="activate" type="submit" id="activate" value="{% blocktrans %}Activate private feed{% endblocktrans %}"/> |
|
51 </div> |
|
52 {% blocktrans %}The private feed for this text is not yet activated.{% endblocktrans %} |
|
53 {% endif %} |
|
54 |
|
55 {% endif %} |
|
56 |
|
57 <h2>{% blocktrans %}Email notifications{% endblocktrans %}</h2> |
|
58 <div> |
|
59 {% if workspace_notify_check %} |
|
60 {% blocktrans %}You will receive text notifications because you subscribed to notifications at the workspace level{% endblocktrans %} |
|
61 {% else %} |
|
62 <input type="checkbox" id="text_notify_check" class="check" {% if text_notify_check %}checked="checked"{% endif %}/> |
|
63 {% blocktrans %}Subscribe to all text notifications{% endblocktrans %} |
|
64 {% endif %} |
|
65 </div> |
|
66 <script type="text/javascript"> |
|
67 <!-- |
|
68 $(function() { |
|
69 $(".check").click(function(){ |
|
70 checked = $(this).attr('checked'); |
|
71 id = $(this).attr('id') ; |
|
72 post_data = {'notif_id': id} ; |
|
73 post_data[id] = checked ; |
|
74 $.post('.', post_data, function(data){}); |
|
75 }); |
|
76 |
|
77 }) ; |
|
78 --> |
|
79 </script> |
|
80 |
|
81 <h2>{% blocktrans %}Embed text{% endblocktrans %}</h2> |
|
82 {% blocktrans %}Copy this code into your site to display text with comments. Users will also be able to add comments from your site depending an anonymous users' roles.{% endblocktrans %} |
|
83 (<a title="{% blocktrans %}Help{% endblocktrans %}" target="_blank" href="{% url help %}#embed">?</a>) |
|
84 <br/> |
|
85 <br/> |
|
86 <input style="width:100%;background-color:#DDDDDD;" value="{{ embed_code }}" type="text" readonly="true"></input> |
|
87 </textarea> |
|
88 {% if not anonymous_can_view_text %} |
|
89 <br/> |
|
90 <span style="color:#F00;">{% blocktrans %}Warning:{% endblocktrans %}</span>{% blocktrans %}You won't successfully embed the text before you give anonymous users a role allowing them to view the text.{% endblocktrans %}</span> |
|
91 {% endif %} |
|
92 </form> |
|
93 </div> |
|
94 |
|
95 |
|
96 {% endblock %} |
|
97 |
|