Skip to content

Commit

Permalink
Release v1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
JustFxDev committed Mar 29, 2023
1 parent 53f42ee commit 7fb0c3b
Show file tree
Hide file tree
Showing 14 changed files with 217 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.zip
Makefile

43 changes: 43 additions & 0 deletions Assets/css/subtasksonboard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.table-suboncard {
margin-top: 10px;
margin-bottom: 10px;
border-top-style: solid;
border-top-width: 12px;
border-top-color: transparent;
border-bottom-style: solid;
border-bottom-width: 12px;
border-bottom-color: transparent;
}

.table-suboncard td:nth-child(1) {
font-size: .8em;
padding-right: 25px;
text-align: left;
background-color: rgba(190, 190, 190, 0.1)!important;
border: 0;
padding-top: 0;
}


/* if Plugin "SubTaskDuedate is available, format date column */
.table-suboncard td:nth-child(2) {
font-size: .8em;
padding-right: 4px;
background-color: rgba(190, 190, 190, 0.1)!important;
border: 0;
padding-top: 0;
}

/* nested html tags from Kanboard subtaskhelper are somehow complicated to format */
.table-suboncard .js-subtask-toggle-status {
display: unset;
}

.table-suboncard .subtask-title i {
display: flex;
margin-left: 4px;
}

.table-suboncard .subtask-title a {
display: -webkit-box;
}
1 change: 1 addition & 0 deletions Assets/images/license.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Assets/images/maintained.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Assets/images/north_west.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Assets/images/version.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Helper/SubtasklistHelper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Kanboard\Plugin\SubtasksOnBoard\Helper;

use Kanboard\Core\Base;
use Kanboard\Model\SubtaskModel;

class SubtasklistHelper extends Base
{
public function subtasks($task_id)
{
return $this->subtaskModel->getAll($task_id);
}
}

12 changes: 6 additions & 6 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License
The MIT License (MIT)

Copyright (c) 2023 Fx
Copyright (c) 2021,2023 JustFxDev (Fx), rfde

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
4 changes: 4 additions & 0 deletions Locale/de_DE/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
return array(
'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.',
);
57 changes: 57 additions & 0 deletions Plugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

namespace Kanboard\Plugin\SubtasksOnBoard;

use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Translator;

class Plugin extends Base
{
public function initialize()
{
$this->helper->register('subtasklistHelper', '\Kanboard\Plugin\SubtasksOnBoard\Helper\SubtasklistHelper');
$this->template->hook->attach('template:board:private:task:after-title', 'SubtasksOnBoard:board/subtasklist');
$this->hook->on("template:layout:css", array("template" => "plugins/SubtasksOnBoard/Assets/css/subtasksonboard.css"));
}

public function onStartup()
{
Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
}

public function getPluginName()
{
// Plugin Name MUST be identical to namespace for Plugin Directory to detect updated versions
// Do not translate the plugin name here
return 'SubtasksOnBoard';
}

public function getPluginDescription()
{
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.');
}

public function getPluginAuthor()
{
return 'JustFxDev, Till Schlueter';
}

public function getPluginVersion()
{
return '1.0.9';
}

public function getCompatibleVersion()
{
// Examples:
// >=1.0.37
// <1.0.37
// <=1.0.37
return '>=1.2.20';
}

public function getPluginHomepage()
{
return 'https://github.com/JustFxDev/SubtaskOnBoard';
}
}
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
![north_west](./Assets/images/north_west.svg) Use the table of contents icon

[![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)

**: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!*


# Show Subtasks on Board

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.

## Features

- Set the status of a subtask directly on the card (not yet started, in progress, finished)

- display due date of the sub task (needs the subtask due date plugin s. above)

- Tested with [ThemeMaestro](https://github.com/JustFxDev/ThemeMaestro)

## Screenshots

![](./Assets/images/screenshot.png)

Requirements
------------

- Kanboard >= 1.2.20

## Installation

Options for the installation:

1. Installation via the plugin manager in Kanboard (recommended).
2. Download the zip file from releases folder here in the repository and unzip it in the directory `plugins/SubtasksOnBoard` (recommended)
3. Clone the repository (current master) into the directory `plugins/SubtasksOnBoard` (not recommended. Very latest code, but not yet released code)

Note: All names in the plugin directory are case-sensitive

## Possible further development

- Provide configuration option to enable or disable the display of subtasks on cards per board

## Authors & Contributors
- [JustFxDev](https://github.com/JustFxDev/) - Author (since v1.0.9)
- [rfde](https://github.com/rfde) - Author (until v1.0.0)
- _Contributors welcome_

## License
- This project is distributed under the [MIT License](../main/LICENSE "Read The MIT license")
15 changes: 15 additions & 0 deletions Template/board/subtasklist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
$subtasks = $this->helper->subtasklistHelper->subtasks($task['id']);
if (sizeof($subtasks) > 0):
?>
<table class="table-suboncard">
<?php foreach ($subtasks as $subtask): ?>
<tr>
<td>
<?= $this->subtask->renderToggleStatus($task, $subtask) ?>
</td>
<?= $this->hook->render('template:board:tooltip:subtasks:rows', array('subtask' => $subtask)) ?>
</tr>
<?php endforeach ?>
</table>
<?php endif ?>
21 changes: 21 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog

### What's Changed

_(most recent changes are listed on top):_

## v1.0.9

- Corrected display glitches (css)
- Supports "SubtaskDuedate" Plugin
- Added language for plugin description
- Minor changes to the plugin structure
- Tested with "ThemeMaestro"
- Friendly take over by JustFxDev from Till (rfde) - Thanks for that!


## v1.0.0

- Initial release

Read the full [**Changelog**](../main/changelog.md) or view the [**README**](../main/README.md)

0 comments on commit 7fb0c3b

Please sign in to comment.