Files
OrganonTweaks/Plugin.php

68 lines
2.0 KiB
PHP
Raw Normal View History

2026-07-01 09:30:31 -03:00
<?php
2026-07-04 10:09:21 -03:00
namespace Kanboard\Plugin\OrganonTweaks;
2026-07-01 09:30:31 -03:00
use Kanboard\Core\Plugin\Base;
class Plugin extends Base
{
public function initialize()
{
2026-07-04 10:09:21 -03:00
// "Remove this Column" entry in the board column header dropdown. The only
// column hook renders outside the native menu <ul>, so the item is rendered
// hidden and relocate.js moves it into the menu (like BulkMoveTasks).
$this->template->hook->attach('template:board:column:dropdown', 'organonTweaks:board/column_dropdown');
2026-07-01 09:30:31 -03:00
$this->hook->on('template:layout:js', array(
2026-07-04 10:09:21 -03:00
'template' => 'plugins/OrganonTweaks/Asset/js/relocate.js',
2026-07-01 09:30:31 -03:00
));
2026-07-05 10:20:45 -03:00
// Settings page for the plugin's tweaks.
$this->template->hook->attach('template:config:sidebar', 'organonTweaks:config/sidebar');
// Tweak: always show a comment icon on board cards. When a card has no comments
// yet, add a bubble "+" that opens the same comment modal (add the first comment
// straight from the board). Cards with comments already show the native count.
if ((int) $this->configModel->get('organon_tweaks_always_comment_icon', 1) === 1) {
$this->template->hook->attach('template:board:task:icons', 'organonTweaks:board/task_comment_icon');
}
2026-07-01 09:30:31 -03:00
}
2026-07-04 10:09:21 -03:00
public function getHelpers()
{
return array(
'Plugin\OrganonTweaks\Helper' => array('OrganonColumnHelper'),
);
}
2026-07-01 09:30:31 -03:00
public function getPluginName()
{
2026-07-04 10:09:21 -03:00
return 'OrganonTweaks';
2026-07-01 09:30:31 -03:00
}
public function getPluginDescription()
{
2026-07-05 10:20:45 -03:00
return t('Umbrella plugin for small Kanboard tweaks: remove an empty board column, always show the card comment icon, and more.');
2026-07-01 09:30:31 -03:00
}
public function getPluginAuthor()
{
return 'Ruben (drbeco)';
}
public function getPluginVersion()
{
return '0.3.1';
2026-07-01 09:30:31 -03:00
}
public function getPluginHomepage()
{
2026-07-04 10:09:21 -03:00
return 'https://code.beco.cc/beco/OrganonTweaks';
2026-07-01 09:30:31 -03:00
}
public function getCompatibleVersion()
{
return '>=1.2.0';
}
}