we have got a button for events in the nav. no need for it in the tabs if we are local.
This commit is contained in:
parent
ebfa1a12b9
commit
be27fb5644
@ -1599,7 +1599,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
$uid = (($a->profile['profile_uid']) ? $a->profile['profile_uid'] : local_channel());
|
$uid = (($a->profile['profile_uid']) ? $a->profile['profile_uid'] : local_channel());
|
||||||
|
|
||||||
if($uid == local_channel()) {
|
if($uid == local_channel()) {
|
||||||
$cal_link = '/events';
|
$cal_link = '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$cal_link = '/cal/' . $nickname;
|
$cal_link = '/cal/' . $nickname;
|
||||||
@ -1653,7 +1653,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($p['view_stream']) {
|
if($p['view_stream'] && $cal_link) {
|
||||||
$tabs[] = array(
|
$tabs[] = array(
|
||||||
'label' => t('Events'),
|
'label' => t('Events'),
|
||||||
'url' => $a->get_baseurl() . $cal_link,
|
'url' => $a->get_baseurl() . $cal_link,
|
||||||
|
@ -80,6 +80,8 @@ function cal_content(&$a) {
|
|||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
|
$tabs = profile_tabs($a, True, $channel['channel_address']);
|
||||||
|
|
||||||
$mode = 'view';
|
$mode = 'view';
|
||||||
$y = 0;
|
$y = 0;
|
||||||
$m = 0;
|
$m = 0;
|
||||||
@ -333,6 +335,7 @@ function cal_content(&$a) {
|
|||||||
'$today' => t('Today'),
|
'$today' => t('Today'),
|
||||||
'$form' => $form,
|
'$form' => $form,
|
||||||
'$expandform' => ((x($_GET,'expandform')) ? true : false),
|
'$expandform' => ((x($_GET,'expandform')) ? true : false),
|
||||||
|
'$tabs' => $tabs
|
||||||
));
|
));
|
||||||
|
|
||||||
if (x($_GET,'id')){ echo $o; killme(); }
|
if (x($_GET,'id')){ echo $o; killme(); }
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{{$tabs}}
|
||||||
<div class="generic-content-wrapper">
|
<div class="generic-content-wrapper">
|
||||||
<div class="section-title-wrapper">
|
<div class="section-title-wrapper">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
Reference in New Issue
Block a user