diff options
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 47 | ||||
-rw-r--r-- | view/tpl/conv_item.tpl | 7 | ||||
-rw-r--r-- | view/tpl/conv_list.tpl | 7 |
3 files changed, 18 insertions, 43 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 90a3d3fc8..2413f7dce 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -415,7 +415,6 @@ class ThreadItem { 'template' => $this->get_template(), 'mode' => $mode, 'item_type' => intval($item['item_type']), - //'type' => implode("",array_slice(explode("/",$item['verb']),-1)), 'body' => $body['html'], 'tags' => $body['tags'], 'categories' => $body['categories'], @@ -450,13 +449,12 @@ class ThreadItem { 'sparkle' => $sparkle, 'title' => $item['title'], 'title_tosource' => get_pconfig($conv->get_profile_owner(),'system','title_tosource'), - //'ago' => relative_date($item['created']), 'app' => $item['app'], 'str_app' => sprintf( t('from %s'), $item['app']), 'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'), - 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'), - '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')):''), + 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created']), + 'editedtime' => (($item['edited'] != $item['created']) ? sprintf( t('Last edited %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'])) : ''), + 'expiretime' => (($item['expires'] > NULL_DATE) ? sprintf( t('Expires %s'), datetime_convert('UTC', date_default_timezone_get(), $item['expires'])) : ''), 'lock' => $lock, 'locktype' => $locktype, 'delayed' => $item['item_delayed'], @@ -479,7 +477,7 @@ class ThreadItem { 'event' => $body['event'], 'has_tags' => $has_tags, 'reactions' => $this->reactions, -// Item toolbar buttons + // Item toolbar buttons 'emojis' => (($this->is_toplevel() && $this->is_commentable() && $observer && feature_enabled($conv->get_profile_owner(),'emojis')) ? '1' : ''), 'like' => $like, 'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike : ''), @@ -489,7 +487,7 @@ class ThreadItem { 'embed' => $embed, 'rawmid' => $item['mid'], 'plink' => get_plink($item), - 'edpost' => $edpost, // ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''), + 'edpost' => $edpost, 'star' => ((feature_enabled($conv->get_profile_owner(),'star_posts') && ($item['item_type'] == ITEM_TYPE_POST)) ? $star : ''), 'tagger' => ((feature_enabled($conv->get_profile_owner(),'commtag')) ? $tagger : ''), 'filer' => ((feature_enabled($conv->get_profile_owner(),'filing') && ($item['item_type'] == ITEM_TYPE_POST)) ? $filer : ''), @@ -500,7 +498,7 @@ class ThreadItem { 'addtocal' => (($has_event) ? t('Add to Calendar') : ''), 'drop' => $drop, 'dropdown_extras' => $dropdown_extras, -// end toolbar buttons + // end toolbar buttons 'unseen_comments' => $unseen_comments, 'comment_count' => $total_children, 'comment_count_txt' => $comment_count_txt, @@ -508,30 +506,9 @@ class ThreadItem { 'markseen' => t('Mark all comments seen'), 'responses' => $responses, 'my_responses' => $my_responses, - /* - 'like_count' => $like_count, - 'like_list' => $like_list, - 'like_list_part' => $like_list_part, - 'like_button_label' => $like_button_label, - 'like_modal_title' => t('Likes','noun'), - - 'repeat_count' => $repeat_count, - 'repeat_list' => $repeat_list, - 'repeat_list_part' => $repeat_list_part, - 'repeat_button_label' => $repeat_button_label, - 'repeat_modal_title' => t('Repeats','noun'), - - - 'dislike_modal_title' => t('Dislikes','noun'), - 'dislike_count' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike_count : ''), - 'dislike_list' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike_list : ''), - 'dislike_list_part' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike_list_part : ''), - 'dislike_button_label' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike_button_label : ''), -*/ 'modal_dismiss' => t('Close'), - // 'showlike' => $showlike, - // 'showdislike' => $showdislike, 'comment' => ($item['item_delayed'] ? '' : $this->get_comment_box()), + 'no_comment' => (($item['item_thread_top'] && $item['item_nocomment'])? t('Comments disabled') : ''), 'previewing' => ($conv->is_preview() ? true : false ), 'preview_lbl' => t('This is an unsaved preview'), 'wait' => t('Please wait'), @@ -556,15 +533,7 @@ class ThreadItem { $result['children'] = array(); $nb_children = count($children); - $visible_comments = Config::Get('system','expanded_comments'); - if($visible_comments === false) - $visible_comments = 3; - -// needed for scroll to comment from notification but needs more work -// as we do not want to open all comments unless there is actually an #item_xx anchor -// and the url fragment is not sent to the server. -// if(in_array(\App::$module,['display','update_display'])) -// $visible_comments = 99999; + $visible_comments = Config::Get('system', 'expanded_comments', 3); if(($this->get_display_mode() === 'normal') && ($nb_children > 0)) { foreach($children as $child) { diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 74e06d6ac..56f590284 100644 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -36,14 +36,17 @@ <i class="bi bi-clock"></i> {{/if}} {{if $item.editedtime}} - <i class="bi bi-pencil"></i> + <i class="bi bi-pencil" title="{{$item.editedtime}}"></i> {{/if}} {{if $item.verified}} <i class="bi bi-shield-check" title="{{$item.verified}}"></i> {{elseif $item.forged}} <i class="bi bi-shield-exclamation text-danger" title="{{$item.forged}}"></i> {{/if}} - <small class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}</small> + {{if $item.no_comment}} + <i class="bi bi-ban" title="{{$item.no_comment}}"></i> + {{/if}} + <small class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.expiretime}} {{$item.expiretime}}{{/if}}</small> </div> {{if $item.thr_parent_uuid}} <a href="javascript:doscroll('{{$item.thr_parent_uuid}}',{{$item.parent}});" class="ms-3" title="{{$item.top_hint}}"><i class="bi bi-chevron-double-up"></i></a> diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl index 41880029f..f31424ce3 100644 --- a/view/tpl/conv_list.tpl +++ b/view/tpl/conv_list.tpl @@ -30,14 +30,17 @@ <i class="bi bi-clock"></i> {{/if}} {{if $item.editedtime}} - <i class="bi bi-pencil"></i> + <i class="bi bi-pencil" title="{{$item.editedtime}}"></i> {{/if}} {{if $item.verified}} <i class="bi bi-shield-check" title="{{$item.verified}}"></i> {{elseif $item.forged}} <i class="bi bi-shield-exclamation text-danger" title="{{$item.forged}}"></i> {{/if}} - <small class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}</small> + {{if $item.no_comment}} + <i class="bi bi-ban" title="{{$item.no_comment}}"></i> + {{/if}} + <small class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.expiretime}} {{$item.expiretime}}{{/if}}</small> </div> {{if $item.pinned}} <div class="wall-item-pinned" title="{{$item.pinned}}" id="wall-item-pinned-{{$item.id}}"><i class="bi bi-pin-fill"></i></div> |