mirror of
https://github.com/Karaka-Management/oms-QA.git
synced 2026-02-17 00:08:40 +00:00
update
This commit is contained in:
parent
454d1b7afe
commit
30622b03a3
|
|
@ -116,10 +116,12 @@ final class BackendController extends Controller
|
||||||
$question = QAQuestionMapper::get()
|
$question = QAQuestionMapper::get()
|
||||||
->with('answers')
|
->with('answers')
|
||||||
->with('answers/createdBy')
|
->with('answers/createdBy')
|
||||||
|
->with('answers/createdBy/image')
|
||||||
->with('answers/createdBy/account')
|
->with('answers/createdBy/account')
|
||||||
->with('answers/votes')
|
->with('answers/votes')
|
||||||
->with('createdBy')
|
->with('createdBy')
|
||||||
->with('createdBy/account')
|
->with('createdBy/account')
|
||||||
|
->with('createdBy/image')
|
||||||
->with('votes')
|
->with('votes')
|
||||||
->with('tags')
|
->with('tags')
|
||||||
->with('tags/title')
|
->with('tags/title')
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ final class NullQAAnswerVote extends QAAnswerVote
|
||||||
public function __construct(int $id = 0)
|
public function __construct(int $id = 0)
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ final class NullQAQuestionVote extends QAQuestionVote
|
||||||
public function __construct(int $id = 0)
|
public function __construct(int $id = 0)
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,9 @@ echo $this->data['nav']->render(); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-foot qa-portlet-foot">
|
<div class="portlet-foot qa-portlet-foot">
|
||||||
<div class="tag-list">
|
<div class="tag-list">
|
||||||
<?php $tags = $question->getTags(); foreach ($tags as $tag) : ?>
|
<?php $tags = $question->getTags(); foreach ($tags as $tag) :
|
||||||
|
if ($tag->id === 0) { continue; }
|
||||||
|
?>
|
||||||
<span class="tag"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
<span class="tag"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,11 @@ echo $this->data['nav']->render();
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-foot qa-portlet-foot">
|
<div class="portlet-foot qa-portlet-foot">
|
||||||
<div class="tag-list">
|
<div class="tag-list">
|
||||||
<?php $tags = $question->getTags(); foreach ($tags as $tag) : ?>
|
<?php
|
||||||
|
$tags = $question->getTags();
|
||||||
|
foreach ($tags as $tag) :
|
||||||
|
if ($tag->id === 0) { continue; }
|
||||||
|
?>
|
||||||
<span class="tag"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
<span class="tag"><?= !empty($tag->icon) ? '<i class="' . $this->printHtml($tag->icon) . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -84,7 +88,7 @@ echo $this->data['nav']->render();
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<?php if ($question->createdBy->image->id > 0) : ?>
|
<?php if ($question->createdBy->image->id > 0) : ?>
|
||||||
<img width="40px" alt="<?= $this->getHtml('AccountImage', '0', '0'); ?>" loading="lazy" src="<?= UriFactory::build('{/app}/' . $question->createdBy->image->getPath()); ?>">
|
<img width="40px" alt="<?= $this->getHtml('AccountImage', '0', '0'); ?>" loading="lazy" src="<?= UriFactory::build($question->createdBy->image->getPath()); ?>">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -155,7 +159,7 @@ echo $this->data['nav']->render();
|
||||||
<div class="name-score">Score: <?= $scores[$answer->createdBy->account->id] ?? 0; ?></div>
|
<div class="name-score">Score: <?= $scores[$answer->createdBy->account->id] ?? 0; ?></div>
|
||||||
</span>
|
</span>
|
||||||
<?php if ($answer->createdBy->image->id > 0) : ?>
|
<?php if ($answer->createdBy->image->id > 0) : ?>
|
||||||
<img width="40px" alt="<?= $this->getHtml('AccountImage', '0', '0'); ?>" loading="lazy" src="<?= UriFactory::build('{/app}/' . $answer->createdBy->image->getPath()); ?>">
|
<img width="40px" alt="<?= $this->getHtml('AccountImage', '0', '0'); ?>" loading="lazy" src="<?= UriFactory::build($answer->createdBy->image->getPath()); ?>">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user