channel/identity selection manage page
This commit is contained in:
parent
58ddd2d565
commit
aff33531ac
@ -87,22 +87,46 @@ function manage_content(&$a) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$active = null;
|
$change_channel = ((argc() > 1) ? intval($argv(1)) : 0);
|
||||||
|
if($change_channel) {
|
||||||
if(local_user()) {
|
$r = q("select * from entity where entity_id = %d and entity_account_id = %d limit 1",
|
||||||
$r = q("select * from entity where entity_id = %d limit 1",
|
intval($change_channel),
|
||||||
intval(local_user())
|
intval(get_account_id())
|
||||||
);
|
);
|
||||||
|
if($r && count($r)) {
|
||||||
if($r && count($r))
|
$_SESSION['uid'] = intval($r[0]['entity_id']);
|
||||||
$active = $r[0];
|
get_app()->identity = $r[0];
|
||||||
|
$_SESSION['theme'] = $r[0]['entity_theme'];
|
||||||
|
date_default_timezone_set($r[0]['entity_timezone']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$channels = null;
|
||||||
|
|
||||||
|
if(local_user()) {
|
||||||
|
$r = q("select entity.*, contact.* from entity left join contact on entity.entity_id = contact.uid
|
||||||
|
where entity.entity_account_id = %d and contact.self = 1",
|
||||||
|
intval(get_account_id())
|
||||||
|
);
|
||||||
|
|
||||||
|
if($r && count($r)) {
|
||||||
|
$channels = $r;
|
||||||
|
for($x = 0; $x < count($channels); $x ++)
|
||||||
|
$channels[$x]['link'] = 'manage/' . intval($channels[$x]['entity_id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$links = array(
|
||||||
|
array( 'zentity', t('Create a new channel'), t('New Channel'))
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
$o = replace_macros(get_markup_template('channels.tpl'), array(
|
$o = replace_macros(get_markup_template('channels.tpl'), array(
|
||||||
'$header' => t('Manage Profile Channels'),
|
'$header' => t('Manage Channels'),
|
||||||
'$desc' => t('These are your Profile Channels. Select any Profile Channel to attach and make that the current channel.'),
|
'$desc' => t('These are your Profile Channels. Select any Profile Channel to attach and make that the current channel.'),
|
||||||
'$active' => $active,
|
'$links' => $links,
|
||||||
|
'$all_channels' => $channels,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2012-09-01.64
|
2012-09-02.65
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
<img class="channel-photo" src="$channel.photo" alt="$channel.name" />
|
<div class="channel-selection">
|
||||||
<div class="channel-name">$channel.name</div>
|
<a href="$channel.link" class="channel-selection-photo-link" title="$channel.entity_name"><img class="channel-photo" src="$channel.thumb" alt="$channel.entity_name" /></a>
|
||||||
|
<a href="$channel.link" class="channel-selection-name-link" title="$channel.entity_name"><div class="channel-name">$channel.entity_name</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="channel-selection-end"></div>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<h3>$header</h3>
|
<h3>$header</h3>
|
||||||
|
|
||||||
<div id="channels-desc" class="descriptive-text">$desc</div>
|
|
||||||
|
|
||||||
{{ if $links }}
|
{{ if $links }}
|
||||||
{{ for $links as $l }}
|
{{ for $links as $l }}
|
||||||
@ -8,12 +7,10 @@
|
|||||||
{{ endfor }}
|
{{ endfor }}
|
||||||
{{ endif }}
|
{{ endif }}
|
||||||
|
|
||||||
<div align="center">{{ inc channel.tpl with $chn = $active }}</div>
|
<div id="channels-desc" class="descriptive-text">$desc</div>
|
||||||
<div align="center">$act_desc</div>
|
|
||||||
|
|
||||||
|
|
||||||
{{ for $all_channels as $chn }}
|
{{ for $all_channels as $chn }}
|
||||||
{{ inc channel.tpl with $channel = $chn }}
|
{{ inc channel.tpl with $channel=$chn }}{{ endinc }}
|
||||||
{{ endfor }}
|
{{ endfor }}
|
||||||
|
|
||||||
<div class="channels-end"></div>
|
<div class="channels-end"></div>
|
||||||
|
Reference in New Issue
Block a user