FinanceBuddy: shell v0.2 -- rename off Skeleton, drop demo files
This commit is contained in:
6
Asset/css/finance.css
Normal file
6
Asset/css/finance.css
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/*
|
||||||
|
* FinanceBuddy styles.
|
||||||
|
*
|
||||||
|
* Empty for now. The money badge (.fb-badge / .fb-installments) and the per-column total
|
||||||
|
* (.fb-column-total) styling are added as those features land in later versions.
|
||||||
|
*/
|
||||||
1
Asset/css/skeleton.css
vendored
1
Asset/css/skeleton.css
vendored
@@ -1 +0,0 @@
|
|||||||
/* Skeleton plugin styles -- add CSS here. Loaded via template:layout:css. */
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
// Skeleton plugin script -- add JS here. Loaded via template:layout:js.
|
|
||||||
23
Plugin.php
23
Plugin.php
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Kanboard\Plugin\Skeleton;
|
namespace Kanboard\Plugin\FinanceBuddy;
|
||||||
|
|
||||||
use Kanboard\Core\Plugin\Base;
|
use Kanboard\Core\Plugin\Base;
|
||||||
|
|
||||||
@@ -8,28 +8,21 @@ class Plugin extends Base
|
|||||||
{
|
{
|
||||||
public function initialize()
|
public function initialize()
|
||||||
{
|
{
|
||||||
// 1. Render a visible word at the top of every page (the demo output).
|
// Plugin stylesheet. Empty for now; the money badge and per-column total styling
|
||||||
$this->template->hook->attach('template:layout:top', 'skeleton:layout/header');
|
// are added as those features land in later versions.
|
||||||
|
|
||||||
// 2. Load the plugin stylesheet (currently empty -- proves the CSS hook fires).
|
|
||||||
$this->hook->on('template:layout:css', array(
|
$this->hook->on('template:layout:css', array(
|
||||||
'template' => 'plugins/Skeleton/Asset/css/skeleton.css',
|
'template' => 'plugins/FinanceBuddy/Asset/css/finance.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 getPluginName()
|
public function getPluginName()
|
||||||
{
|
{
|
||||||
return 'Skeleton';
|
return 'FinanceBuddy';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPluginDescription()
|
public function getPluginDescription()
|
||||||
{
|
{
|
||||||
return t('Reusable skeleton/template for building Kanboard plugins.');
|
return t('Attach a money value (debit/credit and installments) to board cards, shown on the card and totalled per column. Opt-in per board.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPluginAuthor()
|
public function getPluginAuthor()
|
||||||
@@ -39,12 +32,12 @@ class Plugin extends Base
|
|||||||
|
|
||||||
public function getPluginVersion()
|
public function getPluginVersion()
|
||||||
{
|
{
|
||||||
return '0.1.0';
|
return '0.2.0';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPluginHomepage()
|
public function getPluginHomepage()
|
||||||
{
|
{
|
||||||
return 'https://code.beco.cc/beco/kanboard-plugin-skeleton';
|
return 'https://code.beco.cc/beco/FinanceBuddy';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCompatibleVersion()
|
public function getCompatibleVersion()
|
||||||
|
|||||||
88
README.md
88
README.md
@@ -1,19 +1,39 @@
|
|||||||
# Skeleton -- a Kanboard plugin template
|
# FinanceBuddy -- money on your Kanboard cards
|
||||||
|
|
||||||
A minimal, working Kanboard plugin that you copy and rename as the starting point for a
|
Attach a money value to a board card, see it on the card, and total it per column -- so a
|
||||||
real plugin. By itself it does only one trivial thing: it renders the word "Skeleton" at
|
Kanboard project can double as a simple, visual finance board (bills, installments, income
|
||||||
the top of every page. It changes no data and runs no database migration.
|
vs expenses).
|
||||||
|
|
||||||
## What it demonstrates
|
FinanceBuddy is **opt-in per board**: installing it changes nothing until a project manager
|
||||||
|
enables it for a specific board under Settings -> Integrations. Boards that are not enabled
|
||||||
|
look exactly as before.
|
||||||
|
|
||||||
- A complete `Plugin.php` registration class with all the metadata Kanboard shows in
|
## The idea: a bill-lifecycle board
|
||||||
Settings -> Plugins (name, description, author, version, homepage, compatible version).
|
|
||||||
- A template hook (`template:layout:top`) that injects a template into the page.
|
Kanboard imposes no structure, so FinanceBuddy is built to fit one rather than dictate it. The
|
||||||
- Asset hooks (`template:layout:css` and `template:layout:js`) that load a stylesheet and
|
suggested organization:
|
||||||
a script. They are empty for now but prove the injection path works -- handy when a real
|
|
||||||
plugin needs custom CSS or JS.
|
- **Columns = a bill's status:** `Templates -> Due this month -> Paid`. Cards flow left to
|
||||||
- The standard plugin directory layout, with stub folders (`Controller/`, `Model/`,
|
right as they are paid.
|
||||||
`Schema/`, `Locale/`, `Test/`) ready to grow into.
|
- **Tags = category:** housing, utilities, comms, food...
|
||||||
|
- **Due date = the bill's due date;** color/priority = urgency.
|
||||||
|
- Each card carries a **money value** (debit or credit) and, optionally, an **installment**
|
||||||
|
count (`p2/10` = 2nd of 10 payments; leave the total blank for an open-ended recurring bill).
|
||||||
|
|
||||||
|
Recurring monthly bills can live as template cards spawned each month by the companion RecoReco
|
||||||
|
plugin; FinanceBuddy only owns the money.
|
||||||
|
|
||||||
|
## Money format
|
||||||
|
|
||||||
|
Amounts are shown in R$ with a comma decimal and no thousand separator (for example
|
||||||
|
`R$1234,56`). Input accepts either a dot or a comma as the decimal separator, so `1234.56` and
|
||||||
|
`1234,56` are the same value.
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
Early development. This version registers the plugin and loads its stylesheet; the per-board
|
||||||
|
toggle, the in-form editing, the card badge, and the per-column totals arrive in the following
|
||||||
|
versions.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
@@ -21,45 +41,9 @@ the top of every page. It changes no data and runs no database migration.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
No build step and no dependencies.
|
Copy this folder into your Kanboard installation as `plugins/FinanceBuddy/`. The directory name
|
||||||
|
must be exactly `FinanceBuddy` (Kanboard derives the plugin namespace from the folder name). No
|
||||||
1. Copy this folder into your Kanboard installation as `plugins/Skeleton/`.
|
build step and no database migration.
|
||||||
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.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
<div class="skeleton-plugin-marker">Skeleton</div>
|
|
||||||
Reference in New Issue
Block a user