-
Notifications
You must be signed in to change notification settings - Fork 9
/
search.tpl
87 lines (70 loc) · 4.52 KB
/
search.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{{ config_load file="{{ $gimme->language->english_name }}.conf" }}
{{ include "_tpl/_html-head.tpl" }}
<body>
{{ include "_tpl/responsive-menu.tpl"}}
<div id="main-container" class="snap-content overthrow">
<div class="container">
{{ include "_tpl/header.tpl" }}
<main id="main">
<div class="row">
<div class="col-lg-8 col-md-8">
<h1 class="page-title">{{ #searchResults# }}</h1>
<div id="content" class="index-page">
{{ list_search_results length="5" order="bypublishdate desc" }}
{{ assign var=articlesConstraints value="`$articlesConstraints` number not `$gimme->article->number`" }}
{{if $gimme->current_list->at_beginning}}
<p>{{ #resultsFor# }} <strong>"{{ $gimme->search_articles_action->search_phrase }}"</strong>.</p>
{{/if}}
<article class="article list">
<div class="row">
<div class="col-lg-4 col-md-5 col-sm-5 col-xs-5">
<a href="{{ uri options="article" }}">
<figure>
{{ include file='_tpl/img/img_cinema.tpl'}}
</figure>
</a>
</div>
<div class="col-lg-8 col-md-7 col-sm-7 col-xs-7">
<a href="{{ uri options='section'}}" class="section-link">{{ $gimme->article->section->name }}</a>
<h4><a href="{{ uri options='article' }}">{{ $gimme->article->name }}</a></h4>
<div class="excerpt">
{{ $gimme->article->deck|truncate:200:"..." }}
</div>
<a href="{{ uri options='article'}}">{{ #more# }}</a>
</div>
</div>
</article>
{{ if $gimme->current_list->at_end }}
{{* PAGINATION *}}
{{ $pages=ceil($gimme->current_list->count/5) }}
{{ $curpage=intval($gimme->url->get_parameter($gimme->current_list_id())) }}
{{ if $pages gt 1 }}
<ul class="pagination">
{{ if $gimme->current_list->has_previous_elements }}<li class="prev"><a href="{{ uripath options="section" }}?{{ urlparameters options="previous_items" }}">«</a></li>{{ /if }}
{{ for $i=0 to $pages - 1 }}
{{ $curlistid=$i*5 }}
{{ $gimme->url->set_parameter($gimme->current_list_id(),$curlistid) }}
{{ if $curlistid != $curpage }}
<li><a href="{{ uripath options="section" }}?{{ urlparameters }}">{{ $i+1 }}</a></li>
{{ else }}
<li class="selected"><a href="{{ uripath options="section" }}?{{ urlparameters }}">{{ $i+1 }}</a></li>
{{ $remi=$i+1 }}
{{ /if }}
{{ /for }}
{{ if $gimme->current_list->has_next_elements }}<li class="next"><a href="{{ uripath options="section" }}?{{ urlparameters options="next_items" }}">»</a></li>{{ /if }}
</ul>
{{ $gimme->url->set_parameter($gimme->current_list_id(),$curpage) }}
{{ /if }}
{{ /if }}
{{ /list_search_results }}
{{ if $gimme->prev_list_empty }}
<p>{{ #noResultsFound# }} <strong>"{{ $gimme->search_articles_action->search_phrase }}"</strong>.</p>
{{ /if }}
</div>
<!-- End Content -->
</div>
{{ include "_tpl/sidebar.tpl" }}
</div>
</main>
{{ include "_tpl/footer.tpl" }}
{{ include "_tpl/_html-footer.tpl" }}