From 1f3641a82800e91ebfaed80dcbc1e35a818cf20d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Wed, 15 Mar 2017 18:07:41 +0100 Subject: [PATCH 01/58] Add MagicMatcher Issue list to meta box This adds the issue list to the meta-box. SPR-881 --- Template.php | 11 ++++++++++- css/plugins/magic-matcher.less | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Template.php b/Template.php index f1f71f4..68fd351 100644 --- a/Template.php +++ b/Template.php @@ -17,6 +17,7 @@ class Template { protected $plugins = array( 'sqlite' => null, 'tagging' => null, + 'magicmatcher' => null, ); /** @@ -44,6 +45,7 @@ class Template { $this->plugins['sqlite'] = plugin_load('helper', 'sqlite'); if($this->plugins['sqlite']) { $this->plugins['tagging'] = plugin_load('helper', 'tagging'); + $this->plugins['magicmatcher'] = plugin_load('syntax', 'magicmatcher_issuelist'); } } @@ -75,7 +77,14 @@ class Template { ); } - // fixme add magicmatcher info + if ($this->plugins['magicmatcher']) { + $tabs[] = array( + 'id' => 'spr__tab-issues', + 'label' => 'Issues', // FIXME + 'tab' => $this->plugins['magicmatcher']->getIssueListHTML(), + 'count' => $this->plugins['magicmatcher']->getCountIssues(), + ); + } return $tabs; } diff --git a/css/plugins/magic-matcher.less b/css/plugins/magic-matcher.less index 84035fc..6366c45 100755 --- a/css/plugins/magic-matcher.less +++ b/css/plugins/magic-matcher.less @@ -76,6 +76,16 @@ } } + +/* + + + + + in meta box + + + + + */ +#spr__tab-issues { + ul.mmissuelist { + padding-left: 0; + margin-top: 1rem; + } +} + + /* + + + + + in content + + + + + */ a.jiralink { font-size: @font-size-default; From e5d40c9a7e6c9e54acc1faa3017e19db507cce13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 16 Mar 2017 13:25:51 +0100 Subject: [PATCH 02/58] Do not show a tab if the content is falsy There may be occasions where plugin does not wish to show any output for the current user/page. In that case the tab should not be shown at all. SPR-895 --- tpl/nav-meta-box.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tpl/nav-meta-box.php b/tpl/nav-meta-box.php index 77328c5..c83145d 100755 --- a/tpl/nav-meta-box.php +++ b/tpl/nav-meta-box.php @@ -9,6 +9,9 @@ $tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
  •  
  • '; echo '