diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-22 16:21:03 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-11-05 17:54:42 +0100 |
commit | b3bd8c3e8d367975980043e772f7cd78b7f96bc6 (patch) | |
tree | ec79899ea564c093d8b0578f3e614881a4ea7c3d /tpl/default | |
parent | 48df9f45b8c4b2995c1e04146071628668531b37 (diff) | |
download | Shaarli-b3bd8c3e8d367975980043e772f7cd78b7f96bc6.tar.gz Shaarli-b3bd8c3e8d367975980043e772f7cd78b7f96bc6.tar.zst Shaarli-b3bd8c3e8d367975980043e772f7cd78b7f96bc6.zip |
Feature: support any tag separator
So it allows to have multiple words tags.
Breaking change: commas ',' are no longer a default separator.
Fixes #594
Diffstat (limited to 'tpl/default')
-rw-r--r-- | tpl/default/changetag.html | 23 | ||||
-rw-r--r-- | tpl/default/linklist.html | 2 | ||||
-rw-r--r-- | tpl/default/page.footer.html | 5 | ||||
-rw-r--r-- | tpl/default/tag.cloud.html | 2 |
4 files changed, 28 insertions, 4 deletions
diff --git a/tpl/default/changetag.html b/tpl/default/changetag.html index a5fbd31e..13b7f24a 100644 --- a/tpl/default/changetag.html +++ b/tpl/default/changetag.html | |||
@@ -36,6 +36,29 @@ | |||
36 | <p>{'You can also edit tags in the'|t} <a href="{$base_path}/tags/list?sort=usage">{'tag list'|t}</a>.</p> | 36 | <p>{'You can also edit tags in the'|t} <a href="{$base_path}/tags/list?sort=usage">{'tag list'|t}</a>.</p> |
37 | </div> | 37 | </div> |
38 | </div> | 38 | </div> |
39 | |||
40 | <div class="pure-g"> | ||
41 | <div class="pure-u-lg-1-3 pure-u-1-24"></div> | ||
42 | <div class="page-form page-form-light pure-u-lg-1-3 pure-u-22-24"> | ||
43 | <h2 class="window-title">{"Change tags separator"|t}</h2> | ||
44 | <form method="POST" action="{$base_path}/admin/tags/change-separator" name="changeseparator" id="changeseparator"> | ||
45 | <p> | ||
46 | {'Your current tag separator is'|t} <code>{$tags_separator}</code>{if="!empty($tags_separator_desc)"} ({$tags_separator_desc}){/if}. | ||
47 | </p> | ||
48 | <div> | ||
49 | <input type="text" name="separator" placeholder="{'New separator'|t}" | ||
50 | id="separator"> | ||
51 | </div> | ||
52 | <input type="hidden" name="token" value="{$token}"> | ||
53 | <div> | ||
54 | <input type="submit" value="{'Save'|t}" name="saveseparator"> | ||
55 | </div> | ||
56 | <p> | ||
57 | {'Note that hashtags won\'t fully work with a non-whitespace separator.'|t} | ||
58 | </p> | ||
59 | </form> | ||
60 | </div> | ||
61 | </div> | ||
39 | {include="page.footer"} | 62 | {include="page.footer"} |
40 | </body> | 63 | </body> |
41 | </html> | 64 | </html> |
diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index e1115d49..7208a3b6 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html | |||
@@ -90,7 +90,7 @@ | |||
90 | {'for'|t} <em><strong>{$search_term}</strong></em> | 90 | {'for'|t} <em><strong>{$search_term}</strong></em> |
91 | {/if} | 91 | {/if} |
92 | {if="!empty($search_tags)"} | 92 | {if="!empty($search_tags)"} |
93 | {$exploded_tags=explode(' ', $search_tags)} | 93 | {$exploded_tags=tags_str2array($search_tags, $tags_separator)} |
94 | {'tagged'|t} | 94 | {'tagged'|t} |
95 | {loop="$exploded_tags"} | 95 | {loop="$exploded_tags"} |
96 | <span class="label label-tag" title="{'Remove tag'|t}"> | 96 | <span class="label label-tag" title="{'Remove tag'|t}"> |
diff --git a/tpl/default/page.footer.html b/tpl/default/page.footer.html index 964ffff1..58ca18c5 100644 --- a/tpl/default/page.footer.html +++ b/tpl/default/page.footer.html | |||
@@ -18,8 +18,6 @@ | |||
18 | <div class="pure-u-2-24"></div> | 18 | <div class="pure-u-2-24"></div> |
19 | </div> | 19 | </div> |
20 | 20 | ||
21 | <input type="hidden" name="token" value="{$token}" id="token" /> | ||
22 | |||
23 | {loop="$plugins_footer.endofpage"} | 21 | {loop="$plugins_footer.endofpage"} |
24 | {$value} | 22 | {$value} |
25 | {/loop} | 23 | {/loop} |
@@ -41,4 +39,7 @@ | |||
41 | </div> | 39 | </div> |
42 | 40 | ||
43 | <input type="hidden" name="js_base_path" value="{$base_path}" /> | 41 | <input type="hidden" name="js_base_path" value="{$base_path}" /> |
42 | <input type="hidden" name="token" value="{$token}" id="token" /> | ||
43 | <input type="hidden" name="tags_separator" value="{$tags_separator}" id="tags_separator" /> | ||
44 | |||
44 | <script src="{$asset_path}/js/shaarli.min.js?v={$version_hash}#"></script> | 45 | <script src="{$asset_path}/js/shaarli.min.js?v={$version_hash}#"></script> |
diff --git a/tpl/default/tag.cloud.html b/tpl/default/tag.cloud.html index c067e1d4..01b50b02 100644 --- a/tpl/default/tag.cloud.html +++ b/tpl/default/tag.cloud.html | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | <div id="cloudtag" class="cloudtag-container"> | 49 | <div id="cloudtag" class="cloudtag-container"> |
50 | {loop="tags"} | 50 | {loop="tags"} |
51 | <a href="{$base_path}/?searchtags={$tags_url.$key1} {$search_tags_url}" style="font-size:{$value.size}em;">{$key}</a | 51 | <a href="{$base_path}/?searchtags={$tags_url.$key1}{$tags_separator|urlencode}{$search_tags_url}" style="font-size:{$value.size}em;">{$key}</a |
52 | ><a href="{$base_path}/add-tag/{$tags_url.$key1}" title="{'Filter by tag'|t}" class="count">{$value.count}</a> | 52 | ><a href="{$base_path}/add-tag/{$tags_url.$key1}" title="{'Filter by tag'|t}" class="count">{$value.count}</a> |
53 | {loop="$value.tag_plugin"} | 53 | {loop="$value.tag_plugin"} |
54 | {$value} | 54 | {$value} |