friendica-github/view/templates/widget/posted_date.tpl

64 lines
2 KiB
Smarty
Raw Normal View History

2024-08-24 18:23:27 +00:00
{{*
* Copyright (C) 2010-2024, the Friendica project
* SPDX-FileCopyrightText: 2010-2024 the Friendica project
*
* SPDX-License-Identifier: AGPL-3.0-or-later
*}}
2015-05-18 23:03:08 +00:00
<script>
function showHideDates() {
if( $('#posted-date-selector-drop').is(':visible')) {
$('#posted-date-selector-drop').hide();
$('#posted-date-collapse').html('{{$showmore}}');
2017-10-18 22:52:01 +00:00
} else {
$('#posted-date-selector-drop').show();
$('#posted-date-collapse').html('{{$showless}}');
}
}
</script>
2015-05-18 23:03:08 +00:00
<span id="datebrowse-sidebar-inflated" class="widget inflated fakelink" onclick="openCloseWidget('datebrowse-sidebar', 'datebrowse-sidebar-inflated');">
2013-04-23 11:47:57 +00:00
<h3>{{$title}}</h3>
2020-01-11 09:05:43 +00:00
</span>
<div id="datebrowse-sidebar" class="widget">
<span class="fakelink" onclick="openCloseWidget('datebrowse-sidebar', 'datebrowse-sidebar-inflated');">
<h3>{{$title}}</h3>
</span>
2015-05-18 23:03:08 +00:00
<ul id="posted-date-selector" class="datebrowse-ul">
{{foreach $dates as $y => $arr}}
2015-05-18 23:03:08 +00:00
{{if $y == $cutoff_year}}
</ul>
<ul id="posted-date-selector-drop" class="datebrowse-ul" style="display: none;">
{{/if}}
2015-05-18 23:03:08 +00:00
<li id="posted-date-selector-year-{{$y}}" class="tool">
<a class="datebrowse-link" href="#" onclick="openClose('posted-date-selector-{{$y}}'); return false;">{{$y}}</a>
</li>
<li id="posted-date-selector-{{$y}}" class="tool posted-date-selector-months" style="display: none;">
<ul class="datebrowse-ul">
{{if $y|cat:$thisday >= $cutoffday}}
<li class="tool">
2023-06-09 05:39:07 +00:00
<a class="datebrowse-link" href="{{$url}}/{{$y|cat:$nextday}}/{{$y|cat:$thisday}}">{{$onthisdate}}</a>
</li>
{{/if}}
2015-05-18 23:03:08 +00:00
{{foreach $arr as $d}}
<li class="tool">
<a class="datebrowse-link" href="{{$url}}/{{$d.1}}/{{$d.2}}">{{$d.0}}</a>
2015-05-18 23:03:08 +00:00
</li>
2015-05-18 23:03:08 +00:00
{{/foreach}}
</ul>
</li>
2015-05-18 23:03:08 +00:00
{{/foreach}}
</ul>
{{if $cutoff}}
<ul class="datebrowse-ul">
<li onclick="showHideDates(); return false;" id="posted-date-collapse" class="fakelink tool">{{$showmore}}</li>
2015-05-18 23:03:08 +00:00
</ul>
{{/if}}
2015-05-18 23:07:40 +00:00
</div>
2020-01-11 09:05:43 +00:00
<script>
initWidget('datebrowse-sidebar', 'datebrowse-sidebar-inflated');
</script>