Automated merge with ssh://openslides.org/openslides

This commit is contained in:
Emanuel Schuetze 2011-09-03 19:25:16 +02:00
commit 1bce678a03
7 changed files with 31 additions and 78 deletions

View File

@ -9,11 +9,10 @@ function presentation_reload() {
$('#content').html(data.content); $('#content').html(data.content);
document.title = data.title; document.title = data.title;
$('#currentTime').html(data.time); $('#currentTime').html(data.time);
setTimeout("presentation_reload()",500); setTimeout("presentation_reload()", 500);
}, },
error: function () { error: function () {
alert("Ajax Error"); $('#currentTime').addClass('ajax_error');
} }
}); });
} }

View File

@ -57,6 +57,10 @@ body{
background: url(../images/icons/clock.png) no-repeat scroll 0px 4px; background: url(../images/icons/clock.png) no-repeat scroll 0px 4px;
} }
#currentTime.ajax_error {
border-bottom: 4px solid red;
}
/*** CONTENT ***/ /*** CONTENT ***/
#content { #content {
position:absolute; position:absolute;

View File

@ -1,31 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load tags %} {% load tags %}
{% block mainmenu %}
<ul>
{% if perms.agenda.can_view_agenda or perms.agenda.can_manage_agenda %}
<li>
<a href="{% url item_overview %}" title="">{%trans "Agenda" %}</a></li>
{% endif %}
{% if perms.application.can_view_application or perms.application.can_insert_application or perms.application.can_support_application or perms.application.can_manage_application %}
<li>
<a href="{% url application_overview %}" title="">{%trans "Applications" %}</a></li>
{% endif %}
{% if perms.assignment.can_view_assignment or perms.assignment.can_nominate_other or perms.assignment.can_nominate_self or perms.assignment.can_manage_assignment %}
<li>
<a href="{% url assignment_overview %}" title="">{%trans "Elections" %}</a></li>
{% endif %}
{% if perms.participant.can_view_participants or perms.participant.can_manage_participants %}
<li>
<a href="{% url user_overview %}" title="">{%trans "Participants" %}</a></li>
{% endif %}
{% if perms.system.can_manage_system %}
<li>
<a href="{% url config_general %}" title="">{%trans "Configuration" %}</a></li>
{% endif %}
</ul>
{% endblock %}
{% block submenu %} {% block submenu %}
{% endblock %} {% endblock %}

View File

@ -1,30 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load tags %} {% load tags %}
{% block mainmenu %}
<ul>
{% if perms.agenda.can_view_agenda or perms.agenda.can_manage_agenda %}
<li>
<a href="{% url item_overview %}" title="">{%trans "Agenda" %}</a></li>
{% endif %}
{% if perms.application.can_view_application or perms.application.can_insert_application or perms.application.can_support_application or perms.application.can_manage_application %}
<li>
<a href="{% url application_overview %}" title="">{%trans "Applications" %}</a></li>
{% endif %}
{% if perms.assignment.can_view_assignment or perms.assignment.can_nominate_other or perms.assignment.can_nominate_self or perms.assignment.can_manage_assignment %}
<li>
<a href="{% url assignment_overview %}" title="">{%trans "Elections" %}</a></li>
{% endif %}
{% if perms.participant.can_view_participants or perms.participant.can_manage_participants %}
<li>
<a href="{% url user_overview %}" title="">{%trans "Participants" %}</a></li>
{% endif %}
{% if perms.system.can_manage_system %}
<li>
<a href="{% url config_general %}" title="">{%trans "Configuration" %}</a></li>
{% endif %}
</ul>
{% endblock %}
{% block submenu %} {% block submenu %}
{% endblock %} {% endblock %}

View File

@ -1,30 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load tags %} {% load tags %}
{% block mainmenu %}
<ul>
{% if perms.agenda.can_view_agenda or perms.agenda.can_manage_agenda %}
<li>
<a href="{% url item_overview %}" title="">{%trans "Agenda" %}</a></li>
{% endif %}
{% if perms.application.can_view_application or perms.application.can_insert_application or perms.application.can_support_application or perms.application.can_manage_application %}
<li>
<a href="{% url application_overview %}" title="">{%trans "Applications" %}</a></li>
{% endif %}
{% if perms.assignment.can_view_assignment or perms.assignment.can_nominate_other or perms.assignment.can_nominate_self or perms.assignment.can_manage_assignment %}
<li>
<a href="{% url assignment_overview %}" title="">{%trans "Elections" %}</a></li>
{% endif %}
{% if perms.participant.can_view_participants or perms.participant.can_manage_participants %}
<li>
<a href="{% url user_overview %}" title="">{%trans "Participants" %}</a></li>
{% endif %}
{% if perms.system.can_manage_system %}
<li>
<a href="{% url config_general %}" title="">{%trans "Configuration" %}</a></li>
{% endif %}
</ul>
{% endblock %}
{% block submenu %} {% block submenu %}
{% endblock %} {% endblock %}

View File

@ -15,6 +15,7 @@ from django.conf import settings
from django.contrib import admin from django.contrib import admin
admin.autodiscover() admin.autodiscover()
handler500 = 'openslides.utils.views.server_error'
urlpatterns = patterns('', urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)), (r'^admin/', include(admin.site.urls)),
@ -26,3 +27,8 @@ urlpatterns = patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_DOC_ROOT}), (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_DOC_ROOT}),
(r'^i18n/', include('django.conf.urls.i18n')), (r'^i18n/', include('django.conf.urls.i18n')),
) )
urlpatterns += patterns('',
(r'^500/$', 'openslides.utils.views.server_error'),
)

16
openslides/utils/views.py Normal file
View File

@ -0,0 +1,16 @@
from django.conf import settings
from django.http import HttpResponseServerError
from django.template import Context, loader, RequestContext
from django.template.loader import render_to_string
def server_error(request, template_name='500.html'):
"""
500 error handler.
Templates: `500.html`
Context:
MEDIA_URL
Path of static media (e.g. "media.example.org")
"""
t = loader.get_template("500.html") # You need to create a 500.html template.
return HttpResponseServerError(render_to_string('500.html', context_instance=RequestContext(request)))