Add support chat settings

master
Alice 6 years ago
parent 24b8e588c1
commit 180a078a0d

@ -10,5 +10,6 @@ def some_settings(request):
'CLIENT_ON_VPN': is_vpn_gateway(client_ip), 'CLIENT_ON_VPN': is_vpn_gateway(client_ip),
'ROOT_URL': settings.ROOT_URL, 'ROOT_URL': settings.ROOT_URL,
'ADDITIONAL_HTML': settings.ADDITIONAL_HTML, 'ADDITIONAL_HTML': settings.ADDITIONAL_HTML,
'SUPPORT_HTML': settings.SUPPORT_HTML,
'ADDITIONAL_HEADER_HTML': settings.ADDITIONAL_HEADER_HTML, 'ADDITIONAL_HEADER_HTML': settings.ADDITIONAL_HEADER_HTML,
} }

@ -173,6 +173,9 @@ ADDITIONAL_HEADER_HTML = ''
# HTML added before </body> # HTML added before </body>
ADDITIONAL_HTML = '' ADDITIONAL_HTML = ''
# Will replace the default contact us thing when not empty
SUPPORT_HTML = ''
# Custom per cluster message displayed config page # Custom per cluster message displayed config page
# 'cluster_name': "No P2P" # 'cluster_name': "No P2P"
LAMBDAINST_CLUSTER_MESSAGES = {} LAMBDAINST_CLUSTER_MESSAGES = {}

@ -94,16 +94,22 @@
</p> </p>
</footer> </footer>
{{ADDITIONAL_HTML | safe}}
{% block livechat_thing %} {% block livechat_thing %}
<div class="livechat-thing"> {% if not request.user.is_staff %}
<a href="/chat"> {% if SUPPORT_HTML %}
<span class="icon"></span> {{SUPPORT_HTML | safe}}
{% blocktrans %}Any question? <b>Chat with us</b>{% endblocktrans %} {% else %}
</a> <div class="livechat-thing">
</div> <a href="/chat">
<span class="icon"></span>
{% blocktrans %}Any question? <b>Chat with us</b>{% endblocktrans %}
</a>
</div>
{% endif %}
{% endif %}
{% endblock %} {% endblock %}
{{ADDITIONAL_HTML | safe}}
</body> </body>
</html> </html>

Loading…
Cancel
Save