aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-08-19 12:04:17 +0000
committerCash Costello <cash.costello@gmail.com>2009-08-19 12:04:17 +0000
commit6913e7153000ff39f491accf06cf5817f7e6bfd3 (patch)
tree211a324c97d0931363a8f886f495e15dc780ae4c /views/default/widgets
parentfb8c5cb4681f88d25e4a4eb0cc0d7b31216248f7 (diff)
downloadelgg-6913e7153000ff39f491accf06cf5817f7e6bfd3.tar.gz
elgg-6913e7153000ff39f491accf06cf5817f7e6bfd3.tar.bz2
added a latest photos widget
Diffstat (limited to 'views/default/widgets')
-rw-r--r--views/default/widgets/album_view/edit.php41
-rw-r--r--views/default/widgets/latest/edit.php15
-rw-r--r--views/default/widgets/latest/view.php15
3 files changed, 52 insertions, 19 deletions
diff --git a/views/default/widgets/album_view/edit.php b/views/default/widgets/album_view/edit.php
index 2d7c7708f..1fea6764a 100644
--- a/views/default/widgets/album_view/edit.php
+++ b/views/default/widgets/album_view/edit.php
@@ -1,21 +1,24 @@
<p>
- <?php echo elgg_echo("album:num_albums"); ?>:
-
- <?php
- if($vars['entity']->num_display == '') $vars['entity']->num_display = 5;
- ?>
- <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>
+<?php
+
+ echo elgg_echo("tidypics:widget:num_albums") . ": ";
+
+
+ if($vars['entity']->num_display == '') $vars['entity']->num_display = 5;
+
+?>
+ <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
diff --git a/views/default/widgets/latest/edit.php b/views/default/widgets/latest/edit.php
new file mode 100644
index 000000000..15a56af82
--- /dev/null
+++ b/views/default/widgets/latest/edit.php
@@ -0,0 +1,15 @@
+<p>
+<?php
+ echo elgg_echo("tidypics:widget:num_latest") . ": ";
+
+ if($vars['entity']->num_display == '') $vars['entity']->num_display = 6;
+
+?>
+ <select name="params[num_display]">
+ <option value="6" <?php if($vars['entity']->num_display == 6) echo "SELECTED"; ?>>6</option>
+ <option value="9" <?php if($vars['entity']->num_display == 9) echo "SELECTED"; ?>>9</option>
+ <option value="12" <?php if($vars['entity']->num_display == 12) echo "SELECTED"; ?>>12</option>
+ <option value="15" <?php if($vars['entity']->num_display == 15) echo "SELECTED"; ?>>15</option>
+ <option value="18" <?php if($vars['entity']->num_display == 18) echo "SELECTED"; ?>>18</option>
+ </select>
+</p> \ No newline at end of file
diff --git a/views/default/widgets/latest/view.php b/views/default/widgets/latest/view.php
new file mode 100644
index 000000000..6d65e9dc1
--- /dev/null
+++ b/views/default/widgets/latest/view.php
@@ -0,0 +1,15 @@
+<div class="contentWrapper">
+<?php
+
+ //the number of files to display
+ $number = (int) $vars['entity']->num_display;
+ //if no number has been set, default to 6
+ if (!$number)
+ $number = 6;
+
+ echo '<div class="tidypics_widget_latest">';
+ echo tp_get_latest_photos($number);
+ echo '</div>';
+
+?>
+</div> \ No newline at end of file