page.page.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <div class="wiki-breadcrumb" data-page="<?php echo $page->id; ?>">
  2. <span><i style="color:<?php echo $category->color; ?>" class="<?php echo $category->icon; ?>"></i> <?php echo $category->label; ?></span>
  3. <div class="slash">/</div>
  4. <div class="form-control" id="page-label"><?php echo $page->label; ?></div>
  5. <small title="Modifié par <?php echo $page->updater(); ?> <?php echo $page->updated(); ?>"> Créé par <i class="far fa-meh-blank"></i> <?php echo $page->author(); ?> <?php echo $page->created(); ?></small>
  6. </div>
  7. <?php if($page->id!=0): ?>
  8. <ul class="page-option">
  9. <li class="page-summary-menu">
  10. <div class="page-option-item page-option-summary" title="Afficher le sommaire de la page">
  11. <i onclick="wiki_page_summary(this);" title="Sommaire" class="far fa-list-alt"></i>
  12. </div>
  13. </li>
  14. <li class="page-empty-menu"></li>
  15. <li class="page-save-menu hidden">
  16. <div class="page-option-item page-option-save" title="Valider et sauvegarder les changements" onclick="wiki_page_save();">
  17. <i class="fas fa-check"></i>
  18. </div>
  19. </li>
  20. <li class="page-editor-menu">
  21. <div class="page-option-item page-option-menu shown dropdown">
  22. <i class=" fas fa-ellipsis-h" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></i>
  23. <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
  24. <h6 class="dropdown-header">Page :</h6>
  25. <a class="dropdown-item" title="Éditer la page" href="#" onclick="wiki_page_edit(this,event);"><i class="fas fa-pencil-alt"></i> Éditer</a>
  26. <a class="dropdown-item text-danger" title="Supprimer la page" href="#" onclick="wiki_page_delete(this,event);"><i class="far fa-trash-alt"></i> Supprimer</a>
  27. <div class="dropdown-divider"></div>
  28. <a class="dropdown-item" href="#" onclick="wiki_page_download(this,event);"><i class="far fa-file-archive"></i> Télécharger</a>
  29. </div>
  30. </div>
  31. </li>
  32. </ul>
  33. <?php endif; ?>
  34. <?php
  35. if($page->id==0): ?>
  36. <h1><i class="far fa-grin-beam-sweat"></i> Page "<?php echo $page->label; ?>" introuvable</h1>
  37. <p>Cette page n'existe pas ou n'existe plus, en tout cas on la trouve pas ...<p>
  38. <?php else :
  39. $page->content();
  40. if( $page->content == '' ): ?>
  41. <h1><i class="far fa-sticky-note"></i> <?php echo $page->label; ?></h1>
  42. <p>Cette page est bien vide..<p>
  43. <div onclick="wiki_page_edit(this,event);" class="btn btn-success">Éditer la page</div>
  44. <?php endif; ?>
  45. <div class="wiki-page-content">
  46. <div id="content-html">
  47. <?php echo $page->html(); ?>
  48. </div>
  49. <textarea class="hidden" id="content-text"><?php echo $page->content; ?></textarea>
  50. </div>
  51. <?php endif; ?>