rajah 6 ماه پیش
والد
کامیت
91eb2722c3

+ 5 - 2
src/main/java/fr/triplea/demovote/dao/CategorieRepository.java

@@ -11,11 +11,14 @@ import fr.triplea.demovote.model.Categorie;
 public interface CategorieRepository extends JpaRepository<Categorie, Integer> 
 {
   
-  @NativeQuery("SELECT DISTINCT c.* FROM vote.categories AS c WHERE c.numero_categorie = :id AND c.flag_actif IS TRUE ")
-  Categorie findById(@Param("id") int id);
+  @NativeQuery("SELECT DISTINCT c.* FROM vote.categories AS c WHERE c.numero_categorie = :numero AND c.flag_actif IS TRUE ")
+  Categorie findById(@Param("numero") int numeroCategorie);
   
   @NativeQuery("SELECT DISTINCT c.* FROM vote.categories AS c WHERE c.flag_actif IS TRUE AND ((:numero = 0 AND :admin IS TRUE) OR (:numero > 0 AND c.flag_affiche IS TRUE) OR (:admin IS FALSE AND c.flag_affiche IS TRUE)) ORDER BY c.numero_ordre ASC ")
   List<Categorie> findAll(@Param("numero") int numeroParticipant, @Param("admin") boolean admin);
+  
+  @NativeQuery("SELECT DISTINCT c.* FROM vote.presentations AS p INNER JOIN vote.categories c ON p.numero_categorie = c.numero_categorie WHERE p.numero_production = :numero AND c.flag_actif IS TRUE ")
+  Categorie findByProductionPresentee(@Param("numero") int numeroProduction);
 
   @Override
   void delete(Categorie categorie);

+ 2 - 1
src/main/java/fr/triplea/demovote/dto/ProductionVote.java

@@ -45,7 +45,8 @@ public class ProductionVote
 
   public void setPlateforme(String plateforme) { this.plateforme = plateforme; }
   public String getPlateforme() { return plateforme; }
-  
+  public boolean hasPlateforme() { if (this.plateforme == null) { return false; } return (this.plateforme.length() > 0); }
+
   public void setInformationsPrivees(String informationsPrivees) { this.informationsPrivees = informationsPrivees; }
   public String getInformationsPrivees() { return informationsPrivees; }
 

+ 84 - 23
src/main/java/fr/triplea/demovote/web/controller/BulletinController.java

@@ -59,8 +59,6 @@ public class BulletinController
   //@SuppressWarnings("unused") 
   private static final Logger LOG = LoggerFactory.getLogger(BulletinController.class);
 
-  // TODO : page des résultats
-
   @Autowired
   private VariableRepository variableRepository;
 
@@ -565,7 +563,7 @@ public class BulletinController
       
       return ResponseEntity
               .ok()
-              .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"resultats.pdf\"")
+              .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"ranks.all.pdf\"")
               .header(HttpHeaders.CONTENT_LENGTH, "" + binaire.length)
               .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_PDF.toString())
               .body(r); 
@@ -637,7 +635,7 @@ public class BulletinController
   }
 
   
-  @Value("classpath:styles/diapos.css")
+  @Value("classpath:styles/ranks.css")
   private Resource styleDiaposResource;
   
   @GetMapping(value = "/diapos/{id}")
@@ -665,15 +663,13 @@ public class BulletinController
       sb.append("</style>\n");
       sb.append("</head>\n\n");
       sb.append("<body>\n");
-
-      // TODO : résultats HTML par catégorie
       
       sb.append("<div class=\"ranking_page\" id=\"ranking_page\">\n");
       
-      sb.append("\t").append("<div class=\"ranking_compo\">").append(libelleCategorie).append("</div>\n");
+      sb.append("\t").append("<div class=\"ranking_compo\">").append(messageSource.getMessage("show.file.results", null, locale)).append(" ").append(libelleCategorie).append("</div>\n");
+      sb.append("\t").append("<div class=\"ranking_list\">");
       
-      int position = 1;
-      int place = 1;
+      int position = 1; int place = 1;
 
       for (int i = 0; i < productions.size(); i++)
       {
@@ -681,34 +677,45 @@ public class BulletinController
 
         ProductionVote p = productions.get(i);
 
-        sb.append("<div class=\"ranking_item\" id=\"diapo_item_" + i + "\">\n");
+        sb.append("\t\t").append("<div class=\"ranking_item\" id=\"ranking_item_").append(i).append("\">\n");
 
-        sb.append("\t").append("<div class=\"ranking_order\">").append("#").append("" + position).append("</div>\n");
-        sb.append("\t").append("<div class=\"ranking_title\">").append(p.getTitre()).append("</div>\n");
-        sb.append("\t").append("<div class=\"ranking_points\">").append(p.getNombrePoints() + " / " + p.getNombreFirst()).append("</div>\n");
-        sb.append("\t").append("<div class=\"ranking_authors\">").append(messageSource.getMessage("show.file.by", null, locale)).append(" ").append(p.getAuteurs()).append(" / ").append(p.getGroupes()).append("</div>\n");
-        sb.append("\t").append("<div class=\"ranking_plateform\">").append(messageSource.getMessage("show.file.on", null, locale)).append(" ").append(p.getPlateforme()).append("</div>\n");
+        sb.append("\t\t\t").append("<div class=\"ranking_title\"><span class=\"ranking_order\">").append("#" + position).append(" - </span>").append(p.getTitre()).append(" <span class=\"ranking_points faded\">(").append(p.getNombrePoints() + " / " + p.getNombreFirst()).append(")</span></div>\n");
+        sb.append("\t\t\t").append("<div class=\"ranking_authors\"><span class=\"faded\">").append(messageSource.getMessage("show.file.by", null, locale)).append("</span> ").append(p.getAuteurs()).append(" / ").append(p.getGroupes()).append("</div>\n");
+        if (p.hasPlateforme()) { sb.append("\t\t\t").append("<div class=\"ranking_plateform\"><span class=\"faded\">").append(messageSource.getMessage("show.file.on", null, locale)).append("</span> ").append(p.getPlateforme()).append("</div>\n"); }
 
-        sb.append("</div>\n");
+        sb.append("\t\t").append("</div>\n");
         
         place++;
       }
-            
+      
+      sb.append("\t").append("</div>\n");      
       sb.append("</div>\n");
 
+      position = 1; place = 1;
+
+      sb.append("\t").append("<div class=\"ranking_hub\">\n");
+      
+      for (int i = 0; i < productions.size(); i++)
+      {
+        if (i > 0) { if (productions.get(i).getValue() != productions.get(i - 1).getValue()) { position = place; } } else { position = place; }
+
+        sb.append("\t\t").append("<button class=\"ranking_bouton\" id=\"ranking_button_").append(i).append("\" onClick=\"show_prod(").append(i).append(");\" title=\"").append(messageSource.getMessage("show.file.reveal", null, locale) + " #" + position).append("\">").append("#" + position).append("</button>\n");
+
+        place++; 
+      }
+      
+      sb.append("\t").append("</div>\n");
+
+      
       sb.append("<script type=\"text/javascript\">\n");
-      sb.append("function show_prev(num) { var cur = document.getElementById(\"diapo_page_\" + num); var prv = document.getElementById(\"diapo_page_\" + (num - 1)); if (cur) { cur.style.visibility = 'hidden'; cur.style.display = 'none'; } if (prv) { prv.style.visibility = 'visible'; prv.style.display = 'block'; } }\n");
-      sb.append("function show_next(num) { var cur = document.getElementById(\"diapo_page_\" + num); var nxt = document.getElementById(\"diapo_page_\" + (num + 1)); if (cur) { cur.style.visibility = 'hidden'; cur.style.display = 'none'; } if (nxt) { nxt.style.visibility = 'visible'; nxt.style.display = 'block'; } }\n");
-      sb.append("function pict_open(num) { var hub = document.getElementById(\"diapo_ctrl_\" + num); var pic = document.getElementById(\"diapo_pict_\" + num); if (hub) { hub.style.visibility = 'hidden'; hub.style.display = 'none'; } if (pic) { pic.style.visibility = 'visible'; pic.style.display = 'block'; } }\n");
-      sb.append("function pict_hide(num) { var hub = document.getElementById(\"diapo_ctrl_\" + num); var pic = document.getElementById(\"diapo_pict_\" + num); if (hub) { hub.style.visibility = 'visible'; hub.style.display = 'block'; } if (pic) { pic.style.visibility = 'hidden'; pic.style.display = 'none'; } }\n");
-      sb.append("function file_open(num) { var fil = document.getElementById(\"diapo_file_\" + num); if (fil) { if (fil.style.visibility == 'visible') { fil.style.visibility = 'hidden'; fil.style.display = 'none'; } else { fil.style.visibility = 'visible'; fil.style.display = 'block'; } } }\n");
+      sb.append("function show_prod(num) { var cur = document.getElementById(\"ranking_item_\" + num); var but = document.getElementById(\"ranking_button_\" + num); if (cur) { cur.style.visibility = 'visible'; cur.style.display = 'block'; } if (but) { but.style.visibility = 'hidden'; but.style.display = 'none'; } }\n");
       sb.append("</script>\n");
       sb.append("</body>\n");
       sb.append("</html>\n");
       
       return ResponseEntity
               .ok()
-              .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"resultats." + libelleCategorie +".html\"")
+              .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"ranks." + libelleCategorie +".html\"")
               .header(HttpHeaders.CONTENT_LENGTH, "" + sb.length())
               .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_HTML.toString())
               .body(sb.toString());
@@ -717,4 +724,58 @@ public class BulletinController
     return ResponseEntity.notFound().build();
   }  
 
+
+  @GetMapping(value = "/results/{id}")
+  @PreAuthorize("hasRole('USER')")
+  public List<ProductionVote> resultats(@PathVariable("id") int numeroCategorie, final Authentication authentication, HttpServletRequest request) 
+  {
+    Categorie categorie = categorieRepository.findById(numeroCategorie); 
+   
+    List<ProductionVote> productions = new ArrayList<ProductionVote>();
+    
+    if (categorie != null) 
+    { 
+      boolean possible = (categorie.isAvailable() == true) && (categorie.isPollable() == false) && (categorie.isComputed() == true) && (categorie.isDisplayable() == true);
+
+      if (possible)
+      {
+        productions = bulletinService.decompterVotes(numeroCategorie);
+        
+        if (productions != null)
+        {
+          if (productions.size() > 0)
+          {
+            for (int i = 0; i < productions.size(); i++)
+            {
+              productions.get(i).setInformationsPrivees(""); // ne pas diffuser les informations privées aux utilisateurs
+              productions.get(i).setNomGestionnaire("");     // ne pas diffuser le nom du gestionnaire aux utilisateurs
+            }
+          }
+        }
+      }
+    }
+     
+    return productions; 
+  }
+
+
+  @GetMapping(value = "/count-voters/{id}")
+  @PreAuthorize("hasRole('USER')")
+  public ResponseEntity<Integer> compterVotants(@PathVariable("id") int numeroCategorie) 
+  {     
+    int nombreVotants = 0; 
+    
+    Categorie found = categorieRepository.findById(numeroCategorie);
+    
+    if (found != null)
+    {
+      if (found.isDisplayable())
+      {
+        nombreVotants = bulletinRepository.countByCategorie(numeroCategorie);
+      }
+    }
+ 
+    return ResponseEntity.ok(Integer.valueOf(nombreVotants));
+  }
+
 }

+ 2 - 5
src/main/java/fr/triplea/demovote/web/controller/CategorieController.java

@@ -33,7 +33,8 @@ import jakarta.servlet.http.HttpServletRequest;
 public class CategorieController 
 {
 
-    private final BulletinRepository bulletinRepository;
+  @Autowired
+  private BulletinRepository bulletinRepository;
 
   @Autowired
   private CategorieRepository categorieRepository;
@@ -48,10 +49,6 @@ public class CategorieController
   private MessageSource messageSource;
 
 
-    CategorieController(BulletinRepository bulletinRepository) {
-        this.bulletinRepository = bulletinRepository;
-    }
-
 
   @GetMapping(value = "/list")
   @PreAuthorize("hasRole('USER')")

+ 3 - 0
src/main/java/fr/triplea/demovote/web/controller/DiversController.java

@@ -16,6 +16,9 @@ import fr.triplea.demovote.dto.MessagesTransfer;
 public class DiversController 
 {
 
+  // TODO : réglement concours utilisateur
+  // TODO : documentation administrateur
+  
   @Autowired
   private VariableRepository variableRepository;
  

+ 18 - 18
src/main/java/fr/triplea/demovote/web/controller/PresentationController.java

@@ -165,7 +165,7 @@ public class PresentationController
       
       return ResponseEntity
               .ok()
-              .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"presentations.pdf\"")
+              .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"shows.all.pdf\"")
               .header(HttpHeaders.CONTENT_LENGTH, "" + binaire.length)
               .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_PDF.toString())
               .body(r); 
@@ -233,7 +233,7 @@ public class PresentationController
   }
 
   
-  @Value("classpath:styles/diapos.css")
+  @Value("classpath:styles/shows.css")
   private Resource styleDiaposResource;
   
   @GetMapping(value = "/diapos/{id}")
@@ -268,8 +268,8 @@ public class PresentationController
       sb.append("\t").append("<div class=\"diapo_range\">").append(messageSource.getMessage("show.file.starting", null, locale)).append("</div>\n");
 
       sb.append("\t").append("<div class=\"diapo_hub\">\n");
-      sb.append("\t").append("\t").append("<button class=\"diapo_bouton\" style=\"visibility:hidden;\">&#9665;</button>\n");
-      sb.append("\t").append("\t").append("<button class=\"diapo_bouton\" onClick=\"show_next(0);\" title=\"").append(messageSource.getMessage("show.file.next", null, locale)).append("\">&#9655;</button>\n");
+      sb.append("\t\t").append("<button class=\"diapo_bouton\" style=\"visibility:hidden;\">&#9665;</button>\n");
+      sb.append("\t\t").append("<button class=\"diapo_bouton\" onClick=\"show_next(0);\" title=\"").append(messageSource.getMessage("show.file.next", null, locale)).append("\">&#9655;</button>\n");
       sb.append("\t").append("</div>\n");
       
       sb.append("</div>\n");
@@ -281,14 +281,14 @@ public class PresentationController
         Presentation d = presentations.get(i);
         Production p = d.getProduction();
 
-        sb.append("<div class=\"diapo_page\" id=\"diapo_page_" + n + "\">\n");
+        sb.append("<div class=\"diapo_page\" id=\"diapo_page_").append(n).append("\">\n");
 
         sb.append("\t").append("<div class=\"diapo_compo\">").append(libelleCategorie).append("</div>\n");
         sb.append("\t").append("<div class=\"diapo_order\">").append("#").append((i < 26) ? LETTRES.charAt(i) : "?").append("</div>\n");
         sb.append("\t").append("<div class=\"diapo_title\">").append(p.getTitre()).append("</div>\n");
-        sb.append("\t").append("<div class=\"diapo_authors\">").append(messageSource.getMessage("show.file.by", null, locale)).append(" ").append(p.getAuteurs()).append(" / ").append(p.getGroupes()).append("</div>\n");
+        sb.append("\t").append("<div class=\"diapo_authors\"><span class=\"faded\">").append(messageSource.getMessage("show.file.by", null, locale)).append("</span> ").append(p.getAuteurs()).append(" / ").append(p.getGroupes()).append("</div>\n");
         sb.append("\t").append("<div class=\"diapo_comments\">");
-        if (p.hasPlateforme()) { sb.append(messageSource.getMessage("show.file.on", null, locale)).append(" ").append(p.getPlateforme()).append("<br/>"); }
+        if (p.hasPlateforme()) { sb.append("<span class=\"faded\">").append(messageSource.getMessage("show.file.on", null, locale)).append("</span> ").append(p.getPlateforme()).append("<br/>"); }
         sb.append(p.getCommentaire()).append("</div>\n");
 
         if (d.getEtatMedia() == 1)
@@ -296,44 +296,44 @@ public class PresentationController
           if (d.getMimeMedia().startsWith("image/"))
           {
             sb.append("\t").append("<div id=\"diapo_pict_").append(n).append("\" class=\"diapo_image_container\">\n");
-            sb.append("\t").append("\t").append("<div class=\"diapo_image_content\" onClick=\"pict_hide(").append(n).append(");\"><img src=\"").append(d.getDataMediaAsString()).append("\" alt=\"\" class=\"diapo_image\" /></div>\n");
+            sb.append("\t\t").append("<div class=\"diapo_image_content\" onClick=\"pict_hide(").append(n).append(");\"><img src=\"").append(d.getDataMediaAsString()).append("\" alt=\"\" class=\"diapo_image\" /></div>\n");
             sb.append("\t").append("</div>\n");
           }
           else if (d.getMimeMedia().startsWith("audio/"))
           {
             sb.append("\t").append("<div id=\"diapo_file_").append(n).append("\" class=\"diapo_audio_container\">\n");
-            sb.append("\t").append("\t").append("<audio controls><source src=\"").append(d.getDataMediaAsString()).append("\" type=\"").append(d.getMimeMedia()).append("\" />").append("</audio>\n");
+            sb.append("\t\t").append("<audio controls><source src=\"").append(d.getDataMediaAsString()).append("\" type=\"").append(d.getMimeMedia()).append("\" />").append("</audio>\n");
             sb.append("\t").append("</div>\n");
           }
           else if (d.getMimeMedia().startsWith("video/"))
           {
             sb.append("\t").append("<div id=\"diapo_file_").append(n).append("\" class=\"diapo_video_container\">\n");
-            sb.append("\t").append("\t").append("<video controls width=\"480\" height=\"240\"><source src=\"").append(d.getDataMediaAsString()).append("\" type=\"").append(d.getMimeMedia()).append("\" />").append("</video>\n");
+            sb.append("\t\t").append("<video controls width=\"480\" height=\"240\"><source src=\"").append(d.getDataMediaAsString()).append("\" type=\"").append(d.getMimeMedia()).append("\" />").append("</video>\n");
             sb.append("\t").append("</div>\n");
           }
         }
 
         sb.append("\t").append("<div id=\"diapo_ctrl_").append(n).append("\" class=\"diapo_hub\">\n");
-        sb.append("\t").append("\t").append("<button class=\"diapo_bouton\" onClick=\"show_prev(").append(n).append(");\" title=\"").append(messageSource.getMessage("show.file.previous", null, locale)).append("\">&#9665;</button>\n");
-        sb.append("\t").append("\t").append("<button class=\"diapo_bouton\" onClick=\"show_next(").append(n).append(");\" title=\"").append(messageSource.getMessage("show.file.next", null, locale)).append("\">&#9655;</button>\n");
+        sb.append("\t\t").append("<button class=\"diapo_bouton\" onClick=\"show_prev(").append(n).append(");\" title=\"").append(messageSource.getMessage("show.file.previous", null, locale)).append("\">&#9665;</button>\n");
+        sb.append("\t\t").append("<button class=\"diapo_bouton\" onClick=\"show_next(").append(n).append(");\" title=\"").append(messageSource.getMessage("show.file.next", null, locale)).append("\">&#9655;</button>\n");
         if ((d.getEtatMedia() == 1))
         {
           if (d.getMimeMedia().startsWith("image/"))
           {
-            sb.append("\t").append("\t").append("<button class=\"diapo_bouton\" onClick=\"pict_open(").append(n).append(");\" title=\"").append(messageSource.getMessage("show.file.open", null, locale)).append("\">&#9713;</button>\n");
+            sb.append("\t\t").append("<button class=\"diapo_bouton\" onClick=\"pict_open(").append(n).append(");\" title=\"").append(messageSource.getMessage("show.file.open", null, locale)).append("\">&#9713;</button>\n");
           }
           else
           {
-            sb.append("\t").append("\t").append("<button class=\"diapo_bouton\" onClick=\"file_open(").append(n).append(");\" title=\"").append(messageSource.getMessage("show.file.open", null, locale)).append("\">&#9713;</button>\n");
+            sb.append("\t\t").append("<button class=\"diapo_bouton\" onClick=\"file_open(").append(n).append(");\" title=\"").append(messageSource.getMessage("show.file.open", null, locale)).append("\">&#9713;</button>\n");
           }
         }
         else if ((d.getEtatMedia() == 2))
         {
-          sb.append("\t").append("\t").append("<button class=\"diapo_warning\">").append(messageSource.getMessage("show.file.acknowlegded", null, locale)).append("</button>\n");
+          sb.append("\t\t").append("<button class=\"diapo_warning\">").append(messageSource.getMessage("show.file.acknowlegded", null, locale)).append("</button>\n");
         }
         else
         {
-          sb.append("\t").append("\t").append("<button class=\"diapo_alert\">").append(messageSource.getMessage("show.file.missing", null, locale)).append("</button>\n");
+          sb.append("\t\t").append("<button class=\"diapo_alert\">").append(messageSource.getMessage("show.file.missing", null, locale)).append("</button>\n");
         }
         sb.append("\t").append("</div>\n");
 
@@ -347,7 +347,7 @@ public class PresentationController
       sb.append("\t").append("<div class=\"diapo_range\">").append(messageSource.getMessage("show.file.ending", null, locale)).append("</div>\n");
 
       sb.append("\t").append("<div class=\"diapo_hub\">\n");
-      sb.append("\t").append("\t").append("<button class=\"diapo_bouton\" onClick=\"show_prev(").append(n).append(");\" title=\"").append(messageSource.getMessage("show.file.previous", null, locale)).append("\">&#9665;</button>\n");
+      sb.append("\t\t").append("<button class=\"diapo_bouton\" onClick=\"show_prev(").append(n).append(");\" title=\"").append(messageSource.getMessage("show.file.previous", null, locale)).append("\">&#9665;</button>\n");
       sb.append("\t").append("</div>\n");
       
       sb.append("</div>\n");
@@ -364,7 +364,7 @@ public class PresentationController
       
       return ResponseEntity
               .ok()
-              .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"presentation." + libelleCategorie +".html\"")
+              .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"show." + libelleCategorie +".html\"")
               .header(HttpHeaders.CONTENT_LENGTH, "" + sb.length())
               .header(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_HTML.toString())
               .body(sb.toString());

+ 13 - 4
src/main/java/fr/triplea/demovote/web/controller/ProductionController.java

@@ -37,6 +37,7 @@ import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.LocaleResolver;
 
 import fr.triplea.demovote.dao.BulletinRepository;
+import fr.triplea.demovote.dao.CategorieRepository;
 import fr.triplea.demovote.dao.ParticipantRepository;
 import fr.triplea.demovote.dao.PresentationRepository;
 import fr.triplea.demovote.dao.ProductionRepository;
@@ -45,6 +46,7 @@ import fr.triplea.demovote.dto.ProductionFile;
 import fr.triplea.demovote.dto.ProductionShort;
 import fr.triplea.demovote.dto.ProductionTransfer;
 import fr.triplea.demovote.dto.ProductionUpdate;
+import fr.triplea.demovote.model.Categorie;
 import fr.triplea.demovote.model.Participant;
 import fr.triplea.demovote.model.Presentation;
 import fr.triplea.demovote.model.Production;
@@ -66,6 +68,9 @@ public class ProductionController
   @Autowired
   private PresentationRepository presentationRepository;
 
+  @Autowired
+  private CategorieRepository categorieRepository;
+
   @Autowired
   private ParticipantRepository participantRepository;
 
@@ -101,15 +106,19 @@ public class ProductionController
   @ResponseBody
   public ResponseEntity<Resource> getFile(@PathVariable("id") int numeroProduction, final Authentication authentication) 
   {
-    // TODO : après résultats affichés, download autorisé pour tous
-    
     Production p = productionRepository.findById(numeroProduction);
     
+    Categorie c = categorieRepository.findByProductionPresentee(numeroProduction);
+   
+    boolean resultatsPublies = false;
+    
+    if (c != null) { if (c.isDisplayable()) { resultatsPublies = true; }}
+    
     if (p != null) 
     { 
       int numeroUser = this.getNumeroUser(authentication);
-      
-      if ((numeroUser == 0) || (p.getNumeroGestionnaire() == numeroUser))
+            
+      if ((numeroUser == 0) || (p.getNumeroGestionnaire() == numeroUser) || (resultatsPublies == true))
       {
         byte[] data = null;
         

+ 2 - 0
src/main/resources/langs/messages_en.properties

@@ -62,6 +62,8 @@ show.file.by=by
 show.file.on=plateform:
 show.file.starting=Starting...
 show.file.ending=Closed.
+show.file.results=Results:
+show.file.reveal=Reveal production at position
 
 chunk.upload.success=Succes uploading chunk {0} of file {1}.
 chunk.upload.failed=Failure uploading chunk {0} of file {1}.

+ 2 - 0
src/main/resources/langs/messages_fr.properties

@@ -62,6 +62,8 @@ show.file.by=par
 show.file.on=plateforme :
 show.file.starting=Début des présentations
 show.file.ending=Fin des présentations
+show.file.results=Résultats :
+show.file.reveal=Révéler la production à la place
 
 chunk.upload.success=Succès pour le téléversement du morceau {0} du fichier {1}.
 chunk.upload.failed=Echec pour le téléversement du morceau {0} du fichier {1}.

+ 19 - 0
src/main/resources/styles/ranks.css

@@ -0,0 +1,19 @@
+body { overflow: hidden; padding:0; margin:0; font-family: sans-serif; background-color:lightgray; vertical-align:middle; }
+
+.ranking_page { position:absolute; visibility:visible; display:block; width:100vw; height:100vh; }
+
+.ranking_compo { position:absolute; left:0; top:5%; width:100%; background-color:white; font-size:7vh; padding:10px; height:6vh; }
+
+.ranking_list { position:absolute; right:1%; top:15%; width:95vw; }
+.ranking_item { visibility:hidden; display:none; position:relative; margin:2px; border:1px solid gray; width:100%; padding:5px; background-color:white; }
+
+.ranking_order { font-size:4vh; }
+.ranking_title { font-size:5vh; }
+.ranking_authors { font-size:3vh; }
+.ranking_plateform { font-size:3vh; }
+.ranking_points { font-size:3vh; }
+
+.ranking_hub { position:absolute; bottom:7px; right:7px; white-space: nowrap; }
+.ranking_bouton { position:relative; height:30px; border:1px solid black; border-radius:5px; background-color:transparent; display:inline; padding:4px 8px; font-size:16px; }
+
+.faded { opacity: 0.5; }

+ 2 - 0
src/main/resources/styles/diapos.css → src/main/resources/styles/shows.css

@@ -22,3 +22,5 @@ body { overflow: hidden; padding:0; margin:0; font-family: sans-serif; backgroun
 
 .diapo_audio_container { position:absolute; bottom:10px; right:10px; visibility:hidden; display:none; }
 .diapo_video_container { position:absolute; bottom:10px; right:10px; visibility:hidden; display:none; }
+
+.faded { opacity: 0.5; }