1
0
Fork 0

Templates Jinja2: extension .j2 au lieu de .html

This commit is contained in:
Emmanuel Viennet 2023-01-30 18:25:17 -03:00
parent e68cf29a17
commit cb21043f31
118 changed files with 2229 additions and 2037 deletions

View File

@ -26,6 +26,7 @@ from flask_mail import Mail
from flask_bootstrap import Bootstrap
from flask_moment import Moment
from flask_caching import Cache
from jinja2 import select_autoescape
import sqlalchemy
from app.scodoc.sco_exceptions import (
@ -61,11 +62,11 @@ cache = Cache(
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):
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):
@ -75,7 +76,7 @@ def internal_server_error(exc):
return (
render_template(
"error_500.html",
"error_500.j2",
SCOVERSION=sco_version.SCOVERSION,
date=datetime.datetime.now().isoformat(),
exc=exc,
@ -146,7 +147,7 @@ def render_raw_html(template_filename: str, **args) -> str:
def postgresql_server_error(e):
"""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):
@ -275,6 +276,9 @@ def create_app(config_class=DevConfig):
from app.api import api_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
app.register_blueprint(scodoc_bp)
# https://scodoc.fr/ScoDoc/RT/Scolarite/...

View File

@ -11,5 +11,5 @@ def send_password_reset_email(user):
sender=current_app.config["SCODOC_MAIL_FROM"],
recipients=[user.email],
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),
)

View File

@ -42,7 +42,7 @@ def login():
return form.redirect("scodoc.index")
message = request.args.get("message", "")
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()
flash(f"Utilisateur {user.user_name} créé")
return redirect(url_for("scodoc.index"))
return render_template(
"auth/register.html", title="Création utilisateur", form=form
)
return render_template("auth/register.j2", title="Création utilisateur", form=form)
@bp.route("/reset_password_request", methods=["GET", "POST"])
@ -98,7 +96,7 @@ def reset_password_request():
)
return redirect(url_for("auth.login"))
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()
flash(_("Votre mot de passe a été changé."))
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"])

View File

@ -500,7 +500,7 @@ def jury_but_semestriel(
H.append("</div>")
H.append(
render_template(
"but/documentation_codes_jury.html",
"but/documentation_codes_jury.j2",
nom_univ=f"""Export {sco_preferences.get_preference("InstituteName")
or sco_preferences.get_preference("UnivName")
or "Apogée"}""",

View File

@ -89,7 +89,7 @@ def index():
visible=True, association=True, siret_provisoire=True
)
return render_template(
"entreprises/entreprises.html",
"entreprises/entreprises.j2",
title="Entreprises",
entreprises=entreprises,
logs=logs,
@ -109,7 +109,7 @@ def logs():
EntrepriseHistorique.date.desc()
).paginate(page=page, per_page=20)
return render_template(
"entreprises/logs.html",
"entreprises/logs.j2",
title="Logs",
logs=logs,
)
@ -134,7 +134,7 @@ def correspondants():
.all()
)
return render_template(
"entreprises/correspondants.html",
"entreprises/correspondants.j2",
title="Correspondants",
correspondants=correspondants,
logs=logs,
@ -149,7 +149,7 @@ def validation():
"""
entreprises = Entreprise.query.filter_by(visible=False).all()
return render_template(
"entreprises/entreprises_validation.html",
"entreprises/entreprises_validation.j2",
title="Validation entreprises",
entreprises=entreprises,
)
@ -167,7 +167,7 @@ def fiche_entreprise_validation(entreprise_id):
description=f"fiche entreprise (validation) {entreprise_id} inconnue"
)
return render_template(
"entreprises/fiche_entreprise_validation.html",
"entreprises/fiche_entreprise_validation.j2",
title="Validation fiche entreprise",
entreprise=entreprise,
)
@ -205,7 +205,7 @@ def validate_entreprise(entreprise_id):
flash("L'entreprise a été validé et ajouté à la liste.")
return redirect(url_for("entreprises.validation"))
return render_template(
"entreprises/form_validate_confirmation.html",
"entreprises/form_validate_confirmation.j2",
title="Validation entreprise",
form=form,
)
@ -242,7 +242,7 @@ def delete_validation_entreprise(entreprise_id):
flash("L'entreprise a été supprimé de la liste des entreprise à valider.")
return redirect(url_for("entreprises.validation"))
return render_template(
"entreprises/form_confirmation.html",
"entreprises/form_confirmation.j2",
title="Supression entreprise",
form=form,
info_message="Cliquez sur le bouton Supprimer pour confirmer votre supression",
@ -282,7 +282,7 @@ def offres_recues():
files.append(file)
offres_recues_with_files.append([envoi_offre, offre, files, correspondant])
return render_template(
"entreprises/offres_recues.html",
"entreprises/offres_recues.j2",
title="Offres reçues",
offres_recues=offres_recues_with_files,
)
@ -321,7 +321,7 @@ def preferences():
form.mail_entreprise.data = EntreprisePreferences.get_email_notifications()
form.check_siret.data = int(EntreprisePreferences.get_check_siret())
return render_template(
"entreprises/preferences.html",
"entreprises/preferences.j2",
title="Préférences",
form=form,
)
@ -357,7 +357,7 @@ def add_entreprise():
db.session.rollback()
flash("Une erreur est survenue veuillez réessayer.")
return render_template(
"entreprises/form_ajout_entreprise.html",
"entreprises/form_ajout_entreprise.j2",
title="Ajout entreprise avec correspondant",
form=form,
)
@ -408,7 +408,7 @@ def add_entreprise():
flash("L'entreprise a été ajouté à la liste pour la validation.")
return redirect(url_for("entreprises.index"))
return render_template(
"entreprises/form_ajout_entreprise.html",
"entreprises/form_ajout_entreprise.j2",
title="Ajout entreprise avec correspondant",
form=form,
)
@ -446,7 +446,7 @@ def fiche_entreprise(entreprise_id):
.all()
)
return render_template(
"entreprises/fiche_entreprise.html",
"entreprises/fiche_entreprise.j2",
title="Fiche entreprise",
entreprise=entreprise,
offres=offres_with_files,
@ -472,7 +472,7 @@ def logs_entreprise(entreprise_id):
.paginate(page=page, per_page=20)
)
return render_template(
"entreprises/logs_entreprise.html",
"entreprises/logs_entreprise.j2",
title="Logs",
logs=logs,
entreprise=entreprise,
@ -490,7 +490,7 @@ def offres_expirees(entreprise_id):
).first_or_404(description=f"fiche entreprise {entreprise_id} inconnue")
offres_with_files = are.get_offres_expirees_with_files(entreprise.offres)
return render_template(
"entreprises/offres_expirees.html",
"entreprises/offres_expirees.j2",
title="Offres expirées",
entreprise=entreprise,
offres_expirees=offres_with_files,
@ -574,7 +574,7 @@ def edit_entreprise(entreprise_id):
form.pays.data = entreprise.pays
form.association.data = entreprise.association
return render_template(
"entreprises/form_modification_entreprise.html",
"entreprises/form_modification_entreprise.j2",
title="Modification entreprise",
form=form,
)
@ -610,7 +610,7 @@ def fiche_entreprise_desactiver(entreprise_id):
url_for("entreprises.fiche_entreprise", entreprise_id=entreprise.id)
)
return render_template(
"entreprises/form_confirmation.html",
"entreprises/form_confirmation.j2",
title="Désactiver entreprise",
form=form,
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)
)
return render_template(
"entreprises/form_confirmation.html",
"entreprises/form_confirmation.j2",
title="Activer entreprise",
form=form,
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)
)
return render_template(
"entreprises/form.html",
"entreprises/form.j2",
title="Ajout taxe apprentissage",
form=form,
)
@ -735,7 +735,7 @@ def edit_taxe_apprentissage(entreprise_id, taxe_id):
form.montant.data = taxe.montant
form.notes.data = taxe.notes
return render_template(
"entreprises/form.html",
"entreprises/form.j2",
title="Modification taxe apprentissage",
form=form,
)
@ -775,7 +775,7 @@ def delete_taxe_apprentissage(entreprise_id, taxe_id):
url_for("entreprises.fiche_entreprise", entreprise_id=taxe.entreprise_id)
)
return render_template(
"entreprises/form_confirmation.html",
"entreprises/form_confirmation.j2",
title="Supprimer taxe apprentissage",
form=form,
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)
)
return render_template(
"entreprises/form.html",
"entreprises/form.j2",
title="Ajout offre",
form=form,
)
@ -921,7 +921,7 @@ def edit_offre(entreprise_id, offre_id):
form.expiration_date.data = offre.expiration_date
form.depts.data = offre_depts_list
return render_template(
"entreprises/form.html",
"entreprises/form.j2",
title="Modification offre",
form=form,
)
@ -971,7 +971,7 @@ def delete_offre(entreprise_id, offre_id):
url_for("entreprises.fiche_entreprise", entreprise_id=offre.entreprise_id)
)
return render_template(
"entreprises/form_confirmation.html",
"entreprises/form_confirmation.j2",
title="Supression offre",
form=form,
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)
)
return render_template(
"entreprises/form.html",
"entreprises/form.j2",
title="Ajout site",
form=form,
)
@ -1098,7 +1098,7 @@ def edit_site(entreprise_id, site_id):
form.ville.data = site.ville
form.pays.data = site.pays
return render_template(
"entreprises/form.html",
"entreprises/form.j2",
title="Modification site",
form=form,
)
@ -1154,7 +1154,7 @@ def add_correspondant(entreprise_id, site_id):
url_for("entreprises.fiche_entreprise", entreprise_id=site.entreprise_id)
)
return render_template(
"entreprises/form_ajout_correspondants.html",
"entreprises/form_ajout_correspondants.j2",
title="Ajout correspondant",
form=form,
)
@ -1234,7 +1234,7 @@ def edit_correspondant(entreprise_id, site_id, correspondant_id):
form.origine.data = correspondant.origine
form.notes.data = correspondant.notes
return render_template(
"entreprises/form.html",
"entreprises/form.j2",
title="Modification correspondant",
form=form,
)
@ -1290,7 +1290,7 @@ def delete_correspondant(entreprise_id, site_id, correspondant_id):
)
)
return render_template(
"entreprises/form_confirmation.html",
"entreprises/form_confirmation.j2",
title="Supression correspondant",
form=form,
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")
contacts = EntrepriseContact.query.filter_by(entreprise=entreprise.id).all()
return render_template(
"entreprises/contacts.html",
"entreprises/contacts.j2",
title="Liste des contacts",
contacts=contacts,
entreprise=entreprise,
@ -1365,7 +1365,7 @@ def add_contact(entreprise_id):
db.session.commit()
return redirect(url_for("entreprises.contacts", entreprise_id=entreprise.id))
return render_template(
"entreprises/form.html",
"entreprises/form.j2",
title="Ajout contact",
form=form,
)
@ -1421,7 +1421,7 @@ def edit_contact(entreprise_id, contact_id):
)
form.notes.data = contact.notes
return render_template(
"entreprises/form.html",
"entreprises/form.j2",
title="Modification contact",
form=form,
)
@ -1459,7 +1459,7 @@ def delete_contact(entreprise_id, contact_id):
url_for("entreprises.contacts", entreprise_id=contact.entreprise)
)
return render_template(
"entreprises/form_confirmation.html",
"entreprises/form_confirmation.j2",
title="Supression contact",
form=form,
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)
)
return render_template(
"entreprises/form_ajout_stage_apprentissage.html",
"entreprises/form_ajout_stage_apprentissage.j2",
title="Ajout stage / apprentissage",
form=form,
)
@ -1599,7 +1599,7 @@ def edit_stage_apprentissage(entreprise_id, stage_apprentissage_id):
form.date_fin.data = stage_apprentissage.date_fin
form.notes.data = stage_apprentissage.notes
return render_template(
"entreprises/form_ajout_stage_apprentissage.html",
"entreprises/form_ajout_stage_apprentissage.j2",
title="Modification stage / apprentissage",
form=form,
)
@ -1640,7 +1640,7 @@ def delete_stage_apprentissage(entreprise_id, stage_apprentissage_id):
)
)
return render_template(
"entreprises/form_confirmation.html",
"entreprises/form_confirmation.j2",
title="Supression stage/apprentissage",
form=form,
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)
)
return render_template(
"entreprises/form_envoi_offre.html",
"entreprises/form_envoi_offre.j2",
title="Envoyer une offre",
form=form,
)
@ -1816,7 +1816,7 @@ def import_donnees():
db.session.rollback()
flash("Une erreur est survenue veuillez réessayer.")
return render_template(
"entreprises/import_donnees.html",
"entreprises/import_donnees.j2",
title="Importation données",
form=form,
)
@ -1845,7 +1845,7 @@ def import_donnees():
db.session.commit()
flash(f"Importation réussie")
return render_template(
"entreprises/import_donnees.html",
"entreprises/import_donnees.j2",
title="Importation données",
form=form,
entreprises_import=entreprises_import,
@ -1853,7 +1853,7 @@ def import_donnees():
correspondants_import=correspondants,
)
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)
)
return render_template(
"entreprises/form.html",
"entreprises/form.j2",
title="Ajout fichier à une offre",
form=form,
)
@ -1969,7 +1969,7 @@ def delete_offre_file(entreprise_id, offre_id, filedir):
)
)
return render_template(
"entreprises/form_confirmation.html",
"entreprises/form_confirmation.j2",
title="Suppression fichier d'une offre",
form=form,
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
"""
return render_template("entreprises/error.html", title="Erreur", e=e)
return render_template("entreprises/error.j2", title="Erreur", e=e)

View File

@ -171,7 +171,7 @@ class AddLogoForm(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)"""
dept_key = HiddenField()
@ -434,7 +434,7 @@ def config_logos():
scu.flash_errors(form)
return render_template(
"config_logos.html",
"config_logos.j2",
scodoc_dept=None,
title="Configuration ScoDoc",
form=form,

View File

@ -133,7 +133,7 @@ def configuration():
return redirect(url_for("scodoc.index"))
return render_template(
"configuration.html",
"configuration.j2",
form_bonus=form_bonus,
form_scodoc=form_scodoc,
scu=scu,

View File

@ -274,7 +274,7 @@ def sco_header(
H.append("""<div id="gtrcontent">""")
# En attendant le replacement complet de cette fonction,
# inclusion ici des messages flask
H.append(render_template("flashed_messages.html"))
H.append(render_template("flashed_messages.j2"))
#
# Barre menu semestre:
H.append(formsemestre_page_title(formsemestre_id))

View File

@ -166,6 +166,6 @@ def sidebar(etudid: int = None):
def sidebar_dept():
"""Partie supérieure de la marge de gauche"""
return render_template(
"sidebar_dept.html",
"sidebar_dept.j2",
prefs=sco_preferences.SemPreferences(),
)

View File

@ -373,7 +373,7 @@ def etudarchive_import_files(
filename_title="fichier_a_charger",
)
return render_template(
"scolar/photos_import_files.html",
"scolar/photos_import_files.j2",
page_title="Téléchargement de fichiers associés aux étudiants",
ignored_zipfiles=ignored_zipfiles,
unmatched_files=unmatched_files,

View File

@ -926,7 +926,7 @@ def formsemestre_bulletinetud(
_formsemestre_bulletinetud_header_html(etud, formsemestre, format, version),
bulletin,
render_template(
"bul_foot.html",
"bul_foot.j2",
appreciations=None, # déjà affichées
css_class="bul_classic_foot",
etud=etud,
@ -1259,7 +1259,7 @@ def _formsemestre_bulletinetud_header_html(
cssstyles=["css/radar_bulletin.css"],
),
render_template(
"bul_head.html",
"bul_head.j2",
etud=etud,
format=format,
formsemestre=formsemestre,

View File

@ -385,7 +385,7 @@ def module_edit(
),
f"""<h2>{title}</h2>""",
render_template(
"scodoc/help/modules.html",
"scodoc/help/modules.j2",
is_apc=is_apc,
semestre_id=semestre_id,
formsemestres=FormSemestre.query.filter(
@ -396,6 +396,7 @@ def module_edit(
.all()
if not create
else None,
create=create,
),
]
if not unlocked:
@ -655,7 +656,8 @@ def module_edit(
(
"numero",
{
"size": 2,
"title": "Numéro",
"size": 4,
"explanation": "numéro (1, 2, 3, 4, ...) pour ordre d'affichage",
"type": "int",
"default": default_num,

View File

@ -345,7 +345,7 @@ def evaluation_create_form(
+ "\n".join(H)
+ "\n"
+ 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()
)
elif tf[0] == -1:

View File

@ -541,7 +541,7 @@ def formsemestre_page_title(formsemestre_id=None):
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
h = render_template(
"formsemestre_page_title.html",
"formsemestre_page_title.j2",
formsemestre=formsemestre,
scu=scu,
sem_menu_bar=formsemestre_status_menubar(formsemestre),

View File

@ -46,7 +46,7 @@ def affect_groups(partition_id):
raise AccessDenied("vous n'avez pas la permission de modifier les groupes")
partition.formsemestre.setup_parcours_groups()
return render_template(
"scolar/affect_groups.html",
"scolar/affect_groups.j2",
sco_header=html_sco_header.sco_header(
page_title="Affectation aux groupes",
javascripts=["js/groupmgr.js"],

View File

@ -215,7 +215,7 @@ def placement_eval_selectetuds(evaluation_id):
html_sco_header.sco_header(),
sco_evaluations.evaluation_describe(evaluation_id=evaluation_id),
"<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()
return "\n".join(htmls) + "<p>" + footer

View File

@ -554,7 +554,7 @@ def photos_import_files_form(group_ids=()):
back_url=back_url,
)
return render_template(
"scolar/photos_import_files.html",
"scolar/photos_import_files.j2",
page_title="Téléchargement des photos des étudiants",
ignored_zipfiles=ignored_zipfiles,
unmatched_files=unmatched_files,

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% extends 'base.j2' %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}
@ -9,10 +9,10 @@
<p>&copy; Emmanuel Viennet 2021</p>
<p>Version {{ version }}</p>
<p>ScoDoc est un logiciel libre écrit en
<a href="http://www.python.org" target="_blank" rel="noopener noreferrer">Python</a>.
Information et documentation sur <a href="https://scodoc.org" target="_blank">scodoc.org</a>.
<p>ScoDoc est un logiciel libre écrit en
<a href="http://www.python.org" target="_blank" rel="noopener noreferrer">Python</a>.
Information et documentation sur <a href="https://scodoc.org" target="_blank">scodoc.org</a>.
</p>
<h2>Dernières évolutions</h2>

View File

@ -1,14 +1,14 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% extends "base.j2" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% macro render_field(field, auth_name=None) %}
<tr style="">
{% if auth_name %}
<td class="wtf-field"> {{ field.label }}<span style="font-weight:700;"> ({{ auth_name }}):</span></td>
{% if auth_name %}
<td class="wtf-field"> {{ field.label }}<span style="font-weight:700;"> ({{ auth_name }}):</span></td>
{% else %}
<td class="wtf-field">{{ field.label }}</td>
{% endif %}
<td class="wtf-field">{{ field.label }}</td>
{% endif %}
<td class="wtf-field">{{ field(**kwargs)|safe }}
{% if field.errors %}
<ul class=errors>
@ -23,29 +23,31 @@
{% block app_content %}
<h1>Modification du compte ScoDoc <tt>{{form.user_name.data}}</tt></h1>
<div class="help">
<div class="help">
<p>Identifiez-vous avec votre mot de passe actuel</p>
</div>
<form method=post>
{{ form.user_name }}
{{ form.csrf_token }}
<table class="tf"><tbody>
</div>
<form method=post>
{{ form.user_name }}
{{ form.csrf_token }}
<table class="tf">
<tbody>
{{ render_field(form.old_password, size=14, auth_name=auth_username,
style="padding:1px; margin-left: 1em; margin-top: 4px;") }}
<tr>
<td colspan=""2">
<p>Vous pouvez changer le mot de passe et/ou l'adresse email.</p>
<p>Les champs laissés vides ne seront pas modifiés.</p>
<td colspan="" 2">
<p>Vous pouvez changer le mot de passe et/ou l'adresse email.</p>
<p>Les champs laissés vides ne seront pas modifiés.</p>
</td>
</tr>
{{ render_field(form.new_password, size=14,
style="padding:1px; margin-left: 1em; margin-top: 12px;") }}
{{ render_field(form.bis_password, size=14,
{{ render_field(form.bis_password, size=14,
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;") }}
</tbody></table>
<input type="submit" value="Valider">
<input type="submit" name="cancel" value="Annuler" style="margin-left: 1em;>
</tbody>
</table>
<input type="submit" value="Valider">
<input type="submit" name="cancel" value="Annuler" style="margin-left: 1em;>
</form>
{% endblock %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% extends 'base.j2' %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% extends "base.j2" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% extends "base.j2" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% extends "base.j2" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% extends "base.j2" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% extends "base.j2" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}
@ -19,8 +19,8 @@
<p>
<ul>
{% if (
current_user.is_administrator()
or current_user.has_permission(Permission.ScoUsersAdmin, user.dept)
current_user.is_administrator()
or current_user.has_permission(Permission.ScoUsersAdmin, user.dept)
) %}
<li><a class="stdlink" href="{{
url_for( 'users.form_change_password',
@ -36,14 +36,14 @@
</li>
{% endif %}
{% if (
current_user.is_administrator()
or current_user.has_permission(Permission.ScoUsersAdmin, user.dept)
current_user.is_administrator()
or current_user.has_permission(Permission.ScoUsersAdmin, user.dept)
) %}
<li><a class="stdlink" href="{{
<li><a class="stdlink" href="{{
url_for('users.toggle_active_user', scodoc_dept=g.scodoc_dept,
user_name=user.user_name)
}}">{{"désactiver" if user.active else "activer"}} ce compte</a>
</li>
</li>
{% endif %}
</ul>

View File

@ -24,21 +24,23 @@
</button>
<a class="navbar-brand" href="{{ url_for('scodoc.index') }}">ScoDoc</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
{% if current_user.is_administrator() %}
{% if current_user.is_administrator() %}
<li><a href="{{ url_for('scodoc.configuration') }}">Configuration</a></li>
{% endif %}
{% if g.scodoc_dept %}
{% endif %}
{% if g.scodoc_dept %}
<li><a href="{{
url_for('scolar.index_html', scodoc_dept=g.scodoc_dept)
}}">Dept. {{ g.scodoc_dept }}</a></li>
{% endif %}
{% if not current_user.is_anonymous and current_user.has_permission(current_user.Permission.RelationsEntreprisesView, None) and scu and scu.is_entreprises_enabled() %}
{% endif %}
{% 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>
{% endif %}
{% endif %}
</ul>
<ul class="nav navbar-nav navbar-right">
{% if current_user.is_anonymous %}
@ -62,9 +64,9 @@
{% block content %}
<div class="container">
{% with messages = get_flashed_messages(with_categories=true) %}
{% for category, message in messages %}
<div class="alert alert-info alert-{{ category }}" role="alert">{{ message }}</div>
{% endfor %}
{% for category, message in messages %}
<div class="alert alert-info alert-{{ category }}" role="alert">{{ message }}</div>
{% endfor %}
{% endwith %}
{# application content needs to be provided in the app_content block #}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends "sco_page.html" %}
{% extends "sco_page.j2" %}
{% block styles %}
{{super()}}
@ -7,12 +7,12 @@
{% block app_content %}
{% include 'bul_head.html' %}
{% include 'bul_head.j2' %}
<releve-but></releve-but>
<script src="{{sco.scu.STATIC_DIR}}/js/releve-but.js"></script>
{% include 'bul_foot.html' %}
{% include 'bul_foot.j2' %}
<script>
let dataSrc = "{{bul_url|safe}}";

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends "sco_page.html" %}
{% extends "sco_page.j2" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block styles %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% extends "base.j2" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}
@ -11,15 +11,15 @@
}}">{{formation.titre}} ({{formation.acronyme}})</a>
</div>
<div style="margin-top: 20px; margin-bottom: 20px;">
Référentiel actuellement associé:
Référentiel actuellement associé:
{% if formation.referentiel_competence is not none %}
<b>{{ formation.referentiel_competence.specialite_long }}</b>
<a href="{{
<a href="{{
url_for('notes.refcomp_desassoc_formation', scodoc_dept=g.scodoc_dept, formation_id=formation.id)
}}" class="stdlink">supprimer</a>
{% else %}
<b>aucun</b>
<b>aucun</b>
{% endif %}
<div class="row" style="margin-top: 20px;">
<div class="col-md-4">

View File

@ -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 %}

View 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 %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends "sco_page.html" %}
{% extends "sco_page.j2" %}
{% block styles %}
{{super()}}
{% endblock %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends "sco_page.html" %}
{% extends "sco_page.j2" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}

View File

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "base.j2" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}

View File

@ -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 %} &nbsp; / &nbsp; {{ 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 %}

View 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 %} &nbsp; / &nbsp; {{ 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 %}

View File

@ -1,12 +1,12 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.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 %}
{% if with_label %}
<span class="wtf-field">{{ field.label }} :</span>
{% endif %}
<span class="wtf-field">{{ field(**kwargs)|safe }}
{% if field.errors %}
<ul class=errors>
@ -22,10 +22,10 @@
{% block app_content %}
<h1>Configuration générale</h1>
<div class="sco_help greenboldtext">Les paramètres donnés ici s'appliquent à tout ScoDoc (tous les départements).</div>
<div class="sco_help greenboldtext">Les paramètres donnés ici s'appliquent à tout ScoDoc (tous les départements).</div>
<section>
<h2>Calcul des "bonus" définis par l'établissement</h2>
<h2>Calcul des "bonus" définis par l'établissement</h2>
<form id="configuration_form" class="sco-form" action="" method="post" enctype="multipart/form-data" novalidate>
{{ form_bonus.hidden_tag() }}
<div class="row">
@ -39,35 +39,36 @@
</section>
<section>
<h2>Gestion des images: logos, signatures, ...</h2>
<div class="sco_help">Ces images peuvent être intégrées dans les documents
générés par ScoDoc: bulletins, PV, etc.
<h2>Gestion des images: logos, signatures, ...</h2>
<div class="sco_help">Ces images peuvent être intégrées dans les documents
générés par ScoDoc: bulletins, PV, etc.
</div>
<p><a class="stdlink" href="{{url_for('scodoc.configure_logos')}}">configuration des images et logos</a>
</p>
</section>
<section>
<h2>Exports Apogée</h2>
<p><a class="stdlink" href="{{url_for('scodoc.config_codes_decisions')}}">configuration des codes de décision</a></p>
<h2>Exports Apogée</h2>
<p><a class="stdlink" href="{{url_for('scodoc.config_codes_decisions')}}">configuration des codes de décision</a>
</p>
</section>
<h2>Utilisateurs</h2>
<section>
<p><a class="stdlink" href="{{url_for('auth.reset_standard_roles_permissions')}}">remettre
les permissions des rôles standards à leurs valeurs par défaut</a> (efface les modifications apportées)
<p><a class="stdlink" href="{{url_for('auth.reset_standard_roles_permissions')}}">remettre
les permissions des rôles standards à leurs valeurs par défaut</a> (efface les modifications apportées)
</p>
</section>
<h2>ScoDoc</h2>
<form id="configuration_form_scodoc" class="sco-form" action="" method="post" enctype="multipart/form-data" novalidate>
{{ form_scodoc.hidden_tag() }}
<div class="row">
<div class="col-md-4">
{{ wtf.quick_form(form_scodoc) }}
</div>
<form id="configuration_form_scodoc" class="sco-form" action="" method="post" enctype="multipart/form-data" novalidate>
{{ form_scodoc.hidden_tag() }}
<div class="row">
<div class="col-md-4">
{{ wtf.quick_form(form_scodoc) }}
</div>
</form>
</div>
</form>
{% endblock %}
{% block scripts %}
@ -75,20 +76,19 @@
<script>
function update_bonus_description() {
var query = "/ScoDoc/get_bonus_description/" + $("#configuration_form select")[0].value;
$.get(query, '', function (data) {
$("#bonus_description").html(data);
});
}
function update_bonus_description() {
var query = "/ScoDoc/get_bonus_description/" + $("#configuration_form select")[0].value;
$.get(query, '', function (data) {
$("#bonus_description").html(data);
});
}
$(function () {
$("#configuration_form select").change(function () {
update_bonus_description();
});
$(function()
{
$("#configuration_form select").change(function(){
update_bonus_description();
});
update_bonus_description();
});
</script>
{% endblock %}
{% endblock %}

View File

@ -1,5 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% extends 'base.j2' %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% extends "base.j2" %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}">
&laquo;
</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 %}">
&raquo;
</a>
</div>
<p class="text-center">
Page {{ logs.page }} sur {{ logs.pages }}
</p>
{% else %}
<div>Aucune opération</div>
{% endif %}
</div>
{% endblock %}

View 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 %}">
&laquo;
</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 %}">
&raquo;
</a>
</div>
<p class="text-center">
Page {{ logs.page }} sur {{ logs.pages }}
</p>
{% else %}
<div>Aucune opération</div>
{% endif %}
</div>
{% endblock %}

View File

@ -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 %}">
&laquo;
</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 %}">
&raquo;
</a>
</div>
<p class="text-center">
Page {{ logs.page }} sur {{ logs.pages }}
</p>
{% else %}
<div>Aucune opération</div>
{% endif %}
</div>
{% endblock %}

View 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 %}">
&laquo;
</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 %}">
&raquo;
</a>
</div>
<p class="text-center">
Page {{ logs.page }} sur {{ logs.pages }}
</p>
{% else %}
<div>Aucune opération</div>
{% endif %}
</div>
{% endblock %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -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 %}

View 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 %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% extends 'base.j2' %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block title %}Une erreur est survenue !{% endblock %}
@ -7,7 +7,7 @@
{% block app_content %}
<h1>Une erreur est survenue !</h1>
<p>Oups...</tt> <span style="color:red;"><b>ScoDoc version
<span style="font-size: 120%;">{{SCOVERSION}}</span></b></span>
<span style="font-size: 120%;">{{SCOVERSION}}</span></b></span>
a un problème, désolé.</p>
<p><tt style="font-size:60%">{{date}}</tt></p>
@ -16,23 +16,23 @@
}}">le canal Discord</a></b>.
</p>
{% if 'scodoc_dept' in g %}
<p>Pour aider les développeurs à corriger le problème, nous vous
<p>Pour aider les développeurs à corriger le problème, nous vous
suggérons d'envoyer les données anonymisées sur votre configuration:
<form method="POST" action="{{ url_for( 'scolar.sco_dump_and_send_db',
<form method="POST" action="{{ url_for( 'scolar.sco_dump_and_send_db',
scodoc_dept=g.scodoc_dept ) }}">
<input type="hidden" name="request_url" value="{{request_url}}">
<input type="hidden" name="traceback_str_base64" value="{{traceback_str_base64}}">
<input type="submit" value="Envoyer données assistance">
<div>Message optionnel: </div>
<textarea name="message" cols="40" rows="4"></textarea>
</form>
</p>
</form>
</p>
{% endif %}
<p>Vous pouvez aussi envoyer un mail à la liste "notes"
<p>Vous pouvez aussi envoyer un mail à la liste "notes"
<a href="mailto:{{scu.SCO_USERS_LIST}}">{{scu.SCO_USERS_LIST}}</a>
</p>
<p>Pour plus d'informations sur les listes de diffusion
<p>Pour plus d'informations sur les listes de diffusion
<a href="{{ scu.SCO_LISTS_URL }}">voir cette page</a>.
</p>

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% extends 'base.j2' %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}

View File

@ -1,4 +1,4 @@
{% extends 'base.html' %}
{% extends 'base.j2' %}
{% block app_content %}

View File

@ -1,5 +1,5 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% extends 'base.j2' %}
{% import 'bootstrap/wtf.html' as wtf %}
{% block app_content %}

Some files were not shown because too many files have changed in this diff Show More