forked from CMU-313/cmu-313-f24-nodebb-f24-NodeBB
-
Notifications
You must be signed in to change notification settings - Fork 1
/
topic-list-bar.tpl
62 lines (56 loc) · 3.09 KB
/
topic-list-bar.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<div class="{{{ if config.theme.stickyToolbar }}}sticky-tools{{{ end }}} mb-3">
<nav class="topic-list-header d-flex flex-nowrap my-2 p-0 border-0 rounded">
<div class="d-flex flex-row p-2 text-bg-light gap-1 border rounded w-100 align-items-center">
<div component="category/controls" class="d-flex me-auto mb-0 gap-2 flex-wrap">
{{{ if template.category }}}
<!-- IMPORT partials/category/watch.tpl -->
<!-- IMPORT partials/tags/filter-dropdown-left.tpl -->
<!-- IMPORT partials/category/sort.tpl -->
{{{ end }}}
{{{ if (template.popular || template.top)}}}
<!-- IMPORT partials/topic-terms.tpl -->
{{{ end }}}
{{{ if (template.unread || (template.recent || (template.popular || template.top))) }}}
<!-- IMPORT partials/topic-filters.tpl -->
<!-- IMPORT partials/category/filter-dropdown-left.tpl -->
<!-- IMPORT partials/tags/filter-dropdown-left.tpl -->
{{{ end }}}
{{{ if template.unread }}}
<div class="markread btn-group {{{ if !topics.length }}}hidden{{{ end }}}">
<!-- IMPORT partials/category/selector-dropdown-left.tpl -->
</div>
{{{ end }}}
{{{ if template.tag }}}
<!-- IMPORT partials/category/filter-dropdown-left.tpl -->
<!-- IMPORT partials/tags/watch.tpl -->
{{{ end }}}
<!-- IMPORT partials/category/tools.tpl -->
{{{ if (!feeds:disableRSS && rssFeedUrl) }}}
<a class="btn-ghost-sm d-none d-lg-flex align-self-stretch" target="_blank" href="{rssFeedUrl}" itemprop="item" title="[[global:rss-feed]]"><i class="fa fa-rss text-primary"></i></a>
{{{ end }}}
<a href="{{{ if template.category }}}{url}{{{ else }}}{config.relative_path}/{selectedFilter.url}{querystring}{{{ end }}}" class="btn btn-secondary fw-semibold position-absolute top-100 translate-middle-x start-50 mt-1 hide" style="--bs-btn-padding-y: .25rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .75rem;" id="new-topics-alert">
<i class="fa fa-fw fa-arrow-up"></i> [[recent:load-new-posts]]
</a>
</div>
<div class="d-flex gap-1 align-items-center">
{{{ if template.category }}}
{{{ if privileges.topics:create }}}
<div class="input-group">
<input type="text" class="form-control form-control-sm" placeholder="Search" id="group-search">
<span class="input-group-text search-button"><i class="fa fa-search"></i></span>
</div>
<a href="{config.relative_path}/compose?cid={cid}" component="category/post" id="new_topic" class="btn btn-primary btn-sm text-nowrap" data-ajaxify="false" role="button">[[category:new-topic-button]]</a>
{{{ end }}}
{{{ else }}}
{{{ if canPost }}}
<!-- IMPORT partials/buttons/newTopic.tpl -->
{{{ end }}}
{{{ end }}}
<!-- only show login button if not logged in and doesn't have any posting privilege -->
{{{ if (!loggedIn && (!privileges.topics:create && !canPost))}}}
<a component="category/post/guest" href="{config.relative_path}/login" class="btn btn-sm btn-primary">[[category:guest-login-post]]</a>
{{{ end }}}
</div>
</div>
</nav>
</div>