From 8fcf16ee63c86667afe5646ea46d56dd1c96aa08 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 22 Nov 2017 18:39:23 -0800 Subject: optional divider between item header and body --- Zotlabs/Lib/ThreadItem.php | 3 ++- include/conversation.php | 17 +++++------------ view/css/conversation.css | 4 ++++ view/tpl/conv_item.tpl | 4 +++- view/tpl/search_item.tpl | 3 +++ 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 143cc4cc7..197657ab1 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -313,7 +313,7 @@ class ThreadItem { $comment_count_txt = sprintf( tt('%d comment','%d comments',$total_children),$total_children ); $list_unseen_txt = (($unseen_comments) ? sprintf('%d unseen',$unseen_comments) : ''); - + @@ -370,6 +370,7 @@ class ThreadItem { 'unverified' => $unverified, 'forged' => $forged, 'location' => $location, + 'divider' => get_pconfig($conv->get_profile_owner(),'system','item_divider'), 'attend_label' => t('Attend'), 'attend_title' => t('Attendance Options'), 'vote_label' => t('Vote'), diff --git a/include/conversation.php b/include/conversation.php index 8c75389c4..63d503177 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -628,13 +628,14 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa // "New Item View" on network page or search page results // - just loop through the items and format them minimally for display - - //$tpl = get_markup_template('search_item.tpl'); $tpl = 'search_item.tpl'; foreach($items as $item) { - $x = [ 'mode' => $mode, 'item' => $item ]; + $x = [ + 'mode' => $mode, + 'item' => $item + ]; call_hooks('stream_item',$x); if($x['item']['blocked']) @@ -655,14 +656,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE))) && ($item['id'] != $item['parent'])) continue; -// $nickname = $item['nickname']; } -// else -// $nickname = App::$user['nickname']; - -// $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']); -// if($item['author-link'] && (! $item['author-name'])) -// $profile_name = $item['author-link']; $sp = false; $profile_link = best_link_url($item,$sp); @@ -671,8 +665,6 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa else $profile_link = zid($profile_link); -// $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']); - $profile_name = $item['author']['xchan_name']; $profile_link = $item['author']['xchan_url']; $profile_avatar = $item['author']['xchan_photo_m']; @@ -768,6 +760,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa 'editedtime' => (($item['edited'] != $item['created']) ? sprintf( t('last edited: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r')) : ''), 'expiretime' => (($item['expires'] > NULL_DATE) ? sprintf( t('Expires: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['expires'], 'r')):''), 'location' => $location, + 'divider' => false, 'indent' => '', 'owner_name' => $owner_name, 'owner_url' => $owner_url, diff --git a/view/css/conversation.css b/view/css/conversation.css index d2736acaa..77a600deb 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -87,6 +87,10 @@ margin-left:10px; } +.wall-item-divider { + margin: 5px; +} + .wall-item-lock { float: left; } diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index b0e1cb6fb..e9f507f1e 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -46,7 +46,9 @@ {{if $item.verified}} {{elseif $item.forged}} {{/if}}{{if $item.location}}{{$item.location}}, {{/if}}{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}{{if $item.editedtime}} {{/if}} {{if $item.app}}{{$item.str_app}}{{/if}} - + {{if $item.divider}} +
+ {{/if}} {{if $item.body}}
diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl index 0a8f12d4f..ebfb6a256 100755 --- a/view/tpl/search_item.tpl +++ b/view/tpl/search_item.tpl @@ -39,6 +39,9 @@ {{if $item.verified}} {{elseif $item.forged}} {{/if}}{{if $item.location}}{{$item.location}}, {{/if}}{{$item.localtime}}{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}{{if $item.editedtime}} {{/if}} {{if $item.app}}{{$item.str_app}}{{/if}}
+ {{if $item.divider}} +
+ {{/if}} {{if $item.body}}
-- cgit v1.2.3