src/cm/templates/site/text_followup.html
author gibus
Thu, 28 Nov 2013 09:11:51 +0100
changeset 565 95a5c06c4008
parent 439 8994d24e4b2f
permissions -rw-r--r--
With JQuery > 1.6 replace .attr() by .prop() or .val(), see http://api.jquery.com/prop/
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     1
{% extends "site/layout/base_text.html" %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     2
{% load com %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     3
{% load i18n %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     4
{% load local_perms %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     5
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     6
{% block title %}
63
0a610af4033f split followup and embed
raph
parents: 12
diff changeset
     7
{% blocktrans %}Text followup{% endblocktrans %}
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     8
{% endblock %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     9
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    10
{% block main %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    11
{% get_local_perm request can_manage_workspace as can_manage_workspace %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    12
{% get_local_perm request can_view_unapproved_comment as can_view_unapproved_comment %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    13
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    14
<script type="text/javascript">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    15
<!--
63
0a610af4033f split followup and embed
raph
parents: 12
diff changeset
    16
tb_conf['current_tab'] = 'followup';
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    17
-->
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    18
</script>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    19
63
0a610af4033f split followup and embed
raph
parents: 12
diff changeset
    20
<div id="followup_settings" class="tab-meta">   
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    21
63
0a610af4033f split followup and embed
raph
parents: 12
diff changeset
    22
<h2 class="title_first">{% blocktrans %}Feeds{% endblocktrans %}</h2>
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    23
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    24
<h3>{% blocktrans %}Public feed{% endblocktrans %}</h3>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    25
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    26
<div>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    27
<a href="{{SITE_URL}}{% url text-feed text.key  %}" title="{% blocktrans with text.title as title %}Public feed for text {{ title }}{% endblocktrans %}">
160
0c01050f9717 add logo in settings / fix static file settings
raph
parents: 80
diff changeset
    28
	<img style="vertical-align:middle;" src="{{ CM_MEDIA_PREFIX }}img/xml.gif" /> {{SITE_URL}}{% url text-feed text.key  %} 
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    29
</a>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    30
</div>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    31
{% blocktrans %}This is the public feed for the text.{% endblocktrans %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    32
80
23294913284b workspace followup available to anon user
raph
parents: 63
diff changeset
    33
{% if user.is_authenticated %}
439
8994d24e4b2f Reverts to changeset 435, and just add {% csrf_token %} to template forgot_pw.html, since CSRF protection seems to be only here (surely because of django.contrib.auth.views).
gibus
parents: 438
diff changeset
    34
<form id="notifications" enctype="multipart/form-data" action="." method="post">
80
23294913284b workspace followup available to anon user
raph
parents: 63
diff changeset
    35
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    36
{% if can_view_unapproved_comment %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    37
<h3>{% blocktrans %}Private feed{% endblocktrans %}</h3>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    38
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    39
{% if text.private_feed_key %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    40
<div>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    41
<a href="{{SITE_URL}}{% url text-private-feed text.key text.private_feed_key %}" title="{% blocktrans %}Private feed for text {% endblocktrans %}">
160
0c01050f9717 add logo in settings / fix static file settings
raph
parents: 80
diff changeset
    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
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    43
</a>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    44
</div>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    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 %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    46
<br />
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    47
<input name="reset" type="submit" id="reset" value="{% blocktrans %}Reset private feed url{% endblocktrans %}"/>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    48
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    49
{% else %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    50
<div>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    51
<input name="activate" type="submit" id="activate" value="{% blocktrans %}Activate private feed{% endblocktrans %}"/>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    52
</div>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    53
{% blocktrans %}The private feed for this text is not yet activated.{% endblocktrans %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    54
{% endif %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    55
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    56
{% endif %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    57
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    58
<h2>{% blocktrans %}Email notifications{% endblocktrans %}</h2>
12
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    59
    <div>
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    60
    {% if workspace_notify_check %}
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    61
        {% blocktrans %}You will receive text notifications because you subscribed to notifications at the workspace level{% endblocktrans %}
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    62
    {% else %}
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    63
		<input type="checkbox" id="text_notify_check" class="check" {% if text_notify_check %}checked="checked"{% endif %}/>&nbsp;
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    64
	    {% blocktrans %}Subscribe to all text notifications{% endblocktrans %}
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    65
    {% endif %}
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    66
	</div>
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    67
	<script type="text/javascript">                
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    68
	<!--
12
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    69
    $(function() {
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    70
        $(".check").click(function(){
565
95a5c06c4008 With JQuery > 1.6 replace .attr() by .prop() or .val(), see http://api.jquery.com/prop/
gibus
parents: 439
diff changeset
    71
            checked = $(this).prop('checked');
12
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    72
            id = $(this).attr('id') ;
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    73
            post_data = {'notif_id': id} ;
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    74
            post_data[id] = checked ; 
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    75
            $.post('.', post_data, function(data){});
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    76
        });
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    77
        
f69ff46d3240 various notification changes
reno
parents: 3
diff changeset
    78
    }) ;
80
23294913284b workspace followup available to anon user
raph
parents: 63
diff changeset
    79
	--> 
23294913284b workspace followup available to anon user
raph
parents: 63
diff changeset
    80
	</script>
23294913284b workspace followup available to anon user
raph
parents: 63
diff changeset
    81
23294913284b workspace followup available to anon user
raph
parents: 63
diff changeset
    82
</form>
23294913284b workspace followup available to anon user
raph
parents: 63
diff changeset
    83
{% endif %}
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    84
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    85
</div>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    86
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    87
{% endblock %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    88