aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-04-17 16:29:32 -0700
committerzotlabs <mike@macgirvin.com>2018-04-17 16:29:32 -0700
commit0576046d024a4eefba2dd7e43706e1d78270fa40 (patch)
tree17870e64fd03823da53765a0c056e08c478ad994
parent02763811b35eb6be41db8071acb4e07725cac697 (diff)
downloadvolse-hubzilla-0576046d024a4eefba2dd7e43706e1d78270fa40.tar.gz
volse-hubzilla-0576046d024a4eefba2dd7e43706e1d78270fa40.tar.bz2
volse-hubzilla-0576046d024a4eefba2dd7e43706e1d78270fa40.zip
when changing cover photo, show existing
-rw-r--r--Zotlabs/Module/Cover_photo.php1
-rw-r--r--view/theme/redbasic/css/style.css4
-rwxr-xr-xview/tpl/cover_photo.tpl5
3 files changed, 8 insertions, 2 deletions
diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php
index 56e35f912..d76c1b408 100644
--- a/Zotlabs/Module/Cover_photo.php
+++ b/Zotlabs/Module/Cover_photo.php
@@ -355,6 +355,7 @@ class Cover_photo extends \Zotlabs\Web\Controller {
$o .= replace_macros($tpl,array(
'$user' => \App::$channel['channel_address'],
+ '$existing' => get_cover_photo(local_channel(),'array',PHOTO_RES_COVER_850),
'$lbl_upfile' => t('Upload File:'),
'$lbl_profiles' => t('Select a profile:'),
'$title' => t('Change Cover Photo'),
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index a9dcc292a..6e516b21e 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1795,3 +1795,7 @@ dl.bb-dl > dd > li {
position: absolute;
text-shadow: -2px 0 1px #fff, 0 2px 1px#fff, 2px 0 1px #fff, 0 -2px 1px #fff;
}
+
+.cover-photo-review {
+ margin-bottom: 10px;
+}
diff --git a/view/tpl/cover_photo.tpl b/view/tpl/cover_photo.tpl
index 829a3a556..92efcdf02 100755
--- a/view/tpl/cover_photo.tpl
+++ b/view/tpl/cover_photo.tpl
@@ -86,10 +86,11 @@
<h2>{{$title}}</h2>
</div>
<div class="section-content-wrapper">
-
+ {{if $existing}}
+ <img class="cover-photo-review" style="max-width: 100%;" src="{{$existing.url}}" alt="{{t('Cover Photo')}}" />
+ {{/if}}
<form enctype="multipart/form-data" action="cover_photo" method="post">
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
-
<div id="profile-photo-upload-wrapper">
<label id="profile-photo-upload-label" class="form-label" for="profile-photo-upload">{{$lbl_upfile}}</label>