Exemplo n.º 1
0
 public function print_board()
 {
     if ($this->readonly) {
         echo '<div class="read-only">';
         $this->printable_view();
         echo '</div>';
     } else {
         echo '<div class="board-header-wrapper">';
         echo '<div class="board-header">';
         echo '    <label for="project-name">Project Name:</label>';
         echo "    <input type=\"text\" id=\"project-name\" value=\"{$this->title}\">";
         echo '    <br>';
         echo '    <label for="client">Client:</label>';
         echo "    <input type=\"text\" id=\"client\" value=\"{$this->client}\">";
         echo '    <br>';
         echo '    <label for="start-date">Date Begun:</label>';
         echo "    <input type=\"text\" id=\"start-date\" value=\"{$this->creationDate}\" readonly>";
         echo '    <br>';
         echo '    <label for="due-date">Date Due:</label>';
         echo "    <input type=\"text\" id=\"due-date\" value=\"{$this->dueDate}\">";
         echo '    <br>';
         echo '</div></div>';
         // Scene Printing Loop
         // camel case instead of hyphens for input names to avoid annoyance
         $counter = 1;
         if ($this->scenes != '') {
             $counter = count($this->scenes);
         }
         echo '<div class="sort-message">Reorder scenes by clicking their number and dragging.</div>';
         echo '<div id="sorting-wrapper" class="sorting-wrapper">';
         for ($i = 0; $i < $counter; $i++) {
             $sceneInfo = $this->scenes[$i];
             $currScene = new Scene($sceneInfo);
             $currScene->print_scene($i + 1);
         }
         echo '</div><!-- #sorting-wrapper -->';
     }
 }