Add message on top of the chat

master
Alice 8 years ago
parent eec081bdb8
commit 31ed3157d1

@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-09 20:17+0000\n" "POT-Creation-Date: 2017-04-01 15:20+0000\n"
"PO-Revision-Date: 2016-04-07 01:32+0000\n" "PO-Revision-Date: 2016-04-07 01:32+0000\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -449,6 +449,17 @@ msgstr ""
msgid "Unknown content" msgid "Unknown content"
msgstr "" msgstr ""
#: templates/ccvpn/chat.html:9
#, python-format
msgid ""
"We're not able to chat all the time for now. If we don't reply, please <a "
"href=\"%(new_ticket)s\">open a support ticket</a> and we will get back to "
"you as soon as possible!"
msgstr ""
"Nous ne pouvons pas encore être disponibles tout le temps. Si vous ne recevez "
"pas de réponse, merci de <a href=\"%(new_ticket)s\">créer un ticket</a> et nous "
"vous répondrons dès que possible."
#: templates/ccvpn/index.html:6 #: templates/ccvpn/index.html:6
msgid "CCrypto VPN is a cheap, fast, anonymous and secure VPN service" msgid "CCrypto VPN is a cheap, fast, anonymous and secure VPN service"
msgstr "" msgstr ""
@ -1246,4 +1257,3 @@ msgstr "Peut envoyer des messages privés"
#: tickets/models.py:56 #: tickets/models.py:56
msgid "Waiting for staff" msgid "Waiting for staff"
msgstr "En attente du support" msgstr "En attente du support"

@ -715,6 +715,11 @@ div.ticket-message-private {
/***************************************************/ /***************************************************/
/********************* Live chat */ /********************* Live chat */
#livechat-info {
border-bottom: 1px solid black;
text-align: center;
}
.livechat-thing { .livechat-thing {
position: fixed; position: fixed;
bottom: 0; bottom: 0;

@ -2,7 +2,18 @@
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load staticfiles %}
{% block wrap %} {% block wrap %}
{% url 'tickets:new' as new_ticket %}
<div id="livechat-info">
<p>{% blocktrans trimmed with new_ticket as new_ticket %}
We're not able to chat all the time for now.
If we don't reply, please <a href="{{new_ticket}}">open a support ticket</a>
and we will get back to you as soon as possible!
{% endblocktrans %}
</p>
</div>
<iframe id="livechat-iframe" src="https://vpn.ccrypto.org/kiwi/?nick={{username}}&theme=ccrelaxed#ccrypto"></iframe> <iframe id="livechat-iframe" src="https://vpn.ccrypto.org/kiwi/?nick={{username}}&theme=ccrelaxed#ccrypto"></iframe>
<script type="text/javascript"> <script type="text/javascript">
@ -12,6 +23,7 @@
- document.getElementById("topbar").offsetHeight - document.getElementById("topbar").offsetHeight
- document.getElementById("header").offsetHeight - document.getElementById("header").offsetHeight
- document.getElementById("footer").offsetHeight - document.getElementById("footer").offsetHeight
- document.getElementById("livechat-info").offsetHeight
- 10); - 10);
console.log(h); console.log(h);
document.getElementById("livechat-iframe").style.height = h + "px"; document.getElementById("livechat-iframe").style.height = h + "px";

Loading…
Cancel
Save