linklist.html 11 KB

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