From 2504d4c2a2fb42325652d2a47f43eda403b16b06 Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Sun, 22 Jun 2014 01:03:48 +0200 Subject: Add HTML5 datalist to edit photo album field. This patch provides a datalist for the edit photo album field. This makes it easier to move a picture to another existing folder in the way that it provides a list of all available albums as values for the album field. --- mod/photos.php | 5 +++++ view/tpl/photo_view.tpl | 36 ++++++++++++++++++++++-------------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index 8c168c21d..c43beb8d4 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -927,6 +927,10 @@ function photos_content(&$a) { $edit = null; if($can_post) { + if(array_key_exists('albums', $a->data)) + $albums = get_app()->data['albums']; + else + $albums = photos_albums_list($a->data['channel'],$a->data['observer']); $album_e = $ph[0]['album']; $caption_e = $ph[0]['description']; @@ -937,6 +941,7 @@ function photos_content(&$a) { 'id' => $ph[0]['id'], 'rotatecw' => t('Rotate CW (right)'), 'rotateccw' => t('Rotate CCW (left)'), + 'albums' => $albums['albums'], 'album' => $album_e, 'newalbum' => t('New album name'), 'nickname' => $a->data['channel']['channel_address'], diff --git a/view/tpl/photo_view.tpl b/view/tpl/photo_view.tpl index b34f3fcf5..0c16eb362 100755 --- a/view/tpl/photo_view.tpl +++ b/view/tpl/photo_view.tpl @@ -5,11 +5,11 @@ {{if $tools}} {{$tools.profile.1}} {{/if}} -{{if $lock}} | {{/if}} +{{if $lock}} | {{/if}} {{if $prevlink}}{{/if}} -
+
{{if $nextlink}}{{/if}}
{{$desc}}
@@ -24,22 +24,30 @@ {{if $edit}}
-
- +
+ {{$edit.aclselect}}
@@ -61,8 +69,8 @@
- - + +
-- cgit v1.2.3