Commit 1ccedc0f authored by dario's avatar dario

web/{views,templates}: avoid you_are_external meta field

this avoids storing the connection-local data in the global database; or
copying the metadata objects around to avoid the former

references #101
parent 9534f793
{% macro single_entry(entry, edit) %}
<li style="margin-right: 20px;">
{% if entry.you_are_external %}
{% if entry.metadata.get('internal_net_only', False) and not is_internal %}
<!-- TODO: onmouseover disallow-cursor -->
<a>
{% elif entry.comment %}
......@@ -11,7 +11,7 @@
{{ caller() }}
{% if edit == False %}
(<a style="display:inline; border: none;" href="{{entry|univislink|escape}}"><img src="https://univis.uni-erlangen.de/img/anew/univis_96_20.gif" alt="UnivIS" style="height: .8em;" /></a>)
{% if entry.you_are_external %}
{% if entry.internal_net_only and not is_internal %}
<span class="state">[nur intern]</span>
{% endif %}
{% else %}
......
......@@ -84,10 +84,6 @@ def overview(request, edit):
if not searchHit:
continue
if entry.metadata.get('internal_net_only', False) and not \
is_internal:
entry["you_are_external"] = True
key = entry[entryAttribute]
if "semester" == entryAttribute:
key = "%s%02d" % (key[1], key[0])
......@@ -117,6 +113,7 @@ def overview(request, edit):
return render_template('list.xml', pageEntries=pageEntries,
args=request.args, latest=latest,
moddir = config.modurl,
is_internal = is_internal,
theme = local.theme)
@expose('/')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment