Skip to content

Commit 7fb0c3b

Browse files
committed
Release v1.0.9
1 parent 53f42ee commit 7fb0c3b

File tree

14 files changed

+217
-6
lines changed

14 files changed

+217
-6
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.zip
2+
Makefile
3+

Assets/css/subtasksonboard.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.table-suboncard {
2+
margin-top: 10px;
3+
margin-bottom: 10px;
4+
border-top-style: solid;
5+
border-top-width: 12px;
6+
border-top-color: transparent;
7+
border-bottom-style: solid;
8+
border-bottom-width: 12px;
9+
border-bottom-color: transparent;
10+
}
11+
12+
.table-suboncard td:nth-child(1) {
13+
font-size: .8em;
14+
padding-right: 25px;
15+
text-align: left;
16+
background-color: rgba(190, 190, 190, 0.1)!important;
17+
border: 0;
18+
padding-top: 0;
19+
}
20+
21+
22+
/* if Plugin "SubTaskDuedate is available, format date column */
23+
.table-suboncard td:nth-child(2) {
24+
font-size: .8em;
25+
padding-right: 4px;
26+
background-color: rgba(190, 190, 190, 0.1)!important;
27+
border: 0;
28+
padding-top: 0;
29+
}
30+
31+
/* nested html tags from Kanboard subtaskhelper are somehow complicated to format */
32+
.table-suboncard .js-subtask-toggle-status {
33+
display: unset;
34+
}
35+
36+
.table-suboncard .subtask-title i {
37+
display: flex;
38+
margin-left: 4px;
39+
}
40+
41+
.table-suboncard .subtask-title a {
42+
display: -webkit-box;
43+
}

Assets/images/license.svg

Lines changed: 1 addition & 0 deletions
Loading

Assets/images/maintained.svg

Lines changed: 1 addition & 0 deletions
Loading

Assets/images/north_west.svg

Lines changed: 1 addition & 0 deletions
Loading

Assets/images/screenshot.png

97.7 KB
Loading

Assets/images/version.svg

Lines changed: 1 addition & 0 deletions
Loading

Helper/SubtasklistHelper.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace Kanboard\Plugin\SubtasksOnBoard\Helper;
4+
5+
use Kanboard\Core\Base;
6+
use Kanboard\Model\SubtaskModel;
7+
8+
class SubtasklistHelper extends Base
9+
{
10+
public function subtasks($task_id)
11+
{
12+
return $this->subtaskModel->getAll($task_id);
13+
}
14+
}
15+

LICENSE

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
MIT License
1+
The MIT License (MIT)
22

3-
Copyright (c) 2023 Fx
3+
Copyright (c) 2021,2023 JustFxDev (Fx), rfde
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
copies of the Software, and to permit persons to whom the Software is
1010
furnished to do so, subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
1414

1515
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Locale/de_DE/translations.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
return array(
3+
'Displays the subtasks of a task on the task card on the board. One can change state of a subtask directly on the card. Supports display of subtask duedate if the plugin "Subtaskdate" is installed.' => 'Zeigt die Unteraufgaben eines Tasks direkt auf der Task-Karte auf dem Board an. Der Status der Unteraufgabe kann dort auch direkt geändert werden. Außerdem wird die Anzeige des Fälligkeitsdatums der Unteraufgabe unterstützt, wenn das PlugIn "Subtaskdate" installiert ist.',
4+
);

Plugin.php

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php
2+
3+
namespace Kanboard\Plugin\SubtasksOnBoard;
4+
5+
use Kanboard\Core\Plugin\Base;
6+
use Kanboard\Core\Translator;
7+
8+
class Plugin extends Base
9+
{
10+
public function initialize()
11+
{
12+
$this->helper->register('subtasklistHelper', '\Kanboard\Plugin\SubtasksOnBoard\Helper\SubtasklistHelper');
13+
$this->template->hook->attach('template:board:private:task:after-title', 'SubtasksOnBoard:board/subtasklist');
14+
$this->hook->on("template:layout:css", array("template" => "plugins/SubtasksOnBoard/Assets/css/subtasksonboard.css"));
15+
}
16+
17+
public function onStartup()
18+
{
19+
Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
20+
}
21+
22+
public function getPluginName()
23+
{
24+
// Plugin Name MUST be identical to namespace for Plugin Directory to detect updated versions
25+
// Do not translate the plugin name here
26+
return 'SubtasksOnBoard';
27+
}
28+
29+
public function getPluginDescription()
30+
{
31+
return t('Displays the subtasks of a task on the task card on the board. One can change state of a subtask directly on the card. Supports display of subtask duedate if the plugin "Subtaskdate" is installed.');
32+
}
33+
34+
public function getPluginAuthor()
35+
{
36+
return 'JustFxDev, Till Schlueter';
37+
}
38+
39+
public function getPluginVersion()
40+
{
41+
return '1.0.9';
42+
}
43+
44+
public function getCompatibleVersion()
45+
{
46+
// Examples:
47+
// >=1.0.37
48+
// <1.0.37
49+
// <=1.0.37
50+
return '>=1.2.20';
51+
}
52+
53+
public function getPluginHomepage()
54+
{
55+
return 'https://github.com/JustFxDev/SubtaskOnBoard';
56+
}
57+
}

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
![north_west](./Assets/images/north_west.svg) Use the table of contents icon
2+
3+
[![version](./Assets/images/version.svg)](https://github.com/JustFxDev/SubtasksOnBoard/releases) [![license](./Assets/images/license.svg)](https://github.com/JustFxDev/SubtasksOnBoard/blob/main/LICENSE) [![maintainedyes](./Assets/images/maintained.svg)](https://github.com/JustFxDev/SubtasksOnBoard/graphs/contributors)
4+
5+
**:star: If you use it, you should star it on GitHub!** *It's the least you can do for all the work put into it!*
6+
7+
8+
# Show Subtasks on Board
9+
10+
Displays the subtasks of a task on the task card on the board. One can change state of a subtask directly on the card. Supports display of [subtask due date](https://github.com/eSkiSo/Subtaskdate) if that plugin is installed.
11+
12+
## Features
13+
14+
- Set the status of a subtask directly on the card (not yet started, in progress, finished)
15+
16+
- display due date of the sub task (needs the subtask due date plugin s. above)
17+
18+
- Tested with [ThemeMaestro](https://github.com/JustFxDev/ThemeMaestro)
19+
20+
## Screenshots
21+
22+
![](./Assets/images/screenshot.png)
23+
24+
Requirements
25+
------------
26+
27+
- Kanboard >= 1.2.20
28+
29+
## Installation
30+
31+
Options for the installation:
32+
33+
1. Installation via the plugin manager in Kanboard (recommended).
34+
2. Download the zip file from releases folder here in the repository and unzip it in the directory `plugins/SubtasksOnBoard` (recommended)
35+
3. Clone the repository (current master) into the directory `plugins/SubtasksOnBoard` (not recommended. Very latest code, but not yet released code)
36+
37+
Note: All names in the plugin directory are case-sensitive
38+
39+
## Possible further development
40+
41+
- Provide configuration option to enable or disable the display of subtasks on cards per board
42+
43+
## Authors & Contributors
44+
- [JustFxDev](https://github.com/JustFxDev/) - Author (since v1.0.9)
45+
- [rfde](https://github.com/rfde) - Author (until v1.0.0)
46+
- _Contributors welcome_
47+
48+
## License
49+
- This project is distributed under the [MIT License](../main/LICENSE "Read The MIT license")

Template/board/subtasklist.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
$subtasks = $this->helper->subtasklistHelper->subtasks($task['id']);
3+
if (sizeof($subtasks) > 0):
4+
?>
5+
<table class="table-suboncard">
6+
<?php foreach ($subtasks as $subtask): ?>
7+
<tr>
8+
<td>
9+
<?= $this->subtask->renderToggleStatus($task, $subtask) ?>
10+
</td>
11+
<?= $this->hook->render('template:board:tooltip:subtasks:rows', array('subtask' => $subtask)) ?>
12+
</tr>
13+
<?php endforeach ?>
14+
</table>
15+
<?php endif ?>

changelog.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Changelog
2+
3+
### What's Changed
4+
5+
_(most recent changes are listed on top):_
6+
7+
## v1.0.9
8+
9+
- Corrected display glitches (css)
10+
- Supports "SubtaskDuedate" Plugin
11+
- Added language for plugin description
12+
- Minor changes to the plugin structure
13+
- Tested with "ThemeMaestro"
14+
- Friendly take over by JustFxDev from Till (rfde) - Thanks for that!
15+
16+
17+
## v1.0.0
18+
19+
- Initial release
20+
21+
Read the full [**Changelog**](../main/changelog.md) or view the [**README**](../main/README.md)

0 commit comments

Comments
 (0)