]> git.mxchange.org Git - friendica.git/blob - view/templates/widget_forumlist.tpl
Merge remote-tracking branch 'upstream/develop' into private
[friendica.git] / view / templates / widget_forumlist.tpl
1 <script>
2 function showHideForumlist() {
3         if( $("li[id^='forum-widget-entry-extended-']").is(':visible')) {
4                 $("li[id^='forum-widget-entry-extended-']").hide();
5                 $("li#forum-widget-collapse").html(window.showMore);
6
7         }
8         else {
9                 $("li[id^='forum-widget-entry-extended-']").show();
10                 $("li#forum-widget-collapse").html(window.showFewer);
11         }
12 }
13 </script>
14 <span id="forumlist-sidebar-frame">
15 <span id="forumlist-sidebar-inflated" class="widget fakelink" onclick="openCloseWidget('forumlist-sidebar', 'forumlist-sidebar-inflated');">
16         <h3>{{$title}}</h3>
17 </span>
18 <div id="forumlist-sidebar" class="widget">
19         <span class="fakelink" onclick="openCloseWidget('forumlist-sidebar', 'forumlist-sidebar-inflated');">
20                 <h3 id="forumlist">{{$title}}</h3>
21         </span>
22         <ul id="forumlist-sidbar-ul" role="menu">
23                 {{foreach $forums as $forum}}
24                 {{if $forum.id <= $visible_forums}}
25                 <li class="forum-widget-entry forum-{{$forum.cid}}" id="forum-widget-entry-{{$forum.id}}" role="menuitem">
26                         <span class="notify badge pull-right"></span>
27                         <a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank" rel="noopener noreferrer">
28                                 <img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
29                         </a>
30                         <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
31                 </li>
32                 {{/if}}
33         
34                 {{if $forum.id > $visible_forums}}
35                 <li class="forum-widget-entry forum-{{$forum.cid}}" id="forum-widget-entry-extended-{{$forum.id}}" role="menuitem" style="display: none;">
36                         <span class="notify badge pull-right"></span>
37                         <a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank" rel="noopener noreferrer">
38                                 <img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
39                         </a>
40                         <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
41                 </li>
42                 {{/if}}
43                 {{/foreach}}
44
45                 {{if $total > $visible_forums }}
46                 <li onclick="showHideForumlist(); return false;" id="forum-widget-collapse" class="forum-widget-link fakelink tool">{{$showmore}}</li>
47                 {{/if}}
48         </ul>
49 </div>
50 </span>
51 <script>
52 initWidget('forumlist-sidebar', 'forumlist-sidebar-inflated');
53 </script>