My WorkspaceOrg main page, personal per-user project workspaces -- dashboard page, badges, CRUD + assign

This commit is contained in:
2026-07-12 21:54:03 -03:00
parent 52355428c4
commit 5728cf37b2
14 changed files with 638 additions and 67 deletions

112
README.md
View File

@@ -1,19 +1,43 @@
# Skeleton -- a Kanboard plugin template
# WorkspaceOrg -- group your projects into personal workspaces
A minimal, working Kanboard plugin that you copy and rename as the starting point for a
real plugin. By itself it does only one trivial thing: it renders the word "Skeleton" at
the top of every page. It changes no data and runs no database migration.
A small Kanboard plugin that lets each user file their projects into their own named
**workspaces** (think folders: "UNIBRA", "UPE", "Home"), and see them grouped on a
**My workspaces** dashboard page. Kanboard's project list is otherwise flat -- this gives you
structure without touching how projects themselves work.
## What it demonstrates
Everything is **per user**: your workspaces and how you file your projects are yours alone.
Two people can file the same shared project differently, and neither sees the other's grouping.
- A complete `Plugin.php` registration class with all the metadata Kanboard shows in
Settings -> Plugins (name, description, author, version, homepage, compatible version).
- A template hook (`template:layout:top`) that injects a template into the page.
- Asset hooks (`template:layout:css` and `template:layout:js`) that load a stylesheet and
a script. They are empty for now but prove the injection path works -- handy when a real
plugin needs custom CSS or JS.
- The standard plugin directory layout, with stub folders (`Controller/`, `Model/`,
`Schema/`, `Locale/`, `Test/`) ready to grow into.
## What it does
- Adds a **My workspaces** entry to the dashboard sidebar (next to Overview / My projects /
My tasks / My subtasks). Visible to every logged-in user -- no admin rights needed.
- That page lists your projects **grouped by workspace**, and lets you:
- **add / rename / remove** workspaces (each via a small modal, like Kanboard's Tags page);
- **move a project** to another workspace with an inline dropdown on its row.
- Shows a **`[Workspace]`** badge before the project title on the dashboard overview, the
dashboard "My projects" tab, and the Projects management list -- so you can see at a glance
where each project is filed.
## The "Default" workspace
Every project starts in **Default**, which is simply "not filed yet". Default is not a real
stored workspace -- it is the leftover bucket -- so it can never be renamed or removed, and it
always sorts last. Projects in Default show **no badge** (to keep unfiled projects clean).
Removing a workspace moves its projects back to Default; it never deletes anything.
## Ordering
On the My workspaces page, workspaces are listed alphabetically (A-Z) with Default last, and the
projects within each workspace are alphabetical too.
## How it stores data
No database migration. Everything lives in **user metadata**: your workspace names
(`workspaceorg_names`) and your project-to-workspace map (`workspaceorg_map`), both as JSON.
Nothing is global and nothing touches the projects themselves -- uninstalling the plugin leaves
that metadata harmlessly in place and changes nothing about your projects.
## Requirements
@@ -21,46 +45,30 @@ the top of every page. It changes no data and runs no database migration.
## Installation
No build step and no dependencies.
1. Copy this folder into your Kanboard installation as `plugins/Skeleton/`.
2. Reload any page. The word "Skeleton" appears at the top.
3. Confirm it under Settings -> Plugins.
To uninstall, delete `plugins/Skeleton/`. Nothing else is left behind.
## Directory layout
```
Skeleton/
Plugin.php Registration and hook wiring (the only required file).
README.md
LICENSE AGPL-3.0.
Template/
layout/header.php The visible "Skeleton" word.
Asset/
css/skeleton.css Loaded via template:layout:css.
js/skeleton.js Loaded via template:layout:js.
Controller/ Stub for future request handlers.
Model/ Stub for future business logic / DB access.
Schema/ Stub for future database migrations.
Locale/ Stub for future translations (e.g. pt_BR/, fr_FR/).
Test/ Stub for future unit tests.
```
## How to fork this into a new plugin
1. Copy the folder and rename it, e.g. `plugins/MyPlugin/`. The folder name must match the
namespace and start with a capital letter.
2. In `Plugin.php`, change the namespace from `Kanboard\Plugin\Skeleton` to
`Kanboard\Plugin\MyPlugin`.
3. Update the metadata methods (`getPluginName`, `getPluginDescription`, `getPluginAuthor`,
`getPluginVersion`, `getPluginHomepage`, `getCompatibleVersion`).
4. Update the hook target paths: the lowercase prefix in `'skeleton:layout/header'` and the
`plugins/Skeleton/Asset/...` asset paths must match the new plugin name.
5. Replace `Template/layout/header.php` with your real template, or attach to a different
hook. See the Kanboard plugin hooks documentation for the full list of hook points.
Copy this folder into your Kanboard installation as `plugins/WorkspaceOrg/`. The directory name
must be exactly `WorkspaceOrg` (Kanboard derives the plugin namespace from the folder name). No
build step and no database migration. Reload, then open **My workspaces** from the dashboard.
## License
AGPL-3.0. See LICENSE.
## More Kanboard plugins by Ruben (drbeco)
All free and AGPL-3.0, at [code.beco.cc](https://code.beco.cc/beco):
- **[RecoReco](https://code.beco.cc/beco/RecoReco)** -- calendar-scheduled recurring cards (yearly,
monthly, weekly, daily), driven by the card due date.
- **[FinanceBuddy](https://code.beco.cc/beco/FinanceBuddy)** -- attach a money value (debit/credit
and installments) to cards, shown on the card and totalled per column.
- **[QualKard](https://code.beco.cc/beco/QualKard)** -- flashcard spaced repetition: grade a card by
dragging it to a column, and it comes back when due (needs RecoReco).
- **[OrganonTweaks](https://code.beco.cc/beco/OrganonTweaks)** -- an umbrella of small
quality-of-life board tweaks: remove an empty column, always show the comment icon, emphasize due
dates, extra search keywords and shared board filters, and more.
- **[BulkMoveTasks](https://code.beco.cc/beco/BulkMoveTasks)** -- move every task from one board
column to another in a single action.
- **[ShrinkVertically](https://code.beco.cc/beco/ShrinkVertically)** -- shrink vertically-collapsed
board columns so the horizontal scrollbar stays within reach.
- **[TweakDrag](https://code.beco.cc/beco/TweakDrag)** -- board drag and touch niceties:
drag-to-scroll, a wider column gap, and smoother card dragging.