Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds error 404 and 403 pages to base-theme #10

Merged
merged 4 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
- Improvement: Updates 500 error page with js support form submission [#qubIT-Omnis-8481]
- Improvement: Adds 403 and 404 error pages [#qubIT-Omnis-8252]
- Improvement: Adds default userNotFound html [#qubIT-Omnis-8411]

2.12.2 (05-11-2024)
- Refactor: Replaces calls to helpdesk report controller with calls to default support request handler [#qubIT-Support-8445]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,22 @@ label.orLoginWith=Or login with

label.quality.mode=Quality Environment: All changes made will be lost on the next update
label.development.mode=Development Environment
label.database.last.tick=Data from:
label.database.last.tick=Data from:

label.error.backButtonCaption=Back to Homepage

#Error 403 labels
title.not.authorized = Unauthorized
error.not.authorized = You are not authorized to view this information.

#Error 404 labels
title.not.found = Resource Not Found
error.not.found = Resource not found
error.not.found.message = Please verify the URL and that you are allowed to view the selected content or try again later.

#Error 500 labels
label.error.occurred=An error occured
label.error.occurred.detail=An unexpected error occured. We're sorry for the inconvenience. Please try again later.
label.error.500.successSupportSubmition=Report sent successfully!
label.error.500.errorSupportSubmition=Report submition failed, please try again.
label.error.500.reportError=Send us the error
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
link.helpdeskReport = Apoio Fenix (Formul�rio)
label.helpdesk.form = Formul�rio de Suporte
label.helpdesk.form.welcome = Este formul�rio serve para contactar o suporte t�cnico do sistema. Utilize-o se detectou um erro, tem uma sugest�o/pedido ou uma d�vida de utiliza��o.
label.helpdesk.form.welcome = Este formul�rio serve para contactar o suporte t�cnico do sistema. Utilize-o se detectou um erro, tem uma sugest�o/pedido ou uma d�vida de utiliza��o.
label.helpdesk.report.subject = Assunto
label.helpdesk.report.description = Descri��o
label.helpdesk.report.description.tooltip = Seja o mais detalhado poss�vel na descri��o do problema. Se est� a reportar um erro indique os passos necess�rios para o reproduzir, o resultado esperado e o resultado ocorrido.
label.helpdesk.report.type = Tipo
label.helpdesk.report.type.error = Erro
label.helpdesk.report.type.request = Pedido
label.helpdesk.report.type.question = D�vida
label.helpdesk.report.type.question = D�vida
label.helpdesk.report.attachment = Anexo
label.helpdesk.report.attachment.file.too.large = O tamanho do anexo carregado excede o tamanho m�ximo (5MB)!
label.helpdesk.report.attachment.tooltip = De forma a ajudar a equipa de suporte a entender de forma mais precisa a situa��o reportada, anexe um ficheiro (com o m�ximo de 5 MB) que ilustre o problema identificado.
Expand Down Expand Up @@ -36,3 +36,21 @@ label.orLoginWith=Ou fazer login com
label.quality.mode=Ambiente de Qualidade: As altera��es realizadas ser�o perdidas na pr�xima actualiza��o
label.development.mode=Ambiente de Desenvolvimento
label.database.last.tick=Dados de:

label.error.backButtonCaption=Voltar � p�gina inicial

#Error 403 labels
title.not.authorized = N�o autorizado
error.not.authorized = N�o tem autoriza��o para visualizar esta informa��o.

#Error 404 labels
title.not.found = Recurso N�o Encontrado
error.not.found = O recurso que procura n�o foi encontrado
error.not.found.message = Por favor verifique que o URL est� correcto e que tem permiss�o para aceder ao conte�do, ou tente mais tarde.

#Error 500 labels
label.error.occurred=Ocorreu um erro
label.error.occurred.detail=Aconteceu um erro inesperado. Lamentos qualquer inconveniente causado. Por favor, tente mais tarde.
label.error.500.successSupportSubmition=Pedido submetido com sucesso!
label.error.500.errorSupportSubmition=Pedido n�o enviado, por favor tente novamente.
label.error.500.reportError=Envie-nos o erro
98 changes: 98 additions & 0 deletions base-theme/src/main/webapp/themes/ulisboa/403.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<!--

Copyright © 2002 Instituto Superior Técnico

This file is part of FenixEdu Academic.

FenixEdu Academic is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

FenixEdu Academic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with FenixEdu Academic. If not, see <http://www.gnu.org/licenses/>.

-->

<!DOCTYPE html>

<head>
<title>
{{i18n('resources.ULisboaThemeResources', 'title.not.authorized')}}
</title>
<link href="{{contextPath}}/bennu-core/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font: 16px 'Roboto', sans-serif;
font-weight:100;
color: #617383;
background-color: #F1F1F1;
}
.container {
margin: 60px auto 0 auto;
max-width: 700px;
background-color: white;
padding: 30px;
border-radius: 7px;
}
.content { margin-top: 25px; }
@media (max-width: 767px) {
.title > * {
text-align: center !important;
}
img {
padding-bottom: 5px;
}
}
.title {
border-bottom: 1px solid #eee;
font-size: 22px;
padding-bottom: 15px;
}
</style>
</head>

<body>
<div class="container">
<div class="title row">
<div class="col-sm-6 text-right col-sm-push-6">
{% if logoResource != null %}
<img src="{{contextPath}}/portalImage?resourceId={{ logoResource.externalId }}"/>
{% else %}
<img src="{{contextPath}}/api/bennu-portal/configuration/logo"/>
{% endif %}
</div>
<div class="col-sm-6 col-sm-pull-6">
{{i18n('resources.ULisboaThemeResources', 'title.not.authorized')}}
</div>
</div>
<div class="content">
<p>{{i18n('resources.ULisboaThemeResources', 'error.not.authorized')}}</p>
<br />
{% if currentUser is empty %}
<p><a id="goToLogin" href="{{fullLoginPath}}">Login</a></p>
<script>
var link = document.getElementById("goToLogin");
var href = link.href;
var callback = window.location.href;
if (callback != null) {
callback = callback.split("#")[0];
link.href= href + "?callback=" + callback;
}else {
link.href = href;
}

</script>
{% else %}
<p><a href="{% if contexPath is empty %}/{% else %}{{contextPath}}{% endif %}">{{i18n('resources.ULisboaThemeResources', 'label.error.backButtonCaption')}}</a></p>
{% endif %}
</div>
</div>
</body>
97 changes: 97 additions & 0 deletions base-theme/src/main/webapp/themes/ulisboa/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<!--

Copyright © 2002 Instituto Superior Técnico

This file is part of FenixEdu Academic.

FenixEdu Academic is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

FenixEdu Academic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with FenixEdu Academic. If not, see <http://www.gnu.org/licenses/>.

-->

<!DOCTYPE html>

<head>
<title>
{{i18n('resources.ULisboaThemeResources', 'title.not.found')}}
</title>
<link href="{{contextPath}}/bennu-core/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font: 16px 'Roboto', sans-serif;
font-weight:100;
color: #617383;
background-color: #F1F1F1;
}
.container {
margin: 60px auto 0 auto;
max-width: 700px;
background-color: white;
padding: 30px;
border-radius: 7px;
}
.content { margin-top: 25px; }
@media (max-width: 767px) {
.title > * {
text-align: center !important;
}
img {
padding-bottom: 5px;
}
}
.title {
border-bottom: 1px solid #eee;
font-size: 22px;
padding-bottom: 15px;
}
</style>
</head>

<body>
<div class="container">
<div class="title row">
<div class="col-sm-6 text-right col-sm-push-6">
{% if logoResource != null %}
<img src="{{contextPath}}/portalImage?resourceId={{ logoResource.externalId }}"/>
{% else %}
<img src="{{contextPath}}/api/bennu-portal/configuration/logo"/>
{% endif %}
</div>
<div class="col-sm-6 col-sm-pull-6">
{{i18n('resources.ULisboaThemeResources', 'error.not.found')}}
</div>
</div>
<div class="content">
<p>{{i18n('resources.ULisboaThemeResources', 'error.not.found.message')}}</p>
<br/>
{% if currentUser is empty %}
<p><a id="goToLogin" href="{{fullLoginPath}}">Login</a></p>
<script>
var link = document.getElementById("goToLogin");
var href = link.href;
var callback = window.location.href;
if (callback != null) {
callback = callback.split("#")[0];
link.href= href + "?callback=" + callback;
}else {
link.href = href;
}
</script>
{% else %}
<p><a href="{% if contexPath is empty %}/{% else %}{{contextPath}}{% endif %}">{{i18n('resources.ULisboaThemeResources', 'label.error.backButtonCaption')}}</a></p>
{% endif %}
</div>
</div>
</body>
Loading