src/cm/templates/site/layout/header.html
author Simon Descarpentries <sid@sopinspace.com>
Mon, 21 Oct 2013 16:37:07 +0200
changeset 553 bf26fb47a14c
parent 460 2fdb7d095d5c
child 568 0a19e3214687
permissions -rw-r--r--
To allow scrolling in Safari mobile, we set the content of text_view_comments frame in a jQuery UI layout. So the automated scrolling operations in c_sync.js must be adjustable to the right part to scroll. Also, if a comment have to be shown outside of the current viewport, we scroll the correct part to that viewport and then set the comment top Y offset to juste what it needs to avoid the "Add comment" button after scrolling operation. If not in Safari mobile, we add an offset here to avoid comment to display under the "Add comment" button.

{% load i18n %}
{% load local_perms %}
{% get_local_perm request can_create_text as can_create_text %}

<div id="header_controls">

{% if user.is_authenticated %}<b>{{ user.username }}</b> ·{% endif %} 
   <a title="{% blocktrans %}Home{% endblocktrans %}" href="{% url index %}">{% blocktrans %}Home{% endblocktrans %}</a>
   {% if can_create_text %}    
 · <a title="{% blocktrans %}Create a text{% endblocktrans %}" href="{% url text-create-content %}">{% blocktrans %}Create a text{% endblocktrans %}</a>
 · <a title="{% blocktrans %}Upload a text{% endblocktrans %}" href="{% url text-create-upload %}">{% blocktrans %}Upload a text{% endblocktrans %}</a>
 · <a title="{% blocktrans %}Import a co-mented text{% endblocktrans %}" href="{% url text-create-import %}">{% blocktrans %}Import a co-mented text{% endblocktrans %}</a>
   {% endif %}
{% if user.is_authenticated %}
 · <a title="{% blocktrans %}Profile{% endblocktrans %}" href="{% url profile %}">{% blocktrans %}Profile{% endblocktrans %}</a>
 · <a title="{% blocktrans %}Logout{% endblocktrans %}" href="{% url logout %}">{% blocktrans %}Logout{% endblocktrans %}</a>
{% else%} 
 · <a title="{% blocktrans %}Login{% endblocktrans %}" href="{% url login %}">{% blocktrans %}Login{% endblocktrans %}</a>
{% if CONF.workspace_registration %} · <a title="{% blocktrans %}Register{% endblocktrans %}" href="{% url register %}">{% blocktrans %}Register{% endblocktrans %}</a>{% endif %}
{% endif %}
</div>