My WorkspaceOrg main page, personal per-user project workspaces -- dashboard page, badges, CRUD + assign
This commit is contained in:
38
Plugin.php
38
Plugin.php
@@ -1,35 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Kanboard\Plugin\Skeleton;
|
||||
namespace Kanboard\Plugin\WorkspaceOrg;
|
||||
|
||||
use Kanboard\Core\Plugin\Base;
|
||||
|
||||
/**
|
||||
* WorkspaceOrg -- group your projects into personal workspaces.
|
||||
*
|
||||
* Each user files their own projects into their own named workspaces (a per-user folder). Everything
|
||||
* is stored in user metadata -- nothing global, no database migration. A "My workspaces" page on the
|
||||
* dashboard lists projects grouped by workspace and lets you add/rename/remove workspaces and move
|
||||
* projects between them; a [Workspace] badge appears before the project title on the dashboard and
|
||||
* the project list.
|
||||
*/
|
||||
class Plugin extends Base
|
||||
{
|
||||
public function initialize()
|
||||
{
|
||||
// 1. Render a visible word at the top of every page (the demo output).
|
||||
$this->template->hook->attach('template:layout:top', 'skeleton:layout/header');
|
||||
// "My workspaces" entry in the dashboard sidebar (visible to every logged-in user).
|
||||
$this->template->hook->attach('template:dashboard:sidebar', 'workspaceOrg:dashboard/sidebar');
|
||||
|
||||
// [Workspace] badge before the project title -- this hook fires on the dashboard overview,
|
||||
// the dashboard "My projects" tab, and the Projects management list (all via project_title).
|
||||
$this->template->hook->attach('template:dashboard:project:before-title', 'workspaceOrg:project/badge');
|
||||
|
||||
// 2. Load the plugin stylesheet (currently empty -- proves the CSS hook fires).
|
||||
$this->hook->on('template:layout:css', array(
|
||||
'template' => 'plugins/Skeleton/Asset/css/skeleton.css',
|
||||
'template' => 'plugins/WorkspaceOrg/Asset/css/workspaceorg.css',
|
||||
));
|
||||
}
|
||||
|
||||
// 3. Load the plugin script (currently empty -- proves the JS hook fires).
|
||||
$this->hook->on('template:layout:js', array(
|
||||
'template' => 'plugins/Skeleton/Asset/js/skeleton.js',
|
||||
));
|
||||
public function getHelpers()
|
||||
{
|
||||
return array(
|
||||
'Plugin\WorkspaceOrg\Helper' => array('WorkspaceOrgHelper'),
|
||||
);
|
||||
}
|
||||
|
||||
public function getPluginName()
|
||||
{
|
||||
return 'Skeleton';
|
||||
return 'WorkspaceOrg';
|
||||
}
|
||||
|
||||
public function getPluginDescription()
|
||||
{
|
||||
return t('Reusable skeleton/template for building Kanboard plugins.');
|
||||
return t('Group your projects into personal per-user workspaces, shown on a "My workspaces" dashboard page with a badge on each project.');
|
||||
}
|
||||
|
||||
public function getPluginAuthor()
|
||||
@@ -44,7 +58,7 @@ class Plugin extends Base
|
||||
|
||||
public function getPluginHomepage()
|
||||
{
|
||||
return 'https://code.beco.cc/beco/kanboard-plugin-skeleton';
|
||||
return 'https://code.beco.cc/beco/WorkspaceOrg';
|
||||
}
|
||||
|
||||
public function getCompatibleVersion()
|
||||
|
||||
Reference in New Issue
Block a user