This commit is contained in:
Dennis Eichhorn 2022-12-10 22:17:54 +01:00
parent 9b2eda60f1
commit d4c44c04fc
3 changed files with 14 additions and 14 deletions

View File

@ -5,7 +5,7 @@
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Surveys", "name": "Surveys",
"uri": "{/prefix}survey/list", "uri": "{/lang}/{/app}/survey/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 50, "order": 50,
@ -19,7 +19,7 @@
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "List", "name": "List",
"uri": "{/prefix}survey/list", "uri": "{/lang}/{/app}/survey/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,
@ -34,7 +34,7 @@
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Create", "name": "Create",
"uri": "{/prefix}survey/create?{?}", "uri": "{/lang}/{/app}/survey/create?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,

View File

@ -29,8 +29,8 @@ $accountDir = $account->getId() . ' ' . $account->login;
$collections = $this->getData('collections'); $collections = $this->getData('collections');
$mediaPath = \urldecode($this->getData('path') ?? '/'); $mediaPath = \urldecode($this->getData('path') ?? '/');
$previous = empty($surveys) ? 'survey/list' : 'survey/list?{?}&id=' . \reset($surveys)->getId() . '&ptype=p'; $previous = empty($surveys) ? '{/lang}/{/app}/survey/list' : '{/lang}/{/app}/survey/list?{?}&id=' . \reset($surveys)->getId() . '&ptype=p';
$next = empty($surveys) ? 'survey/list' : 'survey/list?{?}&id=' . \end($surveys)->getId() . '&ptype=n'; $next = empty($surveys) ? '{/lang}/{/app}/survey/list' : '{/lang}/{/app}/survey/list?{?}&id=' . \end($surveys)->getId() . '&ptype=n';
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
@ -38,8 +38,8 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<ul class="crumbs-2"> <ul class="crumbs-2">
<li data-href="<?= UriFactory::build('survey/list?path=/Accounts/' . $accountDir); ?>"><a href="<?= UriFactory::build('survey/list?path=/Accounts/' . $accountDir); ?>"><i class="fa fa-home"></i></a> <li data-href="<?= UriFactory::build('{/lang}/{/app}/survey/list?path=/Accounts/' . $accountDir); ?>"><a href="<?= UriFactory::build('{/lang}/{/app}/survey/list?path=/Accounts/' . $accountDir); ?>"><i class="fa fa-home"></i></a>
<li data-href="<?= UriFactory::build('survey/list?path=/'); ?>"><a href="<?= UriFactory::build('survey/list?path=/'); ?>">/</a></li> <li data-href="<?= UriFactory::build('{/lang}/{/app}/survey/list?path=/'); ?>"><a href="<?= UriFactory::build('{/lang}/{/app}/survey/list?path=/'); ?>">/</a></li>
<?php <?php
$subPath = ''; $subPath = '';
$paths = \explode('/', \ltrim($mediaPath, '/')); $paths = \explode('/', \ltrim($mediaPath, '/'));
@ -57,7 +57,7 @@ echo $this->getData('nav')->render(); ?>
$subPath .= '/' . $paths[$i]; $subPath .= '/' . $paths[$i];
$url = UriFactory::build('survey/list?path=' . $subPath); $url = UriFactory::build('{/lang}/{/app}/survey/list?path=' . $subPath);
?> ?>
<li data-href="<?= $url; ?>"<?= $i === $length - 1 ? 'class="active"' : ''; ?>><a href="<?= $url; ?>"><?= $this->printHtml($paths[$i]); ?></a></li> <li data-href="<?= $url; ?>"<?= $i === $length - 1 ? 'class="active"' : ''; ?>><a href="<?= $url; ?>"><?= $this->printHtml($paths[$i]); ?></a></li>
<?php endfor; ?> <?php endfor; ?>
@ -129,7 +129,7 @@ echo $this->getData('nav')->render(); ?>
</label> </label>
<tbody> <tbody>
<?php if (!empty($parentPath)) : <?php if (!empty($parentPath)) :
$url = UriFactory::build('survey/list?path=' . $parentPath); $url = UriFactory::build('{/lang}/{/app}/survey/list?path=' . $parentPath);
?> ?>
<tr tabindex="0" data-href="<?= $url; ?>"> <tr tabindex="0" data-href="<?= $url; ?>">
<td> <td>
@ -142,7 +142,7 @@ echo $this->getData('nav')->render(); ?>
<?php endif; ?> <?php endif; ?>
<?php $count = 0; <?php $count = 0;
foreach ($collections as $key => $value) : ++$count; foreach ($collections as $key => $value) : ++$count;
$url = UriFactory::build('survey/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name); $url = UriFactory::build('{/lang}/{/app}/survey/list?path=' . \rtrim($value->getVirtualPath(), '/') . '/' . $value->name);
?> ?>
<tr data-href="<?= $url; ?>"> <tr data-href="<?= $url; ?>">
<td><label class="checkbox" for="surveyList-<?= $key; ?>"> <td><label class="checkbox" for="surveyList-<?= $key; ?>">
@ -152,13 +152,13 @@ echo $this->getData('nav')->render(); ?>
<td><a href="<?= $url; ?>"><i class="fa fa-folder-open-o"></i></a> <td><a href="<?= $url; ?>"><i class="fa fa-folder-open-o"></i></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a> <td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<td> <td>
<td><a class="content" href="<?= UriFactory::build('profile/single?{?}&for=' . $value->createdBy->getId()); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? ''])); ?></a> <td><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/profile/single?{?}&for=' . $value->createdBy->getId()); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? ''])); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->createdAt->format('Y-m-d')); ?></a> <td><a href="<?= $url; ?>"><?= $this->printHtml($value->createdAt->format('Y-m-d')); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php <?php
$count = 0; $count = 0;
foreach ($surveys as $key => $value) : ++$count; foreach ($surveys as $key => $value) : ++$count;
$url = UriFactory::build('survey/edit?{?}&id=' . $value->getId()); $url = UriFactory::build('{/lang}/{/app}/survey/edit?{?}&id=' . $value->getId());
?> ?>
<tr data-href="<?= $url; ?>"> <tr data-href="<?= $url; ?>">
<td><label class="checkbox" for="surveyList-<?= $key; ?>"> <td><label class="checkbox" for="surveyList-<?= $key; ?>">
@ -168,7 +168,7 @@ echo $this->getData('nav')->render(); ?>
<td> <td>
<td><a href="<?= $url; ?>"><?= $value->getL11n()->title; ?></a> <td><a href="<?= $url; ?>"><?= $value->getL11n()->title; ?></a>
<td> <td>
<td><a class="content" href="<?= UriFactory::build('profile/single?{?}&for=' . $value->createdBy->getId()); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? ''])); ?></a> <td><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/profile/single?{?}&for=' . $value->createdBy->getId()); ?>"><?= $this->printHtml($this->renderUserName('%3$s %2$s %1$s', [$value->createdBy->name1, $value->createdBy->name2, $value->createdBy->name3, $value->createdBy->login ?? ''])); ?></a>
<td><a href="<?= $url; ?>"><?= $value->createdAt->format('Y-m-d'); ?></a> <td><a href="<?= $url; ?>"><?= $value->createdAt->format('Y-m-d'); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php if ($count === 0) : ?> <?php if ($count === 0) : ?>

View File

@ -12,7 +12,7 @@
}, },
"creator": { "creator": {
"name": "Karaka", "name": "Karaka",
"website": "www.spl1nes.com" "website": "jingga.app"
}, },
"description": "Surveys module.", "description": "Surveys module.",
"directory": "Surveys", "directory": "Surveys",