summaryrefslogtreecommitdiff
path: root/tpl/deck/view.php
diff options
context:
space:
mode:
authorNicolas BERNSTEIN <alexis211@gmail.com>2011-09-17 19:36:41 +0200
committerNicolas BERNSTEIN <alexis211@gmail.com>2011-09-17 19:36:41 +0200
commit8d9321225140a3db0b72796d4d0236d6cacfeb8a (patch)
tree766e25ed98b86ed4cbf6d0517d9daaecc5ce3c18 /tpl/deck/view.php
parentb6b341d949437c913fcce3d1a7c302945f67b22b (diff)
downloadBits-8d9321225140a3db0b72796d4d0236d6cacfeb8a.tar.gz
Bits-8d9321225140a3db0b72796d4d0236d6cacfeb8a.zip
Started working on a study program.
Diffstat (limited to 'tpl/deck/view.php')
-rw-r--r--tpl/deck/view.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/tpl/deck/view.php b/tpl/deck/view.php
new file mode 100644
index 0000000..f54da3d
--- /dev/null
+++ b/tpl/deck/view.php
@@ -0,0 +1,33 @@
+<?php
+
+$title = $deck["owner"] . ':' . $deck["name"];
+
+require("tpl/general/top.php");
+
+if ($can_edit) {
+ echo '<div class="small_right"><a href="edit-deck-' . $deck['id'] . '">edit</a> | ';
+ echo '<a href="addent-deck-' . $deck['id'] . '">add card</a></div>';
+}
+
+echo '<h3>Description</h3>';
+echo $deck["comment"];
+
+echo '<h3>Cards</h3>';
+echo '<div class="ordering_links">' . filters_html_full() . '</div>';
+foreach ($cards as $card) {
+ echo '<div class="study_card">';
+ if ($can_edit) {
+ echo '<div class="small_right"><a href="edent-deck-' . $card['id'] . '">edit</a> | <a href="rment-deck-' . $card['id'] . '">remove</a> | ';
+ echo '<a href="#" onclick="if (pos = prompt(\'What position do you want to move this card to ?\', ' . $card['number'] . ')) { window.location = \'mvent-deck-' . $card['id'] . '-\' + pos; }">move</a>';
+ echo '</div>';
+ }
+ echo '<code>#' . $card["number"] . ": " . $card["name"] . '</code>';
+ echo '<br />' . $card['text'];
+ echo '</div>';
+}
+if ($can_edit)
+ echo '<a class="tool_link" href="addent-deck-' . $deck['id'] . '">[+] add card</a>';
+
+require("tpl/study/lib_sidebar.php");
+
+require("tpl/general/bottom.php");