-
Notifications
You must be signed in to change notification settings - Fork 279
/
knowledgebase.tpl
56 lines (50 loc) · 2.16 KB
/
knowledgebase.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
<form role="form" method="post" action="{routePath('knowledgebase-search')}">
<div class="input-group input-group-lg kb-search">
<input type="text" id="inputKnowledgebaseSearch" name="search" class="form-control" placeholder="{$LANG.clientHomeSearchKb}" />
<span class="input-group-btn">
<input type="submit" id="btnKnowledgebaseSearch" class="btn btn-primary btn-input-padded-responsive" value="{$LANG.search}" />
</span>
</div>
</form>
<h2>{$LANG.knowledgebasecategories}</h2>
{if $kbcats}
<div class="row kbcategories">
{foreach from=$kbcats name=kbcats item=kbcat}
<div class="col-sm-4">
<a href="{routePath('knowledgebase-category-view', {$kbcat.id}, {$kbcat.urlfriendlyname})}">
<i class="far fa-folder-open"></i>
{$kbcat.name} ({$kbcat.numarticles})
</a>
{if $kbcat.editLink}
<a href="{$kbcat.editLink}" class="admin-inline-edit">
<i class="fas fa-pencil-alt fa-fw"></i>
{$LANG.edit}
</a>
{/if}
<p>{$kbcat.description}</p>
</div>
{if $smarty.foreach.kbcats.iteration mod 3 == 0}
</div><div class="row kbcategories">
{/if}
{/foreach}
</div>
{else}
{include file="$template/includes/alert.tpl" type="info" msg=$LANG.knowledgebasenoarticles textcenter=true}
{/if}
{if $kbmostviews}
<h2>{$LANG.knowledgebasepopular}</h2>
<div class="kbarticles">
{foreach from=$kbmostviews item=kbarticle}
<a href="{routePath('knowledgebase-article-view', {$kbarticle.id}, {$kbarticle.urlfriendlytitle})}">
<span class="glyphicon glyphicon-file"></span> {$kbarticle.title}
</a>
{if $kbarticle.editLink}
<a href="{$kbarticle.editLink}" class="admin-inline-edit">
<i class="fas fa-pencil-alt fa-fw"></i>
{$LANG.edit}
</a>
{/if}
<p>{$kbarticle.article|truncate:100:"..."}</p>
{/foreach}
</div>
{/if}