Exemple #1
0
def page(S=None):
    doc, tag, text = Doc().tagtext()
    Data = readForm()
    if S:

        with tag('div', klass='wrapper'):
            doc, tag, text = admin_menu.sidebar(doc, tag, text)
            with tag('div', id='content'):
                pass

        with tag('div', klass="dropdown"):
            """Bouton menu"""
            with tag('button', klass="dropbtn"):
                text('Faculté ')
            """Menu descendant"""
            with tag('div', klass="dropdown-content"):

                with tag('a', href=''):
                    text('Droit')

                with tag('a', href=''):
                    text('Economie')

                with tag('a', href=''):
                    text('Informatique')

        with tag('script', src="dist/js/myjs.js"):
            pass
        with tag('stylesheet', src='./dist/css/mycss.css'):
            pass

        webPage(Page=doc, Session=S)
    else:
        webPage(doc)
def page(S=None):
    doc, tag, text = Doc().tagtext()
    Data = readForm(Blank=True)
    if S:
        with tag('div', klass='wrapper'):
            doc, tag, text = mod_menu.sidebar(doc, tag, text)
            with tag('div', id='content'):
                M = MissionPageView(S, 'jgerard')
                # if 'modify' in Data: ## Récupération de l'objet à modifier
                # text(str(M.SaveFromForm(Data))) ## Enregistrement des changements opérés dans le formulaire vers la DB
                # doc.stag('br')
                # doc.stag('br')
                # text(str(M.ResultKey))
                # doc.stag('br')
                # doc.stag('br')
                # text(str(M.MissionRecords))
                # doc.stag('br')
                # doc.stag('br')
                # text(str(M._Records))
                # doc.stag('br')
                # doc.stag('br')
                # text(str(Data))
                # doc.stag('br')
                # doc.stag('br')
                # text(str(M._Modified))
                # goTo('index.py')
                # text(str(Data))
                # RefererPage = os.environ["HTTP_REFERER"].split('/')[-1]
                # if RefererPage in ['logout.py', 'login.py']:
                # goTo('index.py')
                # else:
                # goTo(RefererPage)
                # else:
                # with tag('div',klass='wrapper'):
                # with tag('div', id='content'):
                # with tag('div', klass='container-fluid'):
                # with tag('div', klass='row'):
                # with tag('form', action=thisFileName(), method="post", name="formSaisie", enctype="multipart/form-data"):
                # for Id in M.Missions:
                # with tag('h4'): text('Mission ' + str(Id))
                # for Key in M.Fields:
                # if not Key in ['id_per', 'id_ent', 'id_bud', 'id_mis', 'id_fon']:
                # with tag('div',klass='row'): doc, tag, text = showField(doc, tag, text, M.Show(Id, Key))
                # else:
                # doc.input(type="hidden", id='txt_'+Key, name='txt_'+Key, value=M.Get(Id, Key))
                # doc.stag('hr')
                # doc.stag('br')
                # doc.input(type="hidden", id='EID', name='EID', value=S.Get('eid'))
                # doc.stag('input', type="submit", id='modify', name='modify', value="Mettre à jour", style="width:150px")
        with tag('script', src="dist/js/myjs.js"):
            pass
        with tag('stylesheet', src='./dist/css/mycss.css'):
            pass

        webPage(Page=doc, Session=S, CSS='dist/css/mycss.css', JS='myjs.js')
    else:
        webPage(doc)
Exemple #3
0
def page(S=None):
    doc, tag, text = Doc().tagtext()
    if S:
        with tag('div', klass='wrapper'):
            # doc, tag, text = menu_moderateur.sidebar(doc, tag, text)
            """TABLEAU DE BORD PROFS"""
            # doc, tag, text = tableau_de_bord_prof.tableau_de_bord_page(doc, tag, text)
            doc, tag, text = tableau_de_bord_moderateur.tableau_de_bord_page(
                doc, tag, text)
            # doc, tag, text = tableau_de_bord_admin.tableau_de_bord_page(doc, tag, text)
            # doc, tag, text = tableau_de_bord_etudiant.tableau_de_bord_page(doc, tag, text)

        webPage(Page=doc, Session=S, CSS='dist/css/mycss.css', JS='myjs.js')
    else:
        webPage(doc)
Exemple #4
0
def page(S=None):
    doc, tag, text = Doc().tagtext()
    Data = readForm()
    if S:

        with tag('div', klass='wrapper'):
            doc, tag, text = mod_menu.sidebar(doc, tag, text)
            with tag('div', id='content'):
                pass

        with tag('script', src="dist/js/myjs.js"):
            pass
        with tag('stylesheet', src='./dist/css/mycss.css'):
            pass

        webPage(Page=doc, Session=S)
    else:
        webPage(doc)
def page(S = None):
    doc, tag, text = Doc().tagtext()
    if S:
        with tag('div',klass='wrapper'):
            with tag('nav', id='sidebar'):
                with tag('button', type='button', id='sidebarCollapse', klass='btn navbar-btn'):
                    doc.stag('input', type='image', id='Toggle', name='Toggle', src='./dist/icons/justify-left.svg')
                with tag('ul', klass='list-unstyled components'):
                    with tag('li'):
                        with tag('a', href='index.py'): text('Fiche personnelle')
                    with tag('li'):
                        with tag('a', href='ajouterPersonne.py'): text('Ajouter une personne')
                    with tag('li', klass='active'): 
                        text('Afficher la liste des personnes')
            with tag('div', id='content'):
                with tag('div', klass='container-fluid'):
                    with tag('div', klass='row'):
                        Records = db.readRecords(S.Get('eID'), parametres.Database, 'Personne', [], ['eid','nom','prenom', 'mail'])
                        doc.asis(htmlTable(Records))
        with tag('script',src="dist/js/sidebar.js"):pass
        #with tag('script',src="https://kit.fontawesome.com/a076d05399.js"):pass
        webPage(Page = doc, Session = S)
    else:
        webPage(doc)
def inputUser():
    """
    Ecran de saisie des coordonnées eID et mot de passe de l'utilisateur
    """
    doc, tag, text = Doc().tagtext()
    with tag('div', klass='container'):
        with tag('div', klass='row'):
            with tag('div', klass='modal-body col-md-4'):
                pass
            with tag('div', klass='modal-body col-md-4'):
                with tag('form',
                         klass='form center-block',
                         action='login.py',
                         method='post'):
                    with tag('div', klass='form-group'):
                        doc.input('eID',
                                  type='text',
                                  klass="form-control input-lg",
                                  placeholder="Eid",
                                  id='eID',
                                  name='eID')
                    with tag('div', klass='form-group'):
                        doc.input('password',
                                  type='password',
                                  klass="form-control input-lg",
                                  placeholder="Password",
                                  id='password',
                                  name='password')
                    with tag('div', klass='form-group'):
                        doc.stag('input',
                                 type='submit',
                                 id='btn_login',
                                 name='btn_login',
                                 value='Se connecter',
                                 klass='btn btn-primary btn-lg btn-block')
    webPage(doc)
Exemple #7
0
def page(S=None):
    doc, tag, text = Doc().tagtext()
    Data = readForm()
    if S:
        S.Set('eidOnWork', '')
        eleRecherche = Data['txt_recherche']
        Records = db.readRecords(S.Get('eID'), parametres.Database, 'Personne',
                                 [('eid', '=', eleRecherche)],
                                 ['eid', 'nom', 'prenom'])
        with tag('div', klass='wrapper'):
            doc, tag, text = mod_menu.sidebar(doc, tag, text)
            with tag('div', id='content'):
                with tag('div', klass='container-fluid'):
                    if len(Records):
                        with tag('div', klass='list-group'):
                            text(str(Records))

                        with tag('div'):
                            with tag('div', klass='container-fluid ajouter'):

                                with tag('form'):
                                    """ajouter sujet"""
                                    with tag('row', id="ajouter_sujet"):

                                        with tag(
                                                'row',
                                                klass=
                                                'row justify-content-center top-buffer'
                                        ):

                                            with tag(
                                                    'row',
                                                    klass=
                                                    'col-sm-10 text-center mod_width_textarea'
                                            ):
                                                with tag('textarea',
                                                         placeholder='Titre'):
                                                    pass
                                            with tag(
                                                    'row',
                                                    klass=
                                                    'col-sm-10 text-center mod_width_textarea'
                                            ):
                                                with tag(
                                                        'textarea',
                                                        placeholder='Descriptif'
                                                ):
                                                    pass

                                        with tag('row', klass=' top-buffer'):

                                            with tag('div',
                                                     klass='row col-sm-10 '):
                                                """Afficher dynamiquement les programmes"""
                                                with tag('div',
                                                         klass='col-sm-2'):
                                                    with tag('div',
                                                             id="programmes"):
                                                        text('Programmes : ')
                                                        with tag('div'):
                                                            for p in programme:
                                                                with tag(
                                                                        'div'):
                                                                    with tag(
                                                                            'label',
                                                                            klass
                                                                            ='switch'
                                                                    ):
                                                                        doc.input(
                                                                            type
                                                                            ='checkbox',
                                                                            name
                                                                            =p,
                                                                            value
                                                                            ='0',
                                                                            onclick
                                                                            ='afficherFilFin()'
                                                                        )
                                                                        with tag(
                                                                                'span',
                                                                                klass
                                                                                ='slider round',
                                                                                id
                                                                                =p
                                                                                +
                                                                                '1'
                                                                        ):
                                                                            text(
                                                                                p
                                                                            )
                                                """Afficher dynamiquement les filières"""
                                                with tag('div',
                                                         klass=
                                                         'filiere col-sm-2',
                                                         id='FiliereFin'):
                                                    with tag('div'):
                                                        text('Filiére : ')
                                                        with tag('div'):
                                                            for f in programme[
                                                                    'Finances']:
                                                                with tag(
                                                                        'div'):
                                                                    with tag(
                                                                            'label',
                                                                            klass
                                                                            ='switch'
                                                                    ):
                                                                        doc.input(
                                                                            type
                                                                            ='checkbox',
                                                                            name
                                                                            =f,
                                                                            value
                                                                            ='0'
                                                                        )
                                                                        with tag(
                                                                                'span',
                                                                                klass
                                                                                ='slider round'
                                                                        ):
                                                                            text(
                                                                                f
                                                                            )
                                        """Ajotuer fichier annexe"""
                                        with tag(
                                                'div',
                                                klass=
                                                'top-buffer row justify-content-center'
                                        ):
                                            text('Ajouter un fichier annexe')
                                        with tag(
                                                'div',
                                                klass=
                                                'top-buffer row justify-content-center'
                                        ):
                                            with tag('input', type='file'):
                                                pass
                                        """Etablir min et max etudiants"""
                                        # with tag('row', klass='row justify-content-center top-buffer'):
                                        # with tag('div', id='nbr_min_etus'):
                                        # with tag('input', type='number', placeholder='Nbr. min d\'étudiants'):pass

                                        with tag(
                                                'row',
                                                klass=
                                                'row justify-content-center top-buffer'
                                        ):
                                            with tag('div', id='nbr_max_etus'):
                                                with tag(
                                                        'input',
                                                        type='number',
                                                        placeholder=
                                                        'Nbr. max d\'étudiants',
                                                        min='1'):
                                                    pass
                                        """ligne pour bouton 'enregistrer"""
                                        with tag(
                                                'row',
                                                klass=
                                                'row justify-content-center top-buffer'
                                        ):
                                            with tag('div'):
                                                with tag('a', href=''):
                                                    with tag(
                                                            'img',
                                                            src=
                                                            "./dist/images/check.png"
                                                    ):
                                                        pass
                            """ZONE SUJET EXISTANTS MODIFIABLES"""
                            """AJOUTER UNE UNE BOUCLE POUR LE NBR DE SUJETS"""

                            with tag('div', klass='container-fluid '):
                                with tag('br'):
                                    with tag('h3', klass='text-center'):
                                        text('Sujet 1')

                                    with tag('label', klass='switch '):
                                        doc.input(type='checkbox',
                                                  name=p,
                                                  value='1')
                                        with tag('span',
                                                 klass='slider round',
                                                 id=p + '1'):
                                            text('Actif')
                                with tag('form'):
                                    with tag('row', id="ajouter_sujet"):

                                        with tag(
                                                'row',
                                                klass=
                                                'row justify-content-center top-buffer'
                                        ):

                                            with tag(
                                                    'row',
                                                    klass=
                                                    'col-sm-10 text-center mod_width_textarea'
                                            ):
                                                with tag('textarea',
                                                         placeholder='Titre'):
                                                    pass
                                            with tag(
                                                    'row',
                                                    klass=
                                                    'col-sm-10 text-center mod_width_textarea'
                                            ):
                                                with tag(
                                                        'textarea',
                                                        placeholder='Descriptif'
                                                ):
                                                    pass

                                        with tag('row', klass=' top-buffer'):

                                            with tag('div',
                                                     klass='row col-sm-10 '):
                                                """Afficher dynamiquement les programmes"""
                                                with tag('div',
                                                         klass='col-sm-2'):
                                                    with tag('div',
                                                             id="programmes"):
                                                        text('Programmes : ')
                                                        with tag('div'):
                                                            for p in programme:
                                                                with tag(
                                                                        'div'):
                                                                    with tag(
                                                                            'label',
                                                                            klass
                                                                            ='switch'
                                                                    ):
                                                                        doc.input(
                                                                            type
                                                                            ='checkbox',
                                                                            name
                                                                            =p,
                                                                            value
                                                                            ='0',
                                                                            onclick
                                                                            ='afficherFilFin()'
                                                                        )
                                                                        with tag(
                                                                                'span',
                                                                                klass
                                                                                ='slider round',
                                                                                id
                                                                                =p
                                                                                +
                                                                                '1'
                                                                        ):
                                                                            text(
                                                                                p
                                                                            )
                                                """Afficher dynamiquement les filières"""
                                                with tag('div',
                                                         klass=
                                                         'filiere col-sm-2',
                                                         id='FiliereFin'):
                                                    with tag('div'):
                                                        text('Filiére : ')
                                                        with tag('div'):
                                                            for f in programme[
                                                                    'Finances']:
                                                                with tag(
                                                                        'div'):
                                                                    with tag(
                                                                            'label',
                                                                            klass
                                                                            ='switch'
                                                                    ):
                                                                        doc.input(
                                                                            type
                                                                            ='checkbox',
                                                                            name
                                                                            =f,
                                                                            value
                                                                            ='0'
                                                                        )
                                                                        with tag(
                                                                                'span',
                                                                                klass
                                                                                ='slider round'
                                                                        ):
                                                                            text(
                                                                                f
                                                                            )
                                        """Ajotuer fichier annexe"""
                                        with tag(
                                                'div',
                                                klass=
                                                'top-buffer row justify-content-center'
                                        ):
                                            text('Ajouter un fichier annexe')
                                        with tag(
                                                'div',
                                                klass=
                                                'top-buffer row justify-content-center'
                                        ):
                                            with tag('input', type='file'):
                                                pass
                                        """Etablir min et max etudiants"""
                                        # with tag('row', klass='row justify-content-center top-buffer'):
                                        # with tag('div', id='nbr_min_etus'):
                                        # with tag('input', type='number', placeholder='Nbr. min d\'étudiants'):pass

                                        with tag(
                                                'row',
                                                klass=
                                                'row justify-content-center top-buffer'
                                        ):
                                            with tag('div', id='nbr_max_etus'):
                                                with tag(
                                                        'input',
                                                        type='number',
                                                        placeholder=
                                                        'Nbr. max d\'étudiants',
                                                        min='1'):
                                                    pass

                            with tag('div', klass='container-fluid '):
                                with tag('br'):
                                    with tag('h3', klass='text-center'):
                                        text('Sujet 2')

                                    with tag('label', klass='switch '):
                                        doc.input(type='checkbox',
                                                  name=p,
                                                  value='1')
                                        with tag('span',
                                                 klass='slider round',
                                                 id=p + '1'):
                                            text('Actif')
                                with tag('form'):
                                    with tag('row', id="ajouter_sujet"):

                                        with tag(
                                                'row',
                                                klass=
                                                'row justify-content-center top-buffer'
                                        ):

                                            with tag(
                                                    'row',
                                                    klass=
                                                    'col-sm-10 text-center mod_width_textarea'
                                            ):
                                                with tag('textarea',
                                                         placeholder='Titre'):
                                                    pass
                                            with tag(
                                                    'row',
                                                    klass=
                                                    'col-sm-10 text-center mod_width_textarea'
                                            ):
                                                with tag(
                                                        'textarea',
                                                        placeholder='Descriptif'
                                                ):
                                                    pass

                                        with tag('row', klass=' top-buffer'):

                                            with tag('div',
                                                     klass='row col-sm-10 '):
                                                """Afficher dynamiquement les programmes"""
                                                with tag('div',
                                                         klass='col-sm-2'):
                                                    with tag('div',
                                                             id="programmes"):
                                                        text('Programmes : ')
                                                        with tag('div'):
                                                            for p in programme:
                                                                with tag(
                                                                        'div'):
                                                                    with tag(
                                                                            'label',
                                                                            klass
                                                                            ='switch'
                                                                    ):
                                                                        doc.input(
                                                                            type
                                                                            ='checkbox',
                                                                            name
                                                                            =p,
                                                                            value
                                                                            ='0',
                                                                            onclick
                                                                            ='afficherFilFin()'
                                                                        )
                                                                        with tag(
                                                                                'span',
                                                                                klass
                                                                                ='slider round',
                                                                                id
                                                                                =p
                                                                                +
                                                                                '1'
                                                                        ):
                                                                            text(
                                                                                p
                                                                            )
                                                """Afficher dynamiquement les filières"""
                                                with tag('div',
                                                         klass=
                                                         'filiere col-sm-2',
                                                         id='FiliereFin'):
                                                    with tag('div'):
                                                        text('Filiére : ')
                                                        with tag('div'):
                                                            for f in programme[
                                                                    'Finances']:
                                                                with tag(
                                                                        'div'):
                                                                    with tag(
                                                                            'label',
                                                                            klass
                                                                            ='switch'
                                                                    ):
                                                                        doc.input(
                                                                            type
                                                                            ='checkbox',
                                                                            name
                                                                            =f,
                                                                            value
                                                                            ='0'
                                                                        )
                                                                        with tag(
                                                                                'span',
                                                                                klass
                                                                                ='slider round'
                                                                        ):
                                                                            text(
                                                                                f
                                                                            )
                                        """Ajotuer fichier annexe"""
                                        with tag(
                                                'div',
                                                klass=
                                                'top-buffer row justify-content-center'
                                        ):
                                            text('Ajouter un fichier annexe')
                                        with tag(
                                                'div',
                                                klass=
                                                'top-buffer row justify-content-center'
                                        ):
                                            with tag('input', type='file'):
                                                pass
                                        """Etablir min et max etudiants"""
                                        # with tag('row', klass='row justify-content-center top-buffer'):
                                        # with tag('div', id='nbr_min_etus'):
                                        # with tag('input', type='number', placeholder='Nbr. min d\'étudiants'):pass

                                        with tag(
                                                'row',
                                                klass=
                                                'row justify-content-center top-buffer'
                                        ):
                                            with tag('div', id='nbr_max_etus'):
                                                with tag(
                                                        'input',
                                                        type='number',
                                                        placeholder=
                                                        'Nbr. max d\'étudiants',
                                                        min='1'):
                                                    pass

                    else:
                        text(
                            'Personne ne correspond aux critères de recherche')
                    """Il faut faire la page avec une zone :
                        ajouter sujet SI click sur icone
                        sujet avec toutes ses caractérisitques et modifiable SI il y a des sujets
                        il ne faut pas oublier la case à cocher
                        """

        with tag('script', src="dist/js/myjs.js"):
            pass
        with tag('stylesheet', src='./dist/css/mycss.css'):
            pass

        webPage(Page=doc, Session=S)
    else:
        webPage(doc)
Exemple #8
0
def page(S=None):
    doc, tag, text = Doc().tagtext()
    if S:
        with tag('div', klass='wrapper'):
            doc, tag, text = prof_menu.sidebar(doc, tag, text)
            with tag('div', id='content'):
                with tag('div', klass='container-fluid ajouter'):

                    with tag(
                            'table',
                            id='table_prof_sujet',
                            klass=
                            "table table-striped table-bordered table-sm top-buffer",
                            cellspacing="0",
                            width="100%"):
                        with tag('thead'):
                            with tag('tr', klass='text-center'):
                                with tag('th', cope="col"):
                                    text('Actif')
                                with tag('th', cope="col"):
                                    text('Titre')
                                with tag('th', scope="col"):
                                    text('Programme')
                                with tag('th', scope="col"):
                                    text('Filière')
                                with tag('th',
                                         scope="col",
                                         klass='text-center'):
                                    text('Modifier')
                                with tag('th',
                                         scope="col",
                                         klass='text-center'):
                                    text('Supprimer')

                        with tag('tbody'):
                            """A FAIRE UNE BOUCLE POUR LES sujets"""
                            with tag('tr'):
                                with tag('td',
                                         scope="col",
                                         klass='text-center'):
                                    with tag('input',
                                             type='checkbox',
                                             value='0'):
                                        pass
                                with tag('td', scope="col"):
                                    with tag(
                                            'textarea',
                                            klass='disable_text text',
                                            placeholder='Sujet sur les tomates'
                                    ):
                                        pass
                                with tag('td', scope="col"):
                                    with tag('textarea',
                                             klass='disable_text text',
                                             placeholder='Agriculture'):
                                        pass
                                with tag('td', scope="col"):
                                    with tag('textarea',
                                             klass='disable_text text',
                                             placeholder='Eco'):
                                        pass
                                with tag('td',
                                         scope="col",
                                         klass='mouse_hand text-center'):
                                    with tag('img',
                                             src='./dist/images/pencil.png',
                                             id="myBtn"):
                                        pass
                                with tag('td',
                                         scope="col",
                                         klass='mouse_hand text-center'):
                                    with tag('img',
                                             src='./dist/images/bin.png',
                                             onclick='change()'):
                                        pass
                                """ MODAL """
                                with tag('div', id='myModal', klass='modal'):
                                    with tag('div', klass='modal-content'):
                                        with tag('span', klass='close'):
                                            text("Fermer")

                                        with tag(
                                                'row',
                                                klass=
                                                'row justify-content-center top-buffer'
                                        ):

                                            with tag('form'):
                                                """ajouter sujet"""
                                                with tag('row',
                                                         id="ajouter_sujet",
                                                         klass='cacher'):

                                                    # """Demander si le sujet sera actif pendant des années"""
                                                    # with tag('div', klass='row justify-content-center top-buffer'):
                                                    # with tag('div', klass='col-sm-4 text-center'):
                                                    # with tag('label', klass='switch'):
                                                    # doc.input( type = 'checkbox', name = 'valable_des_annees', value = '0')
                                                    # with tag('span',klass='slider round'):
                                                    # text('Sujet valable plusieures années ?')

                                                    with tag(
                                                            'row',
                                                            klass=
                                                            'row justify-content-center top-buffer'
                                                    ):

                                                        with tag(
                                                                'row',
                                                                klass=
                                                                'col-sm-10 text-center mod_width_textarea'
                                                        ):
                                                            with tag(
                                                                    'textarea',
                                                                    placeholder
                                                                    ='Titre'):
                                                                pass
                                                        with tag(
                                                                'row',
                                                                klass=
                                                                'col-sm-10 text-center mod_width_textarea'
                                                        ):
                                                            with tag(
                                                                    'textarea',
                                                                    placeholder=
                                                                    'Descriptif'
                                                            ):
                                                                pass

                                                    with tag(
                                                            'row',
                                                            klass=' top-buffer'
                                                    ):

                                                        with tag('div',
                                                                 klass='row'):
                                                            """Afficher dynamiquement les programmes"""
                                                            with tag(
                                                                    'div',
                                                                    klass=
                                                                    'col-6 text-center'
                                                            ):
                                                                with tag(
                                                                        'div',
                                                                        id=
                                                                        "programmes"
                                                                ):
                                                                    text(
                                                                        'Programmes : '
                                                                    )
                                                                    with tag(
                                                                            'div'
                                                                    ):
                                                                        for p in programme:
                                                                            with tag(
                                                                                    'div'
                                                                            ):
                                                                                # , klass='switch'):
                                                                                with tag(
                                                                                        'label'
                                                                                ):
                                                                                    doc.input(
                                                                                        type
                                                                                        ='checkbox',
                                                                                        name
                                                                                        =p,
                                                                                        value
                                                                                        ='0',
                                                                                        onclick
                                                                                        ='afficherFilFin()'
                                                                                    )
                                                                                    with tag(
                                                                                            'span',
                                                                                            id
                                                                                            =p
                                                                                            +
                                                                                            '1'
                                                                                    ):
                                                                                        text(
                                                                                            p
                                                                                        )
                                                            """Afficher dynamiquement les filières"""
                                                            with tag(
                                                                    'div',
                                                                    klass=
                                                                    'filiere col-6 text-center',
                                                                    id=
                                                                    'FiliereFin'
                                                            ):
                                                                with tag(
                                                                        'div'):
                                                                    text(
                                                                        'Filiére : '
                                                                    )
                                                                    with tag(
                                                                            'div'
                                                                    ):
                                                                        for f in programme[
                                                                                'Finances']:
                                                                            with tag(
                                                                                    'div'
                                                                            ):
                                                                                with tag(
                                                                                        'label'
                                                                                ):
                                                                                    doc.input(
                                                                                        type
                                                                                        ='checkbox',
                                                                                        name
                                                                                        =f,
                                                                                        value
                                                                                        ='0'
                                                                                    )
                                                                                    with tag(
                                                                                            'span'
                                                                                    ):
                                                                                        text(
                                                                                            f
                                                                                        )

                                                    with tag('div',
                                                             klass='row'):

                                                        with tag(
                                                                'div',
                                                                klass=
                                                                'col-4 text-center'
                                                        ):
                                                            """Ajouter fichier annexe"""
                                                            with tag(
                                                                    'div',
                                                                    klass=
                                                                    'top-buffer row justify-content-center'
                                                            ):
                                                                text(
                                                                    'Ajouter un fichier annexe'
                                                                )
                                                            with tag(
                                                                    'br',
                                                                    klass=
                                                                    'top-buffer row justify-content-center'
                                                            ):
                                                                with tag(
                                                                        'input',
                                                                        type=
                                                                        'file'
                                                                ):
                                                                    pass
                                                        """Etablir min et max etudiants"""
                                                        # with tag('row', klass='row justify-content-center top-buffer'):
                                                        # with tag('div', id='nbr_min_etus'):
                                                        # with tag('input', type='number', placeholder='Nbr. min d\'étudiants'):pass
                                                        with tag(
                                                                'div',
                                                                klass=
                                                                'col-4 text-center'
                                                        ):
                                                            with tag(
                                                                    'div',
                                                                    klass=
                                                                    'top-buffer row justify-content-center'
                                                            ):
                                                                text(
                                                                    'Décider le nombre d\'étudiant qui pourront avoic ce sujet'
                                                                )
                                                            with tag(
                                                                    'br',
                                                                    klass=
                                                                    'row justify-content-center top-buffer'
                                                            ):
                                                                with tag(
                                                                        'div',
                                                                        id=
                                                                        'nbr_max_etus'
                                                                ):
                                                                    with tag(
                                                                            'input',
                                                                            type
                                                                            ='number',
                                                                            placeholder
                                                                            ='Nbr. max d\'étudiants',
                                                                            min=
                                                                            '1'
                                                                    ):
                                                                        pass

                                                        with tag(
                                                                'div',
                                                                klass=
                                                                'col-4 text-center'
                                                        ):
                                                            with tag(
                                                                    'div',
                                                                    klass=
                                                                    'top-buffer row justify-content-center'
                                                            ):
                                                                text(
                                                                    'Année académique pour laquelle le sujet sera disponible'
                                                                )
                                                            with tag('div'):
                                                                doc.input(
                                                                    type=
                                                                    'checkbox',
                                                                    name=p,
                                                                    value='0')
                                                                with tag(
                                                                        'span',
                                                                        id=
                                                                        '2020-2021'
                                                                ):
                                                                    text(
                                                                        '2020-2021'
                                                                    )
                                                            with tag('div'):
                                                                doc.input(
                                                                    type=
                                                                    'checkbox',
                                                                    name=p,
                                                                    value='0')
                                                                with tag(
                                                                        'span',
                                                                        id=
                                                                        '2021-2022'
                                                                ):
                                                                    text(
                                                                        '2021-2022'
                                                                    )
                                                            with tag('div'):
                                                                doc.input(
                                                                    type=
                                                                    'checkbox',
                                                                    name=p,
                                                                    value='0')
                                                                with tag(
                                                                        'span',
                                                                        id=
                                                                        '2022-2023'
                                                                ):
                                                                    text(
                                                                        '2022-2023'
                                                                    )
                                                    """ligne pour bouton 'enregistrer"""
                                                    with tag(
                                                            'div',
                                                            klass=
                                                            'row justify-content-center top-buffer'
                                                    ):
                                                        with tag('div'):
                                                            with tag('a',
                                                                     href=''):
                                                                with tag(
                                                                        'img',
                                                                        src=
                                                                        "./dist/images/check.png"
                                                                ):
                                                                    pass
                                """MODAL FIN"""

                            # """ICI IL FAUT UNE BOUCLE QUI VA GENERER LES SUJETS"""
                            # with tag('tr'):
                            # with tag('td', klass='col-lg-8 top buffer-top'):
                            # with tag('input', type='checkbox', value='0', onchange='sujet_actif()'):pass
                            # with tag('td', klass='col-lg-8 top buffer-top'):
                            # with tag('textarea', name = 'titre', klass='disable_text '):
                            # text('Titre : ' + 'Ceci est un titre')
                            # with tag('td', klass='col-lg-1'):
                            # with tag('img', src='./dist/images/down_arrow_small.png', onclick='afficher_details_sujet()'):pass
                            # with tag('td', klass='col-lg-1'):
                            # with tag('img', src="./dist/images/pencil.png"):pass
                            # with tag('td', klass='col-lg-1 content-center', id='nbr_etus'):

                            # """IL FAUT ALLER CHERCHER LA SOMMES DES ETUS PAR SUJET"""

                            # with tag('div', klass="nbr_etus"):
                            # with tag('input', name = 'nbr_etus', type='number', klass='disable_text hover', value="5"):pass

                            # with tag('td', klass='col-lg-1'):
                            # with tag('img', src="./dist/images/bin.png"):pass

                            # with tag('tr', id = 'details_sujet'):

                            # with tag('row'):
                            # with tag('div'):

                            # with tag('td', klass='col-sm-9'):
                            # with tag('textarea', name = 'descriptif', placeholder = 'Descriptif : ' + 'qsdqsdqsdqsdqsdqsdqsd', klass='disable_text '):
                            # text('Descriptif : ' + 'Ceci est un descriptif')

                            # with tag('td', klass='col-sm-1'):
                            # """Afficher dynamiquement les programmes"""
                            # with tag('div', klass='top-buffer col-sm-1'):
                            # text('Programmes : ')
                            # with tag('div'):
                            # for p in programme:
                            # with tag('div'):
                            # with tag('label', klass='switch'):
                            # doc.input( type = 'checkbox', name = p, value = '0', onclick='afficherFil()')
                            # with tag('span', klass='slider round', id=p+'1'):
                            # text(p)

                            # with tag('td', klass='col-sm-1'):
                            # """Afficher dynamiquement les filières"""
                            # with tag('div', klass='top-buffer filiere col-sm-1', id='FiliereInfo'):
                            # text('Filiére : ')
                            # with tag('div'):
                            # for f in programme['Finances']:
                            # with tag('div'):
                            # with tag('label', klass='switch'):
                            # doc.input( type = 'checkbox', name = f, value = '0')
                            # with tag('span',klass='slider round'):
                            # text(f)

                            # with tag('td', klass='col-sm-1'):pass

                            # with tag('td', klass='col-sm-1'):pass

        with tag('script', src="./dist/js/prof_sujets.js"):
            pass
        with tag('script', src="./dist/js/prof_modal.js"):
            pass
        with tag('script', src="./dist/js/datatables.min.js"):
            pass
        with tag('script', src="./dist/js/datatables.js"):
            pass
        with tag('script', src='./dist/js/responsive.min.js'):
            pass
        with tag('stylesheet', src='./dist/css/modal.css'):
            pass

        webPage(Page=doc, Session=S, CSS='dist/css/mycss.css', JS='myjs.js')
    else:
        webPage(doc)
def page(S=None):
    doc, tag, text = Doc().tagtext()
    if S:
        with tag('div', klass='wrapper'):
            doc, tag, text = prof_menu.sidebar(doc, tag, text)
            with tag('div', id='content'):
                with tag('div', klass='container-fluid ajouter'):

                    with tag('form'):
                        """ajouter sujet"""
                        with tag('row', id="ajouter_sujet", klass='cacher'):

                            # """Demander si le sujet sera actif pendant des années"""
                            # with tag('div', klass='row justify-content-center top-buffer'):
                            # with tag('div', klass='col-sm-4 text-center'):
                            # with tag('label', klass='switch'):
                            # doc.input( type = 'checkbox', name = 'valable_des_annees', value = '0')
                            # with tag('span',klass='slider round'):
                            # text('Sujet valable plusieures années ?')

                            with tag('row',
                                     klass=
                                     'row justify-content-center top-buffer'):

                                with tag(
                                        'row',
                                        klass=
                                        'col-sm-10 text-center mod_width_textarea'
                                ):
                                    with tag('textarea', placeholder='Titre'):
                                        pass
                                with tag(
                                        'row',
                                        klass=
                                        'col-sm-10 text-center mod_width_textarea'
                                ):
                                    with tag('textarea',
                                             placeholder='Descriptif'):
                                        pass

                            with tag('row', klass=' top-buffer'):

                                with tag('div', klass='row'):
                                    """Afficher dynamiquement les programmes"""
                                    with tag('div', klass='col-6 text-center'):
                                        with tag('div', id="programmes"):
                                            text('Programmes : ')
                                            with tag('div'):
                                                for p in programme:
                                                    with tag('div'):
                                                        # , klass='switch'):
                                                        with tag('label'):
                                                            doc.input(
                                                                type='checkbox',
                                                                name=p,
                                                                value='0',
                                                                onclick=
                                                                'afficherFilFin()'
                                                            )
                                                            with tag('span',
                                                                     id=p +
                                                                     '1'):
                                                                text(p)
                                    """Afficher dynamiquement les filières"""
                                    with tag('div',
                                             klass='filiere col-6 text-center',
                                             id='FiliereFin'):
                                        with tag('div'):
                                            text('Filiére : ')
                                            with tag('div'):
                                                for f in programme['Finances']:
                                                    with tag('div'):
                                                        with tag('label'):
                                                            doc.input(
                                                                type='checkbox',
                                                                name=f,
                                                                value='0')
                                                            with tag('span'):
                                                                text(f)

                            with tag('div', klass='row'):

                                with tag('div', klass='col-4 text-center'):
                                    """Ajouter fichier annexe"""
                                    with tag(
                                            'div',
                                            klass=
                                            'top-buffer row justify-content-center'
                                    ):
                                        text('Ajouter un fichier annexe')
                                    with tag(
                                            'br',
                                            klass=
                                            'top-buffer row justify-content-center'
                                    ):
                                        with tag('input', type='file'):
                                            pass
                                """Etablir min et max etudiants"""
                                # with tag('row', klass='row justify-content-center top-buffer'):
                                # with tag('div', id='nbr_min_etus'):
                                # with tag('input', type='number', placeholder='Nbr. min d\'étudiants'):pass
                                with tag('div', klass='col-4 text-center'):
                                    with tag(
                                            'div',
                                            klass=
                                            'top-buffer row justify-content-center'
                                    ):
                                        text(
                                            'Décider le nombre d\'étudiant qui pourront avoic ce sujet'
                                        )
                                    with tag(
                                            'br',
                                            klass=
                                            'row justify-content-center top-buffer'
                                    ):
                                        with tag('div', id='nbr_max_etus'):
                                            with tag('input',
                                                     type='number',
                                                     placeholder=
                                                     'Nbr. max d\'étudiants',
                                                     min='1'):
                                                pass

                                with tag('div', klass='col-4 text-center'):
                                    with tag(
                                            'div',
                                            klass=
                                            'top-buffer row justify-content-center'
                                    ):
                                        text(
                                            'Année académique pour laquelle le sujet sera disponible'
                                        )
                                    with tag('div'):
                                        doc.input(type='checkbox',
                                                  name=p,
                                                  value='0')
                                        with tag('span', id='2020-2021'):
                                            text('2020-2021')
                                    with tag('div'):
                                        doc.input(type='checkbox',
                                                  name=p,
                                                  value='0')
                                        with tag('span', id='2021-2022'):
                                            text('2021-2022')
                                    with tag('div'):
                                        doc.input(type='checkbox',
                                                  name=p,
                                                  value='0')
                                        with tag('span', id='2022-2023'):
                                            text('2022-2023')
                            """ligne pour bouton 'enregistrer"""
                            with tag('div',
                                     klass=
                                     'row justify-content-center top-buffer'):
                                with tag('div'):
                                    with tag('a', href=''):
                                        with tag(
                                                'img',
                                                src="./dist/images/check.png"):
                                            pass

        with tag('script', src="dist/js/myjs.js"):
            pass
        with tag('stylesheet', src='./dist/css/mycss.css'):
            pass

        webPage(Page=doc, Session=S, CSS='dist/css/mycss.css', JS='myjs.js')
    else:
        webPage(doc)
def page(S=None):
    doc, tag, text = Doc().tagtext()
    doc, tag, text = mod_menu.sidebar(doc, tag, text)
    if S:
        with tag('div', klass='text-center'):
            with tag('form',
                     action='mod_rechercher_personne.py',
                     method="post",
                     name="formSaisie",
                     enctype="multipart/form-data"):
                with tag('label'):
                    with tag('a'):
                        text('Rechercher une personne')
                    with tag('div', klass='input-group mb-3'):
                        doc.input(type="text",
                                  id="txt_recherche",
                                  klass="form-control input-lg",
                                  name="txt_recherche",
                                  minlength="3",
                                  maxlength="80",
                                  placeholder="Eid/Nom")
                        with tag('div', klass='input-group-append'):
                            with tag('span', klass='input-group-text'):
                                doc.stag('input',
                                         type='image',
                                         id='Search',
                                         name='Search',
                                         src='./dist/icons/search.svg')

        ###########################################

        with tag('br', klass='container-fluid ajouter'):

            with tag('h4'):
                text('Liste des sujets')

            with tag('table',
                     id='table_prof_sujet',
                     klass=
                     "table table-striped table-bordered table-sm top-buffer",
                     cellspacing="0",
                     width="100%"):
                with tag('thead'):
                    with tag('tr', klass='text-center'):
                        with tag('th', cope="col"):
                            text('Actif')
                        with tag('th', cope="col"):
                            text('Titre')
                        with tag('th', scope="col"):
                            text('Programme')
                        with tag('th', scope="col"):
                            text('Filière')
                        with tag('th', scope="col", klass='text-center'):
                            text('Modifier')
                        with tag('th', scope="col", klass='text-center'):
                            text('Supprimer')

                with tag('tbody'):
                    """A FAIRE UNE BOUCLE POUR LES sujets"""
                    with tag('tr'):
                        with tag('td', scope="col", klass='text-center'):
                            with tag('input', type='checkbox', value='0'):
                                pass
                        with tag('td', scope="col"):
                            with tag('textarea',
                                     klass='disable_text text',
                                     placeholder='Sujet sur les tomates'):
                                pass
                        with tag('td', scope="col"):
                            with tag('textarea',
                                     klass='disable_text text',
                                     placeholder='Agriculture'):
                                pass
                        with tag('td', scope="col"):
                            with tag('textarea',
                                     klass='disable_text text',
                                     placeholder='Eco'):
                                pass
                        with tag('td',
                                 scope="col",
                                 klass='mouse_hand text-center'):
                            with tag('img',
                                     src='./dist/images/pencil.png',
                                     id="myBtn"):
                                pass
                        with tag('td',
                                 scope="col",
                                 klass='mouse_hand text-center'):
                            with tag('img',
                                     src='./dist/images/bin.png',
                                     onclick='change()'):
                                pass
                        """ MODAL """
                        with tag('div', id='myModal', klass='modal'):
                            with tag('div', klass='modal-content'):
                                with tag('span', klass='close'):
                                    text("Fermer")

                                with tag(
                                        'row',
                                        klass=
                                        'row justify-content-center top-buffer'
                                ):

                                    with tag('form'):
                                        """ajouter sujet"""
                                        with tag('row',
                                                 id="ajouter_sujet",
                                                 klass='cacher'):

                                            # """Demander si le sujet sera actif pendant des années"""
                                            # with tag('div', klass='row justify-content-center top-buffer'):
                                            # with tag('div', klass='col-sm-4 text-center'):
                                            # with tag('label', klass='switch'):
                                            # doc.input( type = 'checkbox', name = 'valable_des_annees', value = '0')
                                            # with tag('span',klass='slider round'):
                                            # text('Sujet valable plusieures années ?')

                                            with tag(
                                                    'row',
                                                    klass=
                                                    'row justify-content-center top-buffer'
                                            ):

                                                with tag(
                                                        'row',
                                                        klass=
                                                        'col-sm-10 text-center mod_width_textarea'
                                                ):
                                                    with tag(
                                                            'textarea',
                                                            placeholder='Titre'
                                                    ):
                                                        pass
                                                with tag(
                                                        'row',
                                                        klass=
                                                        'col-sm-10 text-center mod_width_textarea'
                                                ):
                                                    with tag('textarea',
                                                             placeholder=
                                                             'Descriptif'):
                                                        pass

                                            with tag('row',
                                                     klass=' top-buffer'):

                                                with tag('div', klass='row'):
                                                    """Afficher dynamiquement les programmes"""
                                                    with tag(
                                                            'div',
                                                            klass=
                                                            'col-6 text-center'
                                                    ):
                                                        with tag(
                                                                'div',
                                                                id="programmes"
                                                        ):
                                                            text(
                                                                'Programmes : '
                                                            )
                                                            with tag('div'):
                                                                for p in programme:
                                                                    with tag(
                                                                            'div'
                                                                    ):
                                                                        # , klass='switch'):
                                                                        with tag(
                                                                                'label'
                                                                        ):
                                                                            doc.input(
                                                                                type
                                                                                ='checkbox',
                                                                                name
                                                                                =p,
                                                                                value
                                                                                ='0',
                                                                                onclick
                                                                                ='afficherFilFin()'
                                                                            )
                                                                            with tag(
                                                                                    'span',
                                                                                    id
                                                                                    =p
                                                                                    +
                                                                                    '1'
                                                                            ):
                                                                                text(
                                                                                    p
                                                                                )
                                                    """Afficher dynamiquement les filières"""
                                                    with tag(
                                                            'div',
                                                            klass=
                                                            'filiere col-6 text-center',
                                                            id='FiliereFin'):
                                                        with tag('div'):
                                                            text('Filiére : ')
                                                            with tag('div'):
                                                                for f in programme[
                                                                        'Finances']:
                                                                    with tag(
                                                                            'div'
                                                                    ):
                                                                        with tag(
                                                                                'label'
                                                                        ):
                                                                            doc.input(
                                                                                type
                                                                                ='checkbox',
                                                                                name
                                                                                =f,
                                                                                value
                                                                                ='0'
                                                                            )
                                                                            with tag(
                                                                                    'span'
                                                                            ):
                                                                                text(
                                                                                    f
                                                                                )

                                            with tag('div', klass='row'):

                                                with tag('div',
                                                         klass=
                                                         'col-4 text-center'):
                                                    """Ajouter fichier annexe"""
                                                    with tag(
                                                            'div',
                                                            klass=
                                                            'top-buffer row justify-content-center'
                                                    ):
                                                        text(
                                                            'Ajouter un fichier annexe'
                                                        )
                                                    with tag(
                                                            'br',
                                                            klass=
                                                            'top-buffer row justify-content-center'
                                                    ):
                                                        with tag('input',
                                                                 type='file'):
                                                            pass
                                                """Etablir min et max etudiants"""
                                                # with tag('row', klass='row justify-content-center top-buffer'):
                                                # with tag('div', id='nbr_min_etus'):
                                                # with tag('input', type='number', placeholder='Nbr. min d\'étudiants'):pass
                                                with tag('div',
                                                         klass=
                                                         'col-4 text-center'):
                                                    with tag(
                                                            'div',
                                                            klass=
                                                            'top-buffer row justify-content-center'
                                                    ):
                                                        text(
                                                            'Décider le nombre d\'étudiant qui pourront avoic ce sujet'
                                                        )
                                                    with tag(
                                                            'br',
                                                            klass=
                                                            'row justify-content-center top-buffer'
                                                    ):
                                                        with tag(
                                                                'div',
                                                                id='nbr_max_etus'
                                                        ):
                                                            with tag(
                                                                    'input',
                                                                    type=
                                                                    'number',
                                                                    placeholder=
                                                                    'Nbr. max d\'étudiants',
                                                                    min='1'):
                                                                pass

                                                with tag('div',
                                                         klass=
                                                         'col-4 text-center'):
                                                    with tag(
                                                            'div',
                                                            klass=
                                                            'top-buffer row justify-content-center'
                                                    ):
                                                        text(
                                                            'Année académique pour laquelle le sujet sera disponible'
                                                        )
                                                    with tag('div'):
                                                        doc.input(
                                                            type='checkbox',
                                                            name=p,
                                                            value='0')
                                                        with tag('span',
                                                                 id='2020-2021'
                                                                 ):
                                                            text('2020-2021')
                                                    with tag('div'):
                                                        doc.input(
                                                            type='checkbox',
                                                            name=p,
                                                            value='0')
                                                        with tag('span',
                                                                 id='2021-2022'
                                                                 ):
                                                            text('2021-2022')
                                                    with tag('div'):
                                                        doc.input(
                                                            type='checkbox',
                                                            name=p,
                                                            value='0')
                                                        with tag('span',
                                                                 id='2022-2023'
                                                                 ):
                                                            text('2022-2023')
                                            """ligne pour bouton 'enregistrer"""
                                            with tag(
                                                    'div',
                                                    klass=
                                                    'row justify-content-center top-buffer'
                                            ):
                                                with tag('div'):
                                                    with tag('a', href=''):
                                                        with tag(
                                                                'img',
                                                                src=
                                                                "./dist/images/check.png"
                                                        ):
                                                            pass

        ###########################################

        with tag('h4',
                 onclick="switch_table_etus_sujets()",
                 klass='mouse_hand'):
            text('Liste des étudiants qui ont choisi un de vos sujets')
            with tag('p', klass='collapse'):
                pass
        with tag('div', id='div_chercher_nom_etu'):
            pass
            # """Recherche tab étuaints-sujet"""
            # with tag('input', type='text', id='chercher_nom_etu', onkeyup='recherche_etudiant()', placeholder='Chercher par nom', title='introduire un nom'):pass

        with tag('table',
                 id='prof_table_sujets_profs',
                 klass="table table-striped"):
            with tag('thead'):
                with tag('tr'):
                    with tag('th', klass="th-sm", scope="col"):
                        text('Nom')
                    with tag('th', klass="th-sm", scope="col"):
                        text('Prénom')
                    with tag('th', klass="th-sm", scope="col"):
                        text('Programme')
                    with tag('th', klass="th-sm", scope="col"):
                        text('Autres étudiant(s) par sujet')
                    with tag('th', klass="th-sm", scope="col"):
                        text('Sujets choisis')

            with tag('tbody'):
                """A FAIRE UNE BOUCLE POUR LES ETUDIANTS"""

                with tag('tr'):

                    with tag('td', scope="col"):
                        text('Johniiii')
                    with tag('td', scope="col"):
                        text('Antoineyyyy')
                    with tag('td', scope="col"):
                        text('Programme2')
                    with tag('td', scope='col'):
                        with tag('div',
                                 klass='numberCircle',
                                 onclick='mod_affiche_sujet_prof()'):
                            text('5')
                        with tag('div', id='nom-prenom-stud'):
                            # a faire une boucle
                            with tag('p'):
                                text('Nom Prénom mail')
                            with tag('p'):
                                text('Nom Prénom mail')
                            with tag('p'):
                                text('Nom Prénom mail')
                            with tag('p'):
                                text('Nom Prénom mail')
                            with tag('p'):
                                text('Nom Prénom mail')
                    with tag('td', scope="col"):
                        text('wwww wwwww')

                with tag('tr'):

                    with tag('td', scope="col"):
                        text('qaaaaa')
                    with tag('td', scope="col"):
                        text('Antoineyyyy')
                    with tag('td', scope="col"):
                        text('tttt')
                    with tag('td', scope='col'):
                        with tag('div',
                                 klass='numberCircle',
                                 onclick='mod_affiche_sujet_prof()'):
                            text('3')
                        with tag('div', id='nom-prenom-stud'):
                            # a faire une boucle
                            with tag('p'):
                                text('Nom Prénom')
                            with tag('p'):
                                text('Nom Prénom')
                            with tag('p'):
                                text('Nom Prénom')
                    with tag('td', scope="col"):
                        text('aaaa xcvxcvxc')
        with tag('br'):

            with tag('h4',
                     onclick='switch_table_sujets_cette_annee()',
                     klass='mouse_hand'):
                text('Sujets attribués cette année')
                with tag('p', klass='collapse'):
                    pass
            with tag('div', id='div_titre_sujet'):
                # """Recherche tab titre"""
                # with tag('input', type='text', id='chercher_titre', onkeyup='recherche_titre()', placeholder='Chercher par titre', title='introduire un nom'):pass

                with tag(
                        'table',
                        id='table_sujets_cette_annee',
                        klass=
                        "table table-striped table-bordered table-sm top-buffer",
                        cellspacing="0",
                        width="100%"):
                    with tag('thead'):
                        with tag('tr'):

                            with tag('th', cope="col"):
                                text('Titre')
                            with tag('th', scope="col"):
                                text('Programme')
                            with tag('th', scope="col"):
                                text('Filière')
                            with tag('th', scope="col"):
                                text('Etudiant')
                    with tag('tbody'):
                        """A FAIRE UNE BOUCLE POUR LES sujets"""
                        with tag('tr'):

                            with tag('td', scope="col"):
                                text('Titre')
                            with tag('td', scope="col"):
                                text('Programme')
                            with tag('td', scope="col"):
                                text('Filière')
                            with tag('td', scope="col"):
                                text('Etudiant')
            with tag('br'):
                with tag('h4',
                         onclick='switch_historique_sujet()',
                         klass='mouse_hand'):
                    text('Historique des sujets atribués')
                with tag('div', id='div_historique'):
                    with tag(
                            'table',
                            id='table_etu_sujet',
                            klass=
                            "table table-striped table-bordered table-sm top-buffer",
                            cellspacing="0",
                            width="100%"):
                        with tag('thead'):
                            with tag('tr'):

                                with tag('th', cope="col"):
                                    text('Titre')
                                with tag('th', scope="col"):
                                    text('Programme')
                                with tag('th', scope="col"):
                                    text('Filière')
                                with tag('th', scope="col"):
                                    text('Etudiant')
                                with tag('th', scope="col"):
                                    text('Année scolaire')

                        with tag('tbody'):
                            """A FAIRE UNE BOUCLE POUR L'historique"""

                            with tag('tr'):

                                with tag('td', scope="col"):
                                    text('Johniiii')
                                with tag('td', scope="col"):
                                    text('Antoineyyyy')
                                with tag('td', scope="col"):
                                    text('Programme2')
                                with tag('td', scope="col"):
                                    text('wwww wwwww')
                                with tag('td', scope="col"):
                                    text('2')


####################################################################

        with tag('script', src="./dist/js/prof_sujets.js"):
            pass
        with tag('script', src="./dist/js/prof_tab_bord.js"):
            pass
        with tag('script', src="./dist/js/prof_modal.js"):
            pass
        with tag('script', src="./dist/js/datatables.min.js"):
            pass
        with tag('script', src="./dist/js/datatables.js"):
            pass
        with tag('script', src='./dist/js/responsive.min.js'):
            pass
        webPage(Page=doc, Session=S, CSS='dist/css/mycss.css', JS='myjs.js')
    else:
        webPage(doc)
Exemple #11
0
def page(S=None):
    doc, tag, text = Doc().tagtext()
    if S:
        Get = getUrlFields()
        eID = Get['eidRecherche']

        P = PersonPageView(S, eID)

        with tag('div', klass='wrapper'):
            doc, tag, text = menu.sidebar(doc, tag, text)
            with tag('div', id='content'):
                with tag('div', klass='container-fluid'):
                    with tag('div', klass='row infopersonne'):
                        with tag('div', klass='col-sm-4'):
                            with tag('div', klass='row'):
                                with tag('div', klass='col-sm-3'):
                                    if P.Get('photo'):
                                        Width, Height = sizingImage(
                                            P.Get('photo'), H=100)
                                        doc.stag('input',
                                                 type='image',
                                                 klass='photo',
                                                 alt='Photo',
                                                 src='data:image/jpg;base64,' +
                                                 P.Get('photo'),
                                                 width=Width,
                                                 height=Height)
                                with tag('div', klass='col-sm-9 perso'):
                                    with tag('h4'):
                                        text(
                                            P.Get('prenom') + ' ' +
                                            P.Get('nom'))
                                    doc.stag('br')
                                    text(P.Get('eid'))
                                    doc.stag('br')
                                    text(P.Get('mail'))
                        with tag('div', klass='col-sm-3'):
                            with tag('h6'):
                                text('Informations UNamur')
                            klassgenre = ''
                            if str.rstrip(P.Get('genre')) == 'male':
                                klassgenre = 'fa fa-male genre'
                            elif str.rstrip(P.Get('genre')) == 'female':
                                klassgenre = 'fa fa-famale genre'
                            with tag('i', klass=klassgenre):
                                pass
                            with tag('i', klass='fab fa-cotton-bureau'):
                                text(' Bureau ...')
                            with tag('i', klass='fas fa-phone fa-sm'):
                                text(' Phone ...')
                        with tag('div', klass='col-sm-5'):
                            with tag('h6'):
                                text('Informations personnelles')
                                with tag('i',
                                         klass='fas fa-address-card fa-sm'):
                                    if P.Get('adresse') and P.Get(
                                            'cp') and P.Get('localite'):
                                        text(' ' + P.Get('adresse') + ' - ' +
                                             P.Get('cp') + ' ' +
                                             P.Get('localite'))
                                with tag('i', klass='fas fa-at fa-sm'):
                                    if P.Get('mailprive'):
                                        text(' ' + P.Get('mailprive'))
                                with tag('i', klass='fas fa-phone fa-sm'):
                                    if P.Get('telprive'):
                                        text(' ' + P.Get('telprive'))
                                with tag('i', klass='fas fa-atom fa-sm'):
                                    if P.Get('datenaissance'):
                                        text(' ' + str(P.Get('datenaissance')))
        webPage(Page=doc, Session=S)
    else:
        webPage(doc)
            with tag('div', id='content'):
                with tag('div', klass='container-fluid'):
                    with tag('div', klass='row'):
                        if 'modify' in Data and (P := PersonPageView(S, Data['EID'])): ## Récupération de l'objet à modifier
                            for Key in Data:
                                if 'txt_' in Key: P.Set(Key[4:], Data[Key]) ## Création de l'objet modifié
                            P.Save() ## Enregistrement dans la DB
                            goTo('index.py')
                        elif (P := PersonPageView(S, S.Get('eID'))): ## S = Utilisateur connecté et demande. P = la personne à gérer.
                            '''__file__.split('\\')[-1] = le nom de ce fichier comme thisFileName qui est dans tools.'''
                            with tag('form', action=thisFileName(), method="post", name="formSaisie", enctype="multipart/form-data"):
                                for Key in P.Fields(): doc, tag, text = showField(doc, tag, text, P.Show(Key)) ## Affichage de tous les champs à modifier
                                doc.stag('br')
                                doc.input(type="hidden", id='EID', name='EID', value=P.Get('eid'))
                                doc.stag('input', type="submit", id='modify', name='modify', value="Mettre à jour", style="width:150px")
        webPage(Page = doc, Session = S)
    else:
        webPage(doc)



if __name__ == '__main__':
    page()