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