friendica/view/templates/widget_forumlist.tpl

54 lines
2.3 KiB
Smarty
Raw Normal View History

2015-11-09 14:56:20 +00:00
<script>
function showHideForumlist() {
if( $("li[id^='forum-widget-entry-extended-']").is(':visible')) {
$("li[id^='forum-widget-entry-extended-']").hide();
$("li#forum-widget-collapse").html('{{$showmore}}');
2015-11-09 14:56:20 +00:00
}
else {
$("li[id^='forum-widget-entry-extended-']").show();
$("li#forum-widget-collapse").html('{{$showless}}');
2015-11-09 14:56:20 +00:00
}
}
2015-11-09 14:56:20 +00:00
</script>
<span id="forumlist-sidebar-frame">
2020-01-11 08:41:14 +00:00
<span id="forumlist-sidebar-inflated" class="widget fakelink" onclick="openCloseWidget('forumlist-sidebar', 'forumlist-sidebar-inflated');">
<h3>{{$title}}</h3>
</span>
2020-01-11 08:41:14 +00:00
<div id="forumlist-sidebar" class="widget">
<span class="fakelink" onclick="openCloseWidget('forumlist-sidebar', 'forumlist-sidebar-inflated');">
<h3 id="forumlist">{{$title}}</h3>
</span>
<ul id="forumlist-sidbar-ul" role="menu">
{{foreach $forums as $forum}}
2015-11-09 14:56:20 +00:00
{{if $forum.id <= $visible_forums}}
<li class="forum-widget-entry forum-{{$forum.cid}}" id="forum-widget-entry-{{$forum.id}}" role="menuitem">
<span class="notify badge pull-right"></span>
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank" rel="noopener noreferrer">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
2015-11-09 14:56:20 +00:00
</a>
<a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
</li>
2015-11-09 14:56:20 +00:00
{{/if}}
{{if $forum.id > $visible_forums}}
<li class="forum-widget-entry forum-{{$forum.cid}}" id="forum-widget-entry-extended-{{$forum.id}}" role="menuitem" style="display: none;">
<span class="notify badge pull-right"></span>
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank" rel="noopener noreferrer">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
2015-11-09 14:56:20 +00:00
</a>
<a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
</li>
2015-11-09 14:56:20 +00:00
{{/if}}
{{/foreach}}
2015-11-09 14:56:20 +00:00
{{if $total > $visible_forums }}
<li onclick="showHideForumlist(); return false;" id="forum-widget-collapse" class="forum-widget-link fakelink tool">{{$showmore}}</li>
{{/if}}
</ul>
2015-11-11 22:39:14 +00:00
</div>
</span>
2020-01-11 08:41:14 +00:00
<script>
initWidget('forumlist-sidebar', 'forumlist-sidebar-inflated');
</script>