page.page.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 class="noPrint" 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 noPrint">
  9. <li class="page-summary-menu">
  10. <div class="page-option-item page-option-summary noPrint" 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 noPrint">
  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();"><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="#" title="Imprimer la page" onclick="window.print();"><i class="fas fa-print"></i> Imprimer</a>
  29. <a class="dropdown-item" href="#" title="Télécharger la page" onclick="wiki_page_download(this,event);"><i class="far fa-file-archive"></i> Télécharger</a>
  30. </div>
  31. </div>
  32. </li>
  33. </ul>
  34. <?php endif; ?>
  35. <?php
  36. if($page->id==0): ?>
  37. <h1><i class="far fa-grin-beam-sweat"></i> Page "<?php echo $page->label; ?>" introuvable</h1>
  38. <p>Cette page n'existe pas ou n'existe plus, en tout cas on la trouve pas ...<p>
  39. <?php else :
  40. $page->content();
  41. if( $page->content == '' ): ?>
  42. <div onclick="wiki_page_edit();" class="btn btn-primary float-right"><i class="fas fa-pencil-alt"></i> Éditer la page</div>
  43. <h1><i class="far fa-sticky-note"></i> <?php echo $page->label; ?></h1>
  44. <div class="clear"></div>
  45. <p class="mt-3">Cette page est bien vide...<p>
  46. <?php endif; ?>
  47. <div class="wiki-page-content">
  48. <div id="content-html">
  49. <?php echo $page->html(); ?>
  50. </div>
  51. <textarea class="hidden" id="content-text"><?php echo $page->content; ?></textarea>
  52. </div>
  53. <?php endif; ?>