diff --git a/css/area_nav-pagetools.less b/css/area_nav-pagetools.less
index d3f982e..40d2b06 100755
--- a/css/area_nav-pagetools.less
+++ b/css/area_nav-pagetools.less
@@ -110,18 +110,6 @@ nav#dokuwiki__pagetools {
margin-top: 1em;
}
}
-
- &.plugin_move_page {
- a {
- .btn-hover();
-
- color: @ini_nav_menu_color;
-
- * {
- color: inherit;
- }
- }
- }
}
}
diff --git a/images/tools/40-pdf-file.svg b/images/tools/40-pdf-file.svg
new file mode 100644
index 0000000..0c0b1d5
--- /dev/null
+++ b/images/tools/40-pdf-file.svg
@@ -0,0 +1,3 @@
+
diff --git a/images/tools/41-format-paint.svg b/images/tools/41-format-paint.svg
new file mode 100644
index 0000000..a87f0b2
--- /dev/null
+++ b/images/tools/41-format-paint.svg
@@ -0,0 +1,3 @@
+
diff --git a/images/tools/43-file-delimeted.svg b/images/tools/43-file-delimeted.svg
new file mode 100644
index 0000000..f4a984a
--- /dev/null
+++ b/images/tools/43-file-delimeted.svg
@@ -0,0 +1,3 @@
+
diff --git a/tpl/nav-page-tools.php b/tpl/nav-page-tools.php
index 477879b..f57d335 100755
--- a/tpl/nav-page-tools.php
+++ b/tpl/nav-page-tools.php
@@ -21,16 +21,71 @@
)
);
- // the page tools can be amended through a custom plugin hook
- $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data);
- if($evt->advise_before()){
- foreach($evt->data['items'] as $k => $html) {
- if($html)
- echo "
$html";
+
+ foreach ($data['items'] as $k => $html) {
+ if ($html) {
+ echo "$html";
+ }
+ }
+
+ /**
+ * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ * Begin shims as a temporary solution until the svg-approach is mainlined and the plugins have adapted
+ * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ */
+ global $ACT;
+ if (act_clean($ACT) === 'show') {
+ /** @var action_plugin_move_rename $move */
+ $move = plugin_load('action', 'move_rename');
+ if ($move && $move->getConf('pagetools_integration')) {
+ $attr = array(
+ 'style' => 'background-image: none;',
+ );
+ $item = \dokuwiki\template\sprintdoc\tpl::pageToolItem('', $move->getLang('renamepage'), __DIR__ . '/../images/tools/41-format-paint.svg', $attr);
+ echo '' . $item . '';
+ }
+
+ /** @var action_plugin_odt_export $odt */
+ $odt = plugin_load('action', 'odt_export');
+ if ($odt && $odt->getConf('showexportbutton')) {
+ global $ID, $REV;
+ $params = array('do' => 'export_odt');
+ if ($REV) {
+ $params['rev'] = $REV;
}
- }
- $evt->advise_after();
- unset($data);
+ $attr = array(
+ 'class' => 'action export_pdf',
+ 'style' => 'background-image: none;',
+ );
+ $svg = __DIR__ . '/../images/tools/43-file-delimeted.svg';
+ $item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $odt->getLang('export_odt_button'), $svg, $attr);
+ echo '' . $item . '';
+ }
+
+ /** @var action_plugin_dw2pdf $dw2pdf */
+ $dw2pdf = plugin_load('action', 'dw2pdf');
+ if ($dw2pdf && $dw2pdf->getConf('showexportbutton')) {
+ global $ID, $REV;
+
+ $params = array('do' => 'export_pdf');
+ if ($REV) {
+ $params['rev'] = $REV;
+ }
+ $attr = array(
+ 'class' => 'action export_pdf',
+ 'style' => 'background-image: none;',
+ );
+ $svg = __DIR__ . '/../images/tools/40-pdf-file.svg';
+ $item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $dw2pdf->getLang('export_pdf_button'), $svg, $attr);
+ echo '' . $item . '';
+ }
+ }
+ /**
+ * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ * End of shims
+ * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ */
+
?>