some tabs title statuseditor restructuring

This commit is contained in:
Mario Vavti 2015-03-21 00:06:18 +01:00
parent 9a2ef38267
commit ead45292e1
3 changed files with 25 additions and 12 deletions

View File

@ -4823,4 +4823,4 @@ function comment_local_origin($item) {
if(stripos($item['mid'],get_app()->get_hostname()) && ($item['parent'] != $item['id']))
return true;
return false;
}
}

View File

@ -119,13 +119,16 @@ function network_content(&$a, $update = 0, $load = false) {
if($cid)
$def_acl = array('allow_cid' => '<' . intval($cid) . '>');
if(! $update) {
$o .= network_tabs();
$tabs = network_tabs();
$o .= $tabs;
// search terms header
if($search)
$o .= '<h2>' . t('Search Results For:') . ' ' . htmlspecialchars($search, ENT_COMPAT,'UTF-8') . '</h2>';
if($search) {
$o .= replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => t('Search Results For:') . ' ' . htmlspecialchars($search, ENT_COMPAT,'UTF-8')
));
}
nav_set_selected('network');
@ -136,7 +139,6 @@ function network_content(&$a, $update = 0, $load = false) {
'deny_gid' => $channel['channel_deny_gid']
);
$x = array(
'is_owner' => true,
'allow_location' => ((intval(get_pconfig($channel['channel_id'],'system','use_browser_location'))) ? '1' : ''),
@ -149,8 +151,8 @@ function network_content(&$a, $update = 0, $load = false) {
'profile_uid' => local_channel()
);
$o .= status_editor($a,$x);
$status_editor = status_editor($a,$x);
$o .= $status_editor;
}
@ -186,9 +188,15 @@ function network_content(&$a, $update = 0, $load = false) {
$x = group_rec_byhash(local_channel(), $group_hash);
if($x)
$o = '<h2>' . t('Collection: ') . $x['name'] . '</h2>' . $o;
if($x) {
$title = replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => t('Collection: ') . $x['name']
));
}
$o = $tabs;
$o .= $title;
$o .= $status_editor;
}
@ -200,7 +208,12 @@ function network_content(&$a, $update = 0, $load = false) {
);
if($r) {
$sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND uid = " . intval(local_channel()) . " AND ( author_xchan = '" . dbesc($r[0]['abook_xchan']) . "' or owner_xchan = '" . dbesc($r[0]['abook_xchan']) . "' ) and item_restrict = 0 ) ";
$o = '<h2>' . t('Connection: ') . $r[0]['xchan_name'] . '</h2>' . $o;
$title = replace_macros(get_markup_template("section_title.tpl"),array(
'$title' => t('Connection: ') . $r[0]['xchan_name']
));
$o = $tabs;
$o .= $title;
$o .= $status_editor;
}
else {
notice( t('Invalid connection.') . EOL);

View File

@ -187,4 +187,4 @@
{{if $content}}
<script>initEditor();</script>
{{/if}}
{{/if}}