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