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=""}
|
{$index=""}
|
||||||
{/if}
|
{/if}
|
||||||
{$batchModeValue=empty($batch_mode) ? '0' : '1'}
|
{$batchModeValue=empty($batch_mode) ? '0' : '1'}
|
||||||
{$readLaterChecked=strpos(' ' . $link.tags . ' ', ' readlater ') != false || strpos(' ' . $link.tags . ' ', ' toread ') != false}
|
{function="($readLaterChecked = strpos(' ' . $link.tags . ' ', ' readlater ') != false || strpos(' ' . $link.tags . ' ', ' toread ') != false) ? '' : ''"}
|
||||||
{$noteDefaultChecked=$link_is_new && empty($link.url)}
|
{function="($noteDefaultChecked = $link_is_new && empty($link.url)) ? '' : ''"}
|
||||||
{$noteChecked=strpos(' ' . $link.tags . ' ', ' note ') != false || $noteDefaultChecked}
|
{function="($noteChecked = strpos(' ' . $link.tags . ' ', ' note ') != false || $noteDefaultChecked) ? '' : ''"}
|
||||||
{$effectiveTags=$link.tags}
|
{$effectiveTags=$link.tags}
|
||||||
{if="$noteDefaultChecked && strpos(' ' . $effectiveTags . ' ', ' note ') == false"}
|
{if="$noteDefaultChecked && strpos(' ' . $effectiveTags . ' ', ' note ') == false"}
|
||||||
{$effectiveTags=trim($effectiveTags . ' note')}
|
{$effectiveTags=trim($effectiveTags . ' note')}
|
||||||
{/if}
|
{/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 id="editlinkform{$index}" class="editlinkform container page-edit">
|
||||||
<div class="row editlinkform-row">
|
<div class="row editlinkform-row">
|
||||||
<div class="col-md-6 col-md-offset-3 editlinkform-col">
|
<div class="col-md-6 col-md-offset-3 editlinkform-col">
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
Bookmarklet detection logic
|
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}
|
{ignore} When called as a popup from bookmarklet, do not display menu. {/ignore}
|
||||||
{else}
|
{else}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user