src/cm/templates/site/text_notifications.html
author raph
Thu, 10 Dec 2009 14:27:12 +0100
changeset 38 be1807d390d4
parent 12 f69ff46d3240
permissions -rw-r--r--
- add tag support to user - add tag interface to user / text list

{% extends "site/layout/base_text.html" %}
{% load com %}
{% load i18n %}
{% load local_perms %}

{% block title %}
{% blocktrans %}Text notifications{% endblocktrans %}
{% endblock %}

{% block main %}
{% get_local_perm request can_manage_workspace as can_manage_workspace %}
{% get_local_perm request can_view_unapproved_comment as can_view_unapproved_comment %}

<script type="text/javascript">
<!--
tb_conf['current_tab'] = 'notifications';
-->
</script>

<div id="notifications_settings" class="tab-meta">   

<form id="notifications" enctype="multipart/form-data" action="." method="post">

<h2>{% blocktrans %}Feeds{% endblocktrans %}</h2>

<h3>{% blocktrans %}Public feed{% endblocktrans %}</h3>

<div>
<a href="{{SITE_URL}}{% url text-feed text.key  %}" title="{% blocktrans with text.title as title %}Public feed for text {{ title }}{% endblocktrans %}">
	<img style="vertical-align:middle;" src="{{ MEDIA_URL }}img/xml.gif" /> {{SITE_URL}}{% url text-feed text.key  %} 
</a>
</div>
{% blocktrans %}This is the public feed for the text.{% endblocktrans %}

{% if can_view_unapproved_comment %}
<h3>{% blocktrans %}Private feed{% endblocktrans %}</h3>

{% if text.private_feed_key %}
<div>
<a href="{{SITE_URL}}{% url text-private-feed text.key text.private_feed_key %}" title="{% blocktrans %}Private feed for text {% endblocktrans %}">
	<img style="vertical-align:middle;" src="{{ MEDIA_URL }}img/xml.gif" /> {{SITE_URL}}{% url text-private-feed text.key text.private_feed_key %} 
</a>
</div>
{% 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 %}
<br />
<input name="reset" type="submit" id="reset" value="{% blocktrans %}Reset private feed url{% endblocktrans %}"/>

{% else %}
<div>
<input name="activate" type="submit" id="activate" value="{% blocktrans %}Activate private feed{% endblocktrans %}"/>
</div>
{% blocktrans %}The private feed for this text is not yet activated.{% endblocktrans %}
{% endif %}

{% endif %}

<h2>{% blocktrans %}Email notifications{% endblocktrans %}</h2>
    <div>
    {% if workspace_notify_check %}
        {% blocktrans %}You will receive text notifications because you subscribed to notifications at the workspace level{% endblocktrans %}
    {% else %}
		<input type="checkbox" id="text_notify_check" class="check" {% if text_notify_check %}checked="checked"{% endif %}/>&nbsp;
	    {% blocktrans %}Subscribe to all text notifications{% endblocktrans %}
    {% endif %}
	</div>
	<script type="text/javascript">                
	<!--
    $(function() {
        $(".check").click(function(){
            checked = $(this).attr('checked');
            id = $(this).attr('id') ;
            post_data = {'notif_id': id} ;
            post_data[id] = checked ; 
            $.post('.', post_data, function(data){});
        });
        
    }) ;
--> 
</script>

<h2>{% blocktrans %}Embed text{% endblocktrans %}</h2>
{% 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 %}
(<a title="{% blocktrans %}Help{% endblocktrans %}" target="_blank" href="{% url help %}#embed">?</a>)
<br/>
<br/>
<input style="width:100%;background-color:#DDDDDD;" value="{{ embed_code }}" type="text" readonly="true"></input>
</textarea>
{% if not anonymous_can_view_text %}
<br/>
<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>
{% endif %}
</form>
</div>


{% endblock %}