forked from ScoDoc/ScoDoc
Editeur partition: pas d'affichage config EDT si EDT non configuré
This commit is contained in:
parent
2b9b459106
commit
d3b1aaabd8
@ -50,6 +50,11 @@ def get_ics_filename(edt_id: str) -> str | None:
|
|||||||
return edt_ics_path.format(edt_id=edt_id)
|
return edt_ics_path.format(edt_id=edt_id)
|
||||||
|
|
||||||
|
|
||||||
|
def is_edt_configured() -> bool:
|
||||||
|
"True si accès EDT configuré"
|
||||||
|
return bool(ScoDocSiteConfig.get("edt_ics_path"))
|
||||||
|
|
||||||
|
|
||||||
def formsemestre_load_calendar(
|
def formsemestre_load_calendar(
|
||||||
formsemestre: FormSemestre = None, edt_id: str = None
|
formsemestre: FormSemestre = None, edt_id: str = None
|
||||||
) -> tuple[bytes, icalendar.cal.Calendar]:
|
) -> tuple[bytes, icalendar.cal.Calendar]:
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
|
||||||
|
{% if not is_edt_configured %}
|
||||||
|
<style>
|
||||||
|
span.calendarEdit {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<h1>{% if not read_only %}Édition des p{% else %}P{%endif%}artitions</h1>
|
<h1>{% if not read_only %}Édition des p{% else %}P{%endif%}artitions</h1>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
|
@ -80,31 +80,34 @@ from app.scodoc.sco_exceptions import (
|
|||||||
|
|
||||||
from app.scodoc.TrivialFormulator import DMY_REGEXP, TrivialFormulator, tf_error_message
|
from app.scodoc.TrivialFormulator import DMY_REGEXP, TrivialFormulator, tf_error_message
|
||||||
from app.scodoc.gen_tables import GenTable
|
from app.scodoc.gen_tables import GenTable
|
||||||
from app.scodoc import html_sco_header
|
from app.scodoc import (
|
||||||
from app.scodoc import sco_import_etuds
|
codes_cursus,
|
||||||
from app.scodoc import sco_archives_etud
|
html_sco_header,
|
||||||
from app.scodoc import codes_cursus
|
sco_import_etuds,
|
||||||
from app.scodoc import sco_cache
|
sco_archives_etud,
|
||||||
from app.scodoc import sco_debouche
|
sco_cache,
|
||||||
from app.scodoc import sco_dept
|
sco_debouche,
|
||||||
from app.scodoc import sco_dump_db
|
sco_dept,
|
||||||
from app.scodoc import sco_etud
|
sco_dump_db,
|
||||||
from app.scodoc import sco_find_etud
|
sco_etud,
|
||||||
from app.scodoc import sco_formsemestre
|
sco_edt_cal,
|
||||||
from app.scodoc import sco_formsemestre_inscriptions
|
sco_find_etud,
|
||||||
from app.scodoc import sco_groups
|
sco_formsemestre,
|
||||||
from app.scodoc import sco_groups_edit
|
sco_formsemestre_inscriptions,
|
||||||
from app.scodoc import sco_groups_exports
|
sco_groups,
|
||||||
from app.scodoc import sco_groups_view
|
sco_groups_edit,
|
||||||
from app.scodoc import sco_page_etud
|
sco_groups_exports,
|
||||||
from app.scodoc import sco_permissions_check
|
sco_groups_view,
|
||||||
from app.scodoc import sco_photos
|
sco_page_etud,
|
||||||
from app.scodoc import sco_portal_apogee
|
sco_permissions_check,
|
||||||
from app.scodoc import sco_preferences
|
sco_photos,
|
||||||
from app.scodoc import sco_synchro_etuds
|
sco_portal_apogee,
|
||||||
from app.scodoc import sco_trombino
|
sco_preferences,
|
||||||
from app.scodoc import sco_trombino_tours
|
sco_synchro_etuds,
|
||||||
from app.scodoc import sco_up_to_date
|
sco_trombino,
|
||||||
|
sco_trombino_tours,
|
||||||
|
sco_up_to_date,
|
||||||
|
)
|
||||||
from app.tables import list_etuds
|
from app.tables import list_etuds
|
||||||
|
|
||||||
|
|
||||||
@ -935,6 +938,7 @@ def partition_editor(formsemestre_id: int, edit_partition=False):
|
|||||||
formsemestre=formsemestre,
|
formsemestre=formsemestre,
|
||||||
read_only=not formsemestre.can_change_groups(),
|
read_only=not formsemestre.can_change_groups(),
|
||||||
edit_partition=edit_partition,
|
edit_partition=edit_partition,
|
||||||
|
is_edt_configured=sco_edt_cal.is_edt_configured(),
|
||||||
scu=scu,
|
scu=scu,
|
||||||
),
|
),
|
||||||
html_sco_header.sco_footer(),
|
html_sco_header.sco_footer(),
|
||||||
|
Loading…
Reference in New Issue
Block a user