mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-27 20:10:06 +00:00
Changed error page to display logout route in case of unconfigured
This commit is contained in:
parent
b0f48b7f00
commit
1b7e422772
@ -35,6 +35,7 @@ def error_http(error):
|
||||
error_code="Error {0}".format(error.code),
|
||||
error_name=error.name,
|
||||
issue=False,
|
||||
unconfigured=not config.db_configured,
|
||||
instance=config.config_calibre_web_title
|
||||
), error.code
|
||||
|
||||
@ -44,6 +45,7 @@ def internal_error(error):
|
||||
error_code="Internal Server Error",
|
||||
error_name=str(error),
|
||||
issue=True,
|
||||
unconfigured=False,
|
||||
error_stack=traceback.format_exc().split("\n"),
|
||||
instance=config.config_calibre_web_title
|
||||
), 500
|
||||
|
@ -27,6 +27,9 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-offset-4 text-left">
|
||||
{% if unconfigured %}
|
||||
<div>{{_('Calibre-Web Instance is unconfigured, please contact your administrator')}}</div>
|
||||
{% endif %}
|
||||
{% for element in error_stack %}
|
||||
<div>{{ element }}</div>
|
||||
{% endfor %}
|
||||
@ -39,13 +42,15 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col errorlink">
|
||||
<div class="row">
|
||||
<div class="col errorlink">
|
||||
{% if not unconfigured %}
|
||||
<a href="{{url_for('web.index')}}" title="{{ _('Return to Home') }}">{{_('Return to Home')}}</a>
|
||||
{% else %}
|
||||
<a href="{{url_for('web.logout')}}" title="{{ _('Logout User') }}">{{ _('Logout User') }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user