Ejemplo n.º 1
0
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)
Ejemplo n.º 2
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)
Ejemplo n.º 3
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)
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)
Ejemplo n.º 5
0
def tableau_de_bord_page(S, doc, tag, text):
    doc, tag, text = Doc().tagtext()
    if S:
        Found = False

        with tag('br'):
            R9 = db.readRecords(S.Get('eID'), parametres.Database, 'personne',
                                False)
        with tag('div', klass='wrapper'):
            doc, tag, text = mod_menu.sidebar(doc, tag, text)

        with tag('div', id='content'):

            with tag('div', klass="dropdown"):
                """Bouton menu"""
                with tag('button', klass="dropbtn"):
                    text('Choisir une filière ')
                """Menu descendant"""
                with tag('div', klass="dropdown-content"):

                    with tag('a', href=''):
                        text('Fil 1')

                    with tag('a', href=''):
                        text('Fil 2')

                    with tag('a', href=''):
                        text('Fil 3')

            with tag('h4',
                     onclick='switch_table_profs_sujet()',
                     klass="text-center"):
                text('Sujets proposés par les professeurs')

            with tag('div', id='div_profs_sujet'):

                with tag('table',
                         id='mod_table_sujets_profs',
                         klass="table table-striped"):

                    with tag('thead'):
                        with tag('tr', klass='text-center'):
                            with tag('th'):
                                text('Nom')
                            with tag('th'):
                                text('Mail')
                            with tag('th'):
                                text('Plus de détails')
                            with tag('th'):
                                text('Sujets')
                            with tag('th'):
                                text('Etudiants')

                    with tag('tbody'):
                        """A FAIRE UNE BOUCLE POUR LES PROFS"""
                        for el in R9:
                            with tag('tr', klass='text-center'):
                                with tag('td'):
                                    text(str(el["nom"]))
                                with tag('td'):
                                    text(str(el["mail"]))
                                with tag('td'):
                                    with tag('img',
                                             src='./dist/images/eye.png',
                                             id="myBtn"):
                                        pass
                                with tag('td'):
                                    with tag('div',
                                             klass='numberCircle',
                                             onclick='mod_affiche_sujets()'):
                                        text('3')
                                    with tag('div', id='mod-sujet-stud'):
                                        # a faire une boucle
                                        with tag('p'):
                                            text('Sujet vitesse')
                                        with tag('p'):
                                            text('Sujet test')
                                        with tag('p'):
                                            text('Sujet ok')
                                with tag('td'):
                                    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')
                                        with tag('p'):
                                            text('Nom Prénom')
                                        with tag('p'):
                                            text('Nom Prénom')
                                        with tag('p'):
                                            text('Nom Prénom')
                                        with tag('p'):
                                            text('Nom Prénom')
                        """ MODAL """
                        with tag('div', id='myModal', klass='modal'):
                            """A utiliser les modules de mise en forme automatique"""
                            with tag('div', klass='modal-content d-flex'):
                                with tag('span', klass='close'):
                                    text("Fermer")

                                with tag('h4'):
                                    text('Professeur : ' + 'Nom du prof')
                                """Faire une boucle pour afficher tous les sujets des profs"""
                                with tag('div'):
                                    with tag('h4', klass='color_sujet'):
                                        text('Sujet ' + 'x')

                                with tag('div'):
                                    with tag('h5'):
                                        text('Titre :')
                                    with tag('div'):
                                        text(
                                            'Ceci est un titre  qsdqsdqsdqsdqs'
                                        )

                                with tag('div'):
                                    with tag('h5'):
                                        text('Déscriptif:')
                                    with tag('div'):
                                        text(
                                            'Ceci est un titre  déscriptif dqsdqsdqsdqs'
                                        )

                                with tag('div'):
                                    with tag('h5'):
                                        text('Filiéres')
                                    with tag('div'):
                                        text(
                                            'le sujet est dans les filiéres suivantes : '
                                            + ' test ')

                                with tag('div'):
                                    with tag('h5'):
                                        text('Nombre étudiants par sujet')
                                    with tag('div'):
                                        text(
                                            'X ' +
                                            ' étudiants ont choisi ce sujet. ')
                                """Faire une boucle pour afficher tous les sujets des profs"""

                with tag('br'):
                    pass
                with tag('div', klass='row'):
                    """Dates profs """
                    with tag('h5', klass='col-4 text-center'):
                        text('Dates d\'ouverture et fermeture dêpot sujet')
                    """Dates etus """
                    with tag('h5', klass='col-4 text-center'):
                        doc.input(type='checkbox', name='sujet-etu', value='0')
                        text('L\'étudiant peut ajouter son propre sujet')

                    # """Dates etus """
                    with tag('h5', klass='col-4 text-center'):
                        text('Dates d\'ouverture et fermeture choix sujet')

            # """Algos"""
            # with tag('h5', onclick='switch_algos()'):
            #     text('Algorithme à utiliser lors de l\'association + ')
            # with tag('div', id='choix_algos', klass='cache'):
            #     with tag('label', klass='container'):
            #         with tag('input', type='radio', name='radio' ):
            #             text('Munkres')
            #             with tag('span', klass='checkmark'):pass
            #     with tag('label', klass='container'):
            #         with tag('input', type='radio', name='radio' ):
            #             text('Gale et Shapley ')
            #             with tag('span', klass='checkmark'):pass
            #     with tag('label', klass='container'):
            #         with tag('input', type='radio', name='radio' ):
            #             text('Manuellement')
            #             with tag('span', klass='checkmark'):pass
    with tag('script', src="./dist/js/mod_tableaub.js"):
        pass
    with tag('script', src="./dist/js/myjs.js"):
        pass
    with tag('script', src="./dist/js/mod_affiche_sujet_prof.js"):
        pass
    with tag('script', src="./dist/js/mod_modal_oeil_tableaub.js"):
        pass
    with tag('script', src="./dist/js/datatables.min.js"):
        pass
    with tag('stylesheet', src='./dist/css/modal.css'):
        pass

    return doc, tag, text