From f72879de0e8a32017d5027260d9a9b4aae825e6a Mon Sep 17 00:00:00 2001 From: Maxim Leshchenko Date: Mon, 24 Jan 2022 14:35:26 +0200 Subject: [PATCH 1/6] Discussions: Fix search bar in group discussion board --- Web/Presenters/templates/Topics/Board.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/Presenters/templates/Topics/Board.xml b/Web/Presenters/templates/Topics/Board.xml index 6d38ea20..1afeabb8 100644 --- a/Web/Presenters/templates/Topics/Board.xml +++ b/Web/Presenters/templates/Topics/Board.xml @@ -14,8 +14,8 @@ {block tabs}
- - + +

From b9f4cedca57ccd878e074667b3aaff2ef503cfb6 Mon Sep 17 00:00:00 2001 From: veselcraft Date: Mon, 24 Jan 2022 16:08:40 +0300 Subject: [PATCH 2/6] Date: Make it more user-friendly --- Web/Util/DateTime.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/Util/DateTime.php b/Web/Util/DateTime.php index 4e01d5f2..3650d722 100644 --- a/Web/Util/DateTime.php +++ b/Web/Util/DateTime.php @@ -32,10 +32,10 @@ class DateTime return $diff->i === 5 ? tr("time_exactly_five_minutes_ago") : tr("time_minutes_ago", $diff->i); } else if($this->timestamp >= strtotime("-1day midnight")) { # Yesterday return tr("time_yesterday") . tr("time_at_sp") . ovk_strftime_safe("%X", $this->timestamp); - } else if(ovk_strftime_safe("%Y", $this->timestamp) === ovk_strftime_safe("%Y")) { # In this year + } else if(ovk_strftime_safe("%Y", $this->timestamp) === ovk_strftime_safe("%Y", time())) { # In this year return ovk_strftime_safe("%e %h ", $this->timestamp) . tr("time_at_sp") . ovk_strftime_safe(" %R %p", $this->timestamp); } else { - return ovk_strftime_safe("%e %B %Y ", $this->timestamp) . tr("time_at_sp") . ovk_strftime_safe(" %X", $this->timestamp); + return ovk_strftime_safe("%e %B %Y ", $this->timestamp) . tr("time_at_sp") . ovk_strftime_safe(" %R %p", $this->timestamp); } } From 4ae74841e0197180045109ea792dff8354633492 Mon Sep 17 00:00:00 2001 From: veselcraft Date: Mon, 24 Jan 2022 16:15:27 +0300 Subject: [PATCH 3/6] Date: Hide seconds if smth was created today or yesterday --- Web/Util/DateTime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Util/DateTime.php b/Web/Util/DateTime.php index 3650d722..2bcb0f9d 100644 --- a/Web/Util/DateTime.php +++ b/Web/Util/DateTime.php @@ -25,7 +25,7 @@ class DateTime if($this->timestamp >= strtotime("midnight")) { # Today if($diff->h >= 1) - return tr("time_today") . tr("time_at_sp") . ovk_strftime_safe("%X", $this->timestamp); + return tr("time_today") . tr("time_at_sp") . ovk_strftime_safe(" %R %p", $this->timestamp); else if($diff->i < 2) return tr("time_just_now"); else From 6c90bd1d0f54f7329f4e03a3846becbf9f04915f Mon Sep 17 00:00:00 2001 From: veselcraft Date: Mon, 24 Jan 2022 16:16:24 +0300 Subject: [PATCH 4/6] Date: Hide seconds if smth was created today or ACTUALLY yesterday --- Web/Util/DateTime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Util/DateTime.php b/Web/Util/DateTime.php index 2bcb0f9d..464f10c9 100644 --- a/Web/Util/DateTime.php +++ b/Web/Util/DateTime.php @@ -31,7 +31,7 @@ class DateTime else return $diff->i === 5 ? tr("time_exactly_five_minutes_ago") : tr("time_minutes_ago", $diff->i); } else if($this->timestamp >= strtotime("-1day midnight")) { # Yesterday - return tr("time_yesterday") . tr("time_at_sp") . ovk_strftime_safe("%X", $this->timestamp); + return tr("time_yesterday") . tr("time_at_sp") . ovk_strftime_safe(" %R %p", $this->timestamp); } else if(ovk_strftime_safe("%Y", $this->timestamp) === ovk_strftime_safe("%Y", time())) { # In this year return ovk_strftime_safe("%e %h ", $this->timestamp) . tr("time_at_sp") . ovk_strftime_safe(" %R %p", $this->timestamp); } else { From bf19fb2ab78c510a34eb1f6dc32ebd1bd9b3376e Mon Sep 17 00:00:00 2001 From: veselcraft Date: Mon, 24 Jan 2022 16:25:56 +0300 Subject: [PATCH 5/6] Notes: Fix 500 error made by @kosfurler :DDDDDDDDDDDDDDD --- Web/Presenters/templates/Notes/View.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/Web/Presenters/templates/Notes/View.xml b/Web/Presenters/templates/Notes/View.xml index 3ba2d33a..dd1e8348 100644 --- a/Web/Presenters/templates/Notes/View.xml +++ b/Web/Presenters/templates/Notes/View.xml @@ -12,6 +12,7 @@ {/block} {block content} + {var author = $note->getOwner()}