diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-11-02 16:34:10 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-11-05 14:29:56 +0100 |
commit | c8f0a06d801d1e6405f5d86b45ba5967a6569c8c (patch) | |
tree | 173523374b5ac660ace025181acb817125ede482 /plugins/addlink_toolbar/addlink_toolbar.php | |
parent | cac0ea87be6326271993c958788afbd244815ef1 (diff) | |
download | Shaarli-c8f0a06d801d1e6405f5d86b45ba5967a6569c8c.tar.gz Shaarli-c8f0a06d801d1e6405f5d86b45ba5967a6569c8c.tar.zst Shaarli-c8f0a06d801d1e6405f5d86b45ba5967a6569c8c.zip |
Improve theme dependent plugin placeholders:
- buttons_toolbar: now expect links represented by an array instead of HTML content
- fields_toolbar: now expect a form represented by an array instead of HTML content
- action_plugin: now expect links represented by an array instead of HTML content
Default templates updated accordingly
Diffstat (limited to 'plugins/addlink_toolbar/addlink_toolbar.php')
-rw-r--r-- | plugins/addlink_toolbar/addlink_toolbar.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/plugins/addlink_toolbar/addlink_toolbar.php b/plugins/addlink_toolbar/addlink_toolbar.php index cfd74207..c96a891e 100644 --- a/plugins/addlink_toolbar/addlink_toolbar.php +++ b/plugins/addlink_toolbar/addlink_toolbar.php | |||
@@ -15,7 +15,25 @@ | |||
15 | function hook_addlink_toolbar_render_header($data) | 15 | function hook_addlink_toolbar_render_header($data) |
16 | { | 16 | { |
17 | if ($data['_PAGE_'] == Router::$PAGE_LINKLIST && $data['_LOGGEDIN_'] === true) { | 17 | if ($data['_PAGE_'] == Router::$PAGE_LINKLIST && $data['_LOGGEDIN_'] === true) { |
18 | $data['fields_toolbar'][] = file_get_contents(PluginManager::$PLUGINS_PATH . '/addlink_toolbar/addlink_toolbar.html'); | 18 | $form = array( |
19 | 'method' => 'GET', | ||
20 | 'action' => '', | ||
21 | 'name' => 'addform', | ||
22 | 'class' => 'addform', | ||
23 | 'inputs' => array( | ||
24 | array( | ||
25 | 'type' => 'text', | ||
26 | 'name' => 'post', | ||
27 | 'placeholder' => 'URI', | ||
28 | ), | ||
29 | array( | ||
30 | 'type' => 'submit', | ||
31 | 'value' => 'Add link', | ||
32 | 'class' => 'bigbutton', | ||
33 | ), | ||
34 | ), | ||
35 | ); | ||
36 | $data['fields_toolbar'][] = $form; | ||
19 | } | 37 | } |
20 | 38 | ||
21 | return $data; | 39 | return $data; |