src/cm/templates/site/text_embed.html
author gibus
Mon, 21 May 2012 16:50:42 +0200
changeset 439 8994d24e4b2f
parent 438 fcc5e2f0befd
child 476 35a632ed9109
permissions -rw-r--r--
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).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
63
0a610af4033f split followup and embed
raph
parents:
diff changeset
     1
{% extends "site/layout/base_text.html" %}
0a610af4033f split followup and embed
raph
parents:
diff changeset
     2
{% load com %}
0a610af4033f split followup and embed
raph
parents:
diff changeset
     3
{% load i18n %}
0a610af4033f split followup and embed
raph
parents:
diff changeset
     4
{% load local_perms %}
0a610af4033f split followup and embed
raph
parents:
diff changeset
     5
0a610af4033f split followup and embed
raph
parents:
diff changeset
     6
{% block title %}
0a610af4033f split followup and embed
raph
parents:
diff changeset
     7
{% blocktrans %}Text notifications{% endblocktrans %}
0a610af4033f split followup and embed
raph
parents:
diff changeset
     8
{% endblock %}
0a610af4033f split followup and embed
raph
parents:
diff changeset
     9
0a610af4033f split followup and embed
raph
parents:
diff changeset
    10
{% block main %}
0a610af4033f split followup and embed
raph
parents:
diff changeset
    11
{% get_local_perm request can_manage_workspace as can_manage_workspace %}
0a610af4033f split followup and embed
raph
parents:
diff changeset
    12
{% get_local_perm request can_view_unapproved_comment as can_view_unapproved_comment %}
126
b79d7ad83a8d embed for public texts
raph
parents: 63
diff changeset
    13
{% get_local_text_perm request text can_manage_text as can_manage_text %}
63
0a610af4033f split followup and embed
raph
parents:
diff changeset
    14
0a610af4033f split followup and embed
raph
parents:
diff changeset
    15
<script type="text/javascript">
0a610af4033f split followup and embed
raph
parents:
diff changeset
    16
<!--
0a610af4033f split followup and embed
raph
parents:
diff changeset
    17
tb_conf['current_tab'] = 'embed';
0a610af4033f split followup and embed
raph
parents:
diff changeset
    18
-->
0a610af4033f split followup and embed
raph
parents:
diff changeset
    19
</script>
0a610af4033f split followup and embed
raph
parents:
diff changeset
    20
0a610af4033f split followup and embed
raph
parents:
diff changeset
    21
<div id="text_embed" class="tab-meta">   
0a610af4033f split followup and embed
raph
parents:
diff changeset
    22
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
    23
<form id="embed" enctype="multipart/form-data" action="." method="post">
63
0a610af4033f split followup and embed
raph
parents:
diff changeset
    24
0a610af4033f split followup and embed
raph
parents:
diff changeset
    25
<h2 class="title_first">{% blocktrans %}Embed text{% endblocktrans %}</h2>
126
b79d7ad83a8d embed for public texts
raph
parents: 63
diff changeset
    26
{% blocktrans %}Copy this code into your site to display text with comments.{% endblocktrans %} {% blocktrans %}Users will also be able to add comments from your site depending on anonymous users' roles.{% endblocktrans %}
63
0a610af4033f split followup and embed
raph
parents:
diff changeset
    27
(<a title="{% blocktrans %}Help{% endblocktrans %}" target="_blank" href="{% url help %}#embed">?</a>)
0a610af4033f split followup and embed
raph
parents:
diff changeset
    28
<br/>
0a610af4033f split followup and embed
raph
parents:
diff changeset
    29
<br/>
0a610af4033f split followup and embed
raph
parents:
diff changeset
    30
<input style="width:100%;background-color:#DDDDDD;" value="{{ embed_code }}" type="text" readonly="true"></input>
0a610af4033f split followup and embed
raph
parents:
diff changeset
    31
</textarea>
126
b79d7ad83a8d embed for public texts
raph
parents: 63
diff changeset
    32
63
0a610af4033f split followup and embed
raph
parents:
diff changeset
    33
{% if not anonymous_can_view_text %}
126
b79d7ad83a8d embed for public texts
raph
parents: 63
diff changeset
    34
{% if can_manage_text %}
63
0a610af4033f split followup and embed
raph
parents:
diff changeset
    35
<br/>
0a610af4033f split followup and embed
raph
parents:
diff changeset
    36
<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>
0a610af4033f split followup and embed
raph
parents:
diff changeset
    37
{% endif %}
126
b79d7ad83a8d embed for public texts
raph
parents: 63
diff changeset
    38
{% endif %}
63
0a610af4033f split followup and embed
raph
parents:
diff changeset
    39
</form>
0a610af4033f split followup and embed
raph
parents:
diff changeset
    40
</div>
0a610af4033f split followup and embed
raph
parents:
diff changeset
    41
0a610af4033f split followup and embed
raph
parents:
diff changeset
    42
0a610af4033f split followup and embed
raph
parents:
diff changeset
    43
{% endblock %}
0a610af4033f split followup and embed
raph
parents:
diff changeset
    44