Skip to content

Commit

Permalink
[OS-1308] Update the cdd configuration menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
jcougnaud committed Dec 9, 2024
1 parent fff69c5 commit 71faf99
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
9 changes: 9 additions & 0 deletions locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ msgstr "All supervisory panel members must have approved the proposition."
msgid "All supervisors must have approved the proposition."
msgstr ""

msgid "Allow you to manage emails sent by CDD managers based on the CDD"
msgstr ""

msgid "Allow you to manage the doctoral training activities"
msgstr ""

msgid "Already a member."
msgstr "Already a member of the supervisory panel."

Expand Down Expand Up @@ -709,6 +715,9 @@ msgstr ""
msgid "Doctoral training"
msgstr ""

msgid "Doctoral training configuration"
msgstr ""

msgid "Doctoral training numero"
msgstr ""

Expand Down
9 changes: 9 additions & 0 deletions locale/fr_BE/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ msgstr ""
msgid "All supervisors must have approved the proposition."
msgstr "Tous les promoteurs doivent approuver la proposition."

msgid "Allow you to manage emails sent by CDD managers based on the CDD"
msgstr "Permet d’administrer par CDD les mails envoyés par les gestionnaires CDD"

msgid "Allow you to manage the doctoral training activities"
msgstr "Permet d’administrer les activités de formation doctorale"

msgid "Already a member."
msgstr "Déjà membre."

Expand Down Expand Up @@ -752,6 +758,9 @@ msgstr "Docteur"
msgid "Doctoral training"
msgstr "Formation doctorale"

msgid "Doctoral training configuration"
msgstr "Configuration formation doctorale"

msgid "Doctoral training numero"
msgstr "Numéro de la formation doctorale"

Expand Down
2 changes: 2 additions & 0 deletions roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#
# ##############################################################################
from osis_role import role
from rules import always_allow

from parcours_doctoral.auth.predicates.parcours_doctoral import (
complementary_training_enabled,
Expand All @@ -48,6 +49,7 @@

PROGRAM_MANAGER_RULES = {
# Doctorats
'parcours_doctoral.view_parcours_doctoral': always_allow,
# --- Confirmation
'parcours_doctoral.view_confirmation': is_part_of_education_group,
'parcours_doctoral.change_confirmation': is_part_of_education_group,
Expand Down
68 changes: 68 additions & 0 deletions templates/parcours_doctoral/configuration_menu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{% load i18n %}

{% comment "License" %}
* OSIS stands for Open Student Information System. It's an application
* designed to manage the core business of higher education institutions,
* such as universities, faculties, institutes and professional schools.
* The core business involves the administration of students, teachers,
* courses, programs and so on.
*
* Copyright (C) 2015-2024 Université catholique de Louvain (http://www.uclouvain.be)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* A copy of this license - GNU General Public License - is available
* at the root of the source code of this program. If not,
* see http://www.gnu.org/licenses/.
{% endcomment %}

{% if perms.parcours_doctoral.change_cddconfiguration or parcours_doctoral.change_cddmailtemplate %}
<li class="nav-item dropdown">
<a
href="#"
class="dropdown-toggle nav-link"
data-toggle="dropdown"
data-bs-toggle="dropdown"
role="button"
aria-haspopup="true"
aria-expanded="false"
id="lnk_home_dropdown_cdd_configuration"
>
<span class="hidden-md fa fa fa-tools" aria-hidden="true"></span>
<span class="hidden-sm">{% trans 'CDD configuration' %}</span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
{% if perms.parcours_doctoral.change_cddmailtemplate %}
<li class="dropdown-item">
<a
href="{% url 'parcours_doctoral:config:cdd-mail-template:list' %}"
title="{% translate 'Allow you to manage emails sent by CDD managers based on the CDD' %}"
>
<span class="fa fa-tools"></span>
{% translate 'CDD Mail template' %}
</a>
</li>
{% endif %}
{% if perms.parcours_doctoral.change_cddconfiguration %}
<li class="dropdown-item">
<a
href="{% url 'parcours_doctoral:config:cdd-config:list' %}"
title="{% translate 'Allow you to manage the doctoral training activities' %}"
>
<span class="fa fa-tools"></span>
{% translate 'Doctoral training configuration' %}
</a>
</li>
{% endif %}
</ul>
</li>
{% endif %}

0 comments on commit 71faf99

Please sign in to comment.