aboutsummaryrefslogtreecommitdiff
path: root/mod/lightpics/views/default/forms/photos/batch
diff options
context:
space:
mode:
Diffstat (limited to 'mod/lightpics/views/default/forms/photos/batch')
-rw-r--r--mod/lightpics/views/default/forms/photos/batch/edit.php33
-rw-r--r--mod/lightpics/views/default/forms/photos/batch/edit/image.php35
2 files changed, 68 insertions, 0 deletions
diff --git a/mod/lightpics/views/default/forms/photos/batch/edit.php b/mod/lightpics/views/default/forms/photos/batch/edit.php
new file mode 100644
index 000000000..d843d8349
--- /dev/null
+++ b/mod/lightpics/views/default/forms/photos/batch/edit.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Edit properties on a batch of images
+ *
+ * @uses $vars['batch'] ElggObject
+ *
+ * @author Cash Costello
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
+ */
+
+$batch = $vars['batch'];
+$album = $batch->getContainerEntity();
+
+$images = elgg_get_entities_from_relationship(array(
+ 'type' => 'object',
+ 'subtype' => 'image',
+ 'relationship' => 'belongs_to_batch',
+ 'relationship_guid' => $batch->getGUID(),
+ 'inverse_relationship' => true,
+ 'limit' => 0
+));
+
+echo '<ul>';
+foreach ($images as $image) {
+ echo '<li>';
+ echo elgg_view('forms/photos/batch/edit/image', array('entity' => $image));
+ echo '</li>';
+}
+echo '</ul>';
+
+echo '<div class="elgg-foot">';
+echo elgg_view('input/submit', array('value' => elgg_echo('save')));
+echo '</div>';
diff --git a/mod/lightpics/views/default/forms/photos/batch/edit/image.php b/mod/lightpics/views/default/forms/photos/batch/edit/image.php
new file mode 100644
index 000000000..eed804e90
--- /dev/null
+++ b/mod/lightpics/views/default/forms/photos/batch/edit/image.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Form component for editing a single image
+ *
+ * @uses $vars['entity']
+ *
+ * @author Cash Costello
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
+ */
+
+$image = $vars['entity'];
+
+echo '<div class="elgg-image-block">';
+
+echo '<div class="elgg-image">';
+echo elgg_view_entity_icon($image, 'small', array('href' => false));
+echo '</div>';
+
+echo '<div class="elgg-body"><fieldset class="mlm">';
+echo '<div><label>' . elgg_echo('album:title') . '</label>';
+echo elgg_view('input/text', array('name' => 'title[]', 'value' => $title,));
+echo '</div>';
+
+echo '<div><label>' . elgg_echo('caption') . '</label>';
+echo elgg_view('input/longtext', array('name' => 'caption[]'));
+echo '</div>';
+
+echo '<div><label>' . elgg_echo("tags") . '</label>';
+echo elgg_view('input/tags', array('name' => 'tags[]'));
+echo '</div>';
+
+echo elgg_view('input/hidden', array('name' => 'guid[]', 'value' => $image->getGUID()));
+echo '<fieldset></div>';
+
+echo '</div>';