aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornicosomb <nicolas@loeuillet.org>2013-04-21 13:11:14 +0200
committernicosomb <nicolas@loeuillet.org>2013-04-21 13:11:14 +0200
commit016989b79af1f950f449e33c76f368c307c28c19 (patch)
treec01d932f93e4d507457175fb04728901e53bdfa3
parenta58cd56c4fdc9cb86a4b7c056ff31d39cf1cfe8c (diff)
downloadwallabag-016989b79af1f950f449e33c76f368c307c28c19.tar.gz
wallabag-016989b79af1f950f449e33c76f368c307c28c19.tar.zst
wallabag-016989b79af1f950f449e33c76f368c307c28c19.zip
contenu de la page de config
-rw-r--r--inc/functions.php9
-rw-r--r--js/poche.js1
-rw-r--r--tpl/config.html6
-rw-r--r--tpl/config.tpl0
-rw-r--r--tpl/home.html4
-rw-r--r--tpl/tools.html0
6 files changed, 18 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php
index df7e9b17..10005dfe 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -232,6 +232,15 @@ function display_view($view, $id = 0, $full_head = 'yes')
232 232
233 switch ($view) 233 switch ($view)
234 { 234 {
235 case 'config':
236 $tpl->assign('load_all_js', 0);
237 $tpl->draw('head');
238 $tpl->draw('home');
239 $tpl->draw('config');
240 $tpl->draw('js');
241 $tpl->draw('footer');
242 logm('config view');
243 break;
235 case 'view': 244 case 'view':
236 $entry = $store->retrieveOneById($id); 245 $entry = $store->retrieveOneById($id);
237 246
diff --git a/js/poche.js b/js/poche.js
index d27ecbba..97d9911d 100644
--- a/js/poche.js
+++ b/js/poche.js
@@ -23,7 +23,6 @@ function toggle_archive(element, id, view_article) {
23} 23}
24 24
25function sort_links(view, sort) { 25function sort_links(view, sort) {
26 //$('#content').load('index.php', { view: view, sort: sort, full_head: 'no' } );
27 $.get('index.php', { view: view, sort: sort, full_head: 'no' }, function(data) { 26 $.get('index.php', { view: view, sort: sort, full_head: 'no' }, function(data) {
28 $('#content').html(data); 27 $('#content').html(data);
29 }); 28 });
diff --git a/tpl/config.html b/tpl/config.html
new file mode 100644
index 00000000..a19a84fe
--- /dev/null
+++ b/tpl/config.html
@@ -0,0 +1,6 @@
1 <div id="content">
2 <h2>Bookmarklet</h2>
3 <p>Thanks to the bookmarklet, you will be able to easily add a link to your poche. If you don't know how use a bookmarklet, <a href="http://support.mozilla.org/en-US/kb/bookmarklets-perform-common-web-page-tasks">have a look here</a>.</p>
4 <p>Drag & drop this link to your bookmarks bar and have fun with poche.</p>
5 <p><a style="cursor: move; border: 1px dashed grey; background: white;" title="i am a bookmarklet, use me !" href="javascript:(function(){var%20url%20=%20location.href%20||%20url;window.open('{$poche_url}?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></p>
6 </div> \ No newline at end of file
diff --git a/tpl/config.tpl b/tpl/config.tpl
deleted file mode 100644
index e69de29b..00000000
--- a/tpl/config.tpl
+++ /dev/null
diff --git a/tpl/home.html b/tpl/home.html
index 752a571b..33aec78c 100644
--- a/tpl/home.html
+++ b/tpl/home.html
@@ -7,10 +7,12 @@
7 <li><a href="index.php" {if="$view == 'index'"}class="current"{/if}>home</a></li> 7 <li><a href="index.php" {if="$view == 'index'"}class="current"{/if}>home</a></li>
8 <li><a href="?view=fav" {if="$view == 'fav'"}class="current"{/if}>favorites</a></li> 8 <li><a href="?view=fav" {if="$view == 'fav'"}class="current"{/if}>favorites</a></li>
9 <li><a href="?view=archive" {if="$view == 'archive'"}class="current"{/if}>archive</a></li> 9 <li><a href="?view=archive" {if="$view == 'archive'"}class="current"{/if}>archive</a></li>
10 <li><a style="cursor: move" title="i am a bookmarklet, use me !" href="javascript:(function(){var%20url%20=%20location.href%20||%20url;window.open('{$poche_url}?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></li> 10 <li><a href="?view=config" {if="$view == 'config'"}class="current"{/if}>config</a></li>
11 <li><a href="?logout" title="Logout">logout</a></li> 11 <li><a href="?logout" title="Logout">logout</a></li>
12 </ul> 12 </ul>
13 {if condition="isset($entries)"}
13 <ul id="sort"> 14 <ul id="sort">
14 <li><img src="img/up.png" onclick="sort_links('{$view}', 'ia');" title="by date asc" /> by date <img src="img/down.png" onclick="sort_links('{$view}', 'id');" title="by date desc" /></li> 15 <li><img src="img/up.png" onclick="sort_links('{$view}', 'ia');" title="by date asc" /> by date <img src="img/down.png" onclick="sort_links('{$view}', 'id');" title="by date desc" /></li>
15 <li><img src="img/up.png" onclick="sort_links('{$view}', 'ta');" title="by title asc" /> by title <img src="img/down.png" onclick="sort_links('{$view}', 'td');" title="by title desc" /></li> 16 <li><img src="img/up.png" onclick="sort_links('{$view}', 'ta');" title="by title asc" /> by title <img src="img/down.png" onclick="sort_links('{$view}', 'td');" title="by title desc" /></li>
16 </ul> 17 </ul>
18 {/if} \ No newline at end of file
diff --git a/tpl/tools.html b/tpl/tools.html
deleted file mode 100644
index e69de29b..00000000
--- a/tpl/tools.html
+++ /dev/null