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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     1
{% load i18n %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     2
{% load local_perms %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     3
{% get_local_perm request can_create_text as can_create_text %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     4
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     5
<div id="header_controls">
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     6
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     7
{% if user.is_authenticated %}<b>{{ user.username }}</b> ·{% endif %} 
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     8
   <a title="{% blocktrans %}Home{% endblocktrans %}" href="{% url index %}">{% blocktrans %}Home{% endblocktrans %}</a>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
     9
   {% if can_create_text %}    
237
48c4d74c5cd9 help update / i18n
raph
parents: 0
diff changeset
    10
 · <a title="{% blocktrans %}Create a text{% endblocktrans %}" href="{% url text-create-content %}">{% blocktrans %}Create a text{% endblocktrans %}</a>
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    11
 · <a title="{% blocktrans %}Upload a text{% endblocktrans %}" href="{% url text-create-upload %}">{% blocktrans %}Upload a text{% endblocktrans %}</a>
460
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents: 237
diff changeset
    12
 · <a title="{% blocktrans %}Import a co-mented text{% endblocktrans %}" href="{% url text-create-import %}">{% blocktrans %}Import a co-mented text{% endblocktrans %}</a>
0
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    13
   {% endif %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    14
{% if user.is_authenticated %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    15
 · <a title="{% blocktrans %}Profile{% endblocktrans %}" href="{% url profile %}">{% blocktrans %}Profile{% endblocktrans %}</a>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    16
 · <a title="{% blocktrans %}Logout{% endblocktrans %}" href="{% url logout %}">{% blocktrans %}Logout{% endblocktrans %}</a>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    17
{% else%} 
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    18
 · <a title="{% blocktrans %}Login{% endblocktrans %}" href="{% url login %}">{% blocktrans %}Login{% endblocktrans %}</a>
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    19
{% if CONF.workspace_registration %} · <a title="{% blocktrans %}Register{% endblocktrans %}" href="{% url register %}">{% blocktrans %}Register{% endblocktrans %}</a>{% endif %}
40c8f766c9b8 import from internal svn r 4007
raph
parents:
diff changeset
    20
{% endif %}
460
2fdb7d095d5c Added import from XML file, including text, comments and attachments.
gibus
parents: 237
diff changeset
    21
</div>