{if="empty($batch_mode)"}
{$pageName="editlink"} {include="includes"} {include="page.header"} {else} {ignore}Lil hack: when included in a loop in batch mode, `$value` is assigned by RainTPL with template vars.{/ignore} {function="extract($value) ? '' : ''"} {/if} {$asyncLoadClass=$link_is_new && $async_metadata && empty($link.title) ? 'loading-wrapper loading-input' : ''} {if="!isset($index)"} {$index=""} {/if} {$batchModeValue=empty($batch_mode) ? '0' : '1'} {function="($readLaterChecked = strpos(' ' . $link.tags . ' ', ' readitlater ') != false || strpos(' ' . $link.tags . ' ', ' readlater ') != false || strpos(' ' . $link.tags . ' ', ' toread ') != false) ? '' : ''"} {function="($isNoteOrTodo = strpos(' ' . $link.tags . ' ', ' note ') != false || strpos(' ' . $link.tags . ' ', ' shaarli-todo ') != false || strpos(' ' . $link.tags . ' ', ' shaarli-todo ') != false) ? '' : ''"} {function="($noteDefaultChecked = $link_is_new && empty($link.url) && !$isNoteOrTodo) ? '' : ''"} {function="($noteChecked = strpos(' ' . $link.tags . ' ', ' note ') != false || $noteDefaultChecked) ? '' : ''"} {function="($todoChecked = strpos(' ' . $link.tags . ' ', ' shaarli-todo ') != false) ? '' : ''"} {$effectiveTags=$link.tags} {if="$noteDefaultChecked && strpos(' ' . $effectiveTags . ' ', ' note ') == false"} {$effectiveTags=trim($effectiveTags . ' note')} {/if} {if="$todoChecked && strpos(' ' . $effectiveTags . ' ', ' note ') != false"} {$effectiveTags=trim(str_replace(' note ', ' ', ' ' . $effectiveTags . ' '))} {/if} {if="$todoChecked && strpos(' ' . $effectiveTags . ' ', ' shaarli-todo ') == false"} {$effectiveTags=trim($effectiveTags . ' shaarli-todo')} {/if} {function="($privateChecked = $link.private == true || $link_is_new) ? '' : ''"}