feat: refactorer les variables de template en expressions inline pour simplifier la logique et supprimer la variable intermédiaire isCalledFromBookmarklet
This commit is contained in:
parent
9150877d57
commit
65dde10291
@ -16,14 +16,14 @@
|
||||
{$index=""}
|
||||
{/if}
|
||||
{$batchModeValue=empty($batch_mode) ? '0' : '1'}
|
||||
{$readLaterChecked=strpos(' ' . $link.tags . ' ', ' readlater ') != false || strpos(' ' . $link.tags . ' ', ' toread ') != false}
|
||||
{$noteDefaultChecked=$link_is_new && empty($link.url)}
|
||||
{$noteChecked=strpos(' ' . $link.tags . ' ', ' note ') != false || $noteDefaultChecked}
|
||||
{function="($readLaterChecked = strpos(' ' . $link.tags . ' ', ' readlater ') != false || strpos(' ' . $link.tags . ' ', ' toread ') != false) ? '' : ''"}
|
||||
{function="($noteDefaultChecked = $link_is_new && empty($link.url)) ? '' : ''"}
|
||||
{function="($noteChecked = strpos(' ' . $link.tags . ' ', ' note ') != false || $noteDefaultChecked) ? '' : ''"}
|
||||
{$effectiveTags=$link.tags}
|
||||
{if="$noteDefaultChecked && strpos(' ' . $effectiveTags . ' ', ' note ') == false"}
|
||||
{$effectiveTags=trim($effectiveTags . ' note')}
|
||||
{/if}
|
||||
{$privateChecked=$link.private == true || $link_is_new}
|
||||
{function="($privateChecked = $link.private == true || $link_is_new) ? '' : ''"}
|
||||
<div id="editlinkform{$index}" class="editlinkform container page-edit">
|
||||
<div class="row editlinkform-row">
|
||||
<div class="col-md-6 col-md-offset-3 editlinkform-col">
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
<!--
|
||||
Bookmarklet detection logic
|
||||
{$isCalledFromBookmarklet=isset($_GET['source']) && $_GET['source'] == 'bookmarklet'}
|
||||
-->
|
||||
{if="$isCalledFromBookmarklet"}
|
||||
{if="isset($_GET['source']) && $_GET['source'] == 'bookmarklet'"}
|
||||
{ignore} When called as a popup from bookmarklet, do not display menu. {/ignore}
|
||||
{else}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user