src/cm/templates/site/text_embed.html
author Yves-Marie Haussonne <ymh.work+github@gmail.com>
Fri, 09 May 2014 18:35:26 +0200
changeset 656 a84519031134
parent 484 5a8e83132898
permissions -rw-r--r--
add link to "privacy policy" in the header test

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

{% block title %}
{% blocktrans %}Embed text{% 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 %}
{% get_local_text_perm request text can_manage_text as can_manage_text %}

<script type="text/javascript">
<!--
tb_conf['current_tab'] = 'embed';
$(document).ready(function(){
  $("#embed_txt").focus();
  $("#embed_txt").select();
});
-->
</script>

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

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

<h2 class="title_first">{% blocktrans %}Embed text{% endblocktrans %}</h2>
<p>{% 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 %}
(<a title="{% blocktrans %}Help{% endblocktrans %}" target="_blank" href="{% url help %}#embed">?</a>)</p>
<input id="embed_txt" class="copy_link" size="{{ embed_code|length}}" style="width:auto;background-color:#DDDDDD;" value="{{ embed_code }}" type="text" readonly="true"></input>

{% if not anonymous_can_view_text %}
{% if can_manage_text %}
<p><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></p>
{% endif %}
{% endif %}
</form>
</div>


{% endblock %}