feat: implémenter système Todo complet avec bouton segmenté sidebar (bookmark/note/todo), toggle Todo dans formulaire édition avec gestion émoji ✅ automatique, masquage champ URL pour notes/todos, tag shaarli-todo unifié (remplacement todo), déduplication tags case-insensitive, correction tag archive (shaarli-archiver→shaarli-archive), ajout shaarli-todo aux tags cachés par défaut, styles bouton segmenté avec gradient bleu et hover states, et support responsive mobile avec masquage tex
This commit is contained in:
@@ -17,12 +17,20 @@
|
||||
{/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="($noteDefaultChecked = $link_is_new && empty($link.url)) ? '' : ''"}
|
||||
{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) ? '' : ''"}
|
||||
<div id="editlinkform{$index}" class="editlinkform container page-edit">
|
||||
<div class="row editlinkform-row">
|
||||
@@ -46,7 +54,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group bookmark-field-group">
|
||||
<div class="form-group bookmark-field-group {if="$isNoteOrTodo"}hidden{/if}">
|
||||
<label class="form-label" for="lf_url{$index}">{'URL'|t}</label>
|
||||
<input type="text" class="form-control lf_input" name="lf_url" id="lf_url{$index}" value="{$link.url}" placeholder="https://...">
|
||||
</div>
|
||||
@@ -101,6 +109,10 @@
|
||||
<input type="checkbox" id="lf_note{$index}" class="bookmark-toggle-note" {if="$noteChecked"}checked="checked"{/if}>
|
||||
<span>Note</span>
|
||||
</label>
|
||||
<label class="bookmark-toggle-item" for="lf_todo{$index}">
|
||||
<input type="checkbox" id="lf_todo{$index}" class="bookmark-toggle-todo" {if="$todoChecked"}checked="checked"{/if}>
|
||||
<span>Todo</span>
|
||||
</label>
|
||||
<label class="bookmark-toggle-item" for="lf_private{$index}">
|
||||
<input type="checkbox" {if="$privateChecked"}checked="checked"{/if} name="lf_private" id="lf_private{$index}" />
|
||||
<span>{'Private'|t}</span>
|
||||
|
||||
Reference in New Issue
Block a user