Fixess nette 3.0 version

This commit is contained in:
2022-01-25 18:30:23 +01:00
parent 431961ed8f
commit c69bf82ecc
7 changed files with 126 additions and 14 deletions

View File

@@ -88,14 +88,14 @@ final class HomePresenter extends BaseFrontPresenter
if ($clen) $query->withClen($clen);
$result = $this->em->getTermRepository()->fetch($query)->setFetchJoinCollection(FALSE);
if ($paginate) {
$this["paginator"]->setItemCount($result->getTotalCount());
$this["paginator"]->setItemCount(count($result));
$result->applyPaginator($this['paginator']);
$offset = $this['paginator']->getOffset();
$itemsPerPage = $this['paginator']->getItemsPerPage();
}
*/
*/
$t = $this->em->getTranslationRepository()->find($translation);
$this->template->translation = $t;

View File

@@ -44,16 +44,15 @@ $( document ).ready(function() {
</tr>
</table>
{ifset $result}
{dump $result}
<table class="e-table" n:snippet="termsComnainer">
<tr>
<th>Vyraz</th><th>Preklad</th><th>Typ</th><th>Member</th>
</tr>
{foreach $result as $term}
{dump $term}
<tr>
<tr data-url="{link getInfo! $term->id}" n:snippet="term-$term->id">
{if $translation->getDirection() == 1}
<td>{$term->string1}{if $term->suffix1}&nbsp;{$term->suffix1->text}{/if}</td>
<td>{$term->string2}{if $term->suffix2}&nbsp;{$term->suffix2->text}{/if}</td>
@@ -73,3 +72,4 @@ $( document ).ready(function() {
</div>
{/block}