diff options
Diffstat (limited to 'views/photos')
-rw-r--r-- | views/photos/add.html.php | 5 | ||||
-rw-r--r-- | views/photos/index.html.php | 7 | ||||
-rw-r--r-- | views/photos/view.html.php | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/views/photos/add.html.php b/views/photos/add.html.php new file mode 100644 index 0000000..cd6e508 --- /dev/null +++ b/views/photos/add.html.php @@ -0,0 +1,5 @@ +<h1>Upload a photo</h1> +<?= $this->form->create($photo, array('type' => 'file')); ?> + <?= $this->form->field('file', array('type' => 'file')); ?> + <?= $this->form->submit("Upload"); ?> +<?= $this->form->end(); ?>
\ No newline at end of file diff --git a/views/photos/index.html.php b/views/photos/index.html.php new file mode 100644 index 0000000..5d10867 --- /dev/null +++ b/views/photos/index.html.php @@ -0,0 +1,7 @@ +<?php if (count($photos) == 0): ?> +<?= $this->html->link("Add a photo","photos::add"); ?> +<?php else: ?> +<?php foreach($photos as $photo): ?> + <?=$this->html->image("/photos/view/{$photo->_id}.jpg"); ?> +<?php endforeach; ?> +<?php endif; ?>
\ No newline at end of file diff --git a/views/photos/view.html.php b/views/photos/view.html.php new file mode 100644 index 0000000..c492b6e --- /dev/null +++ b/views/photos/view.html.php @@ -0,0 +1 @@ +<?= var_dump($photo); ?>
\ No newline at end of file |