From aba27ad40420f06dea46fd58b7f903ea4b4ed6bf Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Mon, 28 Apr 2014 09:29:48 -0400 Subject: [PATCH] fix photo comments: use $drop array as in wall_thread and search_item --- mod/photos.php | 13 +++++++++---- view/templates/photo_drop.tpl | 9 --------- view/templates/photo_item.tpl | 9 ++++++++- 3 files changed, 17 insertions(+), 14 deletions(-) delete mode 100644 view/templates/photo_drop.tpl diff --git a/mod/photos.php b/mod/photos.php index 1ec16898b..0e9055d05 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1640,10 +1640,15 @@ function photos_content(&$a) { $profile_link = $profile_url; - $drop = ''; - - if(($item['contact-id'] == $contact_id) || ($item['uid'] == local_user())) - $drop = replace_macros(get_markup_template('photo_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete'))); + + + $dropping = (($item['contact-id'] == $contact_id) || ($item['uid'] == local_user())); + $drop = array( + 'dropping' => $dropping, + 'pagedrop' => false, + 'select' => t('Select'), + 'delete' => t('Delete'), + ); if($a->theme['template_engine'] === 'internal') { diff --git a/view/templates/photo_drop.tpl b/view/templates/photo_drop.tpl deleted file mode 100644 index ed500fd0a..000000000 --- a/view/templates/photo_drop.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}} -
- -
-
diff --git a/view/templates/photo_item.tpl b/view/templates/photo_item.tpl index 7d6ac96ee..d1ed78b7e 100644 --- a/view/templates/photo_item.tpl +++ b/view/templates/photo_item.tpl @@ -17,7 +17,14 @@
{{$title}}
{{$body}}
- {{$drop}} + + {{if $drop.dropping }} +
+ +
+
+ {{/if}} +
{{$comment}}