]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - tpl/default/linklist.html
namespacing: \Shaarli\FileUtils
[github/shaarli/Shaarli.git] / tpl / default / linklist.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 {include="includes"}
5 </head>
6 <body>
7 {include="page.header"}
8
9 <div class="linkcount pure-u-0 pure-u-lg-visible">
10 {if="!empty($linkcount)"}
11 <span class="strong">{$linkcount}</span> {function="t('shaare', 'shaares', $linkcount)"}
12 {if="$privateLinkcount>0"}
13 <br><span class="strong">{$privateLinkcount}</span> {function="t('private link', 'private links', $privateLinkcount)"}
14 {/if}
15 {/if}
16 </div>
17
18 <input type="hidden" name="token" value="{$token}">
19 <div id="search-linklist" class="searchform-block search-linklist">
20
21 <form method="GET" class="pure-form searchform" name="searchform">
22 <input type="text" tabindex="1" name="searchterm" class="searchterm" placeholder="{'Search text'|t}"
23 {if="!empty($search_term)"}
24 value="{$search_term}"
25 {/if}
26 >
27 <input type="text" tabindex="2" name="searchtags" class="searchtags" placeholder="{'Filter by tag'|t}"
28 {if="!empty($search_tags)"}
29 value="{$search_tags}"
30 {/if}
31 autocomplete="off" data-multiple data-autofirst data-minChars="1"
32 data-list="{loop="$tags"}{$key}, {/loop}"
33 >
34 <button type="submit" class="search-button"><i class="fa fa-search"></i></button>
35 </form>
36 </div>
37
38 {loop="$plugins_header.fields_toolbar"}
39 <form
40 {loop="$value.attr"}
41 {$key}="{$value}"
42 {/loop}>
43 <div class="toolbar-plugin pure-u-lg-1">
44 {loop="$value.inputs"}
45 <input
46 {loop="$value"}
47 {$key}="{$value}"
48 {/loop}>
49 {/loop}
50 </div>
51 </form>
52 {/loop}
53
54 <div id="linklist">
55 <div id="link-count-block" class="pure-g">
56 <div class="pure-u-lg-2-24 pure-u-1-24"></div>
57 <div id="link-count-content" class="pure-u-lg-20-24 pure-u-22-24">
58 <div class="linkcount pure-u-lg-0 center">
59 {if="!empty($linkcount)"}
60 <span class="strong">{$linkcount}</span> {function="t('shaare', 'shaares', $linkcount)"}
61 {if="$privateLinkcount>0"}
62 &middot; <span class="strong">{$privateLinkcount}</span> {function="t('private link', 'private links', $privateLinkcount)"}
63 {/if}
64 {/if}
65 </div>
66
67 {include="linklist.paging"}
68
69 <div id="plugin_zone_start_linklist" class="plugin_zone">
70 {loop="$plugin_start_zone"}
71 {$value}
72 {/loop}
73 </div>
74 </div>
75 </div>
76
77 {if="count($links)==0"}
78 <div id="search-result-block" class="pure-g pure-alert pure-alert-error search-result">
79 <div class="pure-u-2-24"></div>
80 <div id="search-result-content" class="pure-u-20-24">
81 <div id="searchcriteria">{'Nothing found.'|t}</div>
82 </div>
83 </div>
84 {elseif="!empty($search_term) or $search_tags !== '' or !empty($visibility) or $untaggedonly"}
85 <div id="search-result-block" class="pure-g pure-alert pure-alert-success search-result">
86 <div class="pure-u-2-24"></div>
87 <div id="search-result-content" class="pure-u-20-24 search-result-main">
88 {function="sprintf(t('%s result', '%s results', $result_count), $result_count)"}
89 {if="!empty($search_term)"}
90 {'for'|t} <em><strong>{$search_term}</strong></em>
91 {/if}
92 {if="!empty($search_tags)"}
93 {$exploded_tags=explode(' ', $search_tags)}
94 {'tagged'|t}
95 {loop="$exploded_tags"}
96 <span class="label label-tag" title="{'Remove tag'|t}">
97 <a href="?removetag={function="urlencode($value)"}">{$value}<span class="remove"><i class="fa fa-times"></i></span></a>
98 </span>
99 {/loop}
100 {/if}
101 {if="!empty($visibility)"}
102 {'with status'|t}
103 <span class="label label-private">
104 {$visibility|t}
105 </span>
106 {/if}
107 {if="$untaggedonly"}
108 <span class="label label-private">
109 {'without any tag'|t}
110 </span>
111 {/if}
112 </div>
113 </div>
114 {/if}
115
116 <div id="linklist-loop-block" class="pure-g">
117 <div class="pure-u-lg-2-24 pure-u-1-24"></div>
118 <div id="linklist-loop-content" class="pure-u-lg-20-24 pure-u-22-24">
119 {ignore}Set translation here, for performances{/ignore}
120 {$strPrivate=t('Private')}
121 {$strEdit=t('Edit')}
122 {$strDelete=t('Delete')}
123 {$strFold=t('Fold')}
124 {$strEdited=t('Edited: ')}
125 {$strPermalink=t('Permalink')}
126 {$strPermalinkLc=t('permalink')}
127 {$strAddTag=t('Add tag')}
128 {$strToggleSticky=t('Toggle sticky')}
129 {$strSticky=t('Sticky')}
130 {ignore}End of translations{/ignore}
131 {loop="links"}
132 <div class="anchor" id="{$value.shorturl}"></div>
133
134 <div class="linklist-item linklist-item{if="$value.class"} {$value.class}{/if}" data-id="{$value.id}">
135 <div class="linklist-item-title">
136 {if="$thumbnails_enabled && !empty($value.thumbnail)"}
137 <div class="linklist-item-thumbnail" style="width:{$thumbnails_width}px;height:{$thumbnails_height}px;">
138 <div class="thumbnail">
139 <a href="{$value.real_url}">
140 {ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore}
141 <img data-src="{$value.thumbnail}#" class="b-lazy"
142 src=""
143 alt="thumbnail" width="{$thumbnails_width}" height="{$thumbnails_height}" />
144 </a>
145 </div>
146 </div>
147 {/if}
148
149 {if="$is_logged_in"}
150 <div class="linklist-item-editbuttons">
151 {if="$value.private"}
152 <span class="label label-private">{$strPrivate}</span>
153 {/if}
154 </div>
155 {/if}
156
157 <h2>
158 <a href="{$value.real_url}">
159 {if="strpos($value.url, $value.shorturl) === false"}
160 <i class="fa fa-external-link"></i>
161 {else}
162 <i class="fa fa-sticky-note"></i>
163 {/if}
164
165 <span class="linklist-link">{$value.title}</span>
166 </a>
167 </h2>
168 </div>
169
170 {if="$value.description"}
171 <div class="linklist-item-description">
172 {$value.description}
173 </div>
174 {/if}
175
176 <div class="linklist-item-infos clear">
177 {if="$value.tags"}
178 <div class="linklist-item-tags">
179 <i class="fa fa-tags"></i>
180 {$tag_counter=count($value.taglist)}
181 {loop="value.taglist"}
182 <span class="label label-tag" title="{$strAddTag}">
183 <a href="?addtag={$value|urlencode}">{$value}</a>
184 </span>
185 {if="$tag_counter - 1 != $counter"}&middot;{/if}
186 {/loop}
187 </div>
188 {/if}
189
190 <div class="linklist-item-infos-date-url-block pure-g">
191 <div class="linklist-item-infos-dateblock pure-u-lg-7-12 pure-u-1">
192 {if="$is_logged_in"}
193 <div class="linklist-item-infos-controls-group pure-u-0 pure-u-lg-visible">
194 <span class="linklist-item-infos-controls-item ctrl-checkbox">
195 <input type="checkbox" class="link-checkbox" value="{$value.id}">
196 </span>
197 <span class="linklist-item-infos-controls-item ctrl-edit">
198 <a href="?edit_link={$value.id}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link"></i></a>
199 </span>
200 <span class="linklist-item-infos-controls-item ctrl-delete">
201 <a href="?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}"
202 title="{$strDelete}" class="delete-link pure-u-0 pure-u-lg-visible confirm-delete">
203 <i class="fa fa-trash"></i>
204 </a>
205 </span>
206 <span class="linklist-item-infos-controls-item ctrl-pin">
207 <a href="?do=pin&amp;id={$value.id}&amp;token={$token}"
208 title="{$strToggleSticky}" class="pin-link {if="$value.sticky"}pinned-link{/if} pure-u-0 pure-u-lg-visible">
209 <i class="fa fa-thumb-tack"></i>
210 </a>
211 </span>
212 </div>
213 {else}
214 {if="$value.sticky"}
215 <div class="linklist-item-infos-controls-group pure-u-0 pure-u-lg-visible">
216 <span class="linklist-item-infos-controls-item ctrl-pin">
217 <span title="{$strSticky}" class="pin-link pinned-link pure-u-0 pure-u-lg-visible">
218 <i class="fa fa-thumb-tack"></i>
219 </span>
220 </span>
221 </div>
222 {/if}
223 {/if}
224 <a href="?{$value.shorturl}" title="{$strPermalink}">
225 {if="!$hide_timestamps || $is_logged_in"}
226 {$updated=$value.updated_timestamp ? $strEdited. format_date($value.updated) : $strPermalink}
227 <span class="linkdate" title="{$updated}">
228 <i class="fa fa-clock-o"></i>
229 {$value.created|format_date}
230 {if="$value.updated_timestamp"}*{/if}
231 &middot;
232 </span>
233 {/if}
234 {$strPermalinkLc}
235 </a>
236
237 <div class="pure-u-0 pure-u-lg-visible">
238 {if="isset($value.link_plugin)"}
239 &middot;
240 {$link_plugin_counter=count($value.link_plugin)}
241 {loop="$value.link_plugin"}
242 {$value}
243 {if="$link_plugin_counter - 1 != $counter"}&middot;{/if}
244 {/loop}
245 {/if}
246 </div>
247 </div><div
248 {ignore}do not add space or line break between these div - Firefox issue{/ignore}
249 class="linklist-item-infos-url pure-u-lg-5-12 pure-u-1">
250 <a href="{$value.real_url}" title="{$value.title}">
251 <i class="fa fa-link"></i> {$value.url}
252 </a>
253 <div class="linklist-item-buttons pure-u-0 pure-u-lg-visible">
254 <a href="#" title="{$strFold}" class="fold-button"><i class="fa fa-chevron-up"></i></a>
255 </div>
256 </div>
257 <div class="mobile-buttons pure-u-1 pure-u-lg-0">
258 {if="isset($value.link_plugin)"}
259 {$link_plugin_counter=count($value.link_plugin)}
260 {loop="$value.link_plugin"}
261 {$value}
262 {if="$link_plugin_counter - 1 != $counter"}&middot;{/if}
263 {/loop}
264 {/if}
265 {if="$is_logged_in"}
266 &middot;
267 <a href="?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}"
268 title="{$strDelete}" class="delete-link confirm-delete">
269 <i class="fa fa-trash"></i>
270 </a>
271 &middot;
272 <a href="?edit_link={$value.id}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link"></i></a>
273 {/if}
274 </div>
275 </div>
276 </div>
277 </div>
278 {/loop}
279 </div>
280 </div>
281 </div>
282
283 <div id="plugin_zone_end_linklist" class="plugin_zone">
284 {loop="$plugin_end_zone"}
285 {$value}
286 {/loop}
287 </div>
288
289 <div id="linklist-paging-bottom-block" class="pure-g">
290 <div class="pure-u-lg-2-24 pure-u-1-24"></div>
291 <div id="linklist-paging-bottom-content" class="pure-u-lg-20-24 pure-u-22-24">
292 {include="linklist.paging"}
293 </div>
294 </div>
295
296 {include="page.footer"}
297 <script src="js/thumbnails.min.js?v={$version_hash}"></script>
298 </body>
299 </html>