aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/album_view/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/widgets/album_view/edit.php')
-rw-r--r--views/default/widgets/album_view/edit.php39
1 files changed, 18 insertions, 21 deletions
diff --git a/views/default/widgets/album_view/edit.php b/views/default/widgets/album_view/edit.php
index 9068ffe17..fde8b87b0 100644
--- a/views/default/widgets/album_view/edit.php
+++ b/views/default/widgets/album_view/edit.php
@@ -1,25 +1,22 @@
-<p>
-<?php
+<?php
+/**
+ * Widget settings for newest albums
+ */
-echo elgg_echo("tidypics:widget:num_albums") . ": ";
-
-
-if ($vars['entity']->num_display == '') {
+// set default value
+if (!isset($vars['entity']->num_display)) {
$vars['entity']->num_display = 5;
}
+
+$params = array(
+ 'name' => 'params[num_display]',
+ 'value' => $vars['entity']->num_display,
+ 'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20),
+);
+$dropdown = elgg_view('input/dropdown', $params);
+
?>
- <select name="params[num_display]">
- <option value="1" <?php if($vars['entity']->num_display == 1) echo "SELECTED"; ?>>1</option>
- <option value="2" <?php if($vars['entity']->num_display == 2) echo "SELECTED"; ?>>2</option>
- <option value="3" <?php if($vars['entity']->num_display == 3) echo "SELECTED"; ?>>3</option>
- <option value="4" <?php if($vars['entity']->num_display == 4) echo "SELECTED"; ?>>4</option>
- <option value="5" <?php if($vars['entity']->num_display == 5) echo "SELECTED"; ?>>5</option>
- <option value="6" <?php if($vars['entity']->num_display == 6) echo "SELECTED"; ?>>6</option>
- <option value="7" <?php if($vars['entity']->num_display == 7) echo "SELECTED"; ?>>7</option>
- <option value="8" <?php if($vars['entity']->num_display == 8) echo "SELECTED"; ?>>8</option>
- <option value="9" <?php if($vars['entity']->num_display == 9) echo "SELECTED"; ?>>9</option>
- <option value="10" <?php if($vars['entity']->num_display == 10) echo "SELECTED"; ?>>10</option>
- <option value="15" <?php if($vars['entity']->num_display == 15) echo "SELECTED"; ?>>15</option>
- <option value="20" <?php if($vars['entity']->num_display == 20) echo "SELECTED"; ?>>20</option>
- </select>
-</p> \ No newline at end of file
+<div>
+ <?php echo elgg_echo('tidypics:widget:num_albums'); ?>:
+ <?php echo $dropdown; ?>
+</div>