|
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 |
|
59 <input type="checkbox" id="all_check" class="check" name="all-check" {% if all_check %}checked="checked"{% endif %}/> |
|
60 {% blocktrans %}Subscribe to all text notifications{% endblocktrans %} |
|
61 |
|
62 <script type="text/javascript"> |
|
63 <!-- |
|
64 $(function() { |
|
65 $(".check").click(function(){ |
|
66 var all_check = $("#all_check").attr('checked'); |
|
67 $.post('.',{'all_check':all_check},function(data){/* window.location = window.location;*/}); |
|
68 }); |
|
69 }) ; |
|
70 --> |
|
71 </script> |
|
72 |
|
73 <h2>{% blocktrans %}Embed the text{% endblocktrans %}</h2> |
|
74 (<a title="{% blocktrans %}Help{% endblocktrans %}" target="_blank" href="{% url help %}#embed">?</a>) |
|
75 <br /> |
|
76 {% 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 %} |
|
77 <br/> |
|
78 <br/> |
|
79 <textarea rows="4" cols="80" readonly="true"> |
|
80 <iframe frameborder="0" src="{{ SITE_URL }}{% url text-view-comments-frame text.key %}" style="height: 166px; width: 99.9%; position: relative; top: 0px;"> |
|
81 </iframe> |
|
82 </textarea> |
|
83 {% if not anonymous_can_view_text %} |
|
84 <br/> |
|
85 {% url text-share text.key as text_users_link %} |
|
86 <span style="color:#F00;">{% blocktrans %}Warning:{% endblocktrans %}</span>{% blocktrans %}You won't be able to successfully embed the text before you <a href='{{ text_users_link }}'>give anonymous users</a> a role allowing them to view the text{% endblocktrans %}</span> |
|
87 {% endif %} |
|
88 </form> |
|
89 </div> |
|
90 |
|
91 |
|
92 {% endblock %} |
|
93 |