diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-06-13 11:22:14 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | 818b3193ffabec57501e3bdfa997206e3c0671ef (patch) | |
tree | f5a4d3cc23ac367dde617b849561177fc20d767a /tpl/default/linklist.html | |
parent | c22fa57a5505fe95fd01860e3d3dfbb089f869cd (diff) | |
download | Shaarli-818b3193ffabec57501e3bdfa997206e3c0671ef.tar.gz Shaarli-818b3193ffabec57501e3bdfa997206e3c0671ef.tar.zst Shaarli-818b3193ffabec57501e3bdfa997206e3c0671ef.zip |
Explicitly define base and asset path in templates
With the new routes, all pages are not all at the same folder level anymore
(e.g. /shaare and /shaare/123), so we can't just use './' everywhere.
The most consistent way to handle this is to prefix all path with the proper variable,
and handle the actual path in controllers.
Diffstat (limited to 'tpl/default/linklist.html')
-rw-r--r-- | tpl/default/linklist.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index e574a109..89513595 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html | |||
@@ -94,7 +94,7 @@ | |||
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}"> |
97 | <a href="./remove-tag/{function="urlencode($value)"}" aria-label="{'Remove tag'|t}"> | 97 | <a href="{$base_path}/remove-tag/{function="urlencode($value)"}" aria-label="{'Remove tag'|t}"> |
98 | {$value}<span class="remove"><i class="fa fa-times" aria-hidden="true"></i></span> | 98 | {$value}<span class="remove"><i class="fa fa-times" aria-hidden="true"></i></span> |
99 | </a> | 99 | </a> |
100 | </span> | 100 | </span> |
@@ -183,7 +183,7 @@ | |||
183 | {$tag_counter=count($value.taglist)} | 183 | {$tag_counter=count($value.taglist)} |
184 | {loop="value.taglist"} | 184 | {loop="value.taglist"} |
185 | <span class="label label-tag" title="{$strAddTag}"> | 185 | <span class="label label-tag" title="{$strAddTag}"> |
186 | <a href="./add-tag/{$value|urlencode}">{$value}</a> | 186 | <a href="{$base_path}/add-tag/{$value|urlencode}">{$value}</a> |
187 | </span> | 187 | </span> |
188 | {if="$tag_counter - 1 != $counter"}·{/if} | 188 | {if="$tag_counter - 1 != $counter"}·{/if} |
189 | {/loop} | 189 | {/loop} |
@@ -198,16 +198,16 @@ | |||
198 | <input type="checkbox" class="link-checkbox" value="{$value.id}"> | 198 | <input type="checkbox" class="link-checkbox" value="{$value.id}"> |
199 | </span> | 199 | </span> |
200 | <span class="linklist-item-infos-controls-item ctrl-edit"> | 200 | <span class="linklist-item-infos-controls-item ctrl-edit"> |
201 | <a href="?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a> | 201 | <a href="{$base_path}/?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a> |
202 | </span> | 202 | </span> |
203 | <span class="linklist-item-infos-controls-item ctrl-delete"> | 203 | <span class="linklist-item-infos-controls-item ctrl-delete"> |
204 | <a href="?delete_link&lf_linkdate={$value.id}&token={$token}" aria-label="{$strDelete}" | 204 | <a href="{$base_path}/?delete_link&lf_linkdate={$value.id}&token={$token}" aria-label="{$strDelete}" |
205 | title="{$strDelete}" class="delete-link pure-u-0 pure-u-lg-visible confirm-delete"> | 205 | title="{$strDelete}" class="delete-link pure-u-0 pure-u-lg-visible confirm-delete"> |
206 | <i class="fa fa-trash" aria-hidden="true"></i> | 206 | <i class="fa fa-trash" aria-hidden="true"></i> |
207 | </a> | 207 | </a> |
208 | </span> | 208 | </span> |
209 | <span class="linklist-item-infos-controls-item ctrl-pin"> | 209 | <span class="linklist-item-infos-controls-item ctrl-pin"> |
210 | <a href="./?do=pin&id={$value.id}&token={$token}" | 210 | <a href="{$base_path}/?do=pin&id={$value.id}&token={$token}" |
211 | title="{$strToggleSticky}" aria-label="{$strToggleSticky}" class="pin-link {if="$value.sticky"}pinned-link{/if} pure-u-0 pure-u-lg-visible"> | 211 | title="{$strToggleSticky}" aria-label="{$strToggleSticky}" class="pin-link {if="$value.sticky"}pinned-link{/if} pure-u-0 pure-u-lg-visible"> |
212 | <i class="fa fa-thumb-tack" aria-hidden="true"></i> | 212 | <i class="fa fa-thumb-tack" aria-hidden="true"></i> |
213 | </a> | 213 | </a> |
@@ -224,7 +224,7 @@ | |||
224 | </div> | 224 | </div> |
225 | {/if} | 225 | {/if} |
226 | {/if} | 226 | {/if} |
227 | <a href="?{$value.shorturl}" title="{$strPermalink}"> | 227 | <a href="{$base_path}/?{$value.shorturl}" title="{$strPermalink}"> |
228 | {if="!$hide_timestamps || $is_logged_in"} | 228 | {if="!$hide_timestamps || $is_logged_in"} |
229 | {$updated=$value.updated_timestamp ? $strEdited. format_date($value.updated) : $strPermalink} | 229 | {$updated=$value.updated_timestamp ? $strEdited. format_date($value.updated) : $strPermalink} |
230 | <span class="linkdate" title="{$updated}"> | 230 | <span class="linkdate" title="{$updated}"> |
@@ -267,12 +267,12 @@ | |||
267 | {/if} | 267 | {/if} |
268 | {if="$is_logged_in"} | 268 | {if="$is_logged_in"} |
269 | · | 269 | · |
270 | <a href="?delete_link&lf_linkdate={$value.id}&token={$token}" aria-label="{$strDelete}" | 270 | <a href="{$base_path}/?delete_link&lf_linkdate={$value.id}&token={$token}" aria-label="{$strDelete}" |
271 | title="{$strDelete}" class="delete-link confirm-delete"> | 271 | title="{$strDelete}" class="delete-link confirm-delete"> |
272 | <i class="fa fa-trash" aria-hidden="true"></i> | 272 | <i class="fa fa-trash" aria-hidden="true"></i> |
273 | </a> | 273 | </a> |
274 | · | 274 | · |
275 | <a href="?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a> | 275 | <a href="{$base_path}/?edit_link={$value.id}" aria-label="{$strEdit}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link" aria-hidden="true"></i></a> |
276 | {/if} | 276 | {/if} |
277 | </div> | 277 | </div> |
278 | </div> | 278 | </div> |
@@ -297,6 +297,6 @@ | |||
297 | </div> | 297 | </div> |
298 | 298 | ||
299 | {include="page.footer"} | 299 | {include="page.footer"} |
300 | <script src="js/thumbnails.min.js?v={$version_hash}"></script> | 300 | <script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script> |
301 | </body> | 301 | </body> |
302 | </html> | 302 | </html> |