From 125186c795a8a979cb4016f54688ceaf89ad8c90 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 25 Jan 2020 15:58:16 -0500 Subject: [PATCH 1/3] Remove profile field tabs/panels - Address https://github.com/friendica/friendica/issues/8164 --- view/templates/profile/index.tpl | 149 +++++++++++++------------------ 1 file changed, 64 insertions(+), 85 deletions(-) diff --git a/view/templates/profile/index.tpl b/view/templates/profile/index.tpl index 8ad4d5eba..60bf46b99 100644 --- a/view/templates/profile/index.tpl +++ b/view/templates/profile/index.tpl @@ -28,97 +28,76 @@
{{/if}} +
+
{{$basic_fields.fullname.label}}
+
{{$basic_fields.fullname.value}}
+
- {{* Frio does split the profile information in "standard" and "advanced". This is the tab menu for switching between this modes *}} - {{if count($custom_fields)}} - - {{/if}} +{{if $basic_fields.membersince}} +
+
+
{{$basic_fields.membersince.label}}
+
{{$basic_fields.membersince.value}}
+
+{{/if}} -
-
-
-
{{$basic_fields.fullname.label}}
-
{{$basic_fields.fullname.value}}
-
+{{if $basic_fields.birthday}} +
+
+
{{$basic_fields.birthday.label}}
+
{{$basic_fields.birthday.value}}
+
+{{/if}} - {{if $basic_fields.membersince}} -
-
-
{{$basic_fields.membersince.label}}
-
{{$basic_fields.membersince.value}}
-
- {{/if}} +{{if $basic_fields.age}} +
+
+
{{$basic_fields.age.label}}
+
{{$basic_fields.age.value}}
+
+{{/if}} - {{if $basic_fields.birthday}} -
-
-
{{$basic_fields.birthday.label}}
-
{{$basic_fields.birthday.value}}
-
- {{/if}} +{{if $basic_fields.location}} +
+
+
{{$basic_fields.location.label}}
+
{{$basic_fields.location.value}}
+
+{{/if}} - {{if $basic_fields.age}} -
-
-
{{$basic_fields.age.label}}
-
{{$basic_fields.age.value}}
-
- {{/if}} +{{if $basic_fields.homepage}} +
+
+
{{$basic_fields.homepage.label}}
+
{{$basic_fields.homepage.value nofilter}}
+
+{{/if}} - {{if $basic_fields.location}} -
-
-
{{$basic_fields.location.label}}
-
{{$basic_fields.location.value}}
-
- {{/if}} +{{if $basic_fields.xmpp}} +
+
+
{{$basic_fields.xmpp.label}}
+
{{$basic_fields.xmpp.value nofilter}}
+
+{{/if}} - {{if $basic_fields.homepage}} -
-
-
{{$basic_fields.homepage.label}}
-
{{$basic_fields.homepage.value nofilter}}
-
- {{/if}} +{{if $basic_fields.pub_keywords}} +
+
+
{{$basic_fields.pub_keywords.label}}
+
+ {{foreach $basic_fields.pub_keywords.value as $tag}} + {{$tag.label}} + {{/foreach}} +
+
+{{/if}} - {{if $basic_fields.xmpp}} -
-
-
{{$basic_fields.xmpp.label}}
-
{{$basic_fields.xmpp.value nofilter}}
-
- {{/if}} - - {{if $basic_fields.pub_keywords}} -
-
-
{{$basic_fields.pub_keywords.label}}
-
- {{foreach $basic_fields.pub_keywords.value as $tag}} - {{$tag.label}} - {{/foreach}} -
-
- {{/if}} -
- - {{if count($custom_fields)}} -
- {{foreach $custom_fields as $custom_field}} -
-
-
{{$custom_field.label}}
-
{{$custom_field.value nofilter}}
-
- {{/foreach}} -
- {{/if}} -
+{{foreach $custom_fields as $custom_field}} +
+
+
{{$custom_field.label}}
+
{{$custom_field.value nofilter}}
+
+{{/foreach}} From 5c05d28a8eeab55366322e61f26cb5b5eda96b46 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 25 Jan 2020 16:23:09 -0500 Subject: [PATCH 2/3] Increase argument counter after route change in Module\Profile\Status - Address https://github.com/friendica/friendica/pull/8156#issuecomment-578302294 --- src/Module/Profile/Status.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Profile/Status.php b/src/Module/Profile/Status.php index 1300fdc97..0047f27ed 100644 --- a/src/Module/Profile/Status.php +++ b/src/Module/Profile/Status.php @@ -42,8 +42,8 @@ class Status extends BaseModule $dtFormat = DI::dtFormat(); - if ($args->getArgc() > 2) { - for ($x = 2; $x < $args->getArgc(); $x++) { + if ($args->getArgc() > 3) { + for ($x = 3; $x < $args->getArgc(); $x++) { if ($dtFormat->isYearMonth($args->get($x))) { if ($datequery) { $datequery2 = Strings::escapeHtml($args->get($x)); From 602a57577dcba3fe3d54594332e4dbd306375f37 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 25 Jan 2020 16:26:55 -0500 Subject: [PATCH 3/3] Remove duplicate call to Profile::getTabs in Module\Profile\Index - Address https://github.com/friendica/friendica/issues/8167 --- src/Module/Profile/Index.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Module/Profile/Index.php b/src/Module/Profile/Index.php index 95a929d4b..521a682dc 100644 --- a/src/Module/Profile/Index.php +++ b/src/Module/Profile/Index.php @@ -148,7 +148,6 @@ class Index extends BaseModule $basic_fields += self::buildField('homepage', DI::l10n()->t('Homepage:'), HTML::toLink($a->profile['homepage'])); } - $o .= Profile::getTabs($a, 'profile', $is_owner, $a->profile['nickname']); if ( $a->profile['address'] || $a->profile['locality']