forked from ScoDoc/DocScoDoc
Merge branch 'master' of https://scodoc.org/git/viennet/ScoDoc into table
This commit is contained in:
commit
01a1e84d0c
@ -26,6 +26,7 @@ from flask_mail import Mail
|
|||||||
from flask_bootstrap import Bootstrap
|
from flask_bootstrap import Bootstrap
|
||||||
from flask_moment import Moment
|
from flask_moment import Moment
|
||||||
from flask_caching import Cache
|
from flask_caching import Cache
|
||||||
|
from jinja2 import select_autoescape
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
|
|
||||||
from app.scodoc.sco_exceptions import (
|
from app.scodoc.sco_exceptions import (
|
||||||
@ -61,11 +62,11 @@ cache = Cache(
|
|||||||
|
|
||||||
|
|
||||||
def handle_sco_value_error(exc):
|
def handle_sco_value_error(exc):
|
||||||
return render_template("sco_value_error.html", exc=exc), 404
|
return render_template("sco_value_error.j2", exc=exc), 404
|
||||||
|
|
||||||
|
|
||||||
def handle_access_denied(exc):
|
def handle_access_denied(exc):
|
||||||
return render_template("error_access_denied.html", exc=exc), 403
|
return render_template("error_access_denied.j2", exc=exc), 403
|
||||||
|
|
||||||
|
|
||||||
def internal_server_error(exc):
|
def internal_server_error(exc):
|
||||||
@ -75,7 +76,7 @@ def internal_server_error(exc):
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
render_template(
|
render_template(
|
||||||
"error_500.html",
|
"error_500.j2",
|
||||||
SCOVERSION=sco_version.SCOVERSION,
|
SCOVERSION=sco_version.SCOVERSION,
|
||||||
date=datetime.datetime.now().isoformat(),
|
date=datetime.datetime.now().isoformat(),
|
||||||
exc=exc,
|
exc=exc,
|
||||||
@ -146,7 +147,7 @@ def render_raw_html(template_filename: str, **args) -> str:
|
|||||||
|
|
||||||
def postgresql_server_error(e):
|
def postgresql_server_error(e):
|
||||||
"""Erreur de connection au serveur postgresql (voir notesdb.open_db_connection)"""
|
"""Erreur de connection au serveur postgresql (voir notesdb.open_db_connection)"""
|
||||||
return render_raw_html("error_503.html", SCOVERSION=sco_version.SCOVERSION), 503
|
return render_raw_html("error_503.j2", SCOVERSION=sco_version.SCOVERSION), 503
|
||||||
|
|
||||||
|
|
||||||
class LogRequestFormatter(logging.Formatter):
|
class LogRequestFormatter(logging.Formatter):
|
||||||
@ -275,6 +276,9 @@ def create_app(config_class=DevConfig):
|
|||||||
from app.api import api_bp
|
from app.api import api_bp
|
||||||
from app.api import api_web_bp
|
from app.api import api_web_bp
|
||||||
|
|
||||||
|
# Enable autoescaping of all templates, including .j2
|
||||||
|
app.jinja_env.autoescape = select_autoescape(default_for_string=True, default=True)
|
||||||
|
|
||||||
# https://scodoc.fr/ScoDoc
|
# https://scodoc.fr/ScoDoc
|
||||||
app.register_blueprint(scodoc_bp)
|
app.register_blueprint(scodoc_bp)
|
||||||
# https://scodoc.fr/ScoDoc/RT/Scolarite/...
|
# https://scodoc.fr/ScoDoc/RT/Scolarite/...
|
||||||
|
@ -11,5 +11,5 @@ def send_password_reset_email(user):
|
|||||||
sender=current_app.config["SCODOC_MAIL_FROM"],
|
sender=current_app.config["SCODOC_MAIL_FROM"],
|
||||||
recipients=[user.email],
|
recipients=[user.email],
|
||||||
text_body=render_template("email/reset_password.txt", user=user, token=token),
|
text_body=render_template("email/reset_password.txt", user=user, token=token),
|
||||||
html_body=render_template("email/reset_password.html", user=user, token=token),
|
html_body=render_template("email/reset_password.j2", user=user, token=token),
|
||||||
)
|
)
|
||||||
|
@ -42,7 +42,7 @@ def login():
|
|||||||
return form.redirect("scodoc.index")
|
return form.redirect("scodoc.index")
|
||||||
message = request.args.get("message", "")
|
message = request.args.get("message", "")
|
||||||
return render_template(
|
return render_template(
|
||||||
"auth/login.html", title=_("Sign In"), form=form, message=message
|
"auth/login.j2", title=_("Sign In"), form=form, message=message
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -65,9 +65,7 @@ def create_user():
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
flash(f"Utilisateur {user.user_name} créé")
|
flash(f"Utilisateur {user.user_name} créé")
|
||||||
return redirect(url_for("scodoc.index"))
|
return redirect(url_for("scodoc.index"))
|
||||||
return render_template(
|
return render_template("auth/register.j2", title="Création utilisateur", form=form)
|
||||||
"auth/register.html", title="Création utilisateur", form=form
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/reset_password_request", methods=["GET", "POST"])
|
@bp.route("/reset_password_request", methods=["GET", "POST"])
|
||||||
@ -98,7 +96,7 @@ def reset_password_request():
|
|||||||
)
|
)
|
||||||
return redirect(url_for("auth.login"))
|
return redirect(url_for("auth.login"))
|
||||||
return render_template(
|
return render_template(
|
||||||
"auth/reset_password_request.html", title=_("Reset Password"), form=form
|
"auth/reset_password_request.j2", title=_("Reset Password"), form=form
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -116,7 +114,7 @@ def reset_password(token):
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
flash(_("Votre mot de passe a été changé."))
|
flash(_("Votre mot de passe a été changé."))
|
||||||
return redirect(url_for("auth.login"))
|
return redirect(url_for("auth.login"))
|
||||||
return render_template("auth/reset_password.html", form=form, user=user)
|
return render_template("auth/reset_password.j2", form=form, user=user)
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/reset_standard_roles_permissions", methods=["GET", "POST"])
|
@bp.route("/reset_standard_roles_permissions", methods=["GET", "POST"])
|
||||||
|
@ -841,6 +841,7 @@ class DecisionsProposeesAnnee(DecisionsProposees):
|
|||||||
et autorisations d'inscription émises.
|
et autorisations d'inscription émises.
|
||||||
Efface même si étudiant DEM ou DEF.
|
Efface même si étudiant DEM ou DEF.
|
||||||
Si à cheval, n'efface que pour le semestre d'origine du deca.
|
Si à cheval, n'efface que pour le semestre d'origine du deca.
|
||||||
|
(commite la session.)
|
||||||
"""
|
"""
|
||||||
if only_one_sem or self.a_cheval:
|
if only_one_sem or self.a_cheval:
|
||||||
# N'efface que les autorisations venant de ce semestre,
|
# N'efface que les autorisations venant de ce semestre,
|
||||||
|
@ -500,7 +500,7 @@ def jury_but_semestriel(
|
|||||||
H.append("</div>")
|
H.append("</div>")
|
||||||
H.append(
|
H.append(
|
||||||
render_template(
|
render_template(
|
||||||
"but/documentation_codes_jury.html",
|
"but/documentation_codes_jury.j2",
|
||||||
nom_univ=f"""Export {sco_preferences.get_preference("InstituteName")
|
nom_univ=f"""Export {sco_preferences.get_preference("InstituteName")
|
||||||
or sco_preferences.get_preference("UnivName")
|
or sco_preferences.get_preference("UnivName")
|
||||||
or "Apogée"}""",
|
or "Apogée"}""",
|
||||||
|
@ -430,6 +430,22 @@ class BonusAmiens(BonusSportAdditif):
|
|||||||
# )
|
# )
|
||||||
|
|
||||||
|
|
||||||
|
class BonusBesanconVesoul(BonusSportAdditif):
|
||||||
|
"""Bonus IUT Besançon - Vesoul pour les UE libres
|
||||||
|
|
||||||
|
<p>Toute note non nulle, peu importe sa valeur, entraine un bonus de 0,2 point
|
||||||
|
sur toutes les moyennes d'UE.
|
||||||
|
</p>
|
||||||
|
"""
|
||||||
|
|
||||||
|
name = "bonus_besancon_vesoul"
|
||||||
|
displayed_name = "IUT de Besançon - Vesoul"
|
||||||
|
classic_use_bonus_ues = True # s'applique aux UEs en DUT et LP
|
||||||
|
seuil_moy_gen = 0.0 # tous les points sont comptés
|
||||||
|
proportion_point = 1e10 # infini
|
||||||
|
bonus_max = 0.2
|
||||||
|
|
||||||
|
|
||||||
class BonusBethune(BonusSportMultiplicatif):
|
class BonusBethune(BonusSportMultiplicatif):
|
||||||
"""
|
"""
|
||||||
Calcul bonus modules optionnels (sport, culture), règle IUT de Béthune.
|
Calcul bonus modules optionnels (sport, culture), règle IUT de Béthune.
|
||||||
@ -647,7 +663,10 @@ class BonusCalais(BonusSportAdditif):
|
|||||||
dans la limite de 10 points. 6% de ces points cumulés s'ajoutent :
|
dans la limite de 10 points. 6% de ces points cumulés s'ajoutent :
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>en DUT</b> à la moyenne générale du semestre déjà obtenue par l'étudiant.
|
<li><b>en DUT</b> à la moyenne générale du semestre déjà obtenue par l'étudiant.
|
||||||
<li><b>en BUT et LP</b> à la moyenne des UE dont l'acronyme fini par <b>BS</b> (ex : UE2.1BS, UE32BS)
|
</li>
|
||||||
|
<li><b>en BUT et LP</b> à la moyenne des UE dont l'acronyme fini par <b>BS</b>
|
||||||
|
(ex : UE2.1BS, UE32BS)
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -1339,6 +1358,44 @@ class BonusIUTvannes(BonusSportAdditif):
|
|||||||
classic_use_bonus_ues = False # seulement sur moy gen.
|
classic_use_bonus_ues = False # seulement sur moy gen.
|
||||||
|
|
||||||
|
|
||||||
|
class BonusValenciennes(BonusDirect):
|
||||||
|
"""Article 7 des RCC de l’IUT de Valenciennes
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Une bonification maximale de 0.25 point (1/4 de point) peut être ajoutée
|
||||||
|
à la moyenne de chaque Unité d’Enseignement pour :
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>l'engagement citoyen ;</li>
|
||||||
|
<li>la participation à un module de sport.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Une bonification accordée par la commission des sports de l’UPHF peut être attribuée
|
||||||
|
aux sportifs de haut niveau. Cette bonification est appliquée à l’ensemble des
|
||||||
|
Unités d’Enseignement. Ce bonus est :
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li> 0.5 pour la catégorie <em>or</em> (sportif inscrit sur liste ministérielle
|
||||||
|
jeunesse et sport) ;
|
||||||
|
</li>
|
||||||
|
<li> 0.45 pour la catégorie <em>argent</em> (sportif en club professionnel) ;
|
||||||
|
</li>
|
||||||
|
<li> 0.40 pour le <em>bronze</em> (sportif de niveau départemental, régional ou national).
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>Le cumul de bonifications est possible mais ne peut excéder 0.5 point (un demi-point).
|
||||||
|
</p>
|
||||||
|
<p><em>Dans ScoDoc, saisir directement la valeur désirée du bonus
|
||||||
|
dans une évaluation notée sur 20.</em>
|
||||||
|
</p>
|
||||||
|
"""
|
||||||
|
|
||||||
|
name = "bonus_valenciennes"
|
||||||
|
displayed_name = "IUT de Valenciennes"
|
||||||
|
bonus_max = 0.5
|
||||||
|
|
||||||
|
|
||||||
class BonusVilleAvray(BonusSportAdditif):
|
class BonusVilleAvray(BonusSportAdditif):
|
||||||
"""Bonus modules optionnels (sport, culture), règle IUT Ville d'Avray.
|
"""Bonus modules optionnels (sport, culture), règle IUT Ville d'Avray.
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ def index():
|
|||||||
visible=True, association=True, siret_provisoire=True
|
visible=True, association=True, siret_provisoire=True
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/entreprises.html",
|
"entreprises/entreprises.j2",
|
||||||
title="Entreprises",
|
title="Entreprises",
|
||||||
entreprises=entreprises,
|
entreprises=entreprises,
|
||||||
logs=logs,
|
logs=logs,
|
||||||
@ -109,7 +109,7 @@ def logs():
|
|||||||
EntrepriseHistorique.date.desc()
|
EntrepriseHistorique.date.desc()
|
||||||
).paginate(page=page, per_page=20)
|
).paginate(page=page, per_page=20)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/logs.html",
|
"entreprises/logs.j2",
|
||||||
title="Logs",
|
title="Logs",
|
||||||
logs=logs,
|
logs=logs,
|
||||||
)
|
)
|
||||||
@ -134,7 +134,7 @@ def correspondants():
|
|||||||
.all()
|
.all()
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/correspondants.html",
|
"entreprises/correspondants.j2",
|
||||||
title="Correspondants",
|
title="Correspondants",
|
||||||
correspondants=correspondants,
|
correspondants=correspondants,
|
||||||
logs=logs,
|
logs=logs,
|
||||||
@ -149,7 +149,7 @@ def validation():
|
|||||||
"""
|
"""
|
||||||
entreprises = Entreprise.query.filter_by(visible=False).all()
|
entreprises = Entreprise.query.filter_by(visible=False).all()
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/entreprises_validation.html",
|
"entreprises/entreprises_validation.j2",
|
||||||
title="Validation entreprises",
|
title="Validation entreprises",
|
||||||
entreprises=entreprises,
|
entreprises=entreprises,
|
||||||
)
|
)
|
||||||
@ -167,7 +167,7 @@ def fiche_entreprise_validation(entreprise_id):
|
|||||||
description=f"fiche entreprise (validation) {entreprise_id} inconnue"
|
description=f"fiche entreprise (validation) {entreprise_id} inconnue"
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/fiche_entreprise_validation.html",
|
"entreprises/fiche_entreprise_validation.j2",
|
||||||
title="Validation fiche entreprise",
|
title="Validation fiche entreprise",
|
||||||
entreprise=entreprise,
|
entreprise=entreprise,
|
||||||
)
|
)
|
||||||
@ -205,7 +205,7 @@ def validate_entreprise(entreprise_id):
|
|||||||
flash("L'entreprise a été validé et ajouté à la liste.")
|
flash("L'entreprise a été validé et ajouté à la liste.")
|
||||||
return redirect(url_for("entreprises.validation"))
|
return redirect(url_for("entreprises.validation"))
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_validate_confirmation.html",
|
"entreprises/form_validate_confirmation.j2",
|
||||||
title="Validation entreprise",
|
title="Validation entreprise",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -242,7 +242,7 @@ def delete_validation_entreprise(entreprise_id):
|
|||||||
flash("L'entreprise a été supprimé de la liste des entreprise à valider.")
|
flash("L'entreprise a été supprimé de la liste des entreprise à valider.")
|
||||||
return redirect(url_for("entreprises.validation"))
|
return redirect(url_for("entreprises.validation"))
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_confirmation.html",
|
"entreprises/form_confirmation.j2",
|
||||||
title="Supression entreprise",
|
title="Supression entreprise",
|
||||||
form=form,
|
form=form,
|
||||||
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
||||||
@ -282,7 +282,7 @@ def offres_recues():
|
|||||||
files.append(file)
|
files.append(file)
|
||||||
offres_recues_with_files.append([envoi_offre, offre, files, correspondant])
|
offres_recues_with_files.append([envoi_offre, offre, files, correspondant])
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/offres_recues.html",
|
"entreprises/offres_recues.j2",
|
||||||
title="Offres reçues",
|
title="Offres reçues",
|
||||||
offres_recues=offres_recues_with_files,
|
offres_recues=offres_recues_with_files,
|
||||||
)
|
)
|
||||||
@ -321,7 +321,7 @@ def preferences():
|
|||||||
form.mail_entreprise.data = EntreprisePreferences.get_email_notifications()
|
form.mail_entreprise.data = EntreprisePreferences.get_email_notifications()
|
||||||
form.check_siret.data = int(EntreprisePreferences.get_check_siret())
|
form.check_siret.data = int(EntreprisePreferences.get_check_siret())
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/preferences.html",
|
"entreprises/preferences.j2",
|
||||||
title="Préférences",
|
title="Préférences",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -357,7 +357,7 @@ def add_entreprise():
|
|||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
flash("Une erreur est survenue veuillez réessayer.")
|
flash("Une erreur est survenue veuillez réessayer.")
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_ajout_entreprise.html",
|
"entreprises/form_ajout_entreprise.j2",
|
||||||
title="Ajout entreprise avec correspondant",
|
title="Ajout entreprise avec correspondant",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -408,7 +408,7 @@ def add_entreprise():
|
|||||||
flash("L'entreprise a été ajouté à la liste pour la validation.")
|
flash("L'entreprise a été ajouté à la liste pour la validation.")
|
||||||
return redirect(url_for("entreprises.index"))
|
return redirect(url_for("entreprises.index"))
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_ajout_entreprise.html",
|
"entreprises/form_ajout_entreprise.j2",
|
||||||
title="Ajout entreprise avec correspondant",
|
title="Ajout entreprise avec correspondant",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -446,7 +446,7 @@ def fiche_entreprise(entreprise_id):
|
|||||||
.all()
|
.all()
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/fiche_entreprise.html",
|
"entreprises/fiche_entreprise.j2",
|
||||||
title="Fiche entreprise",
|
title="Fiche entreprise",
|
||||||
entreprise=entreprise,
|
entreprise=entreprise,
|
||||||
offres=offres_with_files,
|
offres=offres_with_files,
|
||||||
@ -472,7 +472,7 @@ def logs_entreprise(entreprise_id):
|
|||||||
.paginate(page=page, per_page=20)
|
.paginate(page=page, per_page=20)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/logs_entreprise.html",
|
"entreprises/logs_entreprise.j2",
|
||||||
title="Logs",
|
title="Logs",
|
||||||
logs=logs,
|
logs=logs,
|
||||||
entreprise=entreprise,
|
entreprise=entreprise,
|
||||||
@ -490,7 +490,7 @@ def offres_expirees(entreprise_id):
|
|||||||
).first_or_404(description=f"fiche entreprise {entreprise_id} inconnue")
|
).first_or_404(description=f"fiche entreprise {entreprise_id} inconnue")
|
||||||
offres_with_files = are.get_offres_expirees_with_files(entreprise.offres)
|
offres_with_files = are.get_offres_expirees_with_files(entreprise.offres)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/offres_expirees.html",
|
"entreprises/offres_expirees.j2",
|
||||||
title="Offres expirées",
|
title="Offres expirées",
|
||||||
entreprise=entreprise,
|
entreprise=entreprise,
|
||||||
offres_expirees=offres_with_files,
|
offres_expirees=offres_with_files,
|
||||||
@ -574,7 +574,7 @@ def edit_entreprise(entreprise_id):
|
|||||||
form.pays.data = entreprise.pays
|
form.pays.data = entreprise.pays
|
||||||
form.association.data = entreprise.association
|
form.association.data = entreprise.association
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_modification_entreprise.html",
|
"entreprises/form_modification_entreprise.j2",
|
||||||
title="Modification entreprise",
|
title="Modification entreprise",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -610,7 +610,7 @@ def fiche_entreprise_desactiver(entreprise_id):
|
|||||||
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_confirmation.html",
|
"entreprises/form_confirmation.j2",
|
||||||
title="Désactiver entreprise",
|
title="Désactiver entreprise",
|
||||||
form=form,
|
form=form,
|
||||||
info_message="Cliquez sur le bouton Modifier pour confirmer la désactivation",
|
info_message="Cliquez sur le bouton Modifier pour confirmer la désactivation",
|
||||||
@ -646,7 +646,7 @@ def fiche_entreprise_activer(entreprise_id):
|
|||||||
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_confirmation.html",
|
"entreprises/form_confirmation.j2",
|
||||||
title="Activer entreprise",
|
title="Activer entreprise",
|
||||||
form=form,
|
form=form,
|
||||||
info_message="Cliquez sur le bouton Modifier pour confirmer l'activaction",
|
info_message="Cliquez sur le bouton Modifier pour confirmer l'activaction",
|
||||||
@ -692,7 +692,7 @@ def add_taxe_apprentissage(entreprise_id):
|
|||||||
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form.html",
|
"entreprises/form.j2",
|
||||||
title="Ajout taxe apprentissage",
|
title="Ajout taxe apprentissage",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -735,7 +735,7 @@ def edit_taxe_apprentissage(entreprise_id, taxe_id):
|
|||||||
form.montant.data = taxe.montant
|
form.montant.data = taxe.montant
|
||||||
form.notes.data = taxe.notes
|
form.notes.data = taxe.notes
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form.html",
|
"entreprises/form.j2",
|
||||||
title="Modification taxe apprentissage",
|
title="Modification taxe apprentissage",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -775,7 +775,7 @@ def delete_taxe_apprentissage(entreprise_id, taxe_id):
|
|||||||
url_for("entreprises.fiche_entreprise", entreprise_id=taxe.entreprise_id)
|
url_for("entreprises.fiche_entreprise", entreprise_id=taxe.entreprise_id)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_confirmation.html",
|
"entreprises/form_confirmation.j2",
|
||||||
title="Supprimer taxe apprentissage",
|
title="Supprimer taxe apprentissage",
|
||||||
form=form,
|
form=form,
|
||||||
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
||||||
@ -845,7 +845,7 @@ def add_offre(entreprise_id):
|
|||||||
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form.html",
|
"entreprises/form.j2",
|
||||||
title="Ajout offre",
|
title="Ajout offre",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -921,7 +921,7 @@ def edit_offre(entreprise_id, offre_id):
|
|||||||
form.expiration_date.data = offre.expiration_date
|
form.expiration_date.data = offre.expiration_date
|
||||||
form.depts.data = offre_depts_list
|
form.depts.data = offre_depts_list
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form.html",
|
"entreprises/form.j2",
|
||||||
title="Modification offre",
|
title="Modification offre",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -971,7 +971,7 @@ def delete_offre(entreprise_id, offre_id):
|
|||||||
url_for("entreprises.fiche_entreprise", entreprise_id=offre.entreprise_id)
|
url_for("entreprises.fiche_entreprise", entreprise_id=offre.entreprise_id)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_confirmation.html",
|
"entreprises/form_confirmation.j2",
|
||||||
title="Supression offre",
|
title="Supression offre",
|
||||||
form=form,
|
form=form,
|
||||||
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
||||||
@ -1047,7 +1047,7 @@ def add_site(entreprise_id):
|
|||||||
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form.html",
|
"entreprises/form.j2",
|
||||||
title="Ajout site",
|
title="Ajout site",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -1098,7 +1098,7 @@ def edit_site(entreprise_id, site_id):
|
|||||||
form.ville.data = site.ville
|
form.ville.data = site.ville
|
||||||
form.pays.data = site.pays
|
form.pays.data = site.pays
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form.html",
|
"entreprises/form.j2",
|
||||||
title="Modification site",
|
title="Modification site",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -1154,7 +1154,7 @@ def add_correspondant(entreprise_id, site_id):
|
|||||||
url_for("entreprises.fiche_entreprise", entreprise_id=site.entreprise_id)
|
url_for("entreprises.fiche_entreprise", entreprise_id=site.entreprise_id)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_ajout_correspondants.html",
|
"entreprises/form_ajout_correspondants.j2",
|
||||||
title="Ajout correspondant",
|
title="Ajout correspondant",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -1234,7 +1234,7 @@ def edit_correspondant(entreprise_id, site_id, correspondant_id):
|
|||||||
form.origine.data = correspondant.origine
|
form.origine.data = correspondant.origine
|
||||||
form.notes.data = correspondant.notes
|
form.notes.data = correspondant.notes
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form.html",
|
"entreprises/form.j2",
|
||||||
title="Modification correspondant",
|
title="Modification correspondant",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -1290,7 +1290,7 @@ def delete_correspondant(entreprise_id, site_id, correspondant_id):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_confirmation.html",
|
"entreprises/form_confirmation.j2",
|
||||||
title="Supression correspondant",
|
title="Supression correspondant",
|
||||||
form=form,
|
form=form,
|
||||||
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
||||||
@ -1308,7 +1308,7 @@ def contacts(entreprise_id):
|
|||||||
).first_or_404(description=f"entreprise {entreprise_id} inconnue")
|
).first_or_404(description=f"entreprise {entreprise_id} inconnue")
|
||||||
contacts = EntrepriseContact.query.filter_by(entreprise=entreprise.id).all()
|
contacts = EntrepriseContact.query.filter_by(entreprise=entreprise.id).all()
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/contacts.html",
|
"entreprises/contacts.j2",
|
||||||
title="Liste des contacts",
|
title="Liste des contacts",
|
||||||
contacts=contacts,
|
contacts=contacts,
|
||||||
entreprise=entreprise,
|
entreprise=entreprise,
|
||||||
@ -1365,7 +1365,7 @@ def add_contact(entreprise_id):
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
return redirect(url_for("entreprises.contacts", entreprise_id=entreprise.id))
|
return redirect(url_for("entreprises.contacts", entreprise_id=entreprise.id))
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form.html",
|
"entreprises/form.j2",
|
||||||
title="Ajout contact",
|
title="Ajout contact",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -1421,7 +1421,7 @@ def edit_contact(entreprise_id, contact_id):
|
|||||||
)
|
)
|
||||||
form.notes.data = contact.notes
|
form.notes.data = contact.notes
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form.html",
|
"entreprises/form.j2",
|
||||||
title="Modification contact",
|
title="Modification contact",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -1459,7 +1459,7 @@ def delete_contact(entreprise_id, contact_id):
|
|||||||
url_for("entreprises.contacts", entreprise_id=contact.entreprise)
|
url_for("entreprises.contacts", entreprise_id=contact.entreprise)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_confirmation.html",
|
"entreprises/form_confirmation.j2",
|
||||||
title="Supression contact",
|
title="Supression contact",
|
||||||
form=form,
|
form=form,
|
||||||
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
||||||
@ -1525,7 +1525,7 @@ def add_stage_apprentissage(entreprise_id):
|
|||||||
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_ajout_stage_apprentissage.html",
|
"entreprises/form_ajout_stage_apprentissage.j2",
|
||||||
title="Ajout stage / apprentissage",
|
title="Ajout stage / apprentissage",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -1599,7 +1599,7 @@ def edit_stage_apprentissage(entreprise_id, stage_apprentissage_id):
|
|||||||
form.date_fin.data = stage_apprentissage.date_fin
|
form.date_fin.data = stage_apprentissage.date_fin
|
||||||
form.notes.data = stage_apprentissage.notes
|
form.notes.data = stage_apprentissage.notes
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_ajout_stage_apprentissage.html",
|
"entreprises/form_ajout_stage_apprentissage.j2",
|
||||||
title="Modification stage / apprentissage",
|
title="Modification stage / apprentissage",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -1640,7 +1640,7 @@ def delete_stage_apprentissage(entreprise_id, stage_apprentissage_id):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_confirmation.html",
|
"entreprises/form_confirmation.j2",
|
||||||
title="Supression stage/apprentissage",
|
title="Supression stage/apprentissage",
|
||||||
form=form,
|
form=form,
|
||||||
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
||||||
@ -1690,7 +1690,7 @@ def envoyer_offre(entreprise_id, offre_id):
|
|||||||
url_for("entreprises.fiche_entreprise", entreprise_id=offre.entreprise_id)
|
url_for("entreprises.fiche_entreprise", entreprise_id=offre.entreprise_id)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_envoi_offre.html",
|
"entreprises/form_envoi_offre.j2",
|
||||||
title="Envoyer une offre",
|
title="Envoyer une offre",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -1816,7 +1816,7 @@ def import_donnees():
|
|||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
flash("Une erreur est survenue veuillez réessayer.")
|
flash("Une erreur est survenue veuillez réessayer.")
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/import_donnees.html",
|
"entreprises/import_donnees.j2",
|
||||||
title="Importation données",
|
title="Importation données",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -1845,7 +1845,7 @@ def import_donnees():
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
flash(f"Importation réussie")
|
flash(f"Importation réussie")
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/import_donnees.html",
|
"entreprises/import_donnees.j2",
|
||||||
title="Importation données",
|
title="Importation données",
|
||||||
form=form,
|
form=form,
|
||||||
entreprises_import=entreprises_import,
|
entreprises_import=entreprises_import,
|
||||||
@ -1853,7 +1853,7 @@ def import_donnees():
|
|||||||
correspondants_import=correspondants,
|
correspondants_import=correspondants,
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/import_donnees.html", title="Importation données", form=form
|
"entreprises/import_donnees.j2", title="Importation données", form=form
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -1927,7 +1927,7 @@ def add_offre_file(entreprise_id, offre_id):
|
|||||||
url_for("entreprises.fiche_entreprise", entreprise_id=offre.entreprise_id)
|
url_for("entreprises.fiche_entreprise", entreprise_id=offre.entreprise_id)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form.html",
|
"entreprises/form.j2",
|
||||||
title="Ajout fichier à une offre",
|
title="Ajout fichier à une offre",
|
||||||
form=form,
|
form=form,
|
||||||
)
|
)
|
||||||
@ -1969,7 +1969,7 @@ def delete_offre_file(entreprise_id, offre_id, filedir):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"entreprises/form_confirmation.html",
|
"entreprises/form_confirmation.j2",
|
||||||
title="Suppression fichier d'une offre",
|
title="Suppression fichier d'une offre",
|
||||||
form=form,
|
form=form,
|
||||||
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
|
||||||
@ -1981,4 +1981,4 @@ def not_found_error_handler(e):
|
|||||||
"""
|
"""
|
||||||
Renvoie une page d'erreur pour l'erreur 404
|
Renvoie une page d'erreur pour l'erreur 404
|
||||||
"""
|
"""
|
||||||
return render_template("entreprises/error.html", title="Erreur", e=e)
|
return render_template("entreprises/error.j2", title="Erreur", e=e)
|
||||||
|
@ -171,7 +171,7 @@ class AddLogoForm(FlaskForm):
|
|||||||
|
|
||||||
|
|
||||||
class LogoForm(FlaskForm):
|
class LogoForm(FlaskForm):
|
||||||
"""Embed both presentation of a logo (cf. template file configuration.html)
|
"""Embed both presentation of a logo (cf. template file configuration.j2)
|
||||||
and all its data and UI action (change, delete)"""
|
and all its data and UI action (change, delete)"""
|
||||||
|
|
||||||
dept_key = HiddenField()
|
dept_key = HiddenField()
|
||||||
@ -434,7 +434,7 @@ def config_logos():
|
|||||||
scu.flash_errors(form)
|
scu.flash_errors(form)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"config_logos.html",
|
"config_logos.j2",
|
||||||
scodoc_dept=None,
|
scodoc_dept=None,
|
||||||
title="Configuration ScoDoc",
|
title="Configuration ScoDoc",
|
||||||
form=form,
|
form=form,
|
||||||
|
@ -133,7 +133,7 @@ def configuration():
|
|||||||
return redirect(url_for("scodoc.index"))
|
return redirect(url_for("scodoc.index"))
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"configuration.html",
|
"configuration.j2",
|
||||||
form_bonus=form_bonus,
|
form_bonus=form_bonus,
|
||||||
form_scodoc=form_scodoc,
|
form_scodoc=form_scodoc,
|
||||||
scu=scu,
|
scu=scu,
|
||||||
|
@ -36,6 +36,7 @@ class Formation(db.Model):
|
|||||||
titre = db.Column(db.Text(), nullable=False)
|
titre = db.Column(db.Text(), nullable=False)
|
||||||
titre_officiel = db.Column(db.Text(), nullable=False)
|
titre_officiel = db.Column(db.Text(), nullable=False)
|
||||||
version = db.Column(db.Integer, default=1, server_default="1")
|
version = db.Column(db.Integer, default=1, server_default="1")
|
||||||
|
commentaire = db.Column(db.Text())
|
||||||
formation_code = db.Column(
|
formation_code = db.Column(
|
||||||
db.String(SHORT_STR_LEN),
|
db.String(SHORT_STR_LEN),
|
||||||
server_default=db.text("notes_newid_fcod()"),
|
server_default=db.text("notes_newid_fcod()"),
|
||||||
|
@ -274,7 +274,7 @@ def sco_header(
|
|||||||
H.append("""<div id="gtrcontent">""")
|
H.append("""<div id="gtrcontent">""")
|
||||||
# En attendant le replacement complet de cette fonction,
|
# En attendant le replacement complet de cette fonction,
|
||||||
# inclusion ici des messages flask
|
# inclusion ici des messages flask
|
||||||
H.append(render_template("flashed_messages.html"))
|
H.append(render_template("flashed_messages.j2"))
|
||||||
#
|
#
|
||||||
# Barre menu semestre:
|
# Barre menu semestre:
|
||||||
H.append(formsemestre_page_title(formsemestre_id))
|
H.append(formsemestre_page_title(formsemestre_id))
|
||||||
|
@ -166,6 +166,6 @@ def sidebar(etudid: int = None):
|
|||||||
def sidebar_dept():
|
def sidebar_dept():
|
||||||
"""Partie supérieure de la marge de gauche"""
|
"""Partie supérieure de la marge de gauche"""
|
||||||
return render_template(
|
return render_template(
|
||||||
"sidebar_dept.html",
|
"sidebar_dept.j2",
|
||||||
prefs=sco_preferences.SemPreferences(),
|
prefs=sco_preferences.SemPreferences(),
|
||||||
)
|
)
|
||||||
|
@ -373,7 +373,7 @@ def etudarchive_import_files(
|
|||||||
filename_title="fichier_a_charger",
|
filename_title="fichier_a_charger",
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"scolar/photos_import_files.html",
|
"scolar/photos_import_files.j2",
|
||||||
page_title="Téléchargement de fichiers associés aux étudiants",
|
page_title="Téléchargement de fichiers associés aux étudiants",
|
||||||
ignored_zipfiles=ignored_zipfiles,
|
ignored_zipfiles=ignored_zipfiles,
|
||||||
unmatched_files=unmatched_files,
|
unmatched_files=unmatched_files,
|
||||||
|
@ -926,7 +926,7 @@ def formsemestre_bulletinetud(
|
|||||||
_formsemestre_bulletinetud_header_html(etud, formsemestre, format, version),
|
_formsemestre_bulletinetud_header_html(etud, formsemestre, format, version),
|
||||||
bulletin,
|
bulletin,
|
||||||
render_template(
|
render_template(
|
||||||
"bul_foot.html",
|
"bul_foot.j2",
|
||||||
appreciations=None, # déjà affichées
|
appreciations=None, # déjà affichées
|
||||||
css_class="bul_classic_foot",
|
css_class="bul_classic_foot",
|
||||||
etud=etud,
|
etud=etud,
|
||||||
@ -1259,7 +1259,7 @@ def _formsemestre_bulletinetud_header_html(
|
|||||||
cssstyles=["css/radar_bulletin.css"],
|
cssstyles=["css/radar_bulletin.css"],
|
||||||
),
|
),
|
||||||
render_template(
|
render_template(
|
||||||
"bul_head.html",
|
"bul_head.j2",
|
||||||
etud=etud,
|
etud=etud,
|
||||||
format=format,
|
format=format,
|
||||||
formsemestre=formsemestre,
|
formsemestre=formsemestre,
|
||||||
|
@ -234,6 +234,16 @@ def formation_edit(formation_id=None, create=False):
|
|||||||
"explanation": "optionel: code utilisé pour échanger avec d'autres logiciels et identifiant la filière ou spécialité (exemple: ASUR). N'est utilisé que s'il n'y a pas de numéro de semestre.",
|
"explanation": "optionel: code utilisé pour échanger avec d'autres logiciels et identifiant la filière ou spécialité (exemple: ASUR). N'est utilisé que s'il n'y a pas de numéro de semestre.",
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"commentaire",
|
||||||
|
{
|
||||||
|
"input_type": "textarea",
|
||||||
|
"rows": 3,
|
||||||
|
"cols": 77,
|
||||||
|
"title": "Commentaire",
|
||||||
|
"explanation": "commentaire libre.",
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
initvalues=initvalues,
|
initvalues=initvalues,
|
||||||
submitlabel=submitlabel,
|
submitlabel=submitlabel,
|
||||||
|
@ -385,7 +385,7 @@ def module_edit(
|
|||||||
),
|
),
|
||||||
f"""<h2>{title}</h2>""",
|
f"""<h2>{title}</h2>""",
|
||||||
render_template(
|
render_template(
|
||||||
"scodoc/help/modules.html",
|
"scodoc/help/modules.j2",
|
||||||
is_apc=is_apc,
|
is_apc=is_apc,
|
||||||
semestre_id=semestre_id,
|
semestre_id=semestre_id,
|
||||||
formsemestres=FormSemestre.query.filter(
|
formsemestres=FormSemestre.query.filter(
|
||||||
@ -396,6 +396,7 @@ def module_edit(
|
|||||||
.all()
|
.all()
|
||||||
if not create
|
if not create
|
||||||
else None,
|
else None,
|
||||||
|
create=create,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
if not unlocked:
|
if not unlocked:
|
||||||
@ -655,7 +656,8 @@ def module_edit(
|
|||||||
(
|
(
|
||||||
"numero",
|
"numero",
|
||||||
{
|
{
|
||||||
"size": 2,
|
"title": "Numéro",
|
||||||
|
"size": 4,
|
||||||
"explanation": "numéro (1, 2, 3, 4, ...) pour ordre d'affichage",
|
"explanation": "numéro (1, 2, 3, 4, ...) pour ordre d'affichage",
|
||||||
"type": "int",
|
"type": "int",
|
||||||
"default": default_num,
|
"default": default_num,
|
||||||
|
@ -345,7 +345,7 @@ def evaluation_create_form(
|
|||||||
+ "\n".join(H)
|
+ "\n".join(H)
|
||||||
+ "\n"
|
+ "\n"
|
||||||
+ tf[1]
|
+ tf[1]
|
||||||
+ render_template("scodoc/help/evaluations.html", is_apc=is_apc)
|
+ render_template("scodoc/help/evaluations.j2", is_apc=is_apc)
|
||||||
+ html_sco_header.sco_footer()
|
+ html_sco_header.sco_footer()
|
||||||
)
|
)
|
||||||
elif tf[0] == -1:
|
elif tf[0] == -1:
|
||||||
|
@ -75,6 +75,7 @@ _formationEditor = ndb.EditableTable(
|
|||||||
"type_parcours",
|
"type_parcours",
|
||||||
"code_specialite",
|
"code_specialite",
|
||||||
"referentiel_competence_id",
|
"referentiel_competence_id",
|
||||||
|
"commentaire",
|
||||||
),
|
),
|
||||||
filter_dept=True,
|
filter_dept=True,
|
||||||
sortkey="acronyme",
|
sortkey="acronyme",
|
||||||
|
@ -541,7 +541,7 @@ def formsemestre_page_title(formsemestre_id=None):
|
|||||||
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
|
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
|
||||||
|
|
||||||
h = render_template(
|
h = render_template(
|
||||||
"formsemestre_page_title.html",
|
"formsemestre_page_title.j2",
|
||||||
formsemestre=formsemestre,
|
formsemestre=formsemestre,
|
||||||
scu=scu,
|
scu=scu,
|
||||||
sem_menu_bar=formsemestre_status_menubar(formsemestre),
|
sem_menu_bar=formsemestre_status_menubar(formsemestre),
|
||||||
|
@ -46,7 +46,7 @@ def affect_groups(partition_id):
|
|||||||
raise AccessDenied("vous n'avez pas la permission de modifier les groupes")
|
raise AccessDenied("vous n'avez pas la permission de modifier les groupes")
|
||||||
partition.formsemestre.setup_parcours_groups()
|
partition.formsemestre.setup_parcours_groups()
|
||||||
return render_template(
|
return render_template(
|
||||||
"scolar/affect_groups.html",
|
"scolar/affect_groups.j2",
|
||||||
sco_header=html_sco_header.sco_header(
|
sco_header=html_sco_header.sco_header(
|
||||||
page_title="Affectation aux groupes",
|
page_title="Affectation aux groupes",
|
||||||
javascripts=["js/groupmgr.js"],
|
javascripts=["js/groupmgr.js"],
|
||||||
|
@ -215,7 +215,7 @@ def placement_eval_selectetuds(evaluation_id):
|
|||||||
html_sco_header.sco_header(),
|
html_sco_header.sco_header(),
|
||||||
sco_evaluations.evaluation_describe(evaluation_id=evaluation_id),
|
sco_evaluations.evaluation_describe(evaluation_id=evaluation_id),
|
||||||
"<h3>Placement et émargement des étudiants</h3>",
|
"<h3>Placement et émargement des étudiants</h3>",
|
||||||
render_template("scodoc/forms/placement.html", form=form),
|
render_template("scodoc/forms/placement.j2", form=form),
|
||||||
]
|
]
|
||||||
footer = html_sco_header.sco_footer()
|
footer = html_sco_header.sco_footer()
|
||||||
return "\n".join(htmls) + "<p>" + footer
|
return "\n".join(htmls) + "<p>" + footer
|
||||||
|
@ -166,9 +166,15 @@ def formsemestre_recapcomplet(
|
|||||||
H.append("<p>")
|
H.append("<p>")
|
||||||
if mode_jury:
|
if mode_jury:
|
||||||
H.append(
|
H.append(
|
||||||
f"""<a class="stdlink" href="{url_for('notes.formsemestre_validation_auto',
|
f"""<p><a class="stdlink" href="{url_for('notes.formsemestre_validation_auto',
|
||||||
scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre_id)
|
scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre_id)
|
||||||
}">Calcul automatique des décisions du jury</a></p>"""
|
}">Calcul automatique des décisions du jury</a>
|
||||||
|
</p><a class="stdlink" href="{url_for('notes.formsemestre_jury_but_erase',
|
||||||
|
scodoc_dept=g.scodoc_dept, formsemestre_id=formsemestre_id, only_one_sem=1)
|
||||||
|
}">Effacer <em>toutes</em> les décisions de jury du semestre</a>
|
||||||
|
<p>
|
||||||
|
</p>
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
H.append(
|
H.append(
|
||||||
|
@ -554,7 +554,7 @@ def photos_import_files_form(group_ids=()):
|
|||||||
back_url=back_url,
|
back_url=back_url,
|
||||||
)
|
)
|
||||||
return render_template(
|
return render_template(
|
||||||
"scolar/photos_import_files.html",
|
"scolar/photos_import_files.j2",
|
||||||
page_title="Téléchargement des photos des étudiants",
|
page_title="Téléchargement des photos des étudiants",
|
||||||
ignored_zipfiles=ignored_zipfiles,
|
ignored_zipfiles=ignored_zipfiles,
|
||||||
unmatched_files=unmatched_files,
|
unmatched_files=unmatched_files,
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
:root {
|
:root {
|
||||||
--sco-content-min-width: 600px;
|
--sco-content-min-width: 600px;
|
||||||
--sco-content-max-width: 1024px;
|
--sco-content-max-width: 1024px;
|
||||||
|
--sco-color-explication: rgb(10, 58, 140);
|
||||||
}
|
}
|
||||||
|
|
||||||
html,
|
html,
|
||||||
@ -2115,6 +2116,11 @@ div.formation_descr span.fd_n {
|
|||||||
margin-left: 6em;
|
margin-left: 6em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.explication {
|
||||||
|
font-style: italic;
|
||||||
|
color: var(--sco-color-explication);
|
||||||
|
}
|
||||||
|
|
||||||
div.formation_ue_list {
|
div.formation_ue_list {
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
|
@ -14,6 +14,8 @@ $(function () {
|
|||||||
const url = new URL(document.URL);
|
const url = new URL(document.URL);
|
||||||
const formsemestre_id = url.searchParams.get("formsemestre_id");
|
const formsemestre_id = url.searchParams.get("formsemestre_id");
|
||||||
const order_info_key = JSON.stringify([url.pathname, formsemestre_id]);
|
const order_info_key = JSON.stringify([url.pathname, formsemestre_id]);
|
||||||
|
const etudids_key = JSON.stringify(["etudids", url.origin, formsemestre_id]);
|
||||||
|
const noms_key = JSON.stringify(["noms", url.origin, formsemestre_id]);
|
||||||
let order_info;
|
let order_info;
|
||||||
if (formsemestre_id) {
|
if (formsemestre_id) {
|
||||||
const x = localStorage.getItem(order_info_key);
|
const x = localStorage.getItem(order_info_key);
|
||||||
@ -157,6 +159,7 @@ $(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
let table = $('table.table_recap').DataTable(
|
let table = $('table.table_recap').DataTable(
|
||||||
{
|
{
|
||||||
paging: false,
|
paging: false,
|
||||||
@ -226,14 +229,19 @@ $(function () {
|
|||||||
document.querySelectorAll("td.identite_court").forEach(e => {
|
document.querySelectorAll("td.identite_court").forEach(e => {
|
||||||
noms.push(e.dataset.nomprenom);
|
noms.push(e.dataset.nomprenom);
|
||||||
});
|
});
|
||||||
const etudids_key = JSON.stringify(["etudids", url.origin, formsemestre_id]);
|
|
||||||
localStorage.setItem(etudids_key, JSON.stringify(etudids));
|
localStorage.setItem(etudids_key, JSON.stringify(etudids));
|
||||||
const noms_key = JSON.stringify(["noms", url.origin, formsemestre_id]);
|
|
||||||
localStorage.setItem(noms_key, JSON.stringify(noms));
|
localStorage.setItem(noms_key, JSON.stringify(noms));
|
||||||
},
|
},
|
||||||
"order": order_info,
|
"order": order_info,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
} catch (error) {
|
||||||
|
// l'erreur peut etre causee par un ancien storage:
|
||||||
|
localStorage.removeItem(etudids_key);
|
||||||
|
localStorage.removeItem(noms_key);
|
||||||
|
localStorage.removeItem(order_info_key);
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
update_buttons_labels(table);
|
update_buttons_labels(table);
|
||||||
});
|
});
|
||||||
$('table.table_recap tbody').on('click', 'tr', function () {
|
$('table.table_recap tbody').on('click', 'tr', function () {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.j2' %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "base.html" %}
|
{% extends "base.j2" %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% macro render_field(field, auth_name=None) %}
|
{% macro render_field(field, auth_name=None) %}
|
||||||
@ -29,7 +29,8 @@
|
|||||||
<form method=post>
|
<form method=post>
|
||||||
{{ form.user_name }}
|
{{ form.user_name }}
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
<table class="tf"><tbody>
|
<table class="tf">
|
||||||
|
<tbody>
|
||||||
{{ render_field(form.old_password, size=14, auth_name=auth_username,
|
{{ render_field(form.old_password, size=14, auth_name=auth_username,
|
||||||
style="padding:1px; margin-left: 1em; margin-top: 4px;") }}
|
style="padding:1px; margin-left: 1em; margin-top: 4px;") }}
|
||||||
<tr>
|
<tr>
|
||||||
@ -44,7 +45,8 @@
|
|||||||
style="padding:1px; margin-left: 1em; margin-top: 4px;") }}
|
style="padding:1px; margin-left: 1em; margin-top: 4px;") }}
|
||||||
{{ render_field(form.email, size=40,
|
{{ render_field(form.email, size=40,
|
||||||
style="padding:1px; margin-top: 12px;margin-bottom: 16px; margin-left: 1em;") }}
|
style="padding:1px; margin-top: 12px;margin-bottom: 16px; margin-left: 1em;") }}
|
||||||
</tbody></table>
|
</tbody>
|
||||||
|
</table>
|
||||||
<input type="submit" value="Valider">
|
<input type="submit" value="Valider">
|
||||||
<input type="submit" name="cancel" value="Annuler" style="margin-left: 1em;>
|
<input type="submit" name="cancel" value="Annuler" style="margin-left: 1em;>
|
||||||
</form>
|
</form>
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.j2' %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "base.html" %}
|
{% extends "base.j2" %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "base.html" %}
|
{% extends "base.j2" %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "base.html" %}
|
{% extends "base.j2" %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "base.html" %}
|
{% extends "base.j2" %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "base.html" %}
|
{% extends "base.j2" %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
@ -36,7 +36,9 @@
|
|||||||
url_for('scolar.index_html', scodoc_dept=g.scodoc_dept)
|
url_for('scolar.index_html', scodoc_dept=g.scodoc_dept)
|
||||||
}}">Dept. {{ g.scodoc_dept }}</a></li>
|
}}">Dept. {{ g.scodoc_dept }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not current_user.is_anonymous and current_user.has_permission(current_user.Permission.RelationsEntreprisesView, None) and scu and scu.is_entreprises_enabled() %}
|
{% if not current_user.is_anonymous and
|
||||||
|
current_user.has_permission(current_user.Permission.RelationsEntreprisesView, None) and scu and
|
||||||
|
scu.is_entreprises_enabled() %}
|
||||||
<li><a href="{{ url_for('entreprises.index') }}">Entreprises</a></li>
|
<li><a href="{{ url_for('entreprises.index') }}">Entreprises</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "sco_page.html" %}
|
{% extends "sco_page.j2" %}
|
||||||
|
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
{{super()}}
|
{{super()}}
|
||||||
@ -7,12 +7,12 @@
|
|||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
||||||
|
|
||||||
{% include 'bul_head.html' %}
|
{% include 'bul_head.j2' %}
|
||||||
|
|
||||||
<releve-but></releve-but>
|
<releve-but></releve-but>
|
||||||
<script src="{{sco.scu.STATIC_DIR}}/js/releve-but.js"></script>
|
<script src="{{sco.scu.STATIC_DIR}}/js/releve-but.js"></script>
|
||||||
|
|
||||||
{% include 'bul_foot.html' %}
|
{% include 'bul_foot.j2' %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let dataSrc = "{{bul_url|safe}}";
|
let dataSrc = "{{bul_url|safe}}";
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "sco_page.html" %}
|
{% extends "sco_page.j2" %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block styles %}
|
{% block styles %}
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "base.html" %}
|
{% extends "base.j2" %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
@ -1,30 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends "base.html" %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<h1>Charger un référentiel de compétences</h1>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-5">
|
|
||||||
{{ wtf.quick_form(form) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-5">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="{{ url_for('notes.refcomp_table', scodoc_dept=g.scodoc_dept, ) }}">
|
|
||||||
Liste des référentiels de compétences chargés</a>
|
|
||||||
</li>
|
|
||||||
{% if formation is not none %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ url_for('notes.refcomp_assoc_formation', scodoc_dept=g.scodoc_dept, formation_id=formation.id) }}">
|
|
||||||
Association à la formation {{ formation.acronyme }}</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
31
app/templates/but/refcomp_load.j2
Normal file
31
app/templates/but/refcomp_load.j2
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends "base.j2" %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<h1>Charger un référentiel de compétences</h1>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-5">
|
||||||
|
{{ wtf.quick_form(form) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-5">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="{{ url_for('notes.refcomp_table', scodoc_dept=g.scodoc_dept, ) }}">
|
||||||
|
Liste des référentiels de compétences chargés</a>
|
||||||
|
</li>
|
||||||
|
{% if formation is not none %}
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="{{ url_for('notes.refcomp_assoc_formation', scodoc_dept=g.scodoc_dept, formation_id=formation.id) }}">
|
||||||
|
Association à la formation {{ formation.acronyme }}</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "sco_page.html" %}
|
{% extends "sco_page.j2" %}
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
{{super()}}
|
{{super()}}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "sco_page.html" %}
|
{% extends "sco_page.j2" %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
@ -1,4 +1,4 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.j2" %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
@ -1,132 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% macro render_field(field, with_label=True) %}
|
|
||||||
<div>
|
|
||||||
{% if with_label %}
|
|
||||||
<span class="wtf-field">{{ field.label }} :</span>
|
|
||||||
{% endif %}
|
|
||||||
<span class="wtf-field">{{ field(**kwargs)|safe }}
|
|
||||||
{% if field.errors %}
|
|
||||||
<ul class=errors>
|
|
||||||
{% for error in field.errors %}
|
|
||||||
<li>{{ error }}</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% macro render_add_logo(add_logo_form) %}
|
|
||||||
<details {{ add_logo_form.opened() }}>
|
|
||||||
<summary>
|
|
||||||
<h3>Ajouter un logo</h3>
|
|
||||||
</summary>
|
|
||||||
<div>
|
|
||||||
{{ render_field(add_logo_form.name) }}
|
|
||||||
{{ render_field(add_logo_form.upload) }}
|
|
||||||
{{ render_field(add_logo_form.do_insert, False, onSubmit="submit_form") }}
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% macro render_logo(dept_form, logo_form) %}
|
|
||||||
<details {{ logo_form.opened() }}>
|
|
||||||
{{ logo_form.hidden_tag() }}
|
|
||||||
<summary>
|
|
||||||
{% if logo_form.titre %}
|
|
||||||
<h3 class="titre_logo">{{ logo_form.titre }}</h3>
|
|
||||||
{% if logo_form.description %}
|
|
||||||
<div class="sco_help">{{ logo_form.description }}</div>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
<h3 class="titre_logo">Logo personalisé: {{ logo_form.logo_id.data }}</h3>
|
|
||||||
{% if logo_form.description %}
|
|
||||||
<div class="sco_help">{{ logo_form.description }}</div>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</summary>
|
|
||||||
<div class="content">
|
|
||||||
<div class="image_logo">
|
|
||||||
<img src="{{ logo_form.logo.get_url_small() }}" alt="pas de logo chargé" />
|
|
||||||
</div>
|
|
||||||
<div class="infos_logo">
|
|
||||||
<h4>{{ logo_form.logo.logoname }} (Format: {{ logo_form.logo.suffix }})</h4>
|
|
||||||
Taille: {{ logo_form.logo.size }} px
|
|
||||||
{% if logo_form.logo.mm %} / {{ logo_form.logo.mm }} mm {% endif %}<br />
|
|
||||||
Aspect ratio: {{ logo_form.logo.aspect_ratio }}<br />
|
|
||||||
Usage: <span style="font-family: system-ui">{{ logo_form.logo.get_usage() }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="actions_logo">
|
|
||||||
<div class="action_label">Modifier l'image</div>
|
|
||||||
<div class="action_button">
|
|
||||||
<span class="wtf-field">{{ render_field(logo_form.upload, False, onchange="submit_form()") }}</span>
|
|
||||||
</div>
|
|
||||||
{% if logo_form.can_delete %}
|
|
||||||
<div class="action_label">Renommer</div>
|
|
||||||
<div class="action_button">
|
|
||||||
{{ render_field(logo_form.new_name, False) }}
|
|
||||||
{{ render_field(logo_form.do_rename, False, onSubmit="submit_form()") }}
|
|
||||||
</div>
|
|
||||||
<div class="action_label">Supprimer l'image</div>
|
|
||||||
<div class="action_button">
|
|
||||||
{{ render_field(logo_form.do_delete, False, onSubmit="submit_form()") }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% macro render_logos(dept_form) %}
|
|
||||||
{% for logo_entry in dept_form.logos.entries %}
|
|
||||||
{% set logo_form = logo_entry.form %}
|
|
||||||
{{ render_logo(dept_form, logo_form) }}
|
|
||||||
{% else %}
|
|
||||||
<p class="logo-titre_logo">
|
|
||||||
<h3 class="titre_logo">Aucun logo défini en propre à ce département</h3>
|
|
||||||
</p>
|
|
||||||
{% endfor %}
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
|
|
||||||
<script src="/ScoDoc/static/jQuery/jquery.js"></script>
|
|
||||||
<script src="/ScoDoc/static/js/config_logos.js"></script>
|
|
||||||
|
|
||||||
<form id="config_logos_form" class="sco-form" action="" method="post" enctype="multipart/form-data" novalidate>
|
|
||||||
{{ form.hidden_tag() }}
|
|
||||||
|
|
||||||
<div class="configuration_logo">
|
|
||||||
<h1>Bibliothèque de logos</h1>
|
|
||||||
{% for dept_entry in form.depts.entries %}
|
|
||||||
{% set dept_form = dept_entry.form %}
|
|
||||||
{{ dept_entry.form.hidden_tag() }}
|
|
||||||
<details {{ dept_form.opened() }}>
|
|
||||||
<summary>
|
|
||||||
<span class="entete_dept">
|
|
||||||
{% if dept_entry.form.is_local() %}
|
|
||||||
<h2>Département {{ dept_form.dept_name.data }}</h2>
|
|
||||||
<h3 class="effectifs">{{ dept_form.count() }}</h3>
|
|
||||||
<div class="sco_help">Les paramètres donnés sont spécifiques à ce département.<br />
|
|
||||||
Les logos du département se substituent aux logos de même nom définis globalement:</div>
|
|
||||||
{% else %}
|
|
||||||
<h2>Logos généraux</h2>
|
|
||||||
<h3 class="effectifs">{{ dept_form.count() }}</h3>
|
|
||||||
<div class="sco_help">Les images de cette section sont utilisé pour tous les départements,
|
|
||||||
mais peuvent être redéfinies localement au niveau de chaque département
|
|
||||||
(il suffit de définir un logo local de même nom)</div>
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
</summary>
|
|
||||||
<div>
|
|
||||||
{{ render_logos(dept_form) }}
|
|
||||||
{{ render_add_logo(dept_form.add_logo.form) }}
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
{% endblock %}
|
|
132
app/templates/config_logos.j2
Normal file
132
app/templates/config_logos.j2
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% macro render_field(field, with_label=True) %}
|
||||||
|
<div>
|
||||||
|
{% if with_label %}
|
||||||
|
<span class="wtf-field">{{ field.label }} :</span>
|
||||||
|
{% endif %}
|
||||||
|
<span class="wtf-field">{{ field(**kwargs)|safe }}
|
||||||
|
{% if field.errors %}
|
||||||
|
<ul class=errors>
|
||||||
|
{% for error in field.errors %}
|
||||||
|
<li>{{ error }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro render_add_logo(add_logo_form) %}
|
||||||
|
<details {{ add_logo_form.opened() }}>
|
||||||
|
<summary>
|
||||||
|
<h3>Ajouter un logo</h3>
|
||||||
|
</summary>
|
||||||
|
<div>
|
||||||
|
{{ render_field(add_logo_form.name) }}
|
||||||
|
{{ render_field(add_logo_form.upload) }}
|
||||||
|
{{ render_field(add_logo_form.do_insert, False, onSubmit="submit_form") }}
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro render_logo(dept_form, logo_form) %}
|
||||||
|
<details {{ logo_form.opened() }}>
|
||||||
|
{{ logo_form.hidden_tag() }}
|
||||||
|
<summary>
|
||||||
|
{% if logo_form.titre %}
|
||||||
|
<h3 class="titre_logo">{{ logo_form.titre }}</h3>
|
||||||
|
{% if logo_form.description %}
|
||||||
|
<div class="sco_help">{{ logo_form.description }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<h3 class="titre_logo">Logo personalisé: {{ logo_form.logo_id.data }}</h3>
|
||||||
|
{% if logo_form.description %}
|
||||||
|
<div class="sco_help">{{ logo_form.description }}</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</summary>
|
||||||
|
<div class="content">
|
||||||
|
<div class="image_logo">
|
||||||
|
<img src="{{ logo_form.logo.get_url_small() }}" alt="pas de logo chargé" />
|
||||||
|
</div>
|
||||||
|
<div class="infos_logo">
|
||||||
|
<h4>{{ logo_form.logo.logoname }} (Format: {{ logo_form.logo.suffix }})</h4>
|
||||||
|
Taille: {{ logo_form.logo.size }} px
|
||||||
|
{% if logo_form.logo.mm %} / {{ logo_form.logo.mm }} mm {% endif %}<br />
|
||||||
|
Aspect ratio: {{ logo_form.logo.aspect_ratio }}<br />
|
||||||
|
Usage: <span style="font-family: system-ui">{{ logo_form.logo.get_usage() }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions_logo">
|
||||||
|
<div class="action_label">Modifier l'image</div>
|
||||||
|
<div class="action_button">
|
||||||
|
<span class="wtf-field">{{ render_field(logo_form.upload, False, onchange="submit_form()") }}</span>
|
||||||
|
</div>
|
||||||
|
{% if logo_form.can_delete %}
|
||||||
|
<div class="action_label">Renommer</div>
|
||||||
|
<div class="action_button">
|
||||||
|
{{ render_field(logo_form.new_name, False) }}
|
||||||
|
{{ render_field(logo_form.do_rename, False, onSubmit="submit_form()") }}
|
||||||
|
</div>
|
||||||
|
<div class="action_label">Supprimer l'image</div>
|
||||||
|
<div class="action_button">
|
||||||
|
{{ render_field(logo_form.do_delete, False, onSubmit="submit_form()") }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro render_logos(dept_form) %}
|
||||||
|
{% for logo_entry in dept_form.logos.entries %}
|
||||||
|
{% set logo_form = logo_entry.form %}
|
||||||
|
{{ render_logo(dept_form, logo_form) }}
|
||||||
|
{% else %}
|
||||||
|
<p class="logo-titre_logo">
|
||||||
|
<h3 class="titre_logo">Aucun logo défini en propre à ce département</h3>
|
||||||
|
</p>
|
||||||
|
{% endfor %}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
|
||||||
|
<script src="/ScoDoc/static/jQuery/jquery.js"></script>
|
||||||
|
<script src="/ScoDoc/static/js/config_logos.js"></script>
|
||||||
|
|
||||||
|
<form id="config_logos_form" class="sco-form" action="" method="post" enctype="multipart/form-data" novalidate>
|
||||||
|
{{ form.hidden_tag() }}
|
||||||
|
|
||||||
|
<div class="configuration_logo">
|
||||||
|
<h1>Bibliothèque de logos</h1>
|
||||||
|
{% for dept_entry in form.depts.entries %}
|
||||||
|
{% set dept_form = dept_entry.form %}
|
||||||
|
{{ dept_entry.form.hidden_tag() }}
|
||||||
|
<details {{ dept_form.opened() }}>
|
||||||
|
<summary>
|
||||||
|
<span class="entete_dept">
|
||||||
|
{% if dept_entry.form.is_local() %}
|
||||||
|
<h2>Département {{ dept_form.dept_name.data }}</h2>
|
||||||
|
<h3 class="effectifs">{{ dept_form.count() }}</h3>
|
||||||
|
<div class="sco_help">Les paramètres donnés sont spécifiques à ce département.<br />
|
||||||
|
Les logos du département se substituent aux logos de même nom définis globalement:</div>
|
||||||
|
{% else %}
|
||||||
|
<h2>Logos généraux</h2>
|
||||||
|
<h3 class="effectifs">{{ dept_form.count() }}</h3>
|
||||||
|
<div class="sco_help">Les images de cette section sont utilisé pour tous les départements,
|
||||||
|
mais peuvent être redéfinies localement au niveau de chaque département
|
||||||
|
(il suffit de définir un logo local de même nom)</div>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
</summary>
|
||||||
|
<div>
|
||||||
|
{{ render_logos(dept_form) }}
|
||||||
|
{{ render_add_logo(dept_form.add_logo.form) }}
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.j2' %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% macro render_field(field, with_label=True) %}
|
{% macro render_field(field, with_label=True) %}
|
||||||
@ -49,7 +49,8 @@
|
|||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h2>Exports Apogée</h2>
|
<h2>Exports Apogée</h2>
|
||||||
<p><a class="stdlink" href="{{url_for('scodoc.config_codes_decisions')}}">configuration des codes de décision</a></p>
|
<p><a class="stdlink" href="{{url_for('scodoc.config_codes_decisions')}}">configuration des codes de décision</a>
|
||||||
|
</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<h2>Utilisateurs</h2>
|
<h2>Utilisateurs</h2>
|
||||||
@ -82,8 +83,7 @@ function update_bonus_description() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function()
|
$(function () {
|
||||||
{
|
|
||||||
$("#configuration_form select").change(function () {
|
$("#configuration_form select").change(function () {
|
||||||
update_bonus_description();
|
update_bonus_description();
|
||||||
});
|
});
|
@ -1,5 +1,4 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{% extends 'base.j2' %}
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
||||||
@ -7,7 +6,7 @@
|
|||||||
<h2>{{ title }}</h2>
|
<h2>{{ title }}</h2>
|
||||||
|
|
||||||
<div style="margin-top: 16px;">
|
<div style="margin-top: 16px;">
|
||||||
{{ explanation }}
|
{{ explanation|safe }}
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 16px;">
|
<div style="margin-top: 16px;">
|
||||||
<form method="post">
|
<form method="post">
|
@ -1,5 +1,5 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
{# -*- mode: jinja-html -*- #}
|
||||||
{% extends "base.html" %}
|
{% extends "base.j2" %}
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
{% block app_content %}
|
{% block app_content %}
|
@ -1,47 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends "sco_page.html" %}
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<h2>Opérations dans le département {{g.scodoc_dept}}</h2>
|
|
||||||
|
|
||||||
<table id="dept_news" class="table table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Date</th>
|
|
||||||
<th>Type</th>
|
|
||||||
<th>Auteur</th>
|
|
||||||
<th>Détail</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
|
||||||
{% block scripts %}
|
|
||||||
{{super()}}
|
|
||||||
<script>
|
|
||||||
$(document).ready(function () {
|
|
||||||
$('#dept_news').DataTable({
|
|
||||||
ajax: '{{url_for("scolar.dept_news_json", scodoc_dept=g.scodoc_dept)}}',
|
|
||||||
serverSide: true,
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
data: {
|
|
||||||
_: "date.display",
|
|
||||||
sort: "date.timestamp"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{data: 'type', searchable: false},
|
|
||||||
{data: 'authenticated_user', orderable: false, searchable: true},
|
|
||||||
{data: 'text', orderable: false, searchable: true}
|
|
||||||
],
|
|
||||||
"order": [[ 0, "desc" ]]
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
47
app/templates/dept_news.j2
Normal file
47
app/templates/dept_news.j2
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends "sco_page.j2" %}
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<h2>Opérations dans le département {{g.scodoc_dept}}</h2>
|
||||||
|
|
||||||
|
<table id="dept_news" class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Date</th>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Auteur</th>
|
||||||
|
<th>Détail</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{{super()}}
|
||||||
|
<script>
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('#dept_news').DataTable({
|
||||||
|
ajax: '{{url_for("scolar.dept_news_json", scodoc_dept=g.scodoc_dept)}}',
|
||||||
|
serverSide: true,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
data: {
|
||||||
|
_: "date.display",
|
||||||
|
sort: "date.timestamp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ data: 'type', searchable: false },
|
||||||
|
{ data: 'authenticated_user', orderable: false, searchable: true },
|
||||||
|
{ data: 'text', orderable: false, searchable: true }
|
||||||
|
],
|
||||||
|
"order": [[0, "desc"]]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,104 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
|
||||||
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<div class="container">
|
|
||||||
<ul class="breadcrumbs">
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=entreprise.id) }}" class="breadcrumbs_link">Fiche entreprise</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Contacts</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container" style="margin-bottom: 10px;">
|
|
||||||
<h1>Liste des contacts</h1>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<a class="btn btn-primary" style="margin-bottom:10px;" href="{{ url_for('entreprises.add_contact', entreprise_id=entreprise.id) }}">Ajouter contact</a>
|
|
||||||
{% endif %}
|
|
||||||
<table id="table-contacts">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td data-priority="">Date</td>
|
|
||||||
<td data-priority="">Utilisateur</td>
|
|
||||||
<td data-priority="">Notes</td>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<td data-priority="">Action</td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for contact in contacts %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ contact.date.strftime('%d/%m/%Y %Hh%M') }}</td>
|
|
||||||
<td>{{ contact.user|get_nomcomplet_by_id }}</td>
|
|
||||||
<td>{{ contact.notes }}</td>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<td>
|
|
||||||
<div class="btn-group">
|
|
||||||
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Action
|
|
||||||
<span class="caret"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu pull-left">
|
|
||||||
<li><a href="{{ url_for('entreprises.edit_contact', entreprise_id=entreprise.id, contact_id=contact.id) }}">Modifier</a></li>
|
|
||||||
<li><a href="{{ url_for('entreprises.delete_contact', entreprise_id=entreprise.id, contact_id=contact.id) }}" style="color:red">Supprimer</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td>Date</td>
|
|
||||||
<td>Utilisateur</td>
|
|
||||||
<td>Notes</td>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<td>Action</td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
|
||||||
let table = new DataTable('#table-contacts',
|
|
||||||
{
|
|
||||||
"autoWidth": false,
|
|
||||||
"responsive": {
|
|
||||||
"details": true
|
|
||||||
},
|
|
||||||
"pageLength": 10,
|
|
||||||
"language": {
|
|
||||||
"emptyTable": "Aucune donnée disponible dans le tableau",
|
|
||||||
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
|
||||||
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
|
||||||
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
|
||||||
"lengthMenu": "Afficher _MENU_ entrées",
|
|
||||||
"loadingRecords": "Chargement...",
|
|
||||||
"processing": "Traitement...",
|
|
||||||
"search": "Rechercher:",
|
|
||||||
"zeroRecords": "Aucune entrée correspondante trouvée",
|
|
||||||
"paginate": {
|
|
||||||
"next": "Suivante",
|
|
||||||
"previous": "Précédente"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
109
app/templates/entreprises/contacts.j2
Normal file
109
app/templates/entreprises/contacts.j2
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
||||||
|
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<div class="container">
|
||||||
|
<ul class="breadcrumbs">
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=entreprise.id) }}"
|
||||||
|
class="breadcrumbs_link">Fiche entreprise</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Contacts</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container" style="margin-bottom: 10px;">
|
||||||
|
<h1>Liste des contacts</h1>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<a class="btn btn-primary" style="margin-bottom:10px;"
|
||||||
|
href="{{ url_for('entreprises.add_contact', entreprise_id=entreprise.id) }}">Ajouter contact</a>
|
||||||
|
{% endif %}
|
||||||
|
<table id="table-contacts">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td data-priority="">Date</td>
|
||||||
|
<td data-priority="">Utilisateur</td>
|
||||||
|
<td data-priority="">Notes</td>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<td data-priority="">Action</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for contact in contacts %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ contact.date.strftime('%d/%m/%Y %Hh%M') }}</td>
|
||||||
|
<td>{{ contact.user|get_nomcomplet_by_id }}</td>
|
||||||
|
<td>{{ contact.notes }}</td>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<td>
|
||||||
|
<div class="btn-group">
|
||||||
|
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Action
|
||||||
|
<span class="caret"></span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu pull-left">
|
||||||
|
<li><a
|
||||||
|
href="{{ url_for('entreprises.edit_contact', entreprise_id=entreprise.id, contact_id=contact.id) }}">Modifier</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="{{ url_for('entreprises.delete_contact', entreprise_id=entreprise.id, contact_id=contact.id) }}"
|
||||||
|
style="color:red">Supprimer</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td>Date</td>
|
||||||
|
<td>Utilisateur</td>
|
||||||
|
<td>Notes</td>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<td>Action</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
let table = new DataTable('#table-contacts',
|
||||||
|
{
|
||||||
|
"autoWidth": false,
|
||||||
|
"responsive": {
|
||||||
|
"details": true
|
||||||
|
},
|
||||||
|
"pageLength": 10,
|
||||||
|
"language": {
|
||||||
|
"emptyTable": "Aucune donnée disponible dans le tableau",
|
||||||
|
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
||||||
|
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
||||||
|
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
||||||
|
"lengthMenu": "Afficher _MENU_ entrées",
|
||||||
|
"loadingRecords": "Chargement...",
|
||||||
|
"processing": "Traitement...",
|
||||||
|
"search": "Rechercher:",
|
||||||
|
"zeroRecords": "Aucune entrée correspondante trouvée",
|
||||||
|
"paginate": {
|
||||||
|
"next": "Suivante",
|
||||||
|
"previous": "Précédente"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,93 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
|
||||||
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
{% include 'entreprises/nav.html' %}
|
|
||||||
|
|
||||||
{% if logs %}
|
|
||||||
<div class="container">
|
|
||||||
<h3>Dernières opérations <a href="{{ url_for('entreprises.logs') }}">Voir tout</a></h3>
|
|
||||||
<ul>
|
|
||||||
{% for log in logs %}
|
|
||||||
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par {{ log.authenticated_user|get_nomcomplet_by_username }}</span></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="container" style="margin-bottom: 10px;">
|
|
||||||
<h1>Liste des correspondants</h1>
|
|
||||||
<table id="table-correspondants">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td data-priority="1">Nom</td>
|
|
||||||
<td data-priority="3">Prenom</td>
|
|
||||||
<td data-priority="4">Téléphone</td>
|
|
||||||
<td data-priority="5">Mail</td>
|
|
||||||
<td data-priority="6">Poste</td>
|
|
||||||
<td data-priority="7">Service</td>
|
|
||||||
<td data-priority="2">Entreprise</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for correspondant, site in correspondants %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ correspondant.nom }}</td>
|
|
||||||
<td>{{ correspondant.prenom }}</td>
|
|
||||||
<td>{{ correspondant.telephone }}</td>
|
|
||||||
<td>{{ correspondant.mail }}</td>
|
|
||||||
<td>{{ correspondant.poste}}</td>
|
|
||||||
<td>{{ correspondant.service}}</td>
|
|
||||||
<td><a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=site.entreprise.id) }}">{{ site.nom }}</a></td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td>Nom</td>
|
|
||||||
<td>Prenom</td>
|
|
||||||
<td>Téléphone</td>
|
|
||||||
<td>Mail</td>
|
|
||||||
<td>Poste</td>
|
|
||||||
<td>Service</td>
|
|
||||||
<td>Entreprise</td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
|
||||||
let table = new DataTable('#table-correspondants',
|
|
||||||
{
|
|
||||||
"autoWidth": false,
|
|
||||||
"responsive": {
|
|
||||||
"details": true
|
|
||||||
},
|
|
||||||
"pageLength": 10,
|
|
||||||
"language": {
|
|
||||||
"emptyTable": "Aucune donnée disponible dans le tableau",
|
|
||||||
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
|
||||||
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
|
||||||
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
|
||||||
"lengthMenu": "Afficher _MENU_ entrées",
|
|
||||||
"loadingRecords": "Chargement...",
|
|
||||||
"processing": "Traitement...",
|
|
||||||
"search": "Rechercher:",
|
|
||||||
"zeroRecords": "Aucune entrée correspondante trouvée",
|
|
||||||
"paginate": {
|
|
||||||
"next": "Suivante",
|
|
||||||
"previous": "Précédente"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
95
app/templates/entreprises/correspondants.j2
Normal file
95
app/templates/entreprises/correspondants.j2
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
||||||
|
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
{% include 'entreprises/nav.html' %}
|
||||||
|
|
||||||
|
{% if logs %}
|
||||||
|
<div class="container">
|
||||||
|
<h3>Dernières opérations <a href="{{ url_for('entreprises.logs') }}">Voir tout</a></h3>
|
||||||
|
<ul>
|
||||||
|
{% for log in logs %}
|
||||||
|
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par
|
||||||
|
{{ log.authenticated_user|get_nomcomplet_by_username }}</span></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="container" style="margin-bottom: 10px;">
|
||||||
|
<h1>Liste des correspondants</h1>
|
||||||
|
<table id="table-correspondants">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td data-priority="1">Nom</td>
|
||||||
|
<td data-priority="3">Prenom</td>
|
||||||
|
<td data-priority="4">Téléphone</td>
|
||||||
|
<td data-priority="5">Mail</td>
|
||||||
|
<td data-priority="6">Poste</td>
|
||||||
|
<td data-priority="7">Service</td>
|
||||||
|
<td data-priority="2">Entreprise</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for correspondant, site in correspondants %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ correspondant.nom }}</td>
|
||||||
|
<td>{{ correspondant.prenom }}</td>
|
||||||
|
<td>{{ correspondant.telephone }}</td>
|
||||||
|
<td>{{ correspondant.mail }}</td>
|
||||||
|
<td>{{ correspondant.poste}}</td>
|
||||||
|
<td>{{ correspondant.service}}</td>
|
||||||
|
<td><a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=site.entreprise.id) }}">{{
|
||||||
|
site.nom }}</a></td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td>Nom</td>
|
||||||
|
<td>Prenom</td>
|
||||||
|
<td>Téléphone</td>
|
||||||
|
<td>Mail</td>
|
||||||
|
<td>Poste</td>
|
||||||
|
<td>Service</td>
|
||||||
|
<td>Entreprise</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
let table = new DataTable('#table-correspondants',
|
||||||
|
{
|
||||||
|
"autoWidth": false,
|
||||||
|
"responsive": {
|
||||||
|
"details": true
|
||||||
|
},
|
||||||
|
"pageLength": 10,
|
||||||
|
"language": {
|
||||||
|
"emptyTable": "Aucune donnée disponible dans le tableau",
|
||||||
|
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
||||||
|
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
||||||
|
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
||||||
|
"lengthMenu": "Afficher _MENU_ entrées",
|
||||||
|
"loadingRecords": "Chargement...",
|
||||||
|
"processing": "Traitement...",
|
||||||
|
"search": "Rechercher:",
|
||||||
|
"zeroRecords": "Aucune entrée correspondante trouvée",
|
||||||
|
"paginate": {
|
||||||
|
"next": "Suivante",
|
||||||
|
"previous": "Précédente"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,133 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
|
||||||
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
{% include 'entreprises/nav.html' %}
|
|
||||||
|
|
||||||
{% if logs %}
|
|
||||||
<div class="container">
|
|
||||||
<h3>Dernières opérations <a href="{{ url_for('entreprises.logs') }}">Voir tout</a></h3>
|
|
||||||
<ul>
|
|
||||||
{% for log in logs %}
|
|
||||||
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par {{ log.authenticated_user|get_nomcomplet_by_username }}</span></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="container boutons">
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<a class="btn btn-default" href="{{ url_for('entreprises.add_entreprise') }}">Ajouter une entreprise</a>
|
|
||||||
{% endif %}
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesExport, None) %}
|
|
||||||
<a class="btn btn-default" href="{{ url_for('entreprises.import_donnees') }}">Importer des données</a>
|
|
||||||
{% endif %}
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesExport, None) and entreprises %}
|
|
||||||
<a class="btn btn-default" href="{{ url_for('entreprises.export_donnees') }}">Exporter des données</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container" style="margin-bottom: 10px;">
|
|
||||||
<h1>Liste des entreprises</h1>
|
|
||||||
{% if form %}
|
|
||||||
<form id="form-entreprise-filter" method="POST" action="">
|
|
||||||
{{ form.hidden_tag() }}
|
|
||||||
<div><input id="active" name="active" type="checkbox" onChange="form.submit()" {% if checked[0] %} checked {% endif %}> {{ form.active.label }}</div>
|
|
||||||
<div><input id="association" name="association" type="checkbox" onChange="form.submit()" {% if checked[1] %} checked {% endif %}> {{ form.association.label }}</div>
|
|
||||||
<div><input id="siret_provisoire" name="siret_provisoire" type="checkbox" onChange="form.submit()" {% if checked[2] %} checked {% endif %}> {{ form.siret_provisoire.label }}</div>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
<table id="table-entreprises">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td data-priority="2">SIRET</td>
|
|
||||||
<td data-priority="1">Nom</td>
|
|
||||||
<td data-priority="4">Adresse</td>
|
|
||||||
<td data-priority="6">Code postal</td>
|
|
||||||
<td data-priority="5">Ville</td>
|
|
||||||
<td data-priority="7">Pays</td>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<td data-priority="3">Action</td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for entreprise in entreprises %}
|
|
||||||
<tr>
|
|
||||||
<td><a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=entreprise.id) }}" style="{% if not entreprise.active %}color:red;{% endif %}{% if entreprise.siret_provisoire %}font-weight:bold;{% endif %}" >{{ entreprise.siret }}</a></td>
|
|
||||||
<td>{{ entreprise.nom }}</td>
|
|
||||||
<td>{{ entreprise.adresse }}</td>
|
|
||||||
<td>{{ entreprise.codepostal }}</td>
|
|
||||||
<td>{{ entreprise.ville }}</td>
|
|
||||||
<td>{{ entreprise.pays }}</td>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<td>
|
|
||||||
<div class="btn-group">
|
|
||||||
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Action
|
|
||||||
<span class="caret"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu pull-left">
|
|
||||||
<li><a href="{{ url_for('entreprises.edit_entreprise', entreprise_id=entreprise.id) }}">Modifier</a></li>
|
|
||||||
{% if entreprise.active %}
|
|
||||||
<li><a href="{{ url_for('entreprises.fiche_entreprise_desactiver', entreprise_id=entreprise.id)}}" style="color:red">Désactiver</a></li>
|
|
||||||
{% else %}
|
|
||||||
<li><a href="{{ url_for('entreprises.fiche_entreprise_activer', entreprise_id=entreprise.id)}}" style="color:lightgreen">Activer</a></li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td>SIRET</td>
|
|
||||||
<td>Nom</td>
|
|
||||||
<td>Adresse</td>
|
|
||||||
<td>Code postal</td>
|
|
||||||
<td>Ville</td>
|
|
||||||
<td>Pays</td>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<td>Action</td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
|
||||||
let table = new DataTable('#table-entreprises',
|
|
||||||
{
|
|
||||||
"autoWidth": false,
|
|
||||||
"responsive": {
|
|
||||||
"details": true
|
|
||||||
},
|
|
||||||
"pageLength": 10,
|
|
||||||
"language": {
|
|
||||||
"emptyTable": "Aucune donnée disponible dans le tableau",
|
|
||||||
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
|
||||||
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
|
||||||
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
|
||||||
"lengthMenu": "Afficher _MENU_ entrées",
|
|
||||||
"loadingRecords": "Chargement...",
|
|
||||||
"processing": "Traitement...",
|
|
||||||
"search": "Rechercher:",
|
|
||||||
"zeroRecords": "Aucune entrée correspondante trouvée",
|
|
||||||
"paginate": {
|
|
||||||
"next": "Suivante",
|
|
||||||
"previous": "Précédente"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
143
app/templates/entreprises/entreprises.j2
Normal file
143
app/templates/entreprises/entreprises.j2
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
||||||
|
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
{% include 'entreprises/nav.html' %}
|
||||||
|
|
||||||
|
{% if logs %}
|
||||||
|
<div class="container">
|
||||||
|
<h3>Dernières opérations <a href="{{ url_for('entreprises.logs') }}">Voir tout</a></h3>
|
||||||
|
<ul>
|
||||||
|
{% for log in logs %}
|
||||||
|
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par
|
||||||
|
{{ log.authenticated_user|get_nomcomplet_by_username }}</span></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="container boutons">
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<a class="btn btn-default" href="{{ url_for('entreprises.add_entreprise') }}">Ajouter une entreprise</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesExport, None) %}
|
||||||
|
<a class="btn btn-default" href="{{ url_for('entreprises.import_donnees') }}">Importer des données</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesExport, None) and entreprises %}
|
||||||
|
<a class="btn btn-default" href="{{ url_for('entreprises.export_donnees') }}">Exporter des données</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container" style="margin-bottom: 10px;">
|
||||||
|
<h1>Liste des entreprises</h1>
|
||||||
|
{% if form %}
|
||||||
|
<form id="form-entreprise-filter" method="POST" action="">
|
||||||
|
{{ form.hidden_tag() }}
|
||||||
|
<div><input id="active" name="active" type="checkbox" onChange="form.submit()" {% if checked[0] %} checked {%
|
||||||
|
endif %}> {{ form.active.label }}</div>
|
||||||
|
<div><input id="association" name="association" type="checkbox" onChange="form.submit()" {% if checked[1] %}
|
||||||
|
checked {% endif %}> {{ form.association.label }}</div>
|
||||||
|
<div><input id="siret_provisoire" name="siret_provisoire" type="checkbox" onChange="form.submit()" {% if
|
||||||
|
checked[2] %} checked {% endif %}> {{ form.siret_provisoire.label }}</div>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
<table id="table-entreprises">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td data-priority="2">SIRET</td>
|
||||||
|
<td data-priority="1">Nom</td>
|
||||||
|
<td data-priority="4">Adresse</td>
|
||||||
|
<td data-priority="6">Code postal</td>
|
||||||
|
<td data-priority="5">Ville</td>
|
||||||
|
<td data-priority="7">Pays</td>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<td data-priority="3">Action</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for entreprise in entreprises %}
|
||||||
|
<tr>
|
||||||
|
<td><a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=entreprise.id) }}"
|
||||||
|
style="{% if not entreprise.active %}color:red;{% endif %}{% if entreprise.siret_provisoire %}font-weight:bold;{% endif %}">{{
|
||||||
|
entreprise.siret }}</a></td>
|
||||||
|
<td>{{ entreprise.nom }}</td>
|
||||||
|
<td>{{ entreprise.adresse }}</td>
|
||||||
|
<td>{{ entreprise.codepostal }}</td>
|
||||||
|
<td>{{ entreprise.ville }}</td>
|
||||||
|
<td>{{ entreprise.pays }}</td>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<td>
|
||||||
|
<div class="btn-group">
|
||||||
|
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Action
|
||||||
|
<span class="caret"></span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu pull-left">
|
||||||
|
<li><a
|
||||||
|
href="{{ url_for('entreprises.edit_entreprise', entreprise_id=entreprise.id) }}">Modifier</a>
|
||||||
|
</li>
|
||||||
|
{% if entreprise.active %}
|
||||||
|
<li><a href="{{ url_for('entreprises.fiche_entreprise_desactiver', entreprise_id=entreprise.id)}}"
|
||||||
|
style="color:red">Désactiver</a></li>
|
||||||
|
{% else %}
|
||||||
|
<li><a href="{{ url_for('entreprises.fiche_entreprise_activer', entreprise_id=entreprise.id)}}"
|
||||||
|
style="color:lightgreen">Activer</a></li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td>SIRET</td>
|
||||||
|
<td>Nom</td>
|
||||||
|
<td>Adresse</td>
|
||||||
|
<td>Code postal</td>
|
||||||
|
<td>Ville</td>
|
||||||
|
<td>Pays</td>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<td>Action</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
let table = new DataTable('#table-entreprises',
|
||||||
|
{
|
||||||
|
"autoWidth": false,
|
||||||
|
"responsive": {
|
||||||
|
"details": true
|
||||||
|
},
|
||||||
|
"pageLength": 10,
|
||||||
|
"language": {
|
||||||
|
"emptyTable": "Aucune donnée disponible dans le tableau",
|
||||||
|
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
||||||
|
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
||||||
|
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
||||||
|
"lengthMenu": "Afficher _MENU_ entrées",
|
||||||
|
"loadingRecords": "Chargement...",
|
||||||
|
"processing": "Traitement...",
|
||||||
|
"search": "Rechercher:",
|
||||||
|
"zeroRecords": "Aucune entrée correspondante trouvée",
|
||||||
|
"paginate": {
|
||||||
|
"next": "Suivante",
|
||||||
|
"previous": "Précédente"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,95 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
|
||||||
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
{% include 'entreprises/nav.html' %}
|
|
||||||
|
|
||||||
{% if logs %}
|
|
||||||
<div class="container">
|
|
||||||
<h3>Dernières opérations</h3>
|
|
||||||
<ul>
|
|
||||||
{% for log in logs %}
|
|
||||||
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par {{ log.authenticated_user|get_nomcomplet_by_username }}</span></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="container" style="margin-bottom: 10px;">
|
|
||||||
<h1>Liste des entreprises à valider</h1>
|
|
||||||
<table id="table-entreprises-validation">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td data-priority="3">SIRET</td>
|
|
||||||
<td data-priority="1">Nom</td>
|
|
||||||
<td data-priority="4">Adresse</td>
|
|
||||||
<td data-priority="5">Code postal</td>
|
|
||||||
<td data-priority="6">Ville</td>
|
|
||||||
<td data-priority="7">Pays</td>
|
|
||||||
<td data-priority="2">Action</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for entreprise in entreprises %}
|
|
||||||
<tr class="table-row active">
|
|
||||||
<th><a href="{{ url_for('entreprises.fiche_entreprise_validation', entreprise_id=entreprise.id) }}">{{ entreprise.siret }}</a></th>
|
|
||||||
<th>{{ entreprise.nom }}</th>
|
|
||||||
<th>{{ entreprise.adresse }}</th>
|
|
||||||
<th>{{ entreprise.codepostal }}</th>
|
|
||||||
<th>{{ entreprise.ville }}</th>
|
|
||||||
<th>{{ entreprise.pays }}</th>
|
|
||||||
<th>
|
|
||||||
<a class="btn btn-default" href="{{ url_for('entreprises.fiche_entreprise_validation', entreprise_id=entreprise.id) }}">Voir</a>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td>SIRET</td>
|
|
||||||
<td>Nom</td>
|
|
||||||
<td>Adresse</td>
|
|
||||||
<td>Code postal</td>
|
|
||||||
<td>Ville</td>
|
|
||||||
<td>Pays</td>
|
|
||||||
<td>Action</td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
|
||||||
let table = new DataTable('#table-entreprises-validation',
|
|
||||||
{
|
|
||||||
"autoWidth": false,
|
|
||||||
"responsive": {
|
|
||||||
"details": true
|
|
||||||
},
|
|
||||||
"pageLength": 10,
|
|
||||||
"language": {
|
|
||||||
"emptyTable": "Aucune donnée disponible dans le tableau",
|
|
||||||
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
|
||||||
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
|
||||||
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
|
||||||
"lengthMenu": "Afficher _MENU_ entrées",
|
|
||||||
"loadingRecords": "Chargement...",
|
|
||||||
"processing": "Traitement...",
|
|
||||||
"search": "Rechercher:",
|
|
||||||
"zeroRecords": "Aucune entrée correspondante trouvée",
|
|
||||||
"paginate": {
|
|
||||||
"next": "Suivante",
|
|
||||||
"previous": "Précédente"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
98
app/templates/entreprises/entreprises_validation.j2
Normal file
98
app/templates/entreprises/entreprises_validation.j2
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
||||||
|
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
{% include 'entreprises/nav.html' %}
|
||||||
|
|
||||||
|
{% if logs %}
|
||||||
|
<div class="container">
|
||||||
|
<h3>Dernières opérations</h3>
|
||||||
|
<ul>
|
||||||
|
{% for log in logs %}
|
||||||
|
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par
|
||||||
|
{{ log.authenticated_user|get_nomcomplet_by_username }}</span></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="container" style="margin-bottom: 10px;">
|
||||||
|
<h1>Liste des entreprises à valider</h1>
|
||||||
|
<table id="table-entreprises-validation">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td data-priority="3">SIRET</td>
|
||||||
|
<td data-priority="1">Nom</td>
|
||||||
|
<td data-priority="4">Adresse</td>
|
||||||
|
<td data-priority="5">Code postal</td>
|
||||||
|
<td data-priority="6">Ville</td>
|
||||||
|
<td data-priority="7">Pays</td>
|
||||||
|
<td data-priority="2">Action</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for entreprise in entreprises %}
|
||||||
|
<tr class="table-row active">
|
||||||
|
<th><a href="{{ url_for('entreprises.fiche_entreprise_validation', entreprise_id=entreprise.id) }}">{{
|
||||||
|
entreprise.siret }}</a></th>
|
||||||
|
<th>{{ entreprise.nom }}</th>
|
||||||
|
<th>{{ entreprise.adresse }}</th>
|
||||||
|
<th>{{ entreprise.codepostal }}</th>
|
||||||
|
<th>{{ entreprise.ville }}</th>
|
||||||
|
<th>{{ entreprise.pays }}</th>
|
||||||
|
<th>
|
||||||
|
<a class="btn btn-default"
|
||||||
|
href="{{ url_for('entreprises.fiche_entreprise_validation', entreprise_id=entreprise.id) }}">Voir</a>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td>SIRET</td>
|
||||||
|
<td>Nom</td>
|
||||||
|
<td>Adresse</td>
|
||||||
|
<td>Code postal</td>
|
||||||
|
<td>Ville</td>
|
||||||
|
<td>Pays</td>
|
||||||
|
<td>Action</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
let table = new DataTable('#table-entreprises-validation',
|
||||||
|
{
|
||||||
|
"autoWidth": false,
|
||||||
|
"responsive": {
|
||||||
|
"details": true
|
||||||
|
},
|
||||||
|
"pageLength": 10,
|
||||||
|
"language": {
|
||||||
|
"emptyTable": "Aucune donnée disponible dans le tableau",
|
||||||
|
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
||||||
|
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
||||||
|
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
||||||
|
"lengthMenu": "Afficher _MENU_ entrées",
|
||||||
|
"loadingRecords": "Chargement...",
|
||||||
|
"processing": "Traitement...",
|
||||||
|
"search": "Rechercher:",
|
||||||
|
"zeroRecords": "Aucune entrée correspondante trouvée",
|
||||||
|
"paginate": {
|
||||||
|
"next": "Suivante",
|
||||||
|
"previous": "Précédente"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,14 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
|
|
||||||
<h2>Erreur !</h2>
|
|
||||||
|
|
||||||
{{ e }}
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<a href="{{ url_for('entreprises.index') }}">Retour</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
14
app/templates/entreprises/error.j2
Normal file
14
app/templates/entreprises/error.j2
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
|
||||||
|
<h2>Erreur !</h2>
|
||||||
|
|
||||||
|
{{ e }}
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="{{ url_for('entreprises.index') }}">Retour</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -1,227 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
|
||||||
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<div class="container">
|
|
||||||
<ul class="breadcrumbs">
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Fiche entreprise</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if logs %}
|
|
||||||
<div class="container">
|
|
||||||
<h3>Dernières opérations sur cette fiche <a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id) }}">Voir tout</a></h3>
|
|
||||||
<ul>
|
|
||||||
{% for log in logs %}
|
|
||||||
<li>
|
|
||||||
<span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span>
|
|
||||||
<span>{{ log.text|safe }} par {{ log.authenticated_user|get_nomcomplet_by_username }}</span>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="container fiche-entreprise">
|
|
||||||
<h2>Fiche entreprise - {{ entreprise.nom }} ({{ entreprise.siret }})</h2>
|
|
||||||
|
|
||||||
{% if not entreprise.active %}
|
|
||||||
<div class="info-active">
|
|
||||||
La fiche entreprise est désactivée<br>
|
|
||||||
{% if entreprise.notes_active != "" %}
|
|
||||||
Notes : {{ entreprise.notes_active }}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="entreprise">
|
|
||||||
<div>
|
|
||||||
SIRET {% if entreprise.siret_provisoire %}provisoire{% endif %} : {{ entreprise.siret }}<br>
|
|
||||||
Nom : {{ entreprise.nom }}<br>
|
|
||||||
Adresse : {{ entreprise.adresse }}<br>
|
|
||||||
Code postal : {{ entreprise.codepostal }}<br>
|
|
||||||
Ville : {{ entreprise.ville }}<br>
|
|
||||||
Pays : {{ entreprise.pays }}<br>
|
|
||||||
{% if entreprise.association %}
|
|
||||||
Association
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<div>
|
|
||||||
Taxe d'apprentissage<br>
|
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.add_taxe_apprentissage', entreprise_id=entreprise.id) }}">Ajouter taxe apprentissage</a>
|
|
||||||
<div class="taxe-apprentissage">
|
|
||||||
<ul id="liste-taxes-apprentissages">
|
|
||||||
{% if not taxes|check_taxe_now %}
|
|
||||||
<li>année actuelle : non versée</li>
|
|
||||||
{% endif %}
|
|
||||||
{% for taxe in taxes %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ url_for('entreprises.delete_taxe_apprentissage', entreprise_id=entreprise.id, taxe_id=taxe.id) }}"><img title="Supprimer taxe d'apprentissage" alt="supprimer" width="10" height="9" border="0" src="/ScoDoc/static/icons/delete_small_img.png" /></a>
|
|
||||||
<a href="{{ url_for('entreprises.edit_taxe_apprentissage', entreprise_id=entreprise.id, taxe_id=taxe.id) }}">{{ taxe.annee }}</a> : {{ taxe.montant }} euros {% if taxe.notes %}- {{ taxe.notes}} {% endif %}
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.edit_entreprise', entreprise_id=entreprise.id) }}">Modifier</a>
|
|
||||||
{% if entreprise.active %}
|
|
||||||
<a class="btn btn-danger" href="{{ url_for('entreprises.fiche_entreprise_desactiver', entreprise_id=entreprise.id) }}">Désactiver</a>
|
|
||||||
{% else %}
|
|
||||||
<a class="btn btn-success" href="{{ url_for('entreprises.fiche_entreprise_activer', entreprise_id=entreprise.id) }}">Activer</a>
|
|
||||||
{% endif %}
|
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.add_site', entreprise_id=entreprise.id) }}">Ajouter site</a>
|
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.add_offre', entreprise_id=entreprise.id) }}">Ajouter offre</a>
|
|
||||||
{% endif %}
|
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.contacts', entreprise_id=entreprise.id) }}">Liste contacts</a>
|
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.offres_expirees', entreprise_id=entreprise.id) }}">Voir les offres expirées</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="sites-et-offres">
|
|
||||||
{% if entreprise.sites %}
|
|
||||||
<div>
|
|
||||||
<h3>Sites</h3>
|
|
||||||
{% for site in entreprise.sites %}
|
|
||||||
<div class="site">
|
|
||||||
Nom : {{ site.nom }}<br>
|
|
||||||
Adresse : {{ site.adresse }}<br>
|
|
||||||
Code postal : {{ site.codepostal }}<br>
|
|
||||||
Ville : {{ site.ville }}<br>
|
|
||||||
Pays : {{ site.pays }}
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<div>
|
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.edit_site', entreprise_id=entreprise.id, site_id=site.id) }}">Modifier</a>
|
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.add_correspondant', entreprise_id=entreprise.id, site_id=site.id) }}">Ajouter correspondant</a>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesCorrespondants, None) %}
|
|
||||||
{% for correspondant in site.correspondants %}
|
|
||||||
{% include 'entreprises/_correspondant.html' %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if offres %}
|
|
||||||
<div>
|
|
||||||
<h3>Offres - <a href="{{ url_for('entreprises.offres_expirees', entreprise_id=entreprise.id) }}">Voir les offres expirées</a></h3>
|
|
||||||
{% for offre, files, offre_depts, correspondant in offres %}
|
|
||||||
{% include 'entreprises/_offre.html' %}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="margin-bottom: 10px;">
|
|
||||||
<h3>Liste des stages et apprentissages réalisés au sein de l'entreprise</h3>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<a class="btn btn-primary" href="{{ url_for('entreprises.add_stage_apprentissage', entreprise_id=entreprise.id) }}" style="margin-bottom:10px;">Ajouter stage ou apprentissage</a>
|
|
||||||
{% endif %}
|
|
||||||
<table id="table-stages-apprentissages">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td data-priority="3">Date début</td>
|
|
||||||
<td data-priority="4">Date fin</td>
|
|
||||||
<td data-priority="5">Durée</td>
|
|
||||||
<td data-priority="2">Type</td>
|
|
||||||
<td data-priority="1">Étudiant</td>
|
|
||||||
<td data-priority="6">Formation</td>
|
|
||||||
<td data-priority="7">Notes</td>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<td data-priority="3">Action</td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for stage_apprentissage, etudiant in stages_apprentissages %}
|
|
||||||
<tr>
|
|
||||||
<td>{{ stage_apprentissage.date_debut.strftime('%d/%m/%Y') }}</td>
|
|
||||||
<td>{{ stage_apprentissage.date_fin.strftime('%d/%m/%Y') }}</td>
|
|
||||||
<td>{{ (stage_apprentissage.date_fin-stage_apprentissage.date_debut).days//7 }} semaines</td>
|
|
||||||
<td>{{ stage_apprentissage.type_offre }}</td>
|
|
||||||
<td><a href="{{ url_for('scolar.ficheEtud', scodoc_dept=etudiant.dept_id|get_dept_acronym, etudid=stage_apprentissage.etudid) }}">{{ etudiant.nom|format_nom }} {{ etudiant.prenom|format_prenom }}</a></td>
|
|
||||||
<td>{% if stage_apprentissage.formation_text %}{{ stage_apprentissage.formation_text }}{% endif %}</td>
|
|
||||||
<td>{{ stage_apprentissage.notes }}</td>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<td>
|
|
||||||
<div class="btn-group">
|
|
||||||
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Action
|
|
||||||
<span class="caret"></span>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu pull-left">
|
|
||||||
<li><a href="{{ url_for('entreprises.edit_stage_apprentissage', entreprise_id=entreprise.id, stage_apprentissage_id=stage_apprentissage.id) }}">Modifier</a></li>
|
|
||||||
<li><a href="{{ url_for('entreprises.delete_stage_apprentissage', entreprise_id=entreprise.id, stage_apprentissage_id=stage_apprentissage.id) }}" style="color:red">Supprimer</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td>Date début</td>
|
|
||||||
<td>Date fin</td>
|
|
||||||
<td>Durée</td>
|
|
||||||
<td>Type</td>
|
|
||||||
<td>Étudiant</td>
|
|
||||||
<td>Formation</td>
|
|
||||||
<td>Notes</td>
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
||||||
<td>Action</td>
|
|
||||||
{% endif %}
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
|
||||||
let table = new DataTable('#table-stages-apprentissages',
|
|
||||||
{
|
|
||||||
"autoWidth": false,
|
|
||||||
"responsive": {
|
|
||||||
"details": true
|
|
||||||
},
|
|
||||||
"pageLength": 10,
|
|
||||||
"language": {
|
|
||||||
"emptyTable": "Aucune donnée disponible dans le tableau",
|
|
||||||
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
|
||||||
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
|
||||||
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
|
||||||
"lengthMenu": "Afficher _MENU_ entrées",
|
|
||||||
"loadingRecords": "Chargement...",
|
|
||||||
"processing": "Traitement...",
|
|
||||||
"search": "Rechercher:",
|
|
||||||
"zeroRecords": "Aucune entrée correspondante trouvée",
|
|
||||||
"paginate": {
|
|
||||||
"next": "Suivante",
|
|
||||||
"previous": "Précédente"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
253
app/templates/entreprises/fiche_entreprise.j2
Normal file
253
app/templates/entreprises/fiche_entreprise.j2
Normal file
@ -0,0 +1,253 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
||||||
|
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<div class="container">
|
||||||
|
<ul class="breadcrumbs">
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Fiche entreprise</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if logs %}
|
||||||
|
<div class="container">
|
||||||
|
<h3>Dernières opérations sur cette fiche <a
|
||||||
|
href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id) }}">Voir tout</a></h3>
|
||||||
|
<ul>
|
||||||
|
{% for log in logs %}
|
||||||
|
<li>
|
||||||
|
<span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span>
|
||||||
|
<span>{{ log.text|safe }} par {{ log.authenticated_user|get_nomcomplet_by_username }}</span>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="container fiche-entreprise">
|
||||||
|
<h2>Fiche entreprise - {{ entreprise.nom }} ({{ entreprise.siret }})</h2>
|
||||||
|
|
||||||
|
{% if not entreprise.active %}
|
||||||
|
<div class="info-active">
|
||||||
|
La fiche entreprise est désactivée<br>
|
||||||
|
{% if entreprise.notes_active != "" %}
|
||||||
|
Notes : {{ entreprise.notes_active }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="entreprise">
|
||||||
|
<div>
|
||||||
|
SIRET {% if entreprise.siret_provisoire %}provisoire{% endif %} : {{ entreprise.siret }}<br>
|
||||||
|
Nom : {{ entreprise.nom }}<br>
|
||||||
|
Adresse : {{ entreprise.adresse }}<br>
|
||||||
|
Code postal : {{ entreprise.codepostal }}<br>
|
||||||
|
Ville : {{ entreprise.ville }}<br>
|
||||||
|
Pays : {{ entreprise.pays }}<br>
|
||||||
|
{% if entreprise.association %}
|
||||||
|
Association
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<div>
|
||||||
|
Taxe d'apprentissage<br>
|
||||||
|
<a class="btn btn-primary"
|
||||||
|
href="{{ url_for('entreprises.add_taxe_apprentissage', entreprise_id=entreprise.id) }}">Ajouter taxe
|
||||||
|
apprentissage</a>
|
||||||
|
<div class="taxe-apprentissage">
|
||||||
|
<ul id="liste-taxes-apprentissages">
|
||||||
|
{% if not taxes|check_taxe_now %}
|
||||||
|
<li>année actuelle : non versée</li>
|
||||||
|
{% endif %}
|
||||||
|
{% for taxe in taxes %}
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="{{ url_for('entreprises.delete_taxe_apprentissage', entreprise_id=entreprise.id, taxe_id=taxe.id) }}"><img
|
||||||
|
title="Supprimer taxe d'apprentissage" alt="supprimer" width="10" height="9" border="0"
|
||||||
|
src="/ScoDoc/static/icons/delete_small_img.png" /></a>
|
||||||
|
<a
|
||||||
|
href="{{ url_for('entreprises.edit_taxe_apprentissage', entreprise_id=entreprise.id, taxe_id=taxe.id) }}">{{
|
||||||
|
taxe.annee }}</a> : {{ taxe.montant }} euros {% if taxe.notes %}- {{ taxe.notes}} {% endif
|
||||||
|
%}
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<a class="btn btn-primary"
|
||||||
|
href="{{ url_for('entreprises.edit_entreprise', entreprise_id=entreprise.id) }}">Modifier</a>
|
||||||
|
{% if entreprise.active %}
|
||||||
|
<a class="btn btn-danger"
|
||||||
|
href="{{ url_for('entreprises.fiche_entreprise_desactiver', entreprise_id=entreprise.id) }}">Désactiver</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="btn btn-success"
|
||||||
|
href="{{ url_for('entreprises.fiche_entreprise_activer', entreprise_id=entreprise.id) }}">Activer</a>
|
||||||
|
{% endif %}
|
||||||
|
<a class="btn btn-primary" href="{{ url_for('entreprises.add_site', entreprise_id=entreprise.id) }}">Ajouter
|
||||||
|
site</a>
|
||||||
|
<a class="btn btn-primary" href="{{ url_for('entreprises.add_offre', entreprise_id=entreprise.id) }}">Ajouter
|
||||||
|
offre</a>
|
||||||
|
{% endif %}
|
||||||
|
<a class="btn btn-primary" href="{{ url_for('entreprises.contacts', entreprise_id=entreprise.id) }}">Liste
|
||||||
|
contacts</a>
|
||||||
|
<a class="btn btn-primary" href="{{ url_for('entreprises.offres_expirees', entreprise_id=entreprise.id) }}">Voir
|
||||||
|
les offres expirées</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="sites-et-offres">
|
||||||
|
{% if entreprise.sites %}
|
||||||
|
<div>
|
||||||
|
<h3>Sites</h3>
|
||||||
|
{% for site in entreprise.sites %}
|
||||||
|
<div class="site">
|
||||||
|
Nom : {{ site.nom }}<br>
|
||||||
|
Adresse : {{ site.adresse }}<br>
|
||||||
|
Code postal : {{ site.codepostal }}<br>
|
||||||
|
Ville : {{ site.ville }}<br>
|
||||||
|
Pays : {{ site.pays }}
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<div>
|
||||||
|
<a class="btn btn-primary"
|
||||||
|
href="{{ url_for('entreprises.edit_site', entreprise_id=entreprise.id, site_id=site.id) }}">Modifier</a>
|
||||||
|
<a class="btn btn-primary"
|
||||||
|
href="{{ url_for('entreprises.add_correspondant', entreprise_id=entreprise.id, site_id=site.id) }}">Ajouter
|
||||||
|
correspondant</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesCorrespondants, None) %}
|
||||||
|
{% for correspondant in site.correspondants %}
|
||||||
|
{% include 'entreprises/_correspondant.html' %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if offres %}
|
||||||
|
<div>
|
||||||
|
<h3>Offres - <a href="{{ url_for('entreprises.offres_expirees', entreprise_id=entreprise.id) }}">Voir les
|
||||||
|
offres expirées</a></h3>
|
||||||
|
{% for offre, files, offre_depts, correspondant in offres %}
|
||||||
|
{% include 'entreprises/_offre.html' %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 10px;">
|
||||||
|
<h3>Liste des stages et apprentissages réalisés au sein de l'entreprise</h3>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<a class="btn btn-primary" href="{{ url_for('entreprises.add_stage_apprentissage', entreprise_id=entreprise.id) }}"
|
||||||
|
style="margin-bottom:10px;">Ajouter stage ou apprentissage</a>
|
||||||
|
{% endif %}
|
||||||
|
<table id="table-stages-apprentissages">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td data-priority="3">Date début</td>
|
||||||
|
<td data-priority="4">Date fin</td>
|
||||||
|
<td data-priority="5">Durée</td>
|
||||||
|
<td data-priority="2">Type</td>
|
||||||
|
<td data-priority="1">Étudiant</td>
|
||||||
|
<td data-priority="6">Formation</td>
|
||||||
|
<td data-priority="7">Notes</td>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<td data-priority="3">Action</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for stage_apprentissage, etudiant in stages_apprentissages %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ stage_apprentissage.date_debut.strftime('%d/%m/%Y') }}</td>
|
||||||
|
<td>{{ stage_apprentissage.date_fin.strftime('%d/%m/%Y') }}</td>
|
||||||
|
<td>{{ (stage_apprentissage.date_fin-stage_apprentissage.date_debut).days//7 }} semaines</td>
|
||||||
|
<td>{{ stage_apprentissage.type_offre }}</td>
|
||||||
|
<td><a
|
||||||
|
href="{{ url_for('scolar.ficheEtud', scodoc_dept=etudiant.dept_id|get_dept_acronym, etudid=stage_apprentissage.etudid) }}">{{
|
||||||
|
etudiant.nom|format_nom }} {{ etudiant.prenom|format_prenom }}</a></td>
|
||||||
|
<td>{% if stage_apprentissage.formation_text %}{{ stage_apprentissage.formation_text }}{% endif %}</td>
|
||||||
|
<td>{{ stage_apprentissage.notes }}</td>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<td>
|
||||||
|
<div class="btn-group">
|
||||||
|
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Action
|
||||||
|
<span class="caret"></span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu pull-left">
|
||||||
|
<li><a
|
||||||
|
href="{{ url_for('entreprises.edit_stage_apprentissage', entreprise_id=entreprise.id, stage_apprentissage_id=stage_apprentissage.id) }}">Modifier</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="{{ url_for('entreprises.delete_stage_apprentissage', entreprise_id=entreprise.id, stage_apprentissage_id=stage_apprentissage.id) }}"
|
||||||
|
style="color:red">Supprimer</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td>Date début</td>
|
||||||
|
<td>Date fin</td>
|
||||||
|
<td>Durée</td>
|
||||||
|
<td>Type</td>
|
||||||
|
<td>Étudiant</td>
|
||||||
|
<td>Formation</td>
|
||||||
|
<td>Notes</td>
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
||||||
|
<td>Action</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
let table = new DataTable('#table-stages-apprentissages',
|
||||||
|
{
|
||||||
|
"autoWidth": false,
|
||||||
|
"responsive": {
|
||||||
|
"details": true
|
||||||
|
},
|
||||||
|
"pageLength": 10,
|
||||||
|
"language": {
|
||||||
|
"emptyTable": "Aucune donnée disponible dans le tableau",
|
||||||
|
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
||||||
|
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
||||||
|
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
||||||
|
"lengthMenu": "Afficher _MENU_ entrées",
|
||||||
|
"loadingRecords": "Chargement...",
|
||||||
|
"processing": "Traitement...",
|
||||||
|
"search": "Rechercher:",
|
||||||
|
"zeroRecords": "Aucune entrée correspondante trouvée",
|
||||||
|
"paginate": {
|
||||||
|
"next": "Suivante",
|
||||||
|
"previous": "Précédente"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,84 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<div class="container">
|
|
||||||
<ul class="breadcrumbs">
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="{{ url_for('entreprises.validation') }}" class="breadcrumbs_link">Entreprises</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Fiche entreprise</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<h2>Fiche entreprise - {{ entreprise.nom }} ({{ entreprise.siret }})</h2>
|
|
||||||
|
|
||||||
<div class="entreprise">
|
|
||||||
<div>
|
|
||||||
SIRET {% if entreprise.siret_provisoire %}provisoire{% endif %} : {{ entreprise.siret }}<br>
|
|
||||||
Nom : {{ entreprise.nom }}<br>
|
|
||||||
Adresse : {{ entreprise.adresse }}<br>
|
|
||||||
Code postal : {{ entreprise.codepostal }}<br>
|
|
||||||
Ville : {{ entreprise.ville }}<br>
|
|
||||||
Pays : {{ entreprise.pays }}<br>
|
|
||||||
{% if entreprise.association %}
|
|
||||||
Association
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="sites-et-offres">
|
|
||||||
{% if entreprise.sites %}
|
|
||||||
<div>
|
|
||||||
<h3>Sites</h3>
|
|
||||||
{% for site in entreprise.sites %}
|
|
||||||
<div class="site">
|
|
||||||
Nom : {{ site.nom }}<br>
|
|
||||||
Adresse : {{ site.adresse }}<br>
|
|
||||||
Code postal : {{ site.codepostal }}<br>
|
|
||||||
Ville : {{ site.ville }}<br>
|
|
||||||
Pays : {{ site.pays }}
|
|
||||||
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesCorrespondants, None) %}
|
|
||||||
{% for correspondant in site.correspondants %}
|
|
||||||
<div class="correspondant">
|
|
||||||
<div>
|
|
||||||
Civilité : {{ correspondant.civilite|get_civilité }}<br>
|
|
||||||
Nom : {{ correspondant.nom }}<br>
|
|
||||||
Prénom : {{ correspondant.prenom }}<br>
|
|
||||||
{% if correspondant.telephone %}
|
|
||||||
Téléphone : {{ correspondant.telephone }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% if correspondant.mail %}
|
|
||||||
Mail : {{ correspondant.mail }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% if correspondant.poste %}
|
|
||||||
Poste : {{ correspondant.poste }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% if correspondant.service %}
|
|
||||||
Service : {{ correspondant.service }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% if correspondant.origine %}
|
|
||||||
Origine : {{ correspondant.origine }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% if correspondant.notes %}
|
|
||||||
Notes : {{ correspondant.notes }}<br>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<a class="btn btn-success" href="{{ url_for('entreprises.validate_entreprise', entreprise_id=entreprise.id) }}">Valider</a>
|
|
||||||
<a class="btn btn-danger" href="{{ url_for('entreprises.delete_validation_entreprise', entreprise_id=entreprise.id) }}">Supprimer</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
86
app/templates/entreprises/fiche_entreprise_validation.j2
Normal file
86
app/templates/entreprises/fiche_entreprise_validation.j2
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<div class="container">
|
||||||
|
<ul class="breadcrumbs">
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="{{ url_for('entreprises.validation') }}" class="breadcrumbs_link">Entreprises</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Fiche entreprise</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h2>Fiche entreprise - {{ entreprise.nom }} ({{ entreprise.siret }})</h2>
|
||||||
|
|
||||||
|
<div class="entreprise">
|
||||||
|
<div>
|
||||||
|
SIRET {% if entreprise.siret_provisoire %}provisoire{% endif %} : {{ entreprise.siret }}<br>
|
||||||
|
Nom : {{ entreprise.nom }}<br>
|
||||||
|
Adresse : {{ entreprise.adresse }}<br>
|
||||||
|
Code postal : {{ entreprise.codepostal }}<br>
|
||||||
|
Ville : {{ entreprise.ville }}<br>
|
||||||
|
Pays : {{ entreprise.pays }}<br>
|
||||||
|
{% if entreprise.association %}
|
||||||
|
Association
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sites-et-offres">
|
||||||
|
{% if entreprise.sites %}
|
||||||
|
<div>
|
||||||
|
<h3>Sites</h3>
|
||||||
|
{% for site in entreprise.sites %}
|
||||||
|
<div class="site">
|
||||||
|
Nom : {{ site.nom }}<br>
|
||||||
|
Adresse : {{ site.adresse }}<br>
|
||||||
|
Code postal : {{ site.codepostal }}<br>
|
||||||
|
Ville : {{ site.ville }}<br>
|
||||||
|
Pays : {{ site.pays }}
|
||||||
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesCorrespondants, None) %}
|
||||||
|
{% for correspondant in site.correspondants %}
|
||||||
|
<div class="correspondant">
|
||||||
|
<div>
|
||||||
|
Civilité : {{ correspondant.civilite|get_civilité }}<br>
|
||||||
|
Nom : {{ correspondant.nom }}<br>
|
||||||
|
Prénom : {{ correspondant.prenom }}<br>
|
||||||
|
{% if correspondant.telephone %}
|
||||||
|
Téléphone : {{ correspondant.telephone }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% if correspondant.mail %}
|
||||||
|
Mail : {{ correspondant.mail }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% if correspondant.poste %}
|
||||||
|
Poste : {{ correspondant.poste }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% if correspondant.service %}
|
||||||
|
Service : {{ correspondant.service }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% if correspondant.origine %}
|
||||||
|
Origine : {{ correspondant.origine }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% if correspondant.notes %}
|
||||||
|
Notes : {{ correspondant.notes }}<br>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<a class="btn btn-success"
|
||||||
|
href="{{ url_for('entreprises.validate_entreprise', entreprise_id=entreprise.id) }}">Valider</a>
|
||||||
|
<a class="btn btn-danger"
|
||||||
|
href="{{ url_for('entreprises.delete_validation_entreprise', entreprise_id=entreprise.id) }}">Supprimer</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
@ -1,62 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
<link type="text/css" rel="stylesheet" href="/ScoDoc/static/css/autosuggest_inquisitor.css" />
|
|
||||||
<script src="/ScoDoc/static/libjs/AutoSuggest.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<h1>{{ title }}</h1>
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<p>
|
|
||||||
(*) champs requis
|
|
||||||
</p>
|
|
||||||
{{ wtf.quick_form(form, novalidate=True) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
{# pour les formulaires offre #}
|
|
||||||
var champ_depts = document.getElementById("depts")
|
|
||||||
if (champ_depts) {
|
|
||||||
var closest_form_control = champ_depts.closest(".form-control")
|
|
||||||
closest_form_control.classList.remove("form-control")
|
|
||||||
}
|
|
||||||
|
|
||||||
if(document.getElementById("expiration_date") && document.getElementById("expiration_date").value === "")
|
|
||||||
expiration()
|
|
||||||
|
|
||||||
if(document.getElementById("type_offre"))
|
|
||||||
document.getElementById("type_offre").addEventListener("change", expiration);
|
|
||||||
|
|
||||||
function expiration() {
|
|
||||||
var date = new Date()
|
|
||||||
var expiration = document.getElementById("expiration_date")
|
|
||||||
var type_offre = document.getElementById("type_offre").value
|
|
||||||
if (type_offre === "Alternance") {
|
|
||||||
expiration.value = `${date.getFullYear() + 1}-01-01`
|
|
||||||
} else {
|
|
||||||
if(date.getMonth() + 1 < 8)
|
|
||||||
expiration.value = `${date.getFullYear()}-08-01`
|
|
||||||
else
|
|
||||||
expiration.value = `${date.getFullYear() + 1}-08-01`
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var responsables_options = {
|
|
||||||
script: "/ScoDoc/entreprises/responsables?",
|
|
||||||
varname: "term",
|
|
||||||
json: true,
|
|
||||||
noresults: "Valeur invalide !",
|
|
||||||
minchars: 2,
|
|
||||||
timeout: 60000
|
|
||||||
};
|
|
||||||
|
|
||||||
var as_utilisateurs = new bsn.AutoSuggest('utilisateur', responsables_options);
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
62
app/templates/entreprises/form.j2
Normal file
62
app/templates/entreprises/form.j2
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
<link type="text/css" rel="stylesheet" href="/ScoDoc/static/css/autosuggest_inquisitor.css" />
|
||||||
|
<script src="/ScoDoc/static/libjs/AutoSuggest.js"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<h1>{{ title }}</h1>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<p>
|
||||||
|
(*) champs requis
|
||||||
|
</p>
|
||||||
|
{{ wtf.quick_form(form, novalidate=True) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
{# pour les formulaires offre # }
|
||||||
|
var champ_depts = document.getElementById("depts")
|
||||||
|
if (champ_depts) {
|
||||||
|
var closest_form_control = champ_depts.closest(".form-control")
|
||||||
|
closest_form_control.classList.remove("form-control")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.getElementById("expiration_date") && document.getElementById("expiration_date").value === "")
|
||||||
|
expiration()
|
||||||
|
|
||||||
|
if (document.getElementById("type_offre"))
|
||||||
|
document.getElementById("type_offre").addEventListener("change", expiration);
|
||||||
|
|
||||||
|
function expiration() {
|
||||||
|
var date = new Date()
|
||||||
|
var expiration = document.getElementById("expiration_date")
|
||||||
|
var type_offre = document.getElementById("type_offre").value
|
||||||
|
if (type_offre === "Alternance") {
|
||||||
|
expiration.value = `${date.getFullYear() + 1}-01-01`
|
||||||
|
} else {
|
||||||
|
if (date.getMonth() + 1 < 8)
|
||||||
|
expiration.value = `${date.getFullYear()}-08-01`
|
||||||
|
else
|
||||||
|
expiration.value = `${date.getFullYear() + 1}-08-01`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var responsables_options = {
|
||||||
|
script: "/ScoDoc/entreprises/responsables?",
|
||||||
|
varname: "term",
|
||||||
|
json: true,
|
||||||
|
noresults: "Valeur invalide !",
|
||||||
|
minchars: 2,
|
||||||
|
timeout: 60000
|
||||||
|
};
|
||||||
|
|
||||||
|
var as_utilisateurs = new bsn.AutoSuggest('utilisateur', responsables_options);
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,91 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<h1>{{ title }}</h1>
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<p>
|
|
||||||
(*) champs requis
|
|
||||||
</p>
|
|
||||||
<form method="POST" action="" novalidate>
|
|
||||||
{{ form.hidden_tag() }}
|
|
||||||
{{ form.correspondants.label }}
|
|
||||||
{% for subfield in form.correspondants %}
|
|
||||||
{% if subfield.errors %}
|
|
||||||
<p class="title-form-error">Formulaire {{ subfield.label.text }}</p>
|
|
||||||
{% endif %}
|
|
||||||
{% for subsubfield in subfield %}
|
|
||||||
{% if subsubfield.errors %}
|
|
||||||
{% for error in subsubfield.errors %}
|
|
||||||
<p class="help-block form-error">{{ error }}</p>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
|
||||||
{{ form.correspondants }}
|
|
||||||
<div style="margin-bottom: 10px;">
|
|
||||||
<button class="btn btn-default" id="add-correspondant-field">Ajouter un correspondant</button>
|
|
||||||
{{ form.submit(class_="btn btn-default") }}
|
|
||||||
{{ form.cancel(class_="btn btn-default") }}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
let allCorrepondantsFieldWrapper = document.getElementById('correspondants');
|
|
||||||
let allCorrepondantsForm = allCorrepondantsFieldWrapper.getElementsByTagName('li');
|
|
||||||
for(let i = 0; i < allCorrepondantsForm.length; i++) {
|
|
||||||
let form_id = allCorrepondantsForm[i].getElementsByTagName('table')[0].id
|
|
||||||
if(form_id.split('-')[1] != 0)
|
|
||||||
allCorrepondantsForm[i].insertAdjacentHTML('beforeend', `<div class="btn btn-default btn-remove" onclick="deleteForm('${form_id}')">Retirer ce correspondant</div>`)
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = function(e) {
|
|
||||||
let addCorrespondantFieldBtn = document.getElementById('add-correspondant-field');
|
|
||||||
addCorrespondantFieldBtn.addEventListener('click', function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
let allCorrepondantsFieldWrapper = document.getElementById('correspondants');
|
|
||||||
let allCorrepondantsField = allCorrepondantsFieldWrapper.getElementsByTagName('input');
|
|
||||||
let correspondantInputIds = []
|
|
||||||
let csrf_token = document.getElementById('csrf_token').value;
|
|
||||||
for(let i = 0; i < allCorrepondantsField.length; i++) {
|
|
||||||
correspondantInputIds.push(parseInt(allCorrepondantsField[i].name.split('-')[1]));
|
|
||||||
}
|
|
||||||
let newFieldName = `correspondants-${Math.max(...correspondantInputIds) + 1}`;
|
|
||||||
allCorrepondantsFieldWrapper.insertAdjacentHTML('beforeend',`
|
|
||||||
<li>
|
|
||||||
<label for="${newFieldName}">Correspondants-${Math.max(...correspondantInputIds) + 1}</label>
|
|
||||||
<table id="${newFieldName}">
|
|
||||||
<tr><th><label for="${newFieldName}-civilite">Civilité (*)</label></th><td><select class="form-control" id="${newFieldName}-civilite" name="${newFieldName}-civilite" required><option value="H">Monsieur</option><option value="F">Madame</option></select></td></tr>
|
|
||||||
<tr><th><label for="${newFieldName}-nom">Nom (*)</label></th><td><input class="form-control" id="${newFieldName}-nom" name="${newFieldName}-nom" required type="text" value=""></td></tr>
|
|
||||||
<tr><th><label for="${newFieldName}-prenom">Prénom (*)</label></th><td><input class="form-control" id="${newFieldName}-prenom" name="${newFieldName}-prenom" required type="text" value=""></td></tr>
|
|
||||||
<tr><th><label for="${newFieldName}-telephone">Téléphone (*)</label></th><td><input class="form-control" id="${newFieldName}-telephone" name="${newFieldName}-telephone" type="text" value=""></td></tr>
|
|
||||||
<tr><th><label for="${newFieldName}-mail">Mail (*)</label></th><td><input class="form-control" id="${newFieldName}-mail" name="${newFieldName}-mail" type="text" value=""></td></tr>
|
|
||||||
<tr><th><label for="${newFieldName}-poste">Poste</label></th><td><input class="form-control" id="${newFieldName}-poste" name="${newFieldName}-poste" type="text" value=""></td></tr>
|
|
||||||
<tr><th><label for="${newFieldName}-service">Service</label></th><td><input class="form-control" id="${newFieldName}-service" name="${newFieldName}-service" type="text" value=""></td></tr>
|
|
||||||
<tr><th><label for="${newFieldName}-origine">Origine</label></th><td><input class="form-control" id="${newFieldName}-origine" name="${newFieldName}-origine" type="text" value=""></td></tr>
|
|
||||||
<tr><th><label for="${newFieldName}-notes">Notes</label></th><td><input class="form-control" id="${newFieldName}-notes" name="${newFieldName}-notes" type="text" value=""></td></tr>
|
|
||||||
</table>
|
|
||||||
<input id="${newFieldName}-csrf_token" name="${newFieldName}-csrf_token" type="hidden" value=${csrf_token}>
|
|
||||||
<div class="btn btn-default btn-remove" onclick="deleteForm('${newFieldName}')">Retirer ce correspondant</div>
|
|
||||||
</li>
|
|
||||||
`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function deleteForm(x) {
|
|
||||||
var li_form = document.querySelector(`label[for=${x}]`).closest('li');
|
|
||||||
if (li_form) {
|
|
||||||
li_form.remove()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
91
app/templates/entreprises/form_ajout_correspondants.j2
Normal file
91
app/templates/entreprises/form_ajout_correspondants.j2
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<h1>{{ title }}</h1>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<p>
|
||||||
|
(*) champs requis
|
||||||
|
</p>
|
||||||
|
<form method="POST" action="" novalidate>
|
||||||
|
{{ form.hidden_tag() }}
|
||||||
|
{{ form.correspondants.label }}
|
||||||
|
{% for subfield in form.correspondants %}
|
||||||
|
{% if subfield.errors %}
|
||||||
|
<p class="title-form-error">Formulaire {{ subfield.label.text }}</p>
|
||||||
|
{% endif %}
|
||||||
|
{% for subsubfield in subfield %}
|
||||||
|
{% if subsubfield.errors %}
|
||||||
|
{% for error in subsubfield.errors %}
|
||||||
|
<p class="help-block form-error">{{ error }}</p>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
{{ form.correspondants }}
|
||||||
|
<div style="margin-bottom: 10px;">
|
||||||
|
<button class="btn btn-default" id="add-correspondant-field">Ajouter un correspondant</button>
|
||||||
|
{{ form.submit(class_="btn btn-default") }}
|
||||||
|
{{ form.cancel(class_="btn btn-default") }}
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let allCorrepondantsFieldWrapper = document.getElementById('correspondants');
|
||||||
|
let allCorrepondantsForm = allCorrepondantsFieldWrapper.getElementsByTagName('li');
|
||||||
|
for (let i = 0; i < allCorrepondantsForm.length; i++) {
|
||||||
|
let form_id = allCorrepondantsForm[i].getElementsByTagName('table')[0].id
|
||||||
|
if (form_id.split('-')[1] != 0)
|
||||||
|
allCorrepondantsForm[i].insertAdjacentHTML('beforeend', `<div class="btn btn-default btn-remove" onclick="deleteForm('${form_id}')">Retirer ce correspondant</div>`)
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload = function (e) {
|
||||||
|
let addCorrespondantFieldBtn = document.getElementById('add-correspondant-field');
|
||||||
|
addCorrespondantFieldBtn.addEventListener('click', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
let allCorrepondantsFieldWrapper = document.getElementById('correspondants');
|
||||||
|
let allCorrepondantsField = allCorrepondantsFieldWrapper.getElementsByTagName('input');
|
||||||
|
let correspondantInputIds = []
|
||||||
|
let csrf_token = document.getElementById('csrf_token').value;
|
||||||
|
for (let i = 0; i < allCorrepondantsField.length; i++) {
|
||||||
|
correspondantInputIds.push(parseInt(allCorrepondantsField[i].name.split('-')[1]));
|
||||||
|
}
|
||||||
|
let newFieldName = `correspondants-${Math.max(...correspondantInputIds) + 1}`;
|
||||||
|
allCorrepondantsFieldWrapper.insertAdjacentHTML('beforeend', `
|
||||||
|
<li>
|
||||||
|
<label for="${newFieldName}">Correspondants-${Math.max(...correspondantInputIds) + 1}</label>
|
||||||
|
<table id="${newFieldName}">
|
||||||
|
<tr><th><label for="${newFieldName}-civilite">Civilité (*)</label></th><td><select class="form-control" id="${newFieldName}-civilite" name="${newFieldName}-civilite" required><option value="H">Monsieur</option><option value="F">Madame</option></select></td></tr>
|
||||||
|
<tr><th><label for="${newFieldName}-nom">Nom (*)</label></th><td><input class="form-control" id="${newFieldName}-nom" name="${newFieldName}-nom" required type="text" value=""></td></tr>
|
||||||
|
<tr><th><label for="${newFieldName}-prenom">Prénom (*)</label></th><td><input class="form-control" id="${newFieldName}-prenom" name="${newFieldName}-prenom" required type="text" value=""></td></tr>
|
||||||
|
<tr><th><label for="${newFieldName}-telephone">Téléphone (*)</label></th><td><input class="form-control" id="${newFieldName}-telephone" name="${newFieldName}-telephone" type="text" value=""></td></tr>
|
||||||
|
<tr><th><label for="${newFieldName}-mail">Mail (*)</label></th><td><input class="form-control" id="${newFieldName}-mail" name="${newFieldName}-mail" type="text" value=""></td></tr>
|
||||||
|
<tr><th><label for="${newFieldName}-poste">Poste</label></th><td><input class="form-control" id="${newFieldName}-poste" name="${newFieldName}-poste" type="text" value=""></td></tr>
|
||||||
|
<tr><th><label for="${newFieldName}-service">Service</label></th><td><input class="form-control" id="${newFieldName}-service" name="${newFieldName}-service" type="text" value=""></td></tr>
|
||||||
|
<tr><th><label for="${newFieldName}-origine">Origine</label></th><td><input class="form-control" id="${newFieldName}-origine" name="${newFieldName}-origine" type="text" value=""></td></tr>
|
||||||
|
<tr><th><label for="${newFieldName}-notes">Notes</label></th><td><input class="form-control" id="${newFieldName}-notes" name="${newFieldName}-notes" type="text" value=""></td></tr>
|
||||||
|
</table>
|
||||||
|
<input id="${newFieldName}-csrf_token" name="${newFieldName}-csrf_token" type="hidden" value=${csrf_token}>
|
||||||
|
<div class="btn btn-default btn-remove" onclick="deleteForm('${newFieldName}')">Retirer ce correspondant</div>
|
||||||
|
</li>
|
||||||
|
`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteForm(x) {
|
||||||
|
var li_form = document.querySelector(`label[for=${x}]`).closest('li');
|
||||||
|
if (li_form) {
|
||||||
|
li_form.remove()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,58 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<h1>Ajout entreprise</h1>
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<p>
|
|
||||||
Les champs s'auto complète selon le SIRET<br>
|
|
||||||
(*) champs requis
|
|
||||||
</p>
|
|
||||||
{{ wtf.quick_form(form, novalidate=True) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
{# ajout margin-bottom sur le champ pays #}
|
|
||||||
var champ_pays = document.getElementById("pays")
|
|
||||||
if (champ_pays !== null) {
|
|
||||||
var closest_form_group = champ_pays.closest(".form-group")
|
|
||||||
closest_form_group.style.marginBottom = "50px"
|
|
||||||
}
|
|
||||||
|
|
||||||
document.getElementById("siret").addEventListener("keyup", autocomplete);
|
|
||||||
|
|
||||||
function autocomplete() {
|
|
||||||
var input = document.getElementById("siret").value.replaceAll(" ", "")
|
|
||||||
if(input.length >= 14) {
|
|
||||||
fetch("https://entreprise.data.gouv.fr/api/sirene/v1/siret/" + input)
|
|
||||||
.then(response => {
|
|
||||||
if(response.ok)
|
|
||||||
return response.json()
|
|
||||||
else {
|
|
||||||
emptyForm()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.then(response => fillForm(response))
|
|
||||||
.catch(err => err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function fillForm(response) {
|
|
||||||
document.getElementById("nom_entreprise").value = response.etablissement.l1_normalisee
|
|
||||||
document.getElementById("adresse").value = response.etablissement.l4_normalisee
|
|
||||||
document.getElementById("codepostal").value = response.etablissement.code_postal
|
|
||||||
document.getElementById("ville").value = response.etablissement.libelle_commune
|
|
||||||
}
|
|
||||||
|
|
||||||
function emptyForm() {
|
|
||||||
document.getElementById("nom_entreprise").value = ''
|
|
||||||
document.getElementById("adresse").value = ''
|
|
||||||
document.getElementById("codepostal").value = ''
|
|
||||||
document.getElementById("ville").value = ''
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
58
app/templates/entreprises/form_ajout_entreprise.j2
Normal file
58
app/templates/entreprises/form_ajout_entreprise.j2
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<h1>Ajout entreprise</h1>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<p>
|
||||||
|
Les champs s'auto complète selon le SIRET<br>
|
||||||
|
(*) champs requis
|
||||||
|
</p>
|
||||||
|
{{ wtf.quick_form(form, novalidate=True) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
{# ajout margin - bottom sur le champ pays # }
|
||||||
|
var champ_pays = document.getElementById("pays")
|
||||||
|
if (champ_pays !== null) {
|
||||||
|
var closest_form_group = champ_pays.closest(".form-group")
|
||||||
|
closest_form_group.style.marginBottom = "50px"
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById("siret").addEventListener("keyup", autocomplete);
|
||||||
|
|
||||||
|
function autocomplete() {
|
||||||
|
var input = document.getElementById("siret").value.replaceAll(" ", "")
|
||||||
|
if (input.length >= 14) {
|
||||||
|
fetch("https://entreprise.data.gouv.fr/api/sirene/v1/siret/" + input)
|
||||||
|
.then(response => {
|
||||||
|
if (response.ok)
|
||||||
|
return response.json()
|
||||||
|
else {
|
||||||
|
emptyForm()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(response => fillForm(response))
|
||||||
|
.catch(err => err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function fillForm(response) {
|
||||||
|
document.getElementById("nom_entreprise").value = response.etablissement.l1_normalisee
|
||||||
|
document.getElementById("adresse").value = response.etablissement.l4_normalisee
|
||||||
|
document.getElementById("codepostal").value = response.etablissement.code_postal
|
||||||
|
document.getElementById("ville").value = response.etablissement.libelle_commune
|
||||||
|
}
|
||||||
|
|
||||||
|
function emptyForm() {
|
||||||
|
document.getElementById("nom_entreprise").value = ''
|
||||||
|
document.getElementById("adresse").value = ''
|
||||||
|
document.getElementById("codepostal").value = ''
|
||||||
|
document.getElementById("ville").value = ''
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,36 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
<link type="text/css" rel="stylesheet" href="/ScoDoc/static/css/autosuggest_inquisitor.css" />
|
|
||||||
<script src="/ScoDoc/static/libjs/AutoSuggest.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<h1>{{ title }}</h1>
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<p>
|
|
||||||
(*) champs requis
|
|
||||||
</p>
|
|
||||||
{{ wtf.quick_form(form, novalidate=True) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
window.onload = function(e) {
|
|
||||||
var etudiants_options = {
|
|
||||||
script: "/ScoDoc/entreprises/etudiants?",
|
|
||||||
varname: "term",
|
|
||||||
json: true,
|
|
||||||
noresults: "Valeur invalide !",
|
|
||||||
minchars: 2,
|
|
||||||
timeout: 60000
|
|
||||||
};
|
|
||||||
var as_etudiants = new bsn.AutoSuggest('etudiant', etudiants_options);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
36
app/templates/entreprises/form_ajout_stage_apprentissage.j2
Normal file
36
app/templates/entreprises/form_ajout_stage_apprentissage.j2
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
<link type="text/css" rel="stylesheet" href="/ScoDoc/static/css/autosuggest_inquisitor.css" />
|
||||||
|
<script src="/ScoDoc/static/libjs/AutoSuggest.js"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<h1>{{ title }}</h1>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<p>
|
||||||
|
(*) champs requis
|
||||||
|
</p>
|
||||||
|
{{ wtf.quick_form(form, novalidate=True) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.onload = function (e) {
|
||||||
|
var etudiants_options = {
|
||||||
|
script: "/ScoDoc/entreprises/etudiants?",
|
||||||
|
varname: "term",
|
||||||
|
json: true,
|
||||||
|
noresults: "Valeur invalide !",
|
||||||
|
minchars: 2,
|
||||||
|
timeout: 60000
|
||||||
|
};
|
||||||
|
var as_etudiants = new bsn.AutoSuggest('etudiant', etudiants_options);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,15 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<h1>{{ title }}</h1>
|
|
||||||
<br>
|
|
||||||
<div>{{ info_message }}</div>
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
{{ wtf.quick_form(form) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
15
app/templates/entreprises/form_confirmation.j2
Normal file
15
app/templates/entreprises/form_confirmation.j2
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<h1>{{ title }}</h1>
|
||||||
|
<br>
|
||||||
|
<div>{{ info_message }}</div>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
{{ wtf.quick_form(form) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
@ -1,88 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
<link type="text/css" rel="stylesheet" href="/ScoDoc/static/css/autosuggest_inquisitor.css" />
|
|
||||||
<script src="/ScoDoc/static/libjs/AutoSuggest.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<h1>Envoyer une offre</h1>
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<p>
|
|
||||||
(*) champs requis
|
|
||||||
</p>
|
|
||||||
<form method="POST" action="" novalidate>
|
|
||||||
{{ form.hidden_tag() }}
|
|
||||||
{{ form.responsables.label }}
|
|
||||||
{% for error in form.responsables.errors %}
|
|
||||||
<p class="help-block form-error">{{ error }}</p>
|
|
||||||
{% endfor %}
|
|
||||||
{{ form.responsables }}
|
|
||||||
<div style="margin-bottom: 10px;">
|
|
||||||
<button class="btn btn-default" id="add-responsable-field">Ajouter un responsable</button>
|
|
||||||
{{ form.submit(class_="btn btn-default") }}
|
|
||||||
{{ form.cancel(class_="btn btn-default") }}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
let allResponsablesFieldWrapper = document.getElementById('responsables');
|
|
||||||
let allResponsablesField = allResponsablesFieldWrapper.getElementsByTagName('li');
|
|
||||||
for(let i = 0; i < allResponsablesField.length; i++) {
|
|
||||||
let form_id = allResponsablesField[i].getElementsByTagName('input')[0].id
|
|
||||||
if(form_id.split('-')[1] != 0)
|
|
||||||
allResponsablesField[i].insertAdjacentHTML('beforeend', `<div class="btn btn-default btn-remove" onclick="deleteForm('${form_id}')">Retirer</div>`)
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = function(e) {
|
|
||||||
var responsables_options = {
|
|
||||||
script: "/ScoDoc/entreprises/responsables?",
|
|
||||||
varname: "term",
|
|
||||||
json: true,
|
|
||||||
noresults: "Valeur invalide !",
|
|
||||||
minchars: 2,
|
|
||||||
timeout: 60000
|
|
||||||
};
|
|
||||||
|
|
||||||
let allResponsablesFieldWrapper = document.getElementById('responsables');
|
|
||||||
let allResponsablesField = allResponsablesFieldWrapper.getElementsByTagName('input');
|
|
||||||
for(let i = 0; i < allResponsablesField.length; i++) {
|
|
||||||
new bsn.AutoSuggest(allResponsablesField[i].id, responsables_options);
|
|
||||||
}
|
|
||||||
|
|
||||||
let addResponsableFieldBtn = document.getElementById('add-responsable-field');
|
|
||||||
addResponsableFieldBtn.addEventListener('click', function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
let allResponsablesFieldWrapper = document.getElementById('responsables');
|
|
||||||
let allResponsablesField = allResponsablesFieldWrapper.getElementsByTagName('input');
|
|
||||||
let responsableInputIds = []
|
|
||||||
for(let i = 0; i < allResponsablesField.length; i++) {
|
|
||||||
responsableInputIds.push(parseInt(allResponsablesField[i].name.split('-')[1]));
|
|
||||||
}
|
|
||||||
let newFieldName = `responsables-${Math.max(...responsableInputIds) + 1}`;
|
|
||||||
allResponsablesFieldWrapper.insertAdjacentHTML('beforeend',`
|
|
||||||
<li>
|
|
||||||
<label for="${newFieldName}">Responsable (*)</label>
|
|
||||||
<input class="form-control" id="${newFieldName}" name="${newFieldName}" type="text" value="" placeholder="Tapez le nom du responsable de formation">
|
|
||||||
<div class="btn btn-default btn-remove" onclick="deleteForm('${newFieldName}')">Retirer</div>
|
|
||||||
</li>
|
|
||||||
`);
|
|
||||||
var as_r = new bsn.AutoSuggest(newFieldName, responsables_options);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function deleteForm(x) {
|
|
||||||
var li_form = document.querySelector(`label[for=${x}]`).closest('li');
|
|
||||||
if (li_form) {
|
|
||||||
li_form.remove()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
88
app/templates/entreprises/form_envoi_offre.j2
Normal file
88
app/templates/entreprises/form_envoi_offre.j2
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
<link type="text/css" rel="stylesheet" href="/ScoDoc/static/css/autosuggest_inquisitor.css" />
|
||||||
|
<script src="/ScoDoc/static/libjs/AutoSuggest.js"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<h1>Envoyer une offre</h1>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<p>
|
||||||
|
(*) champs requis
|
||||||
|
</p>
|
||||||
|
<form method="POST" action="" novalidate>
|
||||||
|
{{ form.hidden_tag() }}
|
||||||
|
{{ form.responsables.label }}
|
||||||
|
{% for error in form.responsables.errors %}
|
||||||
|
<p class="help-block form-error">{{ error }}</p>
|
||||||
|
{% endfor %}
|
||||||
|
{{ form.responsables }}
|
||||||
|
<div style="margin-bottom: 10px;">
|
||||||
|
<button class="btn btn-default" id="add-responsable-field">Ajouter un responsable</button>
|
||||||
|
{{ form.submit(class_="btn btn-default") }}
|
||||||
|
{{ form.cancel(class_="btn btn-default") }}
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let allResponsablesFieldWrapper = document.getElementById('responsables');
|
||||||
|
let allResponsablesField = allResponsablesFieldWrapper.getElementsByTagName('li');
|
||||||
|
for (let i = 0; i < allResponsablesField.length; i++) {
|
||||||
|
let form_id = allResponsablesField[i].getElementsByTagName('input')[0].id
|
||||||
|
if (form_id.split('-')[1] != 0)
|
||||||
|
allResponsablesField[i].insertAdjacentHTML('beforeend', `<div class="btn btn-default btn-remove" onclick="deleteForm('${form_id}')">Retirer</div>`)
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload = function (e) {
|
||||||
|
var responsables_options = {
|
||||||
|
script: "/ScoDoc/entreprises/responsables?",
|
||||||
|
varname: "term",
|
||||||
|
json: true,
|
||||||
|
noresults: "Valeur invalide !",
|
||||||
|
minchars: 2,
|
||||||
|
timeout: 60000
|
||||||
|
};
|
||||||
|
|
||||||
|
let allResponsablesFieldWrapper = document.getElementById('responsables');
|
||||||
|
let allResponsablesField = allResponsablesFieldWrapper.getElementsByTagName('input');
|
||||||
|
for (let i = 0; i < allResponsablesField.length; i++) {
|
||||||
|
new bsn.AutoSuggest(allResponsablesField[i].id, responsables_options);
|
||||||
|
}
|
||||||
|
|
||||||
|
let addResponsableFieldBtn = document.getElementById('add-responsable-field');
|
||||||
|
addResponsableFieldBtn.addEventListener('click', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
let allResponsablesFieldWrapper = document.getElementById('responsables');
|
||||||
|
let allResponsablesField = allResponsablesFieldWrapper.getElementsByTagName('input');
|
||||||
|
let responsableInputIds = []
|
||||||
|
for (let i = 0; i < allResponsablesField.length; i++) {
|
||||||
|
responsableInputIds.push(parseInt(allResponsablesField[i].name.split('-')[1]));
|
||||||
|
}
|
||||||
|
let newFieldName = `responsables-${Math.max(...responsableInputIds) + 1}`;
|
||||||
|
allResponsablesFieldWrapper.insertAdjacentHTML('beforeend', `
|
||||||
|
<li>
|
||||||
|
<label for="${newFieldName}">Responsable (*)</label>
|
||||||
|
<input class="form-control" id="${newFieldName}" name="${newFieldName}" type="text" value="" placeholder="Tapez le nom du responsable de formation">
|
||||||
|
<div class="btn btn-default btn-remove" onclick="deleteForm('${newFieldName}')">Retirer</div>
|
||||||
|
</li>
|
||||||
|
`);
|
||||||
|
var as_r = new bsn.AutoSuggest(newFieldName, responsables_options);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteForm(x) {
|
||||||
|
var li_form = document.querySelector(`label[for=${x}]`).closest('li');
|
||||||
|
if (li_form) {
|
||||||
|
li_form.remove()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,68 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<h1>{{ title }}</h1>
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<p>
|
|
||||||
(*) champs requis
|
|
||||||
</p>
|
|
||||||
{{ wtf.quick_form(form, novalidate=True) }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="sirene-data" class="col-md-5">
|
|
||||||
<b>Informations de la base SIRENE</b>
|
|
||||||
<div id="nom_entreprise_base"></div>
|
|
||||||
<div id="adresse_base"></div>
|
|
||||||
<div id="codepostal_base"></div>
|
|
||||||
<div id="ville_base"></div>
|
|
||||||
<a class="btn btn-primary" onclick="getData()">Copier</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
var value = document.getElementById("siret").value;
|
|
||||||
fetch("https://entreprise.data.gouv.fr/api/sirene/v1/siret/" + value)
|
|
||||||
.then(response => {
|
|
||||||
if(response.ok)
|
|
||||||
return response.json()
|
|
||||||
})
|
|
||||||
.then(response => showSireneData(response))
|
|
||||||
.catch(err => {
|
|
||||||
document.getElementById("sirene-data").style.display = "none"
|
|
||||||
return err
|
|
||||||
})
|
|
||||||
|
|
||||||
function showSireneData(response) {
|
|
||||||
document.getElementById("nom_entreprise_base").innerHTML = "Nom de l'entreprise: " + response.etablissement.l1_normalisee
|
|
||||||
document.getElementById("adresse_base").innerHTML = "Adresse: " + response.etablissement.l4_normalisee
|
|
||||||
document.getElementById("codepostal_base").innerHTML = "Code postal: " + response.etablissement.code_postal
|
|
||||||
document.getElementById("ville_base").innerHTML = "Ville: " + response.etablissement.libelle_commune
|
|
||||||
}
|
|
||||||
|
|
||||||
function getData() {
|
|
||||||
var value = document.getElementById("siret").value;
|
|
||||||
fetch("https://entreprise.data.gouv.fr/api/sirene/v1/siret/" + value)
|
|
||||||
.then(response => {
|
|
||||||
if(response.ok)
|
|
||||||
return response.json()
|
|
||||||
})
|
|
||||||
.then(response => fillForm(response))
|
|
||||||
.catch(err => err)
|
|
||||||
}
|
|
||||||
|
|
||||||
function fillForm(response) {
|
|
||||||
document.getElementById("nom").value = response.etablissement.l1_normalisee
|
|
||||||
document.getElementById("adresse").value = response.etablissement.l4_normalisee
|
|
||||||
document.getElementById("codepostal").value = response.etablissement.code_postal
|
|
||||||
document.getElementById("ville").value = response.etablissement.libelle_commune
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
68
app/templates/entreprises/form_modification_entreprise.j2
Normal file
68
app/templates/entreprises/form_modification_entreprise.j2
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<h1>{{ title }}</h1>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<p>
|
||||||
|
(*) champs requis
|
||||||
|
</p>
|
||||||
|
{{ wtf.quick_form(form, novalidate=True) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="sirene-data" class="col-md-5">
|
||||||
|
<b>Informations de la base SIRENE</b>
|
||||||
|
<div id="nom_entreprise_base"></div>
|
||||||
|
<div id="adresse_base"></div>
|
||||||
|
<div id="codepostal_base"></div>
|
||||||
|
<div id="ville_base"></div>
|
||||||
|
<a class="btn btn-primary" onclick="getData()">Copier</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var value = document.getElementById("siret").value;
|
||||||
|
fetch("https://entreprise.data.gouv.fr/api/sirene/v1/siret/" + value)
|
||||||
|
.then(response => {
|
||||||
|
if (response.ok)
|
||||||
|
return response.json()
|
||||||
|
})
|
||||||
|
.then(response => showSireneData(response))
|
||||||
|
.catch(err => {
|
||||||
|
document.getElementById("sirene-data").style.display = "none"
|
||||||
|
return err
|
||||||
|
})
|
||||||
|
|
||||||
|
function showSireneData(response) {
|
||||||
|
document.getElementById("nom_entreprise_base").innerHTML = "Nom de l'entreprise: " + response.etablissement.l1_normalisee
|
||||||
|
document.getElementById("adresse_base").innerHTML = "Adresse: " + response.etablissement.l4_normalisee
|
||||||
|
document.getElementById("codepostal_base").innerHTML = "Code postal: " + response.etablissement.code_postal
|
||||||
|
document.getElementById("ville_base").innerHTML = "Ville: " + response.etablissement.libelle_commune
|
||||||
|
}
|
||||||
|
|
||||||
|
function getData() {
|
||||||
|
var value = document.getElementById("siret").value;
|
||||||
|
fetch("https://entreprise.data.gouv.fr/api/sirene/v1/siret/" + value)
|
||||||
|
.then(response => {
|
||||||
|
if (response.ok)
|
||||||
|
return response.json()
|
||||||
|
})
|
||||||
|
.then(response => fillForm(response))
|
||||||
|
.catch(err => err)
|
||||||
|
}
|
||||||
|
|
||||||
|
function fillForm(response) {
|
||||||
|
document.getElementById("nom").value = response.etablissement.l1_normalisee
|
||||||
|
document.getElementById("adresse").value = response.etablissement.l4_normalisee
|
||||||
|
document.getElementById("codepostal").value = response.etablissement.code_postal
|
||||||
|
document.getElementById("ville").value = response.etablissement.libelle_commune
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
@ -1,15 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<h1>Validation entreprise</h1>
|
|
||||||
<br>
|
|
||||||
<div style="color:green;">Cliquez sur le bouton Valider pour confirmer votre validation</div>
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
{{ wtf.quick_form(form) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
15
app/templates/entreprises/form_validate_confirmation.j2
Normal file
15
app/templates/entreprises/form_validate_confirmation.j2
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<h1>Validation entreprise</h1>
|
||||||
|
<br>
|
||||||
|
<div style="color:green;">Cliquez sur le bouton Valider pour confirmer votre validation</div>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
{{ wtf.quick_form(form) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
@ -1,149 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
{{super()}}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<div class="container">
|
|
||||||
<ul class="breadcrumbs">
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Importation données</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<h1>{{ title }}</h1>
|
|
||||||
<br>
|
|
||||||
<div>
|
|
||||||
<a href="{{ url_for('entreprises.import_donnees_get_file_sample') }}">Obtenir la feuille excel à remplir</a>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<p>
|
|
||||||
(*) champs requis
|
|
||||||
</p>
|
|
||||||
{{ wtf.quick_form(form, novalidate=True) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% if not entreprises_import and not sites_import and not correspondants_import %}
|
|
||||||
<div>Feuille Entreprises</div>
|
|
||||||
<table class="table">
|
|
||||||
<thead><tr><td><b>Attribut</b></td><td><b>Type</b></td><td><b>Description</b></td></tr></thead>
|
|
||||||
<tr><td>siret (*)</td><td>text</td><td>siret de l'entreprise</td></tr>
|
|
||||||
<tr><td>nom_entreprise (*)</td><td>text</td><td>nom de l'entreprise</td></tr>
|
|
||||||
<tr><td>adresse (*)</td><td>text</td><td>adresse de l'entreprise</td></tr>
|
|
||||||
<tr><td>ville (*)</td><td>text</td><td>ville de l'entreprise</td></tr>
|
|
||||||
<tr><td>code_postal (*)</td><td>text</td><td>code postal de l'entreprise</td></tr>
|
|
||||||
<tr><td>pays</td><td>text</td><td>pays de l'entreprise</td></tr>
|
|
||||||
</table>
|
|
||||||
<div>Feuille Sites</div>
|
|
||||||
<table class="table">
|
|
||||||
<thead><tr><td><b>Attribut</b></td><td><b>Type</b></td><td><b>Description</b></td></tr></thead>
|
|
||||||
<tr><td>siret_entreprise (*)</td><td>text</td><td>siret de l'entreprise</td></tr>
|
|
||||||
<tr><td>id_site (*)</td><td>text</td><td>id du site (ne rien remplir pour créer un site)</td></tr>
|
|
||||||
<tr><td>nom_site (*)</td><td>text</td><td>nom du site</td></tr>
|
|
||||||
<tr><td>adresse (*)</td><td>text</td><td>adresse du site</td></tr>
|
|
||||||
<tr><td>ville (*)</td><td>text</td><td>ville du site</td></tr>
|
|
||||||
<tr><td>code_postal (*)</td><td>text</td><td>code postal du site</td></tr>
|
|
||||||
<tr><td>pays (*)</td><td>text</td><td>pays du site</td></tr>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
<div>Feuille Correspondants (à utiliser pour les modifications)</div>
|
|
||||||
<table class="table">
|
|
||||||
<thead><tr><td><b>Attribut</b></td><td><b>Type</b></td><td><b>Description</b></td></tr></thead>
|
|
||||||
<tr><td>civilite (*)</td><td>text</td><td>civilite du correspondant (H ou F)</td></tr>
|
|
||||||
<tr><td>nom (*)</td><td>text</td><td>nom du correspondant</td></tr>
|
|
||||||
<tr><td>prenom (*)</td><td>text</td><td>prenom du correspondant</td></tr>
|
|
||||||
<tr><td>telephone (*)</td><td>text</td><td>telephone du correspondant</td></tr>
|
|
||||||
<tr><td>mail (*)</td><td>text</td><td>mail du correspondant</td></tr>
|
|
||||||
<tr><td>poste</td><td>text</td><td>poste du correspondant</td></tr>
|
|
||||||
<tr><td>service</td><td>text</td><td>service dans lequel travaille le correspondant</td></tr>
|
|
||||||
<tr><td>origine</td><td>text</td><td>origine du correspondant</td></tr>
|
|
||||||
<tr><td>notes</td><td>text</td><td>notes sur le correspondant</td></tr>
|
|
||||||
<tr><td>nom_site</td><td>text</td><td>nom du site lié au correspondant</td></tr>
|
|
||||||
</table>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if entreprises_import %}
|
|
||||||
<br><div>Importation de {{ entreprises_import|length }} entreprise(s)</div>
|
|
||||||
{% for entreprise in entreprises_import %}
|
|
||||||
<div class="entreprise">
|
|
||||||
<div>
|
|
||||||
SIRET : {{ entreprise.siret }}<br>
|
|
||||||
Nom : {{ entreprise.nom }}<br>
|
|
||||||
Adresse : {{ entreprise.adresse }}<br>
|
|
||||||
Code postal : {{ entreprise.codepostal }}<br>
|
|
||||||
Ville : {{ entreprise.ville }}<br>
|
|
||||||
Pays : {{ entreprise.pays }}<br>
|
|
||||||
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=entreprise.id) }}" target="_blank">Fiche entreprise</a>
|
|
||||||
</div>
|
|
||||||
{% for site in entreprise.sites %}
|
|
||||||
<div class="site">
|
|
||||||
Nom : {{ site.nom }}<br>
|
|
||||||
Adresse : {{ site.adresse }}<br>
|
|
||||||
Code postal : {{ site.codepostal }}<br>
|
|
||||||
Ville : {{ site.ville }}<br>
|
|
||||||
Pays : {{ site.pays }}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if sites_import %}
|
|
||||||
<br><div>Importation de {{ sites_import|length }} site(s)</div>
|
|
||||||
{% for site in sites_import %}
|
|
||||||
<div class="site">
|
|
||||||
Nom : {{ site.nom }}<br>
|
|
||||||
Adresse : {{ site.adresse }}<br>
|
|
||||||
Code postal : {{ site.codepostal }}<br>
|
|
||||||
Ville : {{ site.ville }}<br>
|
|
||||||
Pays : {{ site.pays }}<br>
|
|
||||||
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=site.entreprise_id) }}" target="_blank">Fiche entreprise</a>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if correspondants_import %}
|
|
||||||
<br><div>Importation de {{ correspondants_import|length }} correspondant(s)</div>
|
|
||||||
{% for correspondant in correspondants_import %}
|
|
||||||
<div class="correspondant">
|
|
||||||
<div>
|
|
||||||
Civilité : {{ correspondant.civilite|get_civilité }}<br>
|
|
||||||
Nom : {{ correspondant.nom }}<br>
|
|
||||||
Prénom : {{ correspondant.prenom }}<br>
|
|
||||||
{% if correspondant.telephone %}
|
|
||||||
Téléphone : {{ correspondant.telephone }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% if correspondant.mail %}
|
|
||||||
Mail : {{ correspondant.mail }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% if correspondant.poste %}
|
|
||||||
Poste : {{ correspondant.poste }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% if correspondant.service %}
|
|
||||||
Service : {{ correspondant.service }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% if correspondant.origine %}
|
|
||||||
Origine : {{ correspondant.origine }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% if correspondant.notes %}
|
|
||||||
Notes : {{ correspondant.notes }}<br>
|
|
||||||
{% endif %}
|
|
||||||
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=correspondant.site.entreprise.id) }}" target="_blank">Fiche entreprise</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
265
app/templates/entreprises/import_donnees.j2
Normal file
265
app/templates/entreprises/import_donnees.j2
Normal file
@ -0,0 +1,265 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{super()}}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<div class="container">
|
||||||
|
<ul class="breadcrumbs">
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Importation données</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h1>{{ title }}</h1>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<a href="{{ url_for('entreprises.import_donnees_get_file_sample') }}">Obtenir la feuille excel à remplir</a>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<p>
|
||||||
|
(*) champs requis
|
||||||
|
</p>
|
||||||
|
{{ wtf.quick_form(form, novalidate=True) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if not entreprises_import and not sites_import and not correspondants_import %}
|
||||||
|
<div>Feuille Entreprises</div>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td><b>Attribut</b></td>
|
||||||
|
<td><b>Type</b></td>
|
||||||
|
<td><b>Description</b></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tr>
|
||||||
|
<td>siret (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>siret de l'entreprise</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nom_entreprise (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>nom de l'entreprise</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>adresse (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>adresse de l'entreprise</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ville (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>ville de l'entreprise</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>code_postal (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>code postal de l'entreprise</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pays</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>pays de l'entreprise</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div>Feuille Sites</div>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td><b>Attribut</b></td>
|
||||||
|
<td><b>Type</b></td>
|
||||||
|
<td><b>Description</b></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tr>
|
||||||
|
<td>siret_entreprise (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>siret de l'entreprise</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>id_site (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>id du site (ne rien remplir pour créer un site)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nom_site (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>nom du site</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>adresse (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>adresse du site</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>ville (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>ville du site</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>code_postal (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>code postal du site</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pays (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>pays du site</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<div>Feuille Correspondants (à utiliser pour les modifications)</div>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td><b>Attribut</b></td>
|
||||||
|
<td><b>Type</b></td>
|
||||||
|
<td><b>Description</b></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tr>
|
||||||
|
<td>civilite (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>civilite du correspondant (H ou F)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nom (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>nom du correspondant</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>prenom (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>prenom du correspondant</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>telephone (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>telephone du correspondant</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>mail (*)</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>mail du correspondant</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>poste</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>poste du correspondant</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>service</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>service dans lequel travaille le correspondant</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>origine</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>origine du correspondant</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>notes</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>notes sur le correspondant</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>nom_site</td>
|
||||||
|
<td>text</td>
|
||||||
|
<td>nom du site lié au correspondant</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if entreprises_import %}
|
||||||
|
<br>
|
||||||
|
<div>Importation de {{ entreprises_import|length }} entreprise(s)</div>
|
||||||
|
{% for entreprise in entreprises_import %}
|
||||||
|
<div class="entreprise">
|
||||||
|
<div>
|
||||||
|
SIRET : {{ entreprise.siret }}<br>
|
||||||
|
Nom : {{ entreprise.nom }}<br>
|
||||||
|
Adresse : {{ entreprise.adresse }}<br>
|
||||||
|
Code postal : {{ entreprise.codepostal }}<br>
|
||||||
|
Ville : {{ entreprise.ville }}<br>
|
||||||
|
Pays : {{ entreprise.pays }}<br>
|
||||||
|
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=entreprise.id) }}" target="_blank">Fiche
|
||||||
|
entreprise</a>
|
||||||
|
</div>
|
||||||
|
{% for site in entreprise.sites %}
|
||||||
|
<div class="site">
|
||||||
|
Nom : {{ site.nom }}<br>
|
||||||
|
Adresse : {{ site.adresse }}<br>
|
||||||
|
Code postal : {{ site.codepostal }}<br>
|
||||||
|
Ville : {{ site.ville }}<br>
|
||||||
|
Pays : {{ site.pays }}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if sites_import %}
|
||||||
|
<br>
|
||||||
|
<div>Importation de {{ sites_import|length }} site(s)</div>
|
||||||
|
{% for site in sites_import %}
|
||||||
|
<div class="site">
|
||||||
|
Nom : {{ site.nom }}<br>
|
||||||
|
Adresse : {{ site.adresse }}<br>
|
||||||
|
Code postal : {{ site.codepostal }}<br>
|
||||||
|
Ville : {{ site.ville }}<br>
|
||||||
|
Pays : {{ site.pays }}<br>
|
||||||
|
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=site.entreprise_id) }}" target="_blank">Fiche
|
||||||
|
entreprise</a>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if correspondants_import %}
|
||||||
|
<br>
|
||||||
|
<div>Importation de {{ correspondants_import|length }} correspondant(s)</div>
|
||||||
|
{% for correspondant in correspondants_import %}
|
||||||
|
<div class="correspondant">
|
||||||
|
<div>
|
||||||
|
Civilité : {{ correspondant.civilite|get_civilité }}<br>
|
||||||
|
Nom : {{ correspondant.nom }}<br>
|
||||||
|
Prénom : {{ correspondant.prenom }}<br>
|
||||||
|
{% if correspondant.telephone %}
|
||||||
|
Téléphone : {{ correspondant.telephone }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% if correspondant.mail %}
|
||||||
|
Mail : {{ correspondant.mail }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% if correspondant.poste %}
|
||||||
|
Poste : {{ correspondant.poste }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% if correspondant.service %}
|
||||||
|
Service : {{ correspondant.service }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% if correspondant.origine %}
|
||||||
|
Origine : {{ correspondant.origine }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% if correspondant.notes %}
|
||||||
|
Notes : {{ correspondant.notes }}<br>
|
||||||
|
{% endif %}
|
||||||
|
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=correspondant.site.entreprise.id) }}"
|
||||||
|
target="_blank">Fiche entreprise</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -1,54 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<div class="container">
|
|
||||||
<ul class="breadcrumbs">
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Dernières opérations</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<h3>Dernières opérations</h3>
|
|
||||||
{% if logs.items %}
|
|
||||||
<ul>
|
|
||||||
{% for log in logs.items %}
|
|
||||||
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par {{ log.authenticated_user|get_nomcomplet_by_username }}</span></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<a href="{{ url_for('entreprises.logs', page=logs.prev_num) }}" class="btn btn-default {% if logs.page == 1 %}disabled{% endif %}">
|
|
||||||
«
|
|
||||||
</a>
|
|
||||||
{% for page_num in logs.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
|
|
||||||
{% if page_num %}
|
|
||||||
{% if logs.page == page_num %}
|
|
||||||
<a href="{{ url_for('entreprises.logs', page=page_num) }}" class="btn btn-inverse">{{ page_num }}</a>
|
|
||||||
{% else %}
|
|
||||||
<a href="{{ url_for('entreprises.logs', page=page_num) }}" class="btn btn-default">{{ page_num }}</a>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
...
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
<a href="{{ url_for('entreprises.logs', page=logs.next_num) }}" class="btn btn-default {% if logs.page == logs.pages %}disabled{% endif %}">
|
|
||||||
»
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="text-center">
|
|
||||||
Page {{ logs.page }} sur {{ logs.pages }}
|
|
||||||
</p>
|
|
||||||
{% else %}
|
|
||||||
<div>Aucune opération</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
|
57
app/templates/entreprises/logs.j2
Normal file
57
app/templates/entreprises/logs.j2
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<div class="container">
|
||||||
|
<ul class="breadcrumbs">
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Dernières opérations</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h3>Dernières opérations</h3>
|
||||||
|
{% if logs.items %}
|
||||||
|
<ul>
|
||||||
|
{% for log in logs.items %}
|
||||||
|
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par
|
||||||
|
{{ log.authenticated_user|get_nomcomplet_by_username }}</span></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<a href="{{ url_for('entreprises.logs', page=logs.prev_num) }}"
|
||||||
|
class="btn btn-default {% if logs.page == 1 %}disabled{% endif %}">
|
||||||
|
«
|
||||||
|
</a>
|
||||||
|
{% for page_num in logs.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
|
||||||
|
{% if page_num %}
|
||||||
|
{% if logs.page == page_num %}
|
||||||
|
<a href="{{ url_for('entreprises.logs', page=page_num) }}" class="btn btn-inverse">{{ page_num }}</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ url_for('entreprises.logs', page=page_num) }}" class="btn btn-default">{{ page_num }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
...
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
<a href="{{ url_for('entreprises.logs', page=logs.next_num) }}"
|
||||||
|
class="btn btn-default {% if logs.page == logs.pages %}disabled{% endif %}">
|
||||||
|
»
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="text-center">
|
||||||
|
Page {{ logs.page }} sur {{ logs.pages }}
|
||||||
|
</p>
|
||||||
|
{% else %}
|
||||||
|
<div>Aucune opération</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -1,56 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<div class="container">
|
|
||||||
<ul class="breadcrumbs">
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=entreprise.id) }}" class="breadcrumbs_link">Fiche entreprise</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Dernières opérations</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<h3>Dernières opérations - {{ entreprise.nom }}</h3>
|
|
||||||
{% if logs.items %}
|
|
||||||
<ul>
|
|
||||||
{% for log in logs.items %}
|
|
||||||
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par {{ log.authenticated_user|get_nomcomplet_by_username }}</span></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=logs.prev_num) }}" class="btn btn-default {% if logs.page == 1 %}disabled{% endif %}">
|
|
||||||
«
|
|
||||||
</a>
|
|
||||||
{% for page_num in logs.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
|
|
||||||
{% if page_num %}
|
|
||||||
{% if logs.page == page_num %}
|
|
||||||
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=page_num) }}" class="btn btn-inverse">{{ page_num }}</a>
|
|
||||||
{% else %}
|
|
||||||
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=page_num) }}" class="btn btn-default">{{ page_num }}</a>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
...
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=logs.next_num) }}" class="btn btn-default {% if logs.page == logs.pages %}disabled{% endif %}">
|
|
||||||
»
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="text-center">
|
|
||||||
Page {{ logs.page }} sur {{ logs.pages }}
|
|
||||||
</p>
|
|
||||||
{% else %}
|
|
||||||
<div>Aucune opération</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
62
app/templates/entreprises/logs_entreprise.j2
Normal file
62
app/templates/entreprises/logs_entreprise.j2
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<div class="container">
|
||||||
|
<ul class="breadcrumbs">
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=entreprise.id) }}"
|
||||||
|
class="breadcrumbs_link">Fiche entreprise</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Dernières opérations</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h3>Dernières opérations - {{ entreprise.nom }}</h3>
|
||||||
|
{% if logs.items %}
|
||||||
|
<ul>
|
||||||
|
{% for log in logs.items %}
|
||||||
|
<li><span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span><span>{{ log.text|safe }} par
|
||||||
|
{{ log.authenticated_user|get_nomcomplet_by_username }}</span></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="text-center">
|
||||||
|
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=logs.prev_num) }}"
|
||||||
|
class="btn btn-default {% if logs.page == 1 %}disabled{% endif %}">
|
||||||
|
«
|
||||||
|
</a>
|
||||||
|
{% for page_num in logs.iter_pages(left_edge=1, right_edge=1, left_current=1, right_current=2) %}
|
||||||
|
{% if page_num %}
|
||||||
|
{% if logs.page == page_num %}
|
||||||
|
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=page_num) }}"
|
||||||
|
class="btn btn-inverse">{{ page_num }}</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=page_num) }}"
|
||||||
|
class="btn btn-default">{{ page_num }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
...
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
<a href="{{ url_for('entreprises.logs_entreprise', entreprise_id=entreprise.id, page=logs.next_num) }}"
|
||||||
|
class="btn btn-default {% if logs.page == logs.pages %}disabled{% endif %}">
|
||||||
|
»
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="text-center">
|
||||||
|
Page {{ logs.page }} sur {{ logs.pages }}
|
||||||
|
</p>
|
||||||
|
{% else %}
|
||||||
|
<div>Aucune opération</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -1,29 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
<div class="container">
|
|
||||||
<ul class="breadcrumbs">
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=entreprise.id) }}" class="breadcrumbs_link">Fiche entreprise</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumbs_item">
|
|
||||||
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Offres expirées</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<h1>Offres expirées - {{ entreprise.nom }}</h1>
|
|
||||||
{% if offres_expirees %}
|
|
||||||
{% for offre, files, offre_depts, correspondant in offres_expirees %}
|
|
||||||
{% include 'entreprises/_offre.html' %}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<div>Aucune offre expirées</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
30
app/templates/entreprises/offres_expirees.j2
Normal file
30
app/templates/entreprises/offres_expirees.j2
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
<div class="container">
|
||||||
|
<ul class="breadcrumbs">
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="{{ url_for('entreprises.index') }}" class="breadcrumbs_link">Entreprises</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=entreprise.id) }}"
|
||||||
|
class="breadcrumbs_link">Fiche entreprise</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumbs_item">
|
||||||
|
<a href="" class="breadcrumbs_link breadcrumbs_link-active">Offres expirées</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h1>Offres expirées - {{ entreprise.nom }}</h1>
|
||||||
|
{% if offres_expirees %}
|
||||||
|
{% for offre, files, offre_depts, correspondant in offres_expirees %}
|
||||||
|
{% include 'entreprises/_offre.html' %}
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<div>Aucune offre expirées</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
@ -1,52 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
{% include 'entreprises/nav.html' %}
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<h1>Offres reçues</h1>
|
|
||||||
{% if offres_recues %}
|
|
||||||
{% for envoi_offre, offre, files, correspondant in offres_recues %}
|
|
||||||
<div class="offre offre-recue">
|
|
||||||
<div style="word-break:break-all; text-align: justify;">
|
|
||||||
Envoyé le {{ envoi_offre.date_envoi.strftime('%d/%m/%Y') }} à {{ envoi_offre.date_envoi.strftime('%Hh%M') }} par {{ envoi_offre.sender_id|get_nomcomplet_by_id }}<br>
|
|
||||||
Intitulé : {{ offre.intitule }}<br>
|
|
||||||
Description : {{ offre.description }}<br>
|
|
||||||
Type de l'offre : {{ offre.type_offre }}<br>
|
|
||||||
Missions : {{ offre.missions }}<br>
|
|
||||||
Durée : {{ offre.duree }}<br>
|
|
||||||
|
|
||||||
{% if offre.correspondant_id %}
|
|
||||||
Contacté {{ correspondant.nom }} {{ correspondant.prenom }}
|
|
||||||
{% if correspondant.mail and correspondant.telephone %}
|
|
||||||
({{ correspondant.mail }} - {{ correspondant.telephone }})
|
|
||||||
{% else %}
|
|
||||||
({{ correspondant.mail }}{{ correspondant.telephone }})
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if correspondant.poste %}
|
|
||||||
- poste : {{ correspondant.poste }}
|
|
||||||
{% endif %}
|
|
||||||
{% if correspondant.service %}
|
|
||||||
- service : {{ correspondant.service }}
|
|
||||||
{% endif %}
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=offre.entreprise_id) }}">lien vers l'entreprise</a><br>
|
|
||||||
|
|
||||||
{% for filedir, filename in files %}
|
|
||||||
<a href="{{ url_for('entreprises.get_offre_file', entreprise_id=offre.entreprise_id, offre_id=offre.id, filedir=filedir, filename=filename) }}">{{ filename }}</a><br>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a href="{{ url_for('entreprises.delete_offre_recue', envoi_offre_id=envoi_offre.id) }}" style="margin-left: 5px;"><img title="Supprimer" alt="supprimer" width="16" height="16" border="0" src="/ScoDoc/static/icons/delete_small_img.png" /></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
<div>Aucune offre reçue</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
58
app/templates/entreprises/offres_recues.j2
Normal file
58
app/templates/entreprises/offres_recues.j2
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
{% include 'entreprises/nav.html' %}
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h1>Offres reçues</h1>
|
||||||
|
{% if offres_recues %}
|
||||||
|
{% for envoi_offre, offre, files, correspondant in offres_recues %}
|
||||||
|
<div class="offre offre-recue">
|
||||||
|
<div style="word-break:break-all; text-align: justify;">
|
||||||
|
Envoyé le {{ envoi_offre.date_envoi.strftime('%d/%m/%Y') }} à {{ envoi_offre.date_envoi.strftime('%Hh%M') }}
|
||||||
|
par {{ envoi_offre.sender_id|get_nomcomplet_by_id }}<br>
|
||||||
|
Intitulé : {{ offre.intitule }}<br>
|
||||||
|
Description : {{ offre.description }}<br>
|
||||||
|
Type de l'offre : {{ offre.type_offre }}<br>
|
||||||
|
Missions : {{ offre.missions }}<br>
|
||||||
|
Durée : {{ offre.duree }}<br>
|
||||||
|
|
||||||
|
{% if offre.correspondant_id %}
|
||||||
|
Contacté {{ correspondant.nom }} {{ correspondant.prenom }}
|
||||||
|
{% if correspondant.mail and correspondant.telephone %}
|
||||||
|
({{ correspondant.mail }} - {{ correspondant.telephone }})
|
||||||
|
{% else %}
|
||||||
|
({{ correspondant.mail }}{{ correspondant.telephone }})
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if correspondant.poste %}
|
||||||
|
- poste : {{ correspondant.poste }}
|
||||||
|
{% endif %}
|
||||||
|
{% if correspondant.service %}
|
||||||
|
- service : {{ correspondant.service }}
|
||||||
|
{% endif %}
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a href="{{ url_for('entreprises.fiche_entreprise', entreprise_id=offre.entreprise_id) }}">lien vers
|
||||||
|
l'entreprise</a><br>
|
||||||
|
|
||||||
|
{% for filedir, filename in files %}
|
||||||
|
<a
|
||||||
|
href="{{ url_for('entreprises.get_offre_file', entreprise_id=offre.entreprise_id, offre_id=offre.id, filedir=filedir, filename=filename) }}">{{
|
||||||
|
filename }}</a><br>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="{{ url_for('entreprises.delete_offre_recue', envoi_offre_id=envoi_offre.id) }}"
|
||||||
|
style="margin-left: 5px;"><img title="Supprimer" alt="supprimer" width="16" height="16" border="0"
|
||||||
|
src="/ScoDoc/static/icons/delete_small_img.png" /></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<div>Aucune offre reçue</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
@ -1,17 +0,0 @@
|
|||||||
{# -*- mode: jinja-html -*- #}
|
|
||||||
{% extends 'base.html' %}
|
|
||||||
{% import 'bootstrap/wtf.html' as wtf %}
|
|
||||||
|
|
||||||
{% block app_content %}
|
|
||||||
{% include 'entreprises/nav.html' %}
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<h1>Préférences module gestion entreprises</h1>
|
|
||||||
<br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
{{ wtf.quick_form(form, novalidate=True) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
17
app/templates/entreprises/preferences.j2
Normal file
17
app/templates/entreprises/preferences.j2
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{# -*- mode: jinja-html -*- #}
|
||||||
|
{% extends 'base.j2' %}
|
||||||
|
{% import 'bootstrap/wtf.html' as wtf %}
|
||||||
|
|
||||||
|
{% block app_content %}
|
||||||
|
{% include 'entreprises/nav.html' %}
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h1>Préférences module gestion entreprises</h1>
|
||||||
|
<br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
{{ wtf.quick_form(form, novalidate=True) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user