mirror of
https://github.com/Karaka-Management/oms-Knowledgebase.git
synced 2026-02-13 16:58:42 +00:00
make type hints easier to read
This commit is contained in:
parent
0bc942c4f6
commit
23797cc50d
|
|
@ -14,7 +14,5 @@ declare(strict_types=1);
|
||||||
|
|
||||||
$app = $this->getData('app');
|
$app = $this->getData('app');
|
||||||
|
|
||||||
/**
|
/** @var \phpOMS\Views\View $this */
|
||||||
* @var \phpOMS\Views\View $this
|
|
||||||
*/
|
|
||||||
echo $this->getData('nav')->render();
|
echo $this->getData('nav')->render();
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,5 @@ declare(strict_types=1);
|
||||||
|
|
||||||
$apps = $this->getData('apps');
|
$apps = $this->getData('apps');
|
||||||
|
|
||||||
/**
|
/** @var \phpOMS\Views\View $this */
|
||||||
* @var \phpOMS\Views\View $this
|
|
||||||
*/
|
|
||||||
echo $this->getData('nav')->render();
|
echo $this->getData('nav')->render();
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,5 @@ declare(strict_types=1);
|
||||||
|
|
||||||
$app = $this->getData('app');
|
$app = $this->getData('app');
|
||||||
|
|
||||||
/**
|
/** @var \phpOMS\Views\View $this */
|
||||||
* @var \phpOMS\Views\View $this
|
|
||||||
*/
|
|
||||||
echo $this->getData('nav')->render();
|
echo $this->getData('nav')->render();
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,7 @@ use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
$categories = $this->getData('categories');
|
$categories = $this->getData('categories');
|
||||||
|
|
||||||
/**
|
/** @var \phpOMS\Views\View $this */
|
||||||
* @var \phpOMS\Views\View $this
|
|
||||||
*/
|
|
||||||
echo $this->getData('nav')->render();
|
echo $this->getData('nav')->render();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,18 +14,14 @@ declare(strict_types=1);
|
||||||
|
|
||||||
use \phpOMS\Uri\UriFactory;
|
use \phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
/**
|
/** @var \phpOMS\Views\View $this */
|
||||||
* @var \Modules\Knowledgebase\Models\WikiCategory[] $categories
|
/** @var \Modules\Knowledgebase\Models\WikiCategory[] $categories */
|
||||||
* @var \Modules\Knowledgebase\Models\WikiDoc[] $documents
|
|
||||||
*/
|
|
||||||
$categories = $this->getData('categories') ?? [];
|
$categories = $this->getData('categories') ?? [];
|
||||||
$documents = $this->getData('docs') ?? [];
|
|
||||||
|
|
||||||
/**
|
/** @var \Modules\Knowledgebase\Models\WikiDoc[] $documents */
|
||||||
* @var \phpOMS\Views\View $this
|
$documents = $this->getData('docs') ?? [];
|
||||||
*/
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->getData('nav')->render(); ?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-md-8 col-lg-9">
|
<div class="col-xs-12 col-md-8 col-lg-9">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
||||||
|
|
@ -20,32 +20,48 @@ use Modules\Knowledgebase\Models\NullWikiDoc;
|
||||||
* @var \Modules\Knowledgebase\Models\WikiDoc $doc
|
* @var \Modules\Knowledgebase\Models\WikiDoc $doc
|
||||||
*/
|
*/
|
||||||
$categories = $this->getData('categories') ?? [];
|
$categories = $this->getData('categories') ?? [];
|
||||||
$doc = $this->getData('document') ?? new NullWikiDoc();
|
|
||||||
$tags = $doc->getTags();
|
|
||||||
|
|
||||||
/**
|
/** @var \Modules\Knowledgebase\Models\WikiDoc $doc */
|
||||||
* @var \phpOMS\Views\View $this
|
$doc = $this->getData('document') ?? new NullWikiDoc();
|
||||||
*/
|
|
||||||
|
/** @var \Modules\Tag\Models\Tag[] $tag */
|
||||||
|
$tags = $doc->getTags();
|
||||||
|
|
||||||
|
/** @var bool $editable */
|
||||||
|
$editable = $this->getData('editable');
|
||||||
|
|
||||||
|
/** @var \phpOMS\Views\View $this */
|
||||||
echo $this->getData('nav')->render();
|
echo $this->getData('nav')->render();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-md-8 col-lg-9">
|
<div class="col-xs-12 col-md-8 col-lg-9">
|
||||||
<div class="portlet">
|
<section class="portlet">
|
||||||
<div class="portlet-head"><?= $this->printHtml($doc->getName()); ?></div>
|
<div class="portlet-head"><?= $this->printHtml($doc->getName()); ?></div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<article><?= $doc->getDoc(); ?></article>
|
<article><?= $doc->getDoc(); ?></article>
|
||||||
</div>
|
</div>
|
||||||
|
<?php if ($editable || !empty($tags)) : ?>
|
||||||
<div class="portlet-foot">
|
<div class="portlet-foot">
|
||||||
<?php foreach ($tags as $tag) : ?>
|
<div class="row">
|
||||||
<span class="tag" style="background: <?= $this->printHtml($tag->getColor()); ?>"><?= $this->printHtml($tag->getTitle()); ?></span>
|
<div class="col-xs-6 overflowfix">
|
||||||
<?php endforeach; ?>
|
<?php foreach ($tags as $tag) : ?>
|
||||||
|
<span class="tag" style="background: <?= $this->printHtml($tag->getColor()); ?>"><?= $this->printHtml($tag->getTitle()); ?></span>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
<?php if ($editable) : ?>
|
||||||
|
<div class="col-xs-6 rightText">
|
||||||
|
<a tabindex="0" class="button" href="<?= \phpOMS\Uri\UriFactory::build('{/prefix}wiki/doc/edit?id=' . $doc->getId()); ?>">Edit</a>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<?php endif; ?>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-12 col-md-4 col-lg-3">
|
<div class="col-xs-12 col-md-4 col-lg-3">
|
||||||
<section class="box wf-100">
|
<section class="portlet">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach ($categories as $category) : ?>
|
<?php foreach ($categories as $category) : ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user