From bd249b276d5b0a7f9934272c5443dfe2e0eb010f Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 18 Mar 2016 17:49:31 +0100 Subject: add use as cover photo link to photos view --- mod/photos.php | 1 + view/tpl/photo_view.tpl | 47 +++++++++++++++++++++++++++++++++-------------- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index 8f44f01b2..07138e6cf 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -896,6 +896,7 @@ function photos_content(&$a) { if($can_post && ($ph[0]['uid'] == $owner_uid)) { $tools = array( 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource_id'], t('Use as profile photo')), + 'cover'=>array($a->get_baseurl() . '/cover_photo/use/'.$ph[0]['resource_id'], t('Use as cover photo')), ); } diff --git a/view/tpl/photo_view.tpl b/view/tpl/photo_view.tpl index bd5e68027..067fbe060 100755 --- a/view/tpl/photo_view.tpl +++ b/view/tpl/photo_view.tpl @@ -2,23 +2,41 @@
- {{if $tools}} - - {{/if}} - {{if $map}} -
- + {{if $tools || $map || $edit}} +
+ +
{{/if}} -