From: Hypolite Petovan Date: Fri, 4 Nov 2022 11:03:55 +0000 (-0400) Subject: Move viewcontact_template and contact_template to contact/ folder X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=811e144e9e4656525d9c0c01ca55153e5eee102c;p=friendica.git Move viewcontact_template and contact_template to contact/ folder --- diff --git a/mod/match.php b/mod/match.php index e8a0a66059..ea59d7ee61 100644 --- a/mod/match.php +++ b/mod/match.php @@ -93,7 +93,7 @@ function match_content(App $a) DI::sysmsg()->addInfo(DI::l10n()->t('No matches')); } - $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl'); + $tpl = Renderer::getMarkupTemplate('contact/list.tpl'); $o = Renderer::replaceMacros($tpl, [ '$title' => DI::l10n()->t('Profile Match'), '$contacts' => array_slice($entries, 0, $limit), diff --git a/mod/suggest.php b/mod/suggest.php index 9ad11f7452..41fa1b06b2 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -49,7 +49,7 @@ function suggest_content(App $a) $entries[] = ModuleContact::getContactTemplateVars($contact); } - $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl'); + $tpl = Renderer::getMarkupTemplate('contact/list.tpl'); return Renderer::replaceMacros($tpl,[ '$title' => DI::l10n()->t('Friend Suggestions'), diff --git a/src/Module/BaseSearch.php b/src/Module/BaseSearch.php index b0f03c17d0..2eace38bf1 100644 --- a/src/Module/BaseSearch.php +++ b/src/Module/BaseSearch.php @@ -132,7 +132,7 @@ class BaseSearch extends BaseModule } } - $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl'); + $tpl = Renderer::getMarkupTemplate('contact/list.tpl'); return Renderer::replaceMacros($tpl, [ 'title' => $header, '$contacts' => $entries, diff --git a/src/Module/Conversation/Network.php b/src/Module/Conversation/Network.php index ce2afbfc75..72c4f67cf2 100644 --- a/src/Module/Conversation/Network.php +++ b/src/Module/Conversation/Network.php @@ -178,7 +178,7 @@ class Network extends BaseModule } elseif (self::$forumContactId) { $contact = Contact::getById(self::$forumContactId); if (DBA::isResult($contact)) { - $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('viewcontact_template.tpl'), [ + $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('contact/list.tpl'), [ 'contacts' => [ModuleContact::getContactTemplateVars($contact)], 'id' => DI::args()->get(0), ]) . $o; diff --git a/view/templates/contact/entry.tpl b/view/templates/contact/entry.tpl new file mode 100644 index 0000000000..31a2d15d6e --- /dev/null +++ b/view/templates/contact/entry.tpl @@ -0,0 +1,46 @@ + +
+
+
+ + {{$contact.name}} + + {{if $multiselect}} + + {{/if}} + + {{if $contact.photo_menu}} + menu +
+
    + {{foreach $contact.photo_menu as $k=>$c}} + {{if $c.2}} +
  • {{$c.0}}
  • + {{else}} +
  • {{$c.0}}
  • + {{/if}} + {{/foreach}} +
+
+ {{/if}} +
+ +
+ +
+
+ {{$contact.name}} + {{if $contact.account_type}} ({{$contact.account_type}}){{/if}} +
+ {{if $contact.alt_text}}
{{$contact.alt_text}}
{{/if}} + {{if $contact.itemurl}}
{{$contact.itemurl}}
{{/if}} + {{if $contact.tags}}
{{$contact.tags}}
{{/if}} + {{if $contact.details}}
{{$contact.details}}
{{/if}} + {{if $contact.network}}
{{$contact.network}}
{{/if}} + +
+ +
+
diff --git a/view/templates/contact/list.tpl b/view/templates/contact/list.tpl new file mode 100644 index 0000000000..ec77fd521b --- /dev/null +++ b/view/templates/contact/list.tpl @@ -0,0 +1,14 @@ + +{{include file="section_title.tpl"}} + +{{$tab_str nofilter}} + +
+{{foreach $contacts as $contact}} + {{include file="contact/entry.tpl"}} +{{/foreach}} +
+
+
+ +{{$paginate nofilter}} diff --git a/view/templates/contact_template.tpl b/view/templates/contact_template.tpl deleted file mode 100644 index 31a2d15d6e..0000000000 --- a/view/templates/contact_template.tpl +++ /dev/null @@ -1,46 +0,0 @@ - -
-
-
- - {{$contact.name}} - - {{if $multiselect}} - - {{/if}} - - {{if $contact.photo_menu}} - menu -
-
    - {{foreach $contact.photo_menu as $k=>$c}} - {{if $c.2}} -
  • {{$c.0}}
  • - {{else}} -
  • {{$c.0}}
  • - {{/if}} - {{/foreach}} -
-
- {{/if}} -
- -
- -
-
- {{$contact.name}} - {{if $contact.account_type}} ({{$contact.account_type}}){{/if}} -
- {{if $contact.alt_text}}
{{$contact.alt_text}}
{{/if}} - {{if $contact.itemurl}}
{{$contact.itemurl}}
{{/if}} - {{if $contact.tags}}
{{$contact.tags}}
{{/if}} - {{if $contact.details}}
{{$contact.details}}
{{/if}} - {{if $contact.network}}
{{$contact.network}}
{{/if}} - -
- -
-
diff --git a/view/templates/viewcontact_template.tpl b/view/templates/viewcontact_template.tpl deleted file mode 100644 index 562270e352..0000000000 --- a/view/templates/viewcontact_template.tpl +++ /dev/null @@ -1,14 +0,0 @@ - -{{include file="section_title.tpl"}} - -{{$tab_str nofilter}} - -
-{{foreach $contacts as $contact}} - {{include file="contact_template.tpl"}} -{{/foreach}} -
-
-
- -{{$paginate nofilter}} diff --git a/view/theme/frio/templates/contact/entry.tpl b/view/theme/frio/templates/contact/entry.tpl new file mode 100644 index 0000000000..0cd55f8d3e --- /dev/null +++ b/view/theme/frio/templates/contact/entry.tpl @@ -0,0 +1,233 @@ + +
+ + {{* This is a wrapper for the contact picture *}} + + +
+ {{if $contact.photo_menu}} + {{* The contact actions like private mail, delete contact, edit contact and so on *}} + + {{/if}} + + {{* The button to add or remove contacts from a contact group - group edit page *}} + {{if $contact.change_member}} + + {{/if}} + + {{* The contact description (e.g. Name, Network, kind of connection and so on *}} +
+
+

{{$contact.name}} + {{if $contact.account_type}} ({{$contact.account_type}}){{/if}} + {{if $contact.account_type == 'Forum'}}{{/if}} + {{* @todo this needs some changing in core because $contact.account_type contains a translated string which may notbe the same in every language *}} +

+
+ {{if $contact.alt_text}}
{{$contact.alt_text}}
{{/if}} + {{if $contact.itemurl}}
{{$contact.itemurl}}
{{/if}} + {{if $contact.tags}}
{{$contact.tags}}
{{/if}} + {{if $contact.details}}{{/if}} + {{if $contact.network}}
{{$contact.network}}
{{/if}} +
+ + {{* The checkbox to perform batch actions to these contacts (for batch actions have a look at contacts-template.tpl) *}} + {{* if !$no_contacts_checkbox *}} + {{if $multiselect}} +
+ + +
+ {{/if}} +
+ +
+ + +{{* the following part is a nearly a copy of the part above but it is modified for working with js. +We use this part to filter the contacts with jquery.textcomplete *}} + diff --git a/view/theme/frio/templates/contact/list.tpl b/view/theme/frio/templates/contact/list.tpl new file mode 100644 index 0000000000..5a1ac026bf --- /dev/null +++ b/view/theme/frio/templates/contact/list.tpl @@ -0,0 +1,17 @@ + +{{* This is the standard template for showing contact lists. It is used e.g. +at the suggest page and also at many other places *}} + +{{include file="section_title.tpl"}} + +{{$tab_str nofilter}} + + +
+
+ +{{$paginate nofilter}} diff --git a/view/theme/frio/templates/contact_drop_confirm.tpl b/view/theme/frio/templates/contact_drop_confirm.tpl index a0ac15cf6d..e4c0a35638 100644 --- a/view/theme/frio/templates/contact_drop_confirm.tpl +++ b/view/theme/frio/templates/contact_drop_confirm.tpl @@ -1,7 +1,7 @@

{{$l10n.header}}

- {{include file="contact_template.tpl" no_contacts_checkbox=True}} + {{include file="contact/entry.tpl" no_contacts_checkbox=True}} {{include file="confirm.tpl"}} diff --git a/view/theme/frio/templates/contact_template.tpl b/view/theme/frio/templates/contact_template.tpl deleted file mode 100644 index 0cd55f8d3e..0000000000 --- a/view/theme/frio/templates/contact_template.tpl +++ /dev/null @@ -1,233 +0,0 @@ - -
- - {{* This is a wrapper for the contact picture *}} - - -
- {{if $contact.photo_menu}} - {{* The contact actions like private mail, delete contact, edit contact and so on *}} - - {{/if}} - - {{* The button to add or remove contacts from a contact group - group edit page *}} - {{if $contact.change_member}} - - {{/if}} - - {{* The contact description (e.g. Name, Network, kind of connection and so on *}} -
-
-

{{$contact.name}} - {{if $contact.account_type}} ({{$contact.account_type}}){{/if}} - {{if $contact.account_type == 'Forum'}}{{/if}} - {{* @todo this needs some changing in core because $contact.account_type contains a translated string which may notbe the same in every language *}} -

-
- {{if $contact.alt_text}}
{{$contact.alt_text}}
{{/if}} - {{if $contact.itemurl}}
{{$contact.itemurl}}
{{/if}} - {{if $contact.tags}}
{{$contact.tags}}
{{/if}} - {{if $contact.details}}{{/if}} - {{if $contact.network}}
{{$contact.network}}
{{/if}} -
- - {{* The checkbox to perform batch actions to these contacts (for batch actions have a look at contacts-template.tpl) *}} - {{* if !$no_contacts_checkbox *}} - {{if $multiselect}} -
- - -
- {{/if}} -
- -
- - -{{* the following part is a nearly a copy of the part above but it is modified for working with js. -We use this part to filter the contacts with jquery.textcomplete *}} - diff --git a/view/theme/frio/templates/contacts-template.tpl b/view/theme/frio/templates/contacts-template.tpl index f13f108340..5c41c74e25 100644 --- a/view/theme/frio/templates/contacts-template.tpl +++ b/view/theme/frio/templates/contacts-template.tpl @@ -49,10 +49,10 @@
- {{* format each contact with the contact_template.tpl *}} + {{* format each contact with the contact/entry.tpl *}}
    {{foreach $contacts as $contact}} -
  • {{include file="contact_template.tpl"}}
  • +
  • {{include file="contact/entry.tpl"}}
  • {{/foreach}}
diff --git a/view/theme/frio/templates/directory_header.tpl b/view/theme/frio/templates/directory_header.tpl index cef6208ad0..2c271ffeaa 100644 --- a/view/theme/frio/templates/directory_header.tpl +++ b/view/theme/frio/templates/directory_header.tpl @@ -28,10 +28,10 @@
- {{* format each contact with the contact_template.tpl *}} + {{* format each contact with the contact/entry.tpl *}} diff --git a/view/theme/frio/templates/groupeditor.tpl b/view/theme/frio/templates/groupeditor.tpl index 8d1db5b222..5ec1571147 100644 --- a/view/theme/frio/templates/groupeditor.tpl +++ b/view/theme/frio/templates/groupeditor.tpl @@ -6,12 +6,12 @@ {{* The contacts who are already members of the contact group *}} {{foreach $groupeditor.members as $contact}} -
  • {{include file="contact_template.tpl"}}
  • +
  • {{include file="contact/entry.tpl"}}
  • {{/foreach}} {{* The contacts who are not members of the contact group *}} {{foreach $groupeditor.contacts as $contact}} -
  • {{include file="contact_template.tpl"}}
  • +
  • {{include file="contact/entry.tpl"}}
  • {{/foreach}} diff --git a/view/theme/frio/templates/profile/contacts.tpl b/view/theme/frio/templates/profile/contacts.tpl index 513223f318..4a313e774f 100644 --- a/view/theme/frio/templates/profile/contacts.tpl +++ b/view/theme/frio/templates/profile/contacts.tpl @@ -10,7 +10,7 @@ {{if $contacts}} {{else}} diff --git a/view/theme/frio/templates/viewcontact_template.tpl b/view/theme/frio/templates/viewcontact_template.tpl deleted file mode 100644 index 90f286558d..0000000000 --- a/view/theme/frio/templates/viewcontact_template.tpl +++ /dev/null @@ -1,17 +0,0 @@ - -{{* This is the standard template for showing contact lists. It is used e.g. -at the suggest page and also at many other places *}} - -{{include file="section_title.tpl"}} - -{{$tab_str nofilter}} - - -
    -
    - -{{$paginate nofilter}} diff --git a/view/theme/quattro/templates/contact/entry.tpl b/view/theme/quattro/templates/contact/entry.tpl new file mode 100644 index 0000000000..13eea60de0 --- /dev/null +++ b/view/theme/quattro/templates/contact/entry.tpl @@ -0,0 +1,45 @@ + +
    + {{if $contact.ignlnk}}{{/if}} +
    +
    + + {{$contact.name}} + + {{if $multiselect}} + + {{/if}} + {{if $contact.photo_menu}} + menu + + {{/if}} +
    + +
    +
    + {{$contact.name}} + {{if $contact.account_type}} ({{$contact.account_type}}){{/if}} +
    + {{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}} + {{if $contact.itemurl}}
    {{$contact.itemurl}}
    {{/if}} + {{if $contact.tags}}
    {{$contact.tags}}
    {{/if}} + {{if $contact.details}}
    {{$contact.details}}
    {{/if}} + {{if $contact.network}}
    {{$contact.network}}
    {{/if}} + + {{if $contact.connlnk}} +
    {{$contact.conntxt}}
    + {{/if}} + + +
    + diff --git a/view/theme/quattro/templates/contact_template.tpl b/view/theme/quattro/templates/contact_template.tpl deleted file mode 100644 index 13eea60de0..0000000000 --- a/view/theme/quattro/templates/contact_template.tpl +++ /dev/null @@ -1,45 +0,0 @@ - -
    - {{if $contact.ignlnk}}{{/if}} -
    -
    - - {{$contact.name}} - - {{if $multiselect}} - - {{/if}} - {{if $contact.photo_menu}} - menu - - {{/if}} -
    - -
    -
    - {{$contact.name}} - {{if $contact.account_type}} ({{$contact.account_type}}){{/if}} -
    - {{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}} - {{if $contact.itemurl}}
    {{$contact.itemurl}}
    {{/if}} - {{if $contact.tags}}
    {{$contact.tags}}
    {{/if}} - {{if $contact.details}}
    {{$contact.details}}
    {{/if}} - {{if $contact.network}}
    {{$contact.network}}
    {{/if}} - - {{if $contact.connlnk}} -
    {{$contact.conntxt}}
    - {{/if}} - - -
    - diff --git a/view/theme/vier/templates/contact/entry.tpl b/view/theme/vier/templates/contact/entry.tpl new file mode 100644 index 0000000000..e99aab93d2 --- /dev/null +++ b/view/theme/vier/templates/contact/entry.tpl @@ -0,0 +1,49 @@ + +
    +
    +
    + + + + {{$contact.name}} + + {{if $multiselect}} + + {{/if}} + {{if $contact.photo_menu}} + +
    +
      + {{foreach $contact.photo_menu as $k=>$c}} + {{if $c.2}} +
    • {{$c.0}}
    • + {{else}} +
    • {{$c.0}}
    • + {{/if}} + {{/foreach}} +
    +
    + {{/if}} +
    + +
    +
    + +
    +
    + {{$contact.name}} + {{if $contact.account_type}} ({{$contact.account_type}}){{/if}} +
    + {{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}} +
    + {{if $contact.itemurl}}{{$contact.itemurl}}{{/if}} + {{if $contact.network}} ({{$contact.network}}){{/if}} +
    + {{if $contact.tags}}
    {{$contact.tags}}
    {{/if}} + {{if $contact.details}}
    {{$contact.details}}
    {{/if}} +
    + + +
    +
    diff --git a/view/theme/vier/templates/contact_template.tpl b/view/theme/vier/templates/contact_template.tpl deleted file mode 100644 index e99aab93d2..0000000000 --- a/view/theme/vier/templates/contact_template.tpl +++ /dev/null @@ -1,49 +0,0 @@ - -
    -
    -
    - - - - {{$contact.name}} - - {{if $multiselect}} - - {{/if}} - {{if $contact.photo_menu}} - -
    -
      - {{foreach $contact.photo_menu as $k=>$c}} - {{if $c.2}} -
    • {{$c.0}}
    • - {{else}} -
    • {{$c.0}}
    • - {{/if}} - {{/foreach}} -
    -
    - {{/if}} -
    - -
    -
    - -
    -
    - {{$contact.name}} - {{if $contact.account_type}} ({{$contact.account_type}}){{/if}} -
    - {{if $contact.alt_text}}
    {{$contact.alt_text}}
    {{/if}} -
    - {{if $contact.itemurl}}{{$contact.itemurl}}{{/if}} - {{if $contact.network}} ({{$contact.network}}){{/if}} -
    - {{if $contact.tags}}
    {{$contact.tags}}
    {{/if}} - {{if $contact.details}}
    {{$contact.details}}
    {{/if}} -
    - - -
    -