]> git.mxchange.org Git - friendica.git/commitdiff
fix photo comments: use $drop array as in wall_thread and search_item
authorFabrixxm <fabrix.xm@gmail.com>
Mon, 28 Apr 2014 13:29:48 +0000 (09:29 -0400)
committerFabrixxm <fabrix.xm@gmail.com>
Mon, 28 Apr 2014 13:29:48 +0000 (09:29 -0400)
mod/photos.php
view/templates/photo_drop.tpl [deleted file]
view/templates/photo_item.tpl

index 1ec16898bf761f784d0d0b652b403959d8e3e4e2..0e9055d05dcf1cff004e54019a93a73c4847d686 100644 (file)
@@ -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 (file)
index ed500fd..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{{*
- *     AUTOMATICALLY GENERATED TEMPLATE
- *     DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-{{$id}}" >
-       <a href="item/drop/{{$id}}" onclick="return confirmDelete();" class="icon drophide" title="{{$delete}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>
-</div>
-<div class="wall-item-delete-end"></div>
index 7d6ac96ee171bc5253eaf6e365ee30f2721753af..d1ed78b7e8a636779d3993e5b71d61fe9149cbd8 100644 (file)
                <div class="wall-item-title" id="wall-item-title-{{$id}}">{{$title}}</div>
                <div class="wall-item-body" id="wall-item-body-{{$id}}" >{{$body}}</div>
        </div>
-       {{$drop}}
+       
+       {{if $drop.dropping }}
+               <div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-{{$id}}" >
+                       <a href="item/drop/{{$id}}" onclick="return confirmDelete();" class="icon drophide" title="{{$drop.delete}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>
+               </div>
+               <div class="wall-item-delete-end"></div>
+       {{/if}}
+
        <div class="wall-item-wrapper-end"></div>
        <div class="wall-item-comment-separator"></div>
        {{$comment}}