Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from LarsGit223/NewActionAndMenu
Adjustments for DokuWiki's new action and menu handling/design.
- Loading branch information
Showing
5 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace dokuwiki\plugin\odt; | ||
|
||
use dokuwiki\Menu\Item\AbstractItem; | ||
|
||
/** | ||
* Class MenuItemODT | ||
* | ||
* Implements the ODT export button for DokuWiki's menu system | ||
* | ||
* @package dokuwiki\plugin\odt | ||
*/ | ||
class MenuItemODT extends AbstractItem { | ||
|
||
/** @var string do action for this plugin */ | ||
protected $type = 'export_odt'; | ||
|
||
/** @var string icon file */ | ||
protected $svg = DOKU_INC . 'lib/plugins/odt/menu-odt.svg'; | ||
|
||
/** | ||
* MenuItem constructor. | ||
*/ | ||
public function __construct() { | ||
parent::__construct(); | ||
global $REV; | ||
if($REV) $this->params['rev'] = $REV; | ||
} | ||
|
||
/** | ||
* Get label from plugin language file | ||
* | ||
* @return string | ||
*/ | ||
public function getLabel() { | ||
$hlp = plugin_load('action', 'odt_export'); | ||
return $hlp->getLang('export_odt_button'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace dokuwiki\plugin\odt; | ||
|
||
use dokuwiki\Menu\Item\AbstractItem; | ||
|
||
/** | ||
* Class MenuItemODT | ||
* | ||
* Implements the ODT export button for DokuWiki's menu system | ||
* | ||
* @package dokuwiki\plugin\odt | ||
*/ | ||
class MenuItemODTPDF extends AbstractItem { | ||
|
||
/** @var string do action for this plugin */ | ||
protected $type = 'export_odt_pdf'; | ||
|
||
/** @var string icon file */ | ||
protected $svg = DOKU_INC . 'lib/plugins/odt/menu-odt-pdf.svg'; | ||
|
||
/** | ||
* MenuItem constructor. | ||
*/ | ||
public function __construct() { | ||
parent::__construct(); | ||
global $REV; | ||
if($REV) $this->params['rev'] = $REV; | ||
} | ||
|
||
/** | ||
* Get label from plugin language file | ||
* | ||
* @return string | ||
*/ | ||
public function getLabel() { | ||
$hlp = plugin_load('action', 'odt_export'); | ||
return $hlp->getLang('export_odt_pdf_button'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.