Skip to content

Commit

Permalink
Merge pull request #34 from Chartes-TNAH/dev_annuaire
Browse files Browse the repository at this point in the history
Annuaire finalisé #9
  • Loading branch information
Segolene-Albouy authored Mar 25, 2019
2 parents 48d423f + bcebbed commit 9792f78
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 3 deletions.
Binary file added app/static/img/not_annuaire.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/static/img/not_person.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 16 additions & 3 deletions app/templates/pages/annuaire.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,25 @@
<body>

<main role="main">
{% if current_user.is_anonymous %}
<div class="starter-template container" style="text-align: center">

<img src="/static/img/not_annuaire.gif">
<h1 class="lead">Vous devez être connecté·e pour accéder à l'annuaire.</h1> <br>

<a href="{{url_for('register')}}" class="btn btn-dark btn-lg active" role="button" aria-pressed="true">Inscription</a>
<a href="{{url_for('login')}}" class="btn btn-dark btn-lg active" role="button" aria-pressed="true">Connexion</a>
<!-- deux boutons menant aux pages inscription et description -->

{% else %}
</div>
<section class="jumbotron text-center">
<div class="container">
<h1 class="jumbotron-heading">Annuaire du master TNAH de l'École nationale des chartes</h1>
<p class="lead text-muted">Retrouvez les informations de contact des étudiant·e·s du Master TNAH inscrit·e·s sur TNAHBox.</p>
<p style="padding-left: 20px">Il y a {{resultats.total}} personnes inscrites sur l'annuaire TNAH :</p>
<button type="button" class="btn btn-lg btn-outline-light" style="color: #55595c" disabled><b>Étudiants</b></button>
<button type="button" class="btn btn-lg btn-outline-light" style="color: #BD052D" disabled><b>Professeurs</b></button>
<button type="button" class="btn btn-lg btn-outline-light" style="color: #55595c" disabled><b>Étudiant·e·s</b></button>
<button type="button" class="btn btn-lg btn-outline-light" style="color: #BD052D" disabled><b>Enseignant·e·s</b></button>



Expand All @@ -38,7 +49,7 @@ <h1 class="jumbotron-heading">Annuaire du master TNAH de l'École nationale des
<!-- à conserver, permet de faire grand rectangle gris foncé -->
<text x="50%" y="50%" fill="#eceeef" dy=".3em">
<!-- avant modification, bootstrap = <svg class="bd-placeholder-img card-img-top" width="100%" height="225" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: Thumbnail"><title>Placeholder</title><rect width="100%" height="100%" fill="#55595c"/><text x="50%" y="50%" fill="#eceeef" dy=".3em"> -->
<a href="{{url_for('person', person_id = found_person.person_id)}}">{{found_person.person_firstName}} {{found_person.person_name}}</a>
<a href="{{url_for('person', person_id = found_person.person_id)}}" style="color: white">{{found_person.person_firstName}} {{found_person.person_name}}</a>
<!-- afficher le Prénom Nom dans la case gristextui peut éventuellement accueillir une image, voir si BDD etc. -->
</text>

Expand Down Expand Up @@ -85,6 +96,8 @@ <h1 class="jumbotron-heading">Annuaire du master TNAH de l'École nationale des
</div>
</div>

{% endif %}

</main>


Expand Down
31 changes: 31 additions & 0 deletions app/templates/pages/person.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ <h1>{{person.person_name}} {{person.person_firstName}} ({{person.person_promotio


<!-- design repris de la page document.html pour homognéité visuelle -->

{% if current_user.is_anonymous %}
<div class="starter-template container" style="text-align: center">

<img src="/static/img/not_person.gif">
<h1 class="lead">Vous devez être connecté·e pour accéder à cette page.</h1> <br>

<a href="{{url_for('register')}}" class="btn btn-dark btn-lg active" role="button" aria-pressed="true">Inscription</a>
<a href="{{url_for('login')}}" class="btn btn-dark btn-lg active" role="button" aria-pressed="true">Connexion</a>
<!-- deux boutons menant aux pages inscription et description -->


</div>
<!-- même si la page d'une personne n'est accessible en théorie que si on est passé par l'annuaire qui exige connexion, ceinture et bretelles comme on dit -->
{% else %}

<div class="row" style="padding: 2em">
<!-- Ici image, voir si on ajoute image pour les profils -->
<div class="col-md-5 text-white rounded bg-dark" style="margin-left: 10%">
Expand Down Expand Up @@ -83,6 +99,20 @@ <h4 class="font-italic" style="margin-top: 1em">Contact</h4>
<div class="row" style="padding: 2em">
<div class="col-md-5 rounded" style="margin-left: 10%">
<dt>Description : </dt>

{% if person_description %}
<p>{{person_description}}</p>
{% else %}
<span style="color: grey;">Aucune description n'a été renseignée.</span>
{% endif %}
<!-- BUT ajout d'un lien pour aller sur la page profil, si la personne est un utilisateur et a une page profil -->
{% if person.person_login %}
<!-- si la personne a un login, est forcément un utilisateur, donc afficher son profil avec un lien vers sa page profil. -->
<dt>Profil : </dt>
<span><a href="{{url_for('user', person_login=person.person_login)}}">{{person.person_login}}</a></span>
<!-- Afficher son profil avec redirection vers page -->
{% endif %}

<!-- if person_description
<p>{{person_description}}</p>
else
Expand All @@ -104,6 +134,7 @@ <h4 class="font-italic" style="margin-top: 1em">Contact</h4>

</div>

{% endif %}



Expand Down

0 comments on commit 9792f78

Please sign in to comment.