mirror of
https://github.com/Karaka-Management/oms-QA.git
synced 2026-01-29 15:58:42 +00:00
Fixes #72
This commit is contained in:
parent
93426a8a9d
commit
bd2351dc28
|
|
@ -59,6 +59,17 @@ class QAQuestion implements \JsonSerializable
|
|||
return $this->id;
|
||||
}
|
||||
|
||||
public function hasAccepted() : bool
|
||||
{
|
||||
foreach($this->answers as $answer) {
|
||||
if($answer->isAccepted()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getLanguage() : string
|
||||
{
|
||||
return $this->language;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="inner">
|
||||
<div class="row middle-xs">
|
||||
<div class="col-xs-1 scores">
|
||||
<span class="score"><?= count($question->getAnswers()); ?></span>
|
||||
<span class="score<?= $question->hasAccepted() ? ' done' : ''; ?>"><?= count($question->getAnswers()); ?></span>
|
||||
</div>
|
||||
<div class="title col-xs-11">
|
||||
<a href="<?= \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/qa/question?{?}&id=' . $question->getId()) ?>"><?= $question->getName(); ?></a>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user