From ead45292e134fa03726912905ca1ca58ccb12fec Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 21 Mar 2015 00:06:18 +0100 Subject: some tabs title statuseditor restructuring --- include/items.php | 2 +- mod/network.php | 33 +++++++++++++++++++++++---------- view/tpl/jot.tpl | 2 +- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/include/items.php b/include/items.php index 2518c0d4f..8e293d761 100755 --- a/include/items.php +++ b/include/items.php @@ -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; -} \ No newline at end of file +} diff --git a/mod/network.php b/mod/network.php index 0eeeedbe9..7f8d39044 100644 --- a/mod/network.php +++ b/mod/network.php @@ -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 .= '

' . t('Search Results For:') . ' ' . htmlspecialchars($search, ENT_COMPAT,'UTF-8') . '

'; + 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 = '

' . t('Collection: ') . $x['name'] . '

' . $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 = '

' . t('Connection: ') . $r[0]['xchan_name'] . '

' . $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); diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index e74afffce..1dfb0cb75 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -187,4 +187,4 @@ {{if $content}} -{{/if}} \ No newline at end of file +{{/if}} -- cgit v1.2.3