From dfa48ba17c0263355901cfba67d5058475168bfb Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 7 Jun 2018 23:24:36 +0200 Subject: fixes for search_item.tpl --- Zotlabs/Lib/ThreadItem.php | 7 ---- include/conversation.php | 10 +++--- view/tpl/conv_item.tpl | 2 +- view/tpl/search_item.tpl | 88 +++++++++++++++++++++------------------------- 4 files changed, 47 insertions(+), 60 deletions(-) diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index a3c7f99b9..ed78ae00b 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -243,16 +243,9 @@ class ThreadItem { // FIXME check this permission if(($conv->get_profile_owner() == local_channel()) && (! array_key_exists('real_uid',$item))) { -// FIXME we don't need all this stuff, some can be done in the template - $star = array( - 'do' => t("Add Star"), - 'undo' => t("Remove Star"), 'toggle' => t("Toggle Star Status"), - 'classdo' => ((intval($item['item_starred'])) ? "hidden" : ""), - 'classundo' => ((intval($item['item_starred'])) ? "" : "hidden"), 'isstarred' => ((intval($item['item_starred'])) ? true : false), - 'starred' => t('starred'), ); } diff --git a/include/conversation.php b/include/conversation.php index 61ca208b2..4997bc2b7 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -509,6 +509,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa . ((x($_GET,'cmax')) ? '&cmax=' . $_GET['cmax'] : '') . ((x($_GET,'file')) ? '&file=' . $_GET['file'] : '') . ((x($_GET,'uri')) ? '&uri=' . $_GET['uri'] : '') + . ((x($_GET,'pf')) ? '&pf=' . $_GET['pf'] : '') . "'; var profile_page = " . App::$pager['page'] . "; \r\n"; } } @@ -690,8 +691,10 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa 'delete' => t('Delete'), ); - $star = false; - $isstarred = "unstarred fa-star-o"; + $star = array( + 'toggle' => t("Toggle Star Status"), + 'isstarred' => ((intval($item['item_starred'])) ? true : false), + ); $lock = (($item['item_private'] || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) ? t('Private Message') @@ -773,8 +776,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa 'owner_photo' => $owner_photo, 'plink' => get_plink($item,false), 'edpost' => false, - 'isstarred' => $isstarred, - 'star' => $star, + 'star' => ((feature_enabled(local_channel(),'star_posts')) ? $star : ''), 'drop' => $drop, 'vote' => $likebuttons, 'like' => '', diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 6baf06dda..ac6af40e9 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -29,7 +29,7 @@
- {{$item.name}} + {{$item.name}} {{if $item.thread_author_menu}}