X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FContact.php;h=a70db02345c681c77e46055e67c8ef870f96821d;hb=c1686c486c8fcb4f94f89df869ae72509f3583fe;hp=23a2e9c493e70e27ebbe6d3733ecf59093bb9016;hpb=50746bad55eb2453764dffa143785b19fdb61d6c;p=friendica.git diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 23a2e9c493..a70db02345 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -220,7 +220,6 @@ class Contact extends BaseModule $tpl = Renderer::getMarkupTemplate('contacts-head.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ - '$baseurl' => DI::baseUrl()->get(true), ]); $o = ''; @@ -247,6 +246,11 @@ class Contact extends BaseModule // This makes the query look for contact.uid = 0 array_unshift($sql_values, 0); break; + case 'collapsed': + $sql_extra = " AND `id` IN (SELECT `cid` FROM `user-contact` WHERE `user-contact`.`uid` = ? AND `user-contact`.`collapsed`)"; + // This makes the query look for contact.uid = 0 + array_unshift($sql_values, 0); + break; case 'archived': $sql_extra = " AND `archive` AND NOT `blocked` AND NOT `pending`"; break; @@ -362,6 +366,14 @@ class Contact extends BaseModule 'id' => 'showignored-tab', 'accesskey' => 'i', ], + [ + 'label' => DI::l10n()->t('Collapsed'), + 'url' => 'contact/collapsed', + 'sel' => $type == 'collapsed' ? 'active' : '', + 'title' => DI::l10n()->t('Only show collapsed contacts'), + 'id' => 'showcollapsed-tab', + 'accesskey' => 'c', + ], [ 'label' => DI::l10n()->t('Archived'), 'url' => 'contact/archived', @@ -399,11 +411,12 @@ class Contact extends BaseModule } switch ($type) { - case 'pending': $header .= ' - ' . DI::l10n()->t('Pending'); break; - case 'blocked': $header .= ' - ' . DI::l10n()->t('Blocked'); break; - case 'hidden': $header .= ' - ' . DI::l10n()->t('Hidden'); break; - case 'ignored': $header .= ' - ' . DI::l10n()->t('Ignored'); break; - case 'archived': $header .= ' - ' . DI::l10n()->t('Archived'); break; + case 'pending': $header .= ' - ' . DI::l10n()->t('Pending'); break; + case 'blocked': $header .= ' - ' . DI::l10n()->t('Blocked'); break; + case 'hidden': $header .= ' - ' . DI::l10n()->t('Hidden'); break; + case 'ignored': $header .= ' - ' . DI::l10n()->t('Ignored'); break; + case 'collapsed': $header .= ' - ' . DI::l10n()->t('Collapsed'); break; + case 'archived': $header .= ' - ' . DI::l10n()->t('Archived'); break; } $header .= $nets ? ' - ' . ContactSelector::networkToName($nets) : ''; @@ -437,7 +450,7 @@ class Contact extends BaseModule /** * List of pages for the Contact TabBar * - * Available Pages are 'Status', 'Profile', 'Contacts' and 'Common Friends' + * Available Pages are 'Conversations', 'Profile', 'Contacts' and 'Common Friends' * * @param array $contact The contact array * @param int $active_tab 1 if tab should be marked as active @@ -459,7 +472,15 @@ class Contact extends BaseModule // tabs $tabs = [ [ - 'label' => DI::l10n()->t('Status'), + 'label' => DI::l10n()->t('Profile'), + 'url' => 'contact/' . $cid, + 'sel' => (($active_tab == self::TAB_PROFILE) ? 'active' : ''), + 'title' => DI::l10n()->t('Profile Details'), + 'id' => 'profile-tab', + 'accesskey' => 'o', + ], + [ + 'label' => DI::l10n()->t('Conversations'), 'url' => 'contact/' . $pcid . '/conversations', 'sel' => (($active_tab == self::TAB_CONVERSATIONS) ? 'active' : ''), 'title' => DI::l10n()->t('Conversations started by this contact'), @@ -470,7 +491,7 @@ class Contact extends BaseModule 'label' => DI::l10n()->t('Posts and Comments'), 'url' => 'contact/' . $pcid . '/posts', 'sel' => (($active_tab == self::TAB_POSTS) ? 'active' : ''), - 'title' => DI::l10n()->t('Status Messages and Posts'), + 'title' => DI::l10n()->t('Individual Posts and Replies'), 'id' => 'posts-tab', 'accesskey' => 'p', ], @@ -482,14 +503,6 @@ class Contact extends BaseModule 'id' => 'media-tab', 'accesskey' => 'd', ], - [ - 'label' => DI::l10n()->t('Profile'), - 'url' => 'contact/' . $cid, - 'sel' => (($active_tab == self::TAB_PROFILE) ? 'active' : ''), - 'title' => DI::l10n()->t('Profile Details'), - 'id' => 'profile-tab', - 'accesskey' => 'o', - ], ['label' => DI::l10n()->t('Contacts'), 'url' => 'contact/' . $pcid . '/contacts', 'sel' => (($active_tab == self::TAB_CONTACTS) ? 'active' : ''),