Settings for server; added version, and refined user page
svn: r18308
This commit is contained in:
parent
f7afdc9f6e
commit
df4f26e117
@ -61,7 +61,7 @@
|
|||||||
<div id="footer">
|
<div id="footer">
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
<p id="createdate">
|
<p id="createdate">
|
||||||
Gramps Connect, tools for genealogy collaborations
|
Gramps Connect, version {{gramps_version}}.
|
||||||
</p>
|
</p>
|
||||||
<p id="copyright">© 2009-2011 <a href="http://www.gramps-project.org/">www.gramps-project.org</a>
|
<p id="copyright">© 2009-2011 <a href="http://www.gramps-project.org/">www.gramps-project.org</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -8,12 +8,30 @@
|
|||||||
<p id="description">Details for <b>{{user.first_name}} {{user.last_name}}</b> ({{user.username}}):</p>
|
<p id="description">Details for <b>{{user.first_name}} {{user.last_name}}</b> ({{user.username}}):</p>
|
||||||
|
|
||||||
<p id="description">
|
<p id="description">
|
||||||
<ul>
|
<table>
|
||||||
<li>User name: <b>{{user.username}}</b></li>
|
<tr>
|
||||||
<li>Email: <b><a href="mailto:{{user.email}}">{{user.email}}></a></b></li>
|
<td width="30%">User name: </td><td><em>{{user.username}}</em></td>
|
||||||
<li>Superuser?: <b>{{user.is_superuser}}</b></li>
|
</tr>
|
||||||
<li>Last login: <b>{{user.last_login}}</b></li>
|
<tr>
|
||||||
</ul>
|
<td>Email: </td><td><a href="mailto:{{user.email}}"><em>{{user.email}}</a></em></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Type: </td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
{% if user.is_superuser %}
|
||||||
|
<em>Administrator</em>
|
||||||
|
{% else %}
|
||||||
|
<em>User</em>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Last login: </td><td><em>{{user.last_login}}</em></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -63,6 +63,19 @@ VIEWS = [(_('People'), 'person', Name),
|
|||||||
(_('Tags'), 'tag', Tag),
|
(_('Tags'), 'tag', Tag),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def get_version():
|
||||||
|
#Makefile:VERSIONSTRING = 3.4.0-0.SVN18300
|
||||||
|
version = "trunk.SVN"
|
||||||
|
try:
|
||||||
|
fp = file("/usr/local/wsgi/trunk//Makefile")
|
||||||
|
except:
|
||||||
|
return version
|
||||||
|
for line in fp:
|
||||||
|
if line.startswith("VERSIONSTRING"):
|
||||||
|
junk, version = [item.strip() for item in line.split("=", 1)]
|
||||||
|
break
|
||||||
|
return version
|
||||||
|
|
||||||
def context_processor(request):
|
def context_processor(request):
|
||||||
"""
|
"""
|
||||||
This function is executed before template processing.
|
This function is executed before template processing.
|
||||||
@ -75,6 +88,7 @@ def context_processor(request):
|
|||||||
else:
|
else:
|
||||||
context["css_theme"] = "Web_Mainz.css"
|
context["css_theme"] = "Web_Mainz.css"
|
||||||
# Other things for all environments:
|
# Other things for all environments:
|
||||||
|
context["gramps_version"] = get_version()
|
||||||
context["views"] = VIEWS
|
context["views"] = VIEWS
|
||||||
context["True"] = True
|
context["True"] = True
|
||||||
context["False"] = False
|
context["False"] = False
|
||||||
|
Loading…
Reference in New Issue
Block a user