Skip to content
Snippets Groups Projects
Commit e3f35dfe authored by Boris's avatar Boris
Browse files

Page de bienvenue - seule page accessible directement par navigater : login - ...

Page de bienvenue - seule page accessible directement par navigater : login -  ajout de ftl pour l'utilisateur regulier et pour le mod(suppression de profs en plus)
parent 7783168a
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import com.uca.core.*;
import freemarker.template.*;
import java.io.*;
import java.util.*;
import com.uca.entity.*;
public class ProfGUI
{
......@@ -11,7 +12,7 @@ public class ProfGUI
Map<String, Object> input = new HashMap<>();
input.put("profs", Core.Prof.getAll());
return DefaultGUI.getDefaultGUI(input, "profs.ftl");
return DefaultGUI.getDefaultGUI(input, "profsRegular.ftl");
}
public static void delete(String id)
......@@ -19,6 +20,13 @@ public class ProfGUI
Core.Prof.delete(Core.Prof.getById(Integer.parseInt(id)));
}
public static String getWelcomePage(ProfEntity prof)
{
Map<String, Object> input = new HashMap<>();
input.put("prof",prof);
return DefaultGUI.getDefaultGUI(input, "welcome.ftl");
}
}
......@@ -9,7 +9,7 @@
<label for="userName">Nom d'utilisateur</label>
<input name="userName">
<label for="password">Mot de passe</label>
<input name="password">
<input name="password" type="password">
<button type="submit" placeholder="Supprimer...">Envoyer</button>
</form>
......
<#ftl encoding="utf-8">
<body xmlns="http://www.w3.org/1999/html">
<ul>
<h1> Liste des enseignants: </h1>
<#list profs as prof>
<li>${prof.id} - ${prof.firstName} ${prof.lastName} aka ${prof.userName} </li>
</#list>
</ul>
<a href="/welcome">Retour à la page d'accueil</a>
</body>
</html>
<#ftl encoding="utf-8">
<body xmlns="http://www.w3.org/1999/html">
<h1>Bienvenue ${prof.userName}</h1>
<a href="/profs" >Consulter la liste des profs</a>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment