View upload photo button only if you have permission.
Check if post_photos permission is available otherwise hide the photo upload button. Or should we show the button and just disable it with a title, about missing permission to upload photos? In comments we use the same icon, but just add [img] bb-code. Should we provide this if no permission to upload photos. Do we need different icons for [img] and photo upload buttons?
This commit is contained in:
parent
e0ba373147
commit
946beb6191
@ -1135,8 +1135,8 @@ function status_editor($a,$x,$popup=false) {
|
||||
'$nickname' => $x['nickname'],
|
||||
'$ispublic' => t('Visible to <strong>everybody</strong>'),
|
||||
'$linkurl' => t('Please enter a link URL:'),
|
||||
'$vidurl' => t("Please enter a video link/URL:"),
|
||||
'$audurl' => t("Please enter an audio link/URL:"),
|
||||
'$vidurl' => t('Please enter a video link/URL:'),
|
||||
'$audurl' => t('Please enter an audio link/URL:'),
|
||||
'$term' => t('Tag term:'),
|
||||
'$fileas' => t('Save to Folder:'),
|
||||
'$whereareu' => t('Where are you right now?'),
|
||||
@ -1144,7 +1144,7 @@ function status_editor($a,$x,$popup=false) {
|
||||
));
|
||||
|
||||
|
||||
$tpl = get_markup_template("jot.tpl");
|
||||
$tpl = get_markup_template('jot.tpl');
|
||||
|
||||
$jotplugins = '';
|
||||
$jotnets = '';
|
||||
@ -1156,7 +1156,6 @@ function status_editor($a,$x,$popup=false) {
|
||||
|
||||
$defexpire = ((($z = get_pconfig($x['profile_uid'], 'system', 'default_post_expire')) && (! $webpage)) ? $z : '');
|
||||
|
||||
|
||||
$cipher = get_pconfig($x['profile_uid'], 'system', 'default_cipher');
|
||||
if(! $cipher)
|
||||
$cipher = 'aes256';
|
||||
@ -1173,6 +1172,7 @@ function status_editor($a,$x,$popup=false) {
|
||||
'$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''),
|
||||
'$id_select' => $id_select,
|
||||
'$id_seltext' => t('Post as'),
|
||||
'$writephoto' => perm_is_allowed($x['profile_uid'], get_observer_hash(), 'post_photos'),
|
||||
'$upload' => t('Upload photo'),
|
||||
'$shortupload' => t('upload photo'),
|
||||
'$attach' => t('Attach file'),
|
||||
@ -1227,10 +1227,8 @@ function status_editor($a,$x,$popup=false) {
|
||||
'$expiryModalCANCEL' => t('Cancel')
|
||||
));
|
||||
|
||||
|
||||
if ($popup==true){
|
||||
$o = '<div id="jot-popup" style="display: none;">'.$o.'</div>';
|
||||
|
||||
if ($popup === true) {
|
||||
$o = '<div id="jot-popup" style="display:none">' . $o . '</div>';
|
||||
}
|
||||
|
||||
return $o;
|
||||
@ -1285,7 +1283,6 @@ function conv_sort($arr,$order) {
|
||||
return array();
|
||||
|
||||
$parents = array();
|
||||
$children = array();
|
||||
|
||||
foreach($arr as $x)
|
||||
if($x['id'] == $x['parent'])
|
||||
@ -1340,6 +1337,7 @@ function find_thread_parent_index($arr,$x) {
|
||||
foreach($arr as $k => $v)
|
||||
if($v['id'] == $x['parent'])
|
||||
return $k;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1368,6 +1366,7 @@ function render_location_default($item) {
|
||||
else
|
||||
$location = '<span class="smalltext">' . $coord . '</span>';
|
||||
}
|
||||
|
||||
return $location;
|
||||
}
|
||||
|
||||
@ -1393,6 +1392,7 @@ function prepare_page($item) {
|
||||
$tpl = get_pconfig($item['uid'], 'system', 'pagetemplate');
|
||||
if (! $tpl)
|
||||
$tpl = 'page_display.tpl';
|
||||
|
||||
return replace_macros(get_markup_template($tpl), array(
|
||||
'$author' => (($naked) ? '' : $item['author']['xchan_name']),
|
||||
'$auth_url' => (($naked) ? '' : zid($item['author']['xchan_url'])),
|
||||
@ -1442,7 +1442,6 @@ function network_tabs() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (($new_active == '')
|
||||
&& ($starred_active == '')
|
||||
&& ($conv_active == '')
|
||||
@ -1532,7 +1531,6 @@ function network_tabs() {
|
||||
$tpl = get_markup_template('common_tabs.tpl');
|
||||
|
||||
return replace_macros($tpl, array('$tabs' => $arr['tabs']));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1636,13 +1634,10 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
||||
'id' => 'webpages-tab',
|
||||
);
|
||||
}
|
||||
|
||||
else {
|
||||
// FIXME
|
||||
// we probably need a listing of events that were created by
|
||||
// this channel and are visible to the observer
|
||||
|
||||
|
||||
}
|
||||
|
||||
$arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);
|
||||
|
@ -25,12 +25,12 @@
|
||||
</div>
|
||||
{{if $catsenabled}}
|
||||
<div id="jot-category-wrap" class="jothidden" style="display:none">
|
||||
<input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" data-role="tagsinput"/>
|
||||
<input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" data-role="tagsinput">
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $webpage}}
|
||||
<div id="jot-pagetitle-wrap" class="jothidden" style="display:none">
|
||||
<input name="pagetitle" id="jot-pagetitle" type="text" placeholder="{{$placeholdpagetitle}}" value="{{$pagetitle}}" />
|
||||
<input name="pagetitle" id="jot-pagetitle" type="text" placeholder="{{$placeholdpagetitle}}" value="{{$pagetitle}}">
|
||||
</div>
|
||||
{{/if}}
|
||||
<div id="jot-text-wrap">
|
||||
@ -57,9 +57,11 @@
|
||||
</div>
|
||||
{{if $visitor}}
|
||||
<div class="btn-group hidden-xs">
|
||||
{{if $writephoto}}
|
||||
<button id="wall-image-upload" class="btn btn-default btn-sm" title="{{$upload}}" >
|
||||
<i class="icon-camera jot-icons"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
<button id="wall-file-upload" class="btn btn-default btn-sm" title="{{$attach}}" >
|
||||
<i id="wall-file-upload-icon" class="icon-paper-clip jot-icons"></i>
|
||||
</button>
|
||||
@ -109,7 +111,7 @@
|
||||
<li class="visible-xs"><a href="#" onclick="preview_post();return false;"><i class="icon-eye-open"></i> {{$preview}}</a></li>
|
||||
{{if $visitor}}
|
||||
<li class="divider visible-xs"></li>
|
||||
<li class="visible-xs"><a id="wall-image-upload-sub" href="#" ><i class="icon-camera"></i> {{$upload}}</a></li>
|
||||
{{if $writephoto}}<li class="visible-xs"><a id="wall-image-upload-sub" href="#" ><i class="icon-camera"></i> {{$upload}}</a></li>{{/if}}
|
||||
<li class="visible-xs"><a id="wall-file-upload-sub" href="#" ><i class="icon-paper-clip"></i> {{$attach}}</a></li>
|
||||
<li class="visible-xs"><a href="#" onclick="jotGetLink(); return false;"><i class="icon-link"></i> {{$weblink}}</a></li>
|
||||
<li class="visible-xs"><a href="#" onclick="jotVideoURL(); return false;"><i class="icon-facetime-video"></i> {{$video}}</a></li>
|
||||
|
Reference in New Issue
Block a user