diff --git a/ChangeLog.txt b/ChangeLog.txt index 3438c385..816bc775 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2015-02-26 Florian Lamml (info@florian-lamml.de) + + * changes to the pagetools-button + 2015-02-06 jaller94 * Valid Button for HTML5 diff --git a/action.php b/action.php index 0564a411..09e27f0d 100644 --- a/action.php +++ b/action.php @@ -35,24 +35,24 @@ function register($controller) { * @param Doku_Event $event * @param mixed $param not defined */ - public function addbutton(&$event, $param) { - global $ID, $REV, $conf; + public function addbutton(Doku_Event $event, $param) { + global $ID, $REV; if($this->getConf('showexportbutton') && $event->data['view'] == 'main') { $params = array('do' => 'export_odt'); - if($REV) $params['rev'] = $REV; - - switch($conf['template']) { - case 'dokuwiki': - case 'arago': - $event->data['items']['export_odt'] = - '
  • ' - .'' - .''.$this->getLang('export_odt_button').'' - .'' - .'
  • '; - break; + if($REV) { + $params['rev'] = $REV; } + + $event->data['items'] = array_slice($event->data['items'], 0, -1, true) + + array('export_odt' => + '
  • ' + . '' + . '' . $this->getLang('export_odt_button') . '' + . '' + . '
  • ' + ) + + array_slice($event->data['items'], -1, 1, true); } }