Merge pull request #13198 from anubis2814/develop
On this date option in the archives
This commit is contained in:
commit
ae45a177a5
3 changed files with 28 additions and 11 deletions
|
@ -470,8 +470,11 @@ class Widget
|
||||||
|
|
||||||
if ($dthen) {
|
if ($dthen) {
|
||||||
// Set the start and end date to the beginning of the month
|
// Set the start and end date to the beginning of the month
|
||||||
|
$cutoffday = $dthen;
|
||||||
|
$thisday = substr($dnow, 4);
|
||||||
$dnow = substr($dnow, 0, 8) . '01';
|
$dnow = substr($dnow, 0, 8) . '01';
|
||||||
$dthen = substr($dthen, 0, 8) . '01';
|
$dthen = substr($dthen, 0, 8) . '01';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Starting with the current month, get the first and last days of every
|
* Starting with the current month, get the first and last days of every
|
||||||
|
@ -491,6 +494,7 @@ class Widget
|
||||||
|
|
||||||
$ret[$dyear][] = [$str, $end_month, $start_month];
|
$ret[$dyear][] = [$str, $end_month, $start_month];
|
||||||
$dnow = DateTimeFormat::utc($dnow . ' -1 month', 'Y-m-d');
|
$dnow = DateTimeFormat::utc($dnow . ' -1 month', 'Y-m-d');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -510,7 +514,10 @@ class Widget
|
||||||
'$url' => $url,
|
'$url' => $url,
|
||||||
'$dates' => $ret,
|
'$dates' => $ret,
|
||||||
'$showless' => DI::l10n()->t('show less'),
|
'$showless' => DI::l10n()->t('show less'),
|
||||||
'$showmore' => DI::l10n()->t('show more')
|
'$showmore' => DI::l10n()->t('show more'),
|
||||||
|
'$onthisdate' => DI::l10n()->t('On this date'),
|
||||||
|
'$thisday' => $thisday,
|
||||||
|
'$cutoffday' => $cutoffday
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 2023.09-dev\n"
|
"Project-Id-Version: 2023.09-dev\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2023-06-05 08:44-0400\n"
|
"POT-Creation-Date: 2023-06-05 22:08-0400\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -1597,7 +1597,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/GroupManager.php:151 src/Content/Nav.php:276
|
#: src/Content/GroupManager.php:151 src/Content/Nav.php:276
|
||||||
#: src/Content/Text/HTML.php:877 src/Content/Widget.php:533
|
#: src/Content/Text/HTML.php:877 src/Content/Widget.php:540
|
||||||
msgid "Groups"
|
msgid "Groups"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1605,12 +1605,12 @@ msgstr ""
|
||||||
msgid "External link to group"
|
msgid "External link to group"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/GroupManager.php:157 src/Content/Widget.php:512
|
#: src/Content/GroupManager.php:157 src/Content/Widget.php:516
|
||||||
msgid "show less"
|
msgid "show less"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/GroupManager.php:158 src/Content/Widget.php:414
|
#: src/Content/GroupManager.php:158 src/Content/Widget.php:414
|
||||||
#: src/Content/Widget.php:513
|
#: src/Content/Widget.php:517
|
||||||
msgid "show more"
|
msgid "show more"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -2185,27 +2185,31 @@ msgid_plural "%d contacts in common"
|
||||||
msgstr[0] ""
|
msgstr[0] ""
|
||||||
msgstr[1] ""
|
msgstr[1] ""
|
||||||
|
|
||||||
#: src/Content/Widget.php:506
|
#: src/Content/Widget.php:510
|
||||||
msgid "Archives"
|
msgid "Archives"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Widget.php:530
|
#: src/Content/Widget.php:518
|
||||||
|
msgid "On this date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/Content/Widget.php:537
|
||||||
msgid "Persons"
|
msgid "Persons"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Widget.php:531
|
#: src/Content/Widget.php:538
|
||||||
msgid "Organisations"
|
msgid "Organisations"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Widget.php:532 src/Model/Contact.php:1651
|
#: src/Content/Widget.php:539 src/Model/Contact.php:1651
|
||||||
msgid "News"
|
msgid "News"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Widget.php:536 src/Module/Settings/Account.php:453
|
#: src/Content/Widget.php:543 src/Module/Settings/Account.php:453
|
||||||
msgid "Account Types"
|
msgid "Account Types"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/Content/Widget.php:537 src/Module/Moderation/BaseUsers.php:69
|
#: src/Content/Widget.php:544 src/Module/Moderation/BaseUsers.php:69
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -31,10 +31,16 @@ function showHideDates() {
|
||||||
</li>
|
</li>
|
||||||
<li id="posted-date-selector-{{$y}}" class="tool posted-date-selector-months" style="display: none;">
|
<li id="posted-date-selector-{{$y}}" class="tool posted-date-selector-months" style="display: none;">
|
||||||
<ul class="datebrowse-ul">
|
<ul class="datebrowse-ul">
|
||||||
|
{{if $y|cat:$thisday >= $cutoffday}}
|
||||||
|
<li class="tool">
|
||||||
|
<a class="datebrowse-link" href="{{$url}}/{{$y|cat:$thisday}}/{{$y|cat:$thisday}}">{{$onthisdate}}</a>
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
{{foreach $arr as $d}}
|
{{foreach $arr as $d}}
|
||||||
<li class="tool">
|
<li class="tool">
|
||||||
<a class="datebrowse-link" href="{{$url}}/{{$d.1}}/{{$d.2}}">{{$d.0}}</a>
|
<a class="datebrowse-link" href="{{$url}}/{{$d.1}}/{{$d.2}}">{{$d.0}}</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue