|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * MantisBT - A PHP based bugtracking system |
| 4 | + * |
| 5 | + * MantisBT is free software: you can redistribute it and/or modify |
| 6 | + * it under the terms of the GNU General Public License as published by |
| 7 | + * the Free Software Foundation, either version 2 of the License, or |
| 8 | + * (at your option) any later version. |
| 9 | + * |
| 10 | + * MantisBT is distributed in the hope that it will be useful, |
| 11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | + * GNU General Public License for more details. |
| 14 | + * |
| 15 | + * You should have received a copy of the GNU General Public License |
| 16 | + * along with MantisBT. If not, see <http://www.gnu.org/licenses/>. |
| 17 | + * |
| 18 | + * @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net |
| 19 | + */ |
| 20 | + |
| 21 | +/** |
| 22 | + * Mantis Graph plugin |
| 23 | + */ |
| 24 | +class BetterStatusColorsPlugin extends MantisPlugin { |
| 25 | + |
| 26 | + /** |
| 27 | + * A method that populates the plugin information and minimum requirements. |
| 28 | + * @return void |
| 29 | + */ |
| 30 | + function register() { |
| 31 | + $this->name = 'Better status colors'; |
| 32 | + $this->description = 'Make the status color more prominent'; |
| 33 | + $this->page = ''; |
| 34 | + |
| 35 | + $this->version = '1.0.0'; |
| 36 | + $this->requires = array( |
| 37 | + 'MantisCore' => '2.0.0', |
| 38 | + ); |
| 39 | + |
| 40 | + $this->author = 'Simone Tellini'; |
| 41 | + $this->url = 'https://tellini.info'; |
| 42 | + } |
| 43 | + |
| 44 | + /** |
| 45 | + * Default plugin configuration. |
| 46 | + * @return array |
| 47 | + */ |
| 48 | + function config() { |
| 49 | + return array(); |
| 50 | + } |
| 51 | + |
| 52 | + /** |
| 53 | + * plugin hooks |
| 54 | + * @return array |
| 55 | + */ |
| 56 | + function hooks() { |
| 57 | + $t_hooks = array( |
| 58 | + 'EVENT_LAYOUT_RESOURCES' => 'resources' |
| 59 | + ); |
| 60 | + return $t_hooks; |
| 61 | + } |
| 62 | + |
| 63 | + /** |
| 64 | + * Include javascript files for chart.js |
| 65 | + * @return void |
| 66 | + */ |
| 67 | + function resources() { |
| 68 | + echo '<script src="' . plugin_file( "BetterStatusColors.js" ) . '"></script>'; |
| 69 | + } |
| 70 | +} |
0 commit comments