mirror of
https://github.com/Karaka-Management/oms-Kanban.git
synced 2026-02-18 05:08:41 +00:00
prepare description
This commit is contained in:
parent
38e87c331b
commit
a5d09a0a34
|
|
@ -94,6 +94,12 @@
|
||||||
"default": null,
|
"default": null,
|
||||||
"null": true
|
"null": true
|
||||||
},
|
},
|
||||||
|
"kanban_card_descriptionraw": {
|
||||||
|
"name": "kanban_card_descriptionraw",
|
||||||
|
"type": "TEXT",
|
||||||
|
"default": null,
|
||||||
|
"null": true
|
||||||
|
},
|
||||||
"kanban_card_type": {
|
"kanban_card_type": {
|
||||||
"name": "kanban_card_type",
|
"name": "kanban_card_type",
|
||||||
"type": "TINYINT",
|
"type": "TINYINT",
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ use phpOMS\Message\NotificationLevel;
|
||||||
use phpOMS\Message\RequestAbstract;
|
use phpOMS\Message\RequestAbstract;
|
||||||
use phpOMS\Message\ResponseAbstract;
|
use phpOMS\Message\ResponseAbstract;
|
||||||
use phpOMS\Model\Message\FormValidation;
|
use phpOMS\Model\Message\FormValidation;
|
||||||
|
use phpOMS\Utils\Parser\Markdown\Markdown;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kanban controller class.
|
* Kanban controller class.
|
||||||
|
|
@ -80,9 +81,10 @@ final class ApiController extends Controller
|
||||||
*/
|
*/
|
||||||
public function createKanbanCardFromRequest(RequestAbstract $request) : KanbanCard
|
public function createKanbanCardFromRequest(RequestAbstract $request) : KanbanCard
|
||||||
{
|
{
|
||||||
$card = new KanbanCard();
|
$card = new KanbanCard();
|
||||||
$card->name = (string) ($request->getData('title'));
|
$card->name = (string) ($request->getData('title'));
|
||||||
$card->description = (string) ($request->getData('plain') ?? '');
|
$card->description = Markdown::parse((string) ($request->getData('plain') ?? ''));
|
||||||
|
$card->descriptionRaw = (string) ($request->getData('plain') ?? '');
|
||||||
$card->setColumn((int) $request->getData('column'));
|
$card->setColumn((int) $request->getData('column'));
|
||||||
$card->setOrder((int) ($request->getData('order') ?? 1));
|
$card->setOrder((int) ($request->getData('order') ?? 1));
|
||||||
$card->setRef((int) ($request->getData('ref') ?? 0));
|
$card->setRef((int) ($request->getData('ref') ?? 0));
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,14 @@ class KanbanCard implements \JsonSerializable
|
||||||
*/
|
*/
|
||||||
public string $description = '';
|
public string $description = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public string $descriptionRaw = '';
|
||||||
|
|
||||||
private int $column = 0;
|
private int $column = 0;
|
||||||
|
|
||||||
private int $order = 0;
|
private int $order = 0;
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ final class KanbanCardMapper extends DataMapperAbstract
|
||||||
'kanban_card_id' => ['name' => 'kanban_card_id', 'type' => 'int', 'internal' => 'id'],
|
'kanban_card_id' => ['name' => 'kanban_card_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'kanban_card_name' => ['name' => 'kanban_card_name', 'type' => 'string', 'internal' => 'name'],
|
'kanban_card_name' => ['name' => 'kanban_card_name', 'type' => 'string', 'internal' => 'name'],
|
||||||
'kanban_card_description' => ['name' => 'kanban_card_description', 'type' => 'string', 'internal' => 'description'],
|
'kanban_card_description' => ['name' => 'kanban_card_description', 'type' => 'string', 'internal' => 'description'],
|
||||||
|
'kanban_card_descriptionraw' => ['name' => 'kanban_card_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'],
|
||||||
'kanban_card_type' => ['name' => 'kanban_card_type', 'type' => 'int', 'internal' => 'type'],
|
'kanban_card_type' => ['name' => 'kanban_card_type', 'type' => 'int', 'internal' => 'type'],
|
||||||
'kanban_card_status' => ['name' => 'kanban_card_status', 'type' => 'int', 'internal' => 'status'],
|
'kanban_card_status' => ['name' => 'kanban_card_status', 'type' => 'int', 'internal' => 'status'],
|
||||||
'kanban_card_order' => ['name' => 'kanban_card_order', 'type' => 'int', 'internal' => 'order'],
|
'kanban_card_order' => ['name' => 'kanban_card_order', 'type' => 'int', 'internal' => 'order'],
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ $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" draggable="true">
|
<div id="kanban-column-<?= $i; ?>" class="col-xs-12 col-sm-3 box" draggable="true">
|
||||||
<header><?= $this->printHtml($column->name); ?></header>
|
<header><?= $this->printHtml($column->name); ?></header>
|
||||||
<?php $j = 0; foreach ($cards as $card) : $j++; $labels = $card->getLabels(); ?>
|
<?php $j = 0; foreach ($cards as $card) : $j++; $labels = $card->getLabels(); ?>
|
||||||
<a href="<?= $this->printHtml(\phpOMS\Uri\UriFactory::build('{/prefix}kanban/card?{?}&id=' . $card->getId())); ?>">
|
<a href="<?= $this->printHtml(\phpOMS\Uri\UriFactory::build('{/prefix}kanban/card?{?}&id=' . $card->getId())); ?>">
|
||||||
<section id="kanban-card-<?= $this->printHtml($i . '-' . $j); ?>" class="box wf-100" draggable="true">
|
<section id="kanban-card-<?= $this->printHtml($i . '-' . $j); ?>" class="portlet" draggable="true">
|
||||||
<header><h1><?= $this->printHtml($card->name); ?></h1></header>
|
<div class="portlet-head"><?= $this->printHtml($card->name); ?></div>
|
||||||
<div class="inner">
|
<div class="portlet-body">
|
||||||
<?= $this->printHtml($card->description); ?>
|
<?= $this->printHtml($card->description); ?>
|
||||||
<?php foreach ($labels as $label) : ?>
|
<?php foreach ($labels as $label) : ?>
|
||||||
<span class="tag" style="background: #<?= $this->printHtml(\dechex($label->getColor())); ?>"><?= $this->printHtml($label->getName()); ?></span>
|
<span class="tag" style="background: #<?= $this->printHtml(\dechex($label->getColor())); ?>"><?= $this->printHtml($label->getName()); ?></span>
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ $comments = $card->getComments();
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<section class="box wf-100">
|
<section class="portlet">
|
||||||
<header><h1><?= $this->printHtml($card->name); ?></h1></header>
|
<div class="portlet-head"><?= $this->printHtml($card->name); ?></div>
|
||||||
<div class="inner">
|
<div class="portlet-body">
|
||||||
<?= $this->printHtml($card->description); ?>
|
<?= $this->printHtml($card->description); ?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -17,8 +17,8 @@ $comments = $card->getComments();
|
||||||
<?php foreach ($comments as $comment) : ?>
|
<?php foreach ($comments as $comment) : ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<section class="box wf-100">
|
<section class="portlet">
|
||||||
<div class="inner">
|
<div class="portlet-body">
|
||||||
<?= $this->printHtml($comment->description); ?>
|
<?= $this->printHtml($comment->description); ?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user