edit.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. $story = new Story();
  3. if(isset($_['story']))
  4. $story = $story->getById($_['story']);
  5. ?>
  6. <div class="story" data-mode="cause" id="story" data-id="<?php echo $story->id; ?>">
  7. <h1>Nom : <input id="storyName" value="<?php echo $story->label; ?>" placeholder="Scénario 1"/></h1>
  8. <h2>
  9. <span id="causePanelButton" class="active" onclick="switchCauseEffect('cause');"><i class="fa fa-cog"></i> CAUSES</span>
  10. /
  11. <span id="effectPanelButton" onclick="switchCauseEffect('effect');"><i class="fa fa-bolt"></i> EFFETS</span>
  12. </h2>
  13. <div id="causePanel">
  14. <ul class="toolbar">
  15. <?php
  16. foreach(Cause::types() as $key=>$type):
  17. echo '<li data-type="'.$key.'" title="'.$type['description'].'" class="'.$key.' infobulle typeButton"><i class="fa '.$type['icon'].'"></i> '.$type['label'].'</li>';
  18. endforeach;
  19. ?>
  20. <div class="clear"></div>
  21. </ul>
  22. <div class="firstunion">SI</div>
  23. <ul class="workspace workspace-cause">
  24. </ul>
  25. </div>
  26. <div id="effectPanel">
  27. <ul class="toolbar">
  28. <?php
  29. foreach(Effect::types() as $key=>$type):
  30. echo '<li data-type="'.$key.'" title="'.$type['description'].'" class="'.$key.' infobulle typeButton"><i class="fa '.$type['icon'].'"></i> '.$type['label'].'</li>';
  31. endforeach;
  32. ?>
  33. <div class="clear"></div>
  34. </ul>
  35. <div class="firstunion">ALORS</div>
  36. <ul class="workspace workspace-effect">
  37. </ul>
  38. </div>
  39. <div onclick="saveStory();" class="clear btn" style="cursor:pointer;"><i class="fa fa-check"></i> Enregistrer</div>
  40. </div>