diff options
Diffstat (limited to 'tpl/default/tools.html')
-rw-r--r-- | tpl/default/tools.html | 247 |
1 files changed, 164 insertions, 83 deletions
diff --git a/tpl/default/tools.html b/tpl/default/tools.html index c36aa5b5..b9df32d9 100644 --- a/tpl/default/tools.html +++ b/tpl/default/tools.html | |||
@@ -1,98 +1,179 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html> |
3 | <head>{include="includes"}</head> | 3 | <head> |
4 | {include="includes"} | ||
5 | </head> | ||
4 | <body> | 6 | <body> |
5 | <div id="pageheader"> | 7 | {include="page.header"} |
6 | {include="page.header"} | ||
7 | <div id="toolsdiv"> | ||
8 | <a href="?do=configure"><b>Configure your Shaarli</b><span>: Change Title, timezone...</span></a> | ||
9 | <br><br> | ||
10 | <a href="?do=pluginadmin"><b>Plugin administration</b><span>: Enable, disable and configure plugins.</span></a> | ||
11 | <br><br> | ||
12 | {if="!$openshaarli"}<a href="?do=changepasswd"><b>Change password</b><span>: Change your password.</span></a> | ||
13 | <br><br>{/if} | ||
14 | <a href="?do=changetag"><b>Rename/delete tags</b><span>: Rename or delete a tag in all links</span></a> | ||
15 | <br><br> | ||
16 | <a href="?do=import"><b>Import</b><span>: Import Netscape html bookmarks (as exported from Firefox, Chrome, Opera, delicious...)</span></a> | ||
17 | <br><br> | ||
18 | <a href="?do=export"><b>Export</b><span>: Export Netscape html bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)</span></a> | ||
19 | <br><br> | ||
20 | <a class="smallbutton" | ||
21 | onclick="return alertBookmarklet();" | ||
22 | href="javascript:( | ||
23 | function(){ | ||
24 | var%20url%20=%20location.href; | ||
25 | var%20title%20=%20document.title%20||%20url; | ||
26 | window.open( | ||
27 | '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+ | ||
28 | '&title='%20+%20encodeURIComponent(title)+ | ||
29 | '&description='%20+%20encodeURIComponent(document.getSelection())+ | ||
30 | '&source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1' | ||
31 | ); | ||
32 | } | ||
33 | )();"><b>✚Shaare link</b></a> | ||
34 | <a href="#" onclick="return alertBookmarklet();"> | ||
35 | <span> | ||
36 | ⇐ Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).<br> | ||
37 | Then click "✚Shaare link" button in any page you want to share. | ||
38 | </span> | ||
39 | </a><br><br> | ||
40 | <a class="smallbutton" | ||
41 | onclick="return alertBookmarklet();" | ||
42 | href="?private=1&post="><b>✚Add Note</b></a> | ||
43 | <a href="#" onclick="return alertBookmarklet();"> | ||
44 | <span> | ||
45 | ⇐ Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link....).<br> | ||
46 | Then click "✚Add Note" button anytime to start composing a private Note (text post) to your Shaarli. | ||
47 | </span> | ||
48 | </a><br><br> | ||
49 | 8 | ||
50 | {if="$sslenabled"} | 9 | <div class="pure-g"> |
51 | <a class="smallbutton" onclick="activateFirefoxSocial(this)"><b>✚Add to Firefox social</b></a> | 10 | <div class="pure-u-lg-1-3 pure-u-1-24"></div> |
52 | <a href="#"> | 11 | <div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light"> |
53 | <span>⇐ Click on this button to add Shaarli to the "Share this page" button in Firefox.</span> | 12 | <h2 class="window-title">{'Settings'|t}</h2> |
54 | </a><br><br> | 13 | <div class="tools-item"> |
55 | {/if} | 14 | <a href="?do=configure" title="{'Change Shaarli settings: title, timezone, etc.'|t}"> |
15 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Configure your Shaarli'|t}</span> | ||
16 | </a> | ||
17 | </div> | ||
18 | <div class="tools-item"> | ||
19 | <a href="?do=pluginadmin" title="{'Enable, disable and configure plugins'|t}"> | ||
20 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Plugin administration'|t}</span> | ||
21 | </a> | ||
22 | </div> | ||
23 | {if="!$openshaarli"} | ||
24 | <div class="tools-item"> | ||
25 | <a href="?do=changepasswd" title="{'Change your password'|t}"> | ||
26 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Change password'|t}</span> | ||
27 | </a> | ||
28 | </div> | ||
29 | {/if} | ||
30 | <div class="tools-item"> | ||
31 | <a href="?do=changetag" title="{'Rename or delete a tag in all links'|t}"> | ||
32 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Manage tags'|t}</span> | ||
33 | </a> | ||
34 | </div> | ||
35 | <div class="tools-item"> | ||
36 | <a href="?do=import" | ||
37 | title="{'Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, delicious...)'|t}"> | ||
38 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Import links'|t}</span> | ||
39 | </a> | ||
40 | </div> | ||
41 | <div class="tools-item"> | ||
42 | <a href="?do=export" | ||
43 | title="{'Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)'|t}"> | ||
44 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">{'Export database'|t}</span> | ||
45 | </a> | ||
46 | </div> | ||
56 | 47 | ||
57 | {loop="$tools_plugin"} | 48 | {loop="$tools_plugin"} |
58 | {$value} | 49 | <div class="tools-item"> |
59 | {/loop} | 50 | {$value} |
51 | </div> | ||
52 | {/loop} | ||
53 | </div> | ||
60 | 54 | ||
61 | <div class="clear"></div> | ||
62 | 55 | ||
63 | <script> | 56 | <div class="clear"></div> |
64 | {if="$sslenabled"} | 57 | </div> |
65 | function activateFirefoxSocial(node) { | ||
66 | var loc = location.href; | ||
67 | var baseURL = loc.substring(0, loc.lastIndexOf("/")); | ||
68 | 58 | ||
69 | // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. | 59 | <div class="pure-g"> |
70 | var data = { | 60 | <div class="pure-u-lg-1-3 pure-u-1-24"></div> |
71 | name: "{$shaarlititle}", | 61 | <div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light"> |
72 | description: "The personal, minimalist, super-fast, no-database delicious clone.", | 62 | <h2 class="window-title">Bookmarklets</h2> |
73 | author: "Shaarli", | 63 | <p> |
74 | version: "1.0.0", | 64 | {'Drag one of these button to your bookmarks toolbar or right-click it and "Bookmark This Link"'|t}, |
65 | {'then click on the bookmarklet in any page you want to share.'|t} | ||
66 | </p> | ||
67 | <div class="tools-item"> | ||
68 | <a title="{'Drag this link to your bookmarks toolbar or right-click it and Bookmark This Link'|t}, | ||
69 | {'then click ✚Shaare link button in any page you want to share'|t}" | ||
70 | onclick="return alertBookmarklet();" | ||
71 | href="javascript:( | ||
72 | function(){ | ||
73 | var%20url%20=%20location.href; | ||
74 | var%20title%20=%20document.title%20||%20url; | ||
75 | window.open( | ||
76 | '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+ | ||
77 | '&title='%20+%20encodeURIComponent(title)+ | ||
78 | '&description='%20+%20encodeURIComponent(document.getSelection())+ | ||
79 | '&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1' | ||
80 | ); | ||
81 | } | ||
82 | )();"> | ||
83 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Shaare link'|t}</span> | ||
84 | </a> | ||
85 | </div> | ||
86 | <div class="tools-item"> | ||
87 | <a title="{'Drag this link to your bookmarks toolbar or right-click it and Bookmark This Link'|t}, | ||
88 | {'Then click ✚Add Note button anytime to start composing a private Note (text post) to your Shaarli'|t}" | ||
89 | onclick="return alertBookmarklet();" | ||
90 | href="?private=1&post="> | ||
91 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Add Note'|t}</span> | ||
92 | </a> | ||
93 | </div> | ||
94 | </div> | ||
95 | </div> | ||
75 | 96 | ||
76 | iconURL: baseURL + "/images/favicon.ico", | 97 | {if="$sslenabled"} |
77 | icon32URL: baseURL + "/images/favicon.ico", | 98 | <div class="pure-g"> |
78 | icon64URL: baseURL + "/images/favicon.ico", | 99 | <div class="pure-u-lg-1-3 pure-u-1-24"></div> |
100 | <div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light"> | ||
101 | <h2 class="window-title">Firefox Social API</h2> | ||
102 | <p>{'You need to browse your Shaarli over <strong>HTTPS</strong> to use this functionality.'|t}</p> | ||
79 | 103 | ||
80 | shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}", | 104 | <div class="tools-item"> |
81 | homepageURL: baseURL | 105 | <a title="{'Click on this button to add Shaarli to the 'Share this page' button in Firefox" |
82 | }; | 106 | onclick="activateFirefoxSocial(this)"> |
83 | node.setAttribute("data-service", JSON.stringify(data)); | 107 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Add to'|t} Firefox Social</span> |
108 | </a> | ||
109 | </div> | ||
110 | </div> | ||
111 | </div> | ||
112 | {/if} | ||
84 | 113 | ||
85 | var activate = new CustomEvent("ActivateSocialFeature"); | 114 | <div class="pure-g"> |
86 | node.dispatchEvent(activate); | 115 | <div class="pure-u-lg-1-3 pure-u-1-24"></div> |
87 | } | 116 | <div class="pure-u-lg-1-3 pure-u-22-24 page-form page-form-light"> |
88 | {/if} | 117 | <h2 class="window-title">{'3rd party'|t}</h2> |
89 | function alertBookmarklet() { | 118 | <div class="tools-item"> |
90 | alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...'); | 119 | <a href="https://addons.mozilla.org/fr/firefox/addon/shaarli/" title="Firefox {'Plugin'|t}"> |
91 | return false; | 120 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Firefox {'plugin'|t}</span> |
92 | } | 121 | </a> |
93 | </script> | 122 | </div> |
94 | </div> | 123 | <div class="tools-item"> |
124 | <a href="https://chrome.google.com/webstore/detail/shiny-shaarli/hajdfkmbdmadjmmpkkbbcnllepomekin" | ||
125 | title="Chrome {'Plugin'|t}"> | ||
126 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Chrome {'plugin'|t}</span> | ||
127 | </a> | ||
128 | </div> | ||
129 | <div class="tools-item"> | ||
130 | <a href="https://play.google.com/store/apps/details?id=com.dimtion.shaarlier&hl=fr" | ||
131 | title="Android"> | ||
132 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Android</span> | ||
133 | </a> | ||
134 | </div> | ||
135 | <div class="tools-item"> | ||
136 | <a href="https://itunes.apple.com/app/ShaarliOS/id1027441388?mt=8" | ||
137 | title="iOS"> | ||
138 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">iOS</span> | ||
139 | </a> | ||
140 | </div> | ||
141 | </div> | ||
95 | </div> | 142 | </div> |
143 | |||
96 | {include="page.footer"} | 144 | {include="page.footer"} |
145 | |||
146 | <script> | ||
147 | {if="$sslenabled"} | ||
148 | function activateFirefoxSocial(node) { | ||
149 | var loc = location.href; | ||
150 | var baseURL = loc.substring(0, loc.lastIndexOf("/")); | ||
151 | |||
152 | // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. | ||
153 | var data = { | ||
154 | name: "{$shaarlititle}", | ||
155 | description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.", | ||
156 | author: "Shaarli", | ||
157 | version: "1.0.0", | ||
158 | |||
159 | iconURL: baseURL + "/images/favicon.ico", | ||
160 | icon32URL: baseURL + "/images/favicon.ico", | ||
161 | icon64URL: baseURL + "/images/favicon.ico", | ||
162 | |||
163 | shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}", | ||
164 | homepageURL: baseURL | ||
165 | }; | ||
166 | node.setAttribute("data-service", JSON.stringify(data)); | ||
167 | |||
168 | var activate = new CustomEvent("ActivateSocialFeature"); | ||
169 | node.dispatchEvent(activate); | ||
170 | } | ||
171 | {/if} | ||
172 | function alertBookmarklet() { | ||
173 | alert({"'Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link'"|t}); | ||
174 | return false; | ||
175 | } | ||
176 | </script> | ||
97 | </body> | 177 | </body> |
98 | </html> | 178 | </html> |
179 | |||