]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - tpl/linklist.html
Link filter refactoring
[github/shaarli/Shaarli.git] / tpl / linklist.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link type="text/css" rel="stylesheet" href="../inc/awesomplete.css" />
5 {include="includes"}
6 </head>
7 <body>
8 <div id="pageheader">
9 {include="page.header"}
10
11 <div id="headerform" class="search">
12 <form method="GET" class="searchform" name="searchform">
13 <input type="text" tabindex="1" id="searchform_value" name="searchterm" placeholder="Search text"
14 {if="!empty($search_crits) && $search_type=='fulltext'"}
15 value="{$search_crits}"
16 {/if}
17 >
18 <input type="submit" value="Search" class="bigbutton">
19 </form>
20 <form method="GET" class="tagfilter" name="tagfilter">
21 <input type="text" tabindex="2" name="searchtags" id="tagfilter_value" placeholder="Filter by tag"
22 {if="!empty($search_crits) && $search_type=='tags'"}
23 value="{function="implode(' ', $search_crits)"}"
24 {/if}
25 autocomplete="off" class="awesomplete" data-multiple data-minChars="1"
26 data-list="{loop="$tags"}{$key}, {/loop}">
27 >
28 <input type="submit" value="Search" class="bigbutton">
29 </form>
30 {loop="$plugins_header.fields_toolbar"}
31 {$value}
32 {/loop}
33 </div>
34 </div>
35
36 <div id="linklist">
37
38 {include="linklist.paging"}
39
40 <div id="plugin_zone_start_linklist" class="plugin_zone">
41 {loop="$plugin_start_zone"}
42 {$value}
43 {/loop}
44 </div>
45
46 {if="count($links)==0"}
47 <div id="searchcriteria">Nothing found.</i></div>
48 {else}
49 {if="$search_type=='fulltext'"}
50 <div id="searchcriteria">{$result_count} results for <i>{$search_crits}</i></div>
51 {/if}
52 {if="$search_type=='tags'"}
53 <div id="searchcriteria">{$result_count} results for tags <i>
54 {loop="search_crits"}
55 <span class="linktag" title="Remove tag">
56 <a href="?removetag={$value}">{$value} <span class="remove">x</span></a>
57 </span>
58 {/loop}</i></div>
59 {/if}
60 {/if}
61 <ul>
62 {loop="links"}
63 <li{if="$value.class"} class="{$value.class}"{/if}>
64 <a id="{$value.shorturl}"></a>
65 <div class="thumbnail">{$value.url|thumbnail}</div>
66 <div class="linkcontainer">
67 {if="isLoggedIn()"}
68 <div class="linkeditbuttons">
69 <form method="GET" class="buttoneditform">
70 <input type="hidden" name="edit_link" value="{$value.linkdate}">
71 <input type="image" alt="Edit" src="images/edit_icon.png#" title="Edit" class="button_edit">
72 </form><br>
73 <form method="POST" class="buttoneditform">
74 <input type="hidden" name="lf_linkdate" value="{$value.linkdate}">
75 <input type="hidden" name="token" value="{$token}">
76 <input type="hidden" name="delete_link">
77 <input type="image" alt="Delete" src="images/delete_icon.png#" title="Delete"
78 class="button_delete" onClick="return confirmDeleteLink();">
79 </form>
80 </div>
81 {/if}
82 <span class="linktitle">
83 <a href="{$value.real_url}">{$value.title}</a>
84 </span>
85 <br>
86 {if="$value.description"}<div class="linkdescription">{$value.description}</div>{/if}
87 {if="!$GLOBALS['config']['HIDE_TIMESTAMPS'] || isLoggedIn()"}
88 <span class="linkdate" title="Permalink"><a href="?{$value.linkdate|smallHash}">{function="strftime('%c', $value.timestamp)"} - permalink</a> - </span>
89 {else}
90 <span class="linkdate" title="Short link here"><a href="?{$value.shorturl}">permalink</a> - </span>
91 {/if}
92
93 {loop="$value.link_plugin"}
94 <span>{$value}</span> -
95 {/loop}
96
97 <a href="{$value.real_url}"><span class="linkurl" title="Short link">{$value.url}</span></a><br>
98 {if="$value.tags"}
99 <div class="linktaglist">
100 {loop="value.taglist"}<span class="linktag" title="Add tag"><a href="?addtag={$value|urlencode}">{$value}</a></span> {/loop}
101 </div>
102 {/if}
103
104
105 </div>
106 </li>
107 {/loop}
108 </ul>
109
110 <div id="plugin_zone_end_linklist" class="plugin_zone">
111 {loop="$plugin_end_zone"}
112 {$value}
113 {/loop}
114 </div>
115
116 {include="linklist.paging"}
117
118 </div>
119
120 {include="page.footer"}
121
122 <script src="inc/awesomplete.min.js#"></script>
123 <script src="inc/awesomplete-multiple-tags.js#"></script>
124 <script>
125 awesompleteUniqueTag('#tagfilter_value');
126 </script>
127 </body>
128 </html>