Merge pull request #922 from dawnbreak/master
View upload photo button only if you have permission.
This commit is contained in:
commit
57384b9f9f
@ -1135,8 +1135,8 @@ function status_editor($a,$x,$popup=false) {
|
|||||||
'$nickname' => $x['nickname'],
|
'$nickname' => $x['nickname'],
|
||||||
'$ispublic' => t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => t('Visible to <strong>everybody</strong>'),
|
||||||
'$linkurl' => t('Please enter a link URL:'),
|
'$linkurl' => t('Please enter a link URL:'),
|
||||||
'$vidurl' => t("Please enter a video link/URL:"),
|
'$vidurl' => t('Please enter a video link/URL:'),
|
||||||
'$audurl' => t("Please enter an audio link/URL:"),
|
'$audurl' => t('Please enter an audio link/URL:'),
|
||||||
'$term' => t('Tag term:'),
|
'$term' => t('Tag term:'),
|
||||||
'$fileas' => t('Save to Folder:'),
|
'$fileas' => t('Save to Folder:'),
|
||||||
'$whereareu' => t('Where are you right now?'),
|
'$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 = '';
|
$jotplugins = '';
|
||||||
$jotnets = '';
|
$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 : '');
|
$defexpire = ((($z = get_pconfig($x['profile_uid'], 'system', 'default_post_expire')) && (! $webpage)) ? $z : '');
|
||||||
|
|
||||||
|
|
||||||
$cipher = get_pconfig($x['profile_uid'], 'system', 'default_cipher');
|
$cipher = get_pconfig($x['profile_uid'], 'system', 'default_cipher');
|
||||||
if(! $cipher)
|
if(! $cipher)
|
||||||
$cipher = 'aes256';
|
$cipher = 'aes256';
|
||||||
@ -1173,6 +1172,7 @@ function status_editor($a,$x,$popup=false) {
|
|||||||
'$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''),
|
'$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''),
|
||||||
'$id_select' => $id_select,
|
'$id_select' => $id_select,
|
||||||
'$id_seltext' => t('Post as'),
|
'$id_seltext' => t('Post as'),
|
||||||
|
'$writephoto' => perm_is_allowed($x['profile_uid'], get_observer_hash(), 'post_photos'),
|
||||||
'$upload' => t('Upload photo'),
|
'$upload' => t('Upload photo'),
|
||||||
'$shortupload' => t('upload photo'),
|
'$shortupload' => t('upload photo'),
|
||||||
'$attach' => t('Attach file'),
|
'$attach' => t('Attach file'),
|
||||||
@ -1227,10 +1227,8 @@ function status_editor($a,$x,$popup=false) {
|
|||||||
'$expiryModalCANCEL' => t('Cancel')
|
'$expiryModalCANCEL' => t('Cancel')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
if ($popup === true) {
|
||||||
if ($popup==true){
|
$o = '<div id="jot-popup" style="display:none">' . $o . '</div>';
|
||||||
$o = '<div id="jot-popup" style="display: none;">'.$o.'</div>';
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
@ -1285,7 +1283,6 @@ function conv_sort($arr,$order) {
|
|||||||
return array();
|
return array();
|
||||||
|
|
||||||
$parents = array();
|
$parents = array();
|
||||||
$children = array();
|
|
||||||
|
|
||||||
foreach($arr as $x)
|
foreach($arr as $x)
|
||||||
if($x['id'] == $x['parent'])
|
if($x['id'] == $x['parent'])
|
||||||
@ -1340,6 +1337,7 @@ function find_thread_parent_index($arr,$x) {
|
|||||||
foreach($arr as $k => $v)
|
foreach($arr as $k => $v)
|
||||||
if($v['id'] == $x['parent'])
|
if($v['id'] == $x['parent'])
|
||||||
return $k;
|
return $k;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1368,6 +1366,7 @@ function render_location_default($item) {
|
|||||||
else
|
else
|
||||||
$location = '<span class="smalltext">' . $coord . '</span>';
|
$location = '<span class="smalltext">' . $coord . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $location;
|
return $location;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1393,6 +1392,7 @@ function prepare_page($item) {
|
|||||||
$tpl = get_pconfig($item['uid'], 'system', 'pagetemplate');
|
$tpl = get_pconfig($item['uid'], 'system', 'pagetemplate');
|
||||||
if (! $tpl)
|
if (! $tpl)
|
||||||
$tpl = 'page_display.tpl';
|
$tpl = 'page_display.tpl';
|
||||||
|
|
||||||
return replace_macros(get_markup_template($tpl), array(
|
return replace_macros(get_markup_template($tpl), array(
|
||||||
'$author' => (($naked) ? '' : $item['author']['xchan_name']),
|
'$author' => (($naked) ? '' : $item['author']['xchan_name']),
|
||||||
'$auth_url' => (($naked) ? '' : zid($item['author']['xchan_url'])),
|
'$auth_url' => (($naked) ? '' : zid($item['author']['xchan_url'])),
|
||||||
@ -1442,7 +1442,6 @@ function network_tabs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (($new_active == '')
|
if (($new_active == '')
|
||||||
&& ($starred_active == '')
|
&& ($starred_active == '')
|
||||||
&& ($conv_active == '')
|
&& ($conv_active == '')
|
||||||
@ -1532,7 +1531,6 @@ function network_tabs() {
|
|||||||
$tpl = get_markup_template('common_tabs.tpl');
|
$tpl = get_markup_template('common_tabs.tpl');
|
||||||
|
|
||||||
return replace_macros($tpl, array('$tabs' => $arr['tabs']));
|
return replace_macros($tpl, array('$tabs' => $arr['tabs']));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1636,13 +1634,10 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
|||||||
'id' => 'webpages-tab',
|
'id' => 'webpages-tab',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
// FIXME
|
// FIXME
|
||||||
// we probably need a listing of events that were created by
|
// we probably need a listing of events that were created by
|
||||||
// this channel and are visible to the observer
|
// this channel and are visible to the observer
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);
|
$arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);
|
||||||
|
@ -25,12 +25,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{{if $catsenabled}}
|
{{if $catsenabled}}
|
||||||
<div id="jot-category-wrap" class="jothidden" style="display:none">
|
<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>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $webpage}}
|
{{if $webpage}}
|
||||||
<div id="jot-pagetitle-wrap" class="jothidden" style="display:none">
|
<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>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div id="jot-text-wrap">
|
<div id="jot-text-wrap">
|
||||||
@ -57,9 +57,11 @@
|
|||||||
</div>
|
</div>
|
||||||
{{if $visitor}}
|
{{if $visitor}}
|
||||||
<div class="btn-group hidden-xs">
|
<div class="btn-group hidden-xs">
|
||||||
|
{{if $writephoto}}
|
||||||
<button id="wall-image-upload" class="btn btn-default btn-sm" title="{{$upload}}" >
|
<button id="wall-image-upload" class="btn btn-default btn-sm" title="{{$upload}}" >
|
||||||
<i class="icon-camera jot-icons"></i>
|
<i class="icon-camera jot-icons"></i>
|
||||||
</button>
|
</button>
|
||||||
|
{{/if}}
|
||||||
<button id="wall-file-upload" class="btn btn-default btn-sm" title="{{$attach}}" >
|
<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>
|
<i id="wall-file-upload-icon" class="icon-paper-clip jot-icons"></i>
|
||||||
</button>
|
</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>
|
<li class="visible-xs"><a href="#" onclick="preview_post();return false;"><i class="icon-eye-open"></i> {{$preview}}</a></li>
|
||||||
{{if $visitor}}
|
{{if $visitor}}
|
||||||
<li class="divider visible-xs"></li>
|
<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 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="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>
|
<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