formatting fixes, bug fixes and support impl.

This commit is contained in:
Dennis Eichhorn 2021-07-04 18:27:21 +02:00
parent a64dfa367e
commit a495a65476
10 changed files with 54 additions and 10 deletions

View File

@ -26,7 +26,7 @@ use phpOMS\Message\ResponseAbstract;
use phpOMS\Views\View; use phpOMS\Views\View;
/** /**
* Task class. * Kanban backend controller class.
* *
* @package Modules\Kanban * @package Modules\Kanban
* @license OMS License 1.0 * @license OMS License 1.0

View File

@ -17,7 +17,7 @@ namespace Modules\Kanban\Controller;
use phpOMS\Module\ModuleAbstract; use phpOMS\Module\ModuleAbstract;
/** /**
* Task class. * Kanban controller class.
* *
* @package Modules\Kanban * @package Modules\Kanban
* @license OMS License 1.0 * @license OMS License 1.0

View File

@ -19,7 +19,7 @@ use Modules\Admin\Models\NullAccount;
use Modules\Tag\Models\Tag; use Modules\Tag\Models\Tag;
/** /**
* Task class. * Kanban board class.
* *
* @package Modules\Kanban\Models * @package Modules\Kanban\Models
* @license OMS License 1.0 * @license OMS License 1.0

View File

@ -18,7 +18,7 @@ use Modules\Admin\Models\Account;
use Modules\Admin\Models\NullAccount; use Modules\Admin\Models\NullAccount;
/** /**
* Task class. * Kanban card comment class.
* *
* @package Modules\Kanban\Models * @package Modules\Kanban\Models
* @license OMS License 1.0 * @license OMS License 1.0

View File

@ -15,7 +15,7 @@ declare(strict_types=1);
namespace Modules\Kanban\Models; namespace Modules\Kanban\Models;
/** /**
* Task class. * Kanban column class.
* *
* @package Modules\Kanban\Models * @package Modules\Kanban\Models
* @license OMS License 1.0 * @license OMS License 1.0

0
Models/styles.tpl.json Normal file → Executable file
View File

View File

@ -0,0 +1,7 @@
.kanban-column .portlet-head {
display: flex;
flex-direction: row; }
.kanban-column .portlet-head > a {
flex: 1; }
.kanban-column .portlet-head div {
flex: 0; }

View File

@ -1,3 +1,14 @@
.m-kanban { .kanban-column {
.portlet-head {
display: flex;
flex-direction: row;
> a {
flex: 1;
}
div {
flex: 0;
}
}
} }

View File

@ -25,13 +25,16 @@ $columns = $board->getColumns();
--> -->
<div class="row"> <div class="row">
<?php $i = 0; foreach ($columns as $column) : $i++; $cards = $column->getCards(); ?> <?php $i = 0; foreach ($columns as $column) : $i++; $cards = $column->getCards(); ?>
<div id="kanban-column-<?= $i; ?>" class="col-xs-12 col-sm-3 box" draggable="true"> <div id="kanban-column-<?= $i; ?>" class="col-xs-12 col-sm-3 box kanban-column" draggable="true">
<header><?= $this->printHtml($column->name); ?></header> <header><?= $this->printHtml($column->name); ?></header>
<?php $j = 0; foreach ($cards as $card) : $j++; <?php $j = 0; foreach ($cards as $card) : $j++;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}kanban/card?{?}&id=' . $card->getId()); $url = \phpOMS\Uri\UriFactory::build('{/prefix}kanban/card?{?}&id=' . $card->getId());
?> ?>
<section id="kanban-card-<?= $this->printHtml($i . '-' . $j); ?>" class="portlet" draggable="true"> <section id="kanban-card-<?= $this->printHtml($i . '-' . $j); ?>" class="portlet" draggable="true">
<div class="portlet-head"><a href="<?= $url; ?>"><?= $this->printHtml($card->name); ?></a><span class="floatRight tag"><?= $card->getCommentCount(); ?></span></div> <div class="portlet-head">
<a href="<?= $url; ?>"><?= $this->printHtml($card->name); ?></a>
<div><span class="tag"><?= $card->getCommentCount(); ?></span></div>
</div>
<div class="portlet-body"> <div class="portlet-body">
<article><?= $card->description; ?></article> <article><?= $card->description; ?></article>
</div> </div>

View File

@ -1,8 +1,31 @@
<?php declare(strict_types=1); <?php
$card = $this->getData('card'); /**
* Orange Management
*
* PHP Version 8.0
*
* @package Modules\Kanban
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
use phpOMS\Uri\UriFactory;
/** @var \Modules\Kanban\Models\KanbanCard $card */
$card = $this->getData('card');
$comments = $card->getComments(); $comments = $card->getComments();
?> ?>
<div class="row">
<div class="box">
<a tabindex="0" class="button" href="<?= $this->request->getReferer() !== '' ? $this->request->getReferer() : UriFactory::build('{/prefix}kanban/dashboard'); ?>"><?= $this->getHtml('Back'); ?></a>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<section class="portlet"> <section class="portlet">