]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - tpl/vintage/editlink.html
Vintage theme: support async metadata retrieval
[github/shaarli/Shaarli.git] / tpl / vintage / editlink.html
1 <!DOCTYPE html>
2 <html>
3 <head>{include="includes"}
4 </head>
5 <body
6 {if="$link.title==''"}onload="document.linkform.lf_title.focus();"
7 {elseif="$link.description==''"}onload="document.linkform.lf_description.focus();"
8 {else}onload="document.linkform.lf_tags.focus();"{/if} >
9 {$asyncLoadClass=$link_is_new && $async_metadata && empty($link.title) ? 'loading-input' : ''}
10 <div id="pageheader">
11 {include="page.header"}
12 <div id="shaarli_title"><a href="{$titleLink}">{$shaarlititle}</a></div>
13 <div id="editlinkform">
14 <form method="post" name="linkform" action="{$base_path}/admin/shaare">
15 {if="isset($link.id)"}
16 <input type="hidden" name="lf_id" value="{$link.id}">
17 {/if}
18 <label for="lf_url"><i>URL</i></label><br><input type="text" name="lf_url" id="lf_url" value="{$link.url}" class="lf_input">
19 <label for="lf_title"><i>Title</i></label>
20 <div class="{$asyncLoadClass}">
21 <input type="text" name="lf_title" id="lf_title" value="{$link.title}" class="lf_input">
22 <div class="icon-container">
23 <i class="loader"></i>
24 </div>
25 </div>
26 <label for="lf_description"><i>Description</i></label>
27 <div class="{if="$retrieve_description"}{$asyncLoadClass}{/if}">
28 <textarea name="lf_description" id="lf_description" rows="4" cols="25">{$link.description}</textarea>
29 <div class="icon-container">
30 <i class="loader"></i>
31 </div>
32 </div>
33 <label for="lf_tags"><i>Tags</i></label>
34 <div class="{if="$retrieve_description"}{$asyncLoadClass}{/if}">
35 <input type="text" name="lf_tags" id="lf_tags" value="{$link.tags}" class="lf_input"
36 data-list="{loop="$tags"}{$key}, {/loop}" data-multiple autocomplete="off" >
37 <div class="icon-container">
38 <i class="loader"></i>
39 </div>
40 </div>
41
42 {if="$formatter==='markdown'"}
43 <div class="md_help">
44 {'Description will be rendered with'|t}
45 <a href="http://daringfireball.net/projects/markdown/syntax" title="{'Markdown syntax documentation'|t}">
46 {'Markdown syntax'|t}
47 </a>.
48 </div>
49 {/if}
50
51 {loop="$edit_link_plugin"}
52 {$value}
53 {/loop}
54
55 {if="($link_is_new && $default_private_links) || $link.private == true"}
56 <input type="checkbox" checked="checked" name="lf_private" id="lf_private">
57 &nbsp;<label for="lf_private"><i>Private</i></label><br>
58 {else}
59 <input type="checkbox" name="lf_private" id="lf_private">
60 &nbsp;<label for="lf_private"><i>Private</i></label><br><br>
61 {/if}
62 <input type="submit" value="Save" name="save_edit" class="bigbutton">
63 {if="!$link_is_new && isset($link.id)"}
64 <a href="{$base_path}/admin/shaare/delete?id={$link.id}&amp;token={$token}"
65 name="delete_link" class="bigbutton"
66 onClick="return confirmDeleteLink();">
67 {'Delete'|t}
68 </a>
69 {/if}
70 <input type="hidden" name="token" value="{$token}">
71 <input type="hidden" name="source" value="{$source}">
72 {if="$http_referer"}<input type="hidden" name="returnurl" value="{$http_referer}">{/if}
73 </form>
74 </div>
75 </div>
76 {include="page.footer"}
77 {if="$link_is_new && $async_metadata"}<script src="{$asset_path}/js/metadata.min.js?v={$version_hash}#"></script>{/if}</body>
78 </html>