From 62827e6cf470449c117624058fb36ad94804bcc0 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 5 May 2020 14:25:42 +0200 Subject: Time tracking related plugins --- plugins/Timetrackingeditor/Plugin.php | 91 +++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 plugins/Timetrackingeditor/Plugin.php (limited to 'plugins/Timetrackingeditor/Plugin.php') diff --git a/plugins/Timetrackingeditor/Plugin.php b/plugins/Timetrackingeditor/Plugin.php new file mode 100644 index 00000000..f36403fb --- /dev/null +++ b/plugins/Timetrackingeditor/Plugin.php @@ -0,0 +1,91 @@ +hook->on("template:layout:css", array("template" => "plugins/Timetrackingeditor/assets/css/timetrackingeditor.css")); + $this->template->setTemplateOverride('task/time_tracking_details', 'timetrackingeditor:time_tracking_editor'); + $this->template->setTemplateOverride('subtask/table', 'timetrackingeditor:subtask/table'); + + # $this->helper->register("subtask", "Kanboard\Plugin\Timetrackingeditor\Helper\SubtaskHelper"); + + $this->container["cli"]->add(new AllSubtaskTimeTrackingExportCommand($this->container)); + } + + public function onStartup() + { + Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale'); + } + + public function getClasses() + { + return array( + 'Plugin\Timetrackingeditor\Model' => array( + 'SubtaskTimeTrackingCreationModel', + 'SubtaskTimeTrackingEditModel', + 'SubtaskTimeTrackingModel', + ), + 'Plugin\Timetrackingeditor\Filter' => array( + 'SubtaskFilter', + 'SubtaskTaskFilter', + 'SubtaskTitleFilter' + ), + 'Plugin\Timetrackingeditor\Console' => array( + 'AllSubtaskTimeTrackingExportCommand' + ), + 'Plugin\Timetrackingeditor\Controller' => array( + 'SubtaskStatusController', + 'SubtaskAjaxController', + 'TimeTrackingEditorController' + ), + 'Plugin\Timetrackingeditor\Export' => array( + 'SubtaskTimeTrackingExport' + ), + 'Plugin\Timetrackingeditor\Validator' => array( + 'SubtaskTimeTrackingValidator' + ), + 'Plugin\Timetrackingeditor\Formatter' => array( + 'SubtaskAutoCompleteFormatter' + ), + ); + } + + public function getPluginName() + { + return 'TimeTrackingEditor'; + } + + public function getPluginDescription() + { + return t('Allows Editing of TimeTracking Values'); + } + + public function getPluginAuthor() + { + return 'Thomas Stinner'; + } + + public function getPluginVersion() + { + return '1.0.21'; + } + + public function getPluginHomepage() + { + return 'https://github.com/stinnux/kanboard-timetrackingeditor'; + } + + public function getCompatibleVersion() + { + return '>=1.2.4'; + } +} -- cgit v1.2.3