started with template fixes

This commit is contained in:
Dennis Eichhorn 2024-03-29 15:26:00 +00:00
parent f41aa39aed
commit c0dfe52596
5 changed files with 8 additions and 6 deletions

View File

@ -22,6 +22,7 @@ return [
[ [
'dest' => '\Modules\Draw\Controller\ApiController:apiDrawCreate', 'dest' => '\Modules\Draw\Controller\ApiController:apiDrawCreate',
'verb' => RouteVerb::SET, 'verb' => RouteVerb::SET,
'csrf' => true,
'permission' => [ 'permission' => [
'module' => ApiController::NAME, 'module' => ApiController::NAME,
'type' => PermissionType::CREATE, 'type' => PermissionType::CREATE,

View File

@ -126,7 +126,7 @@ final class BackendController extends Controller
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005201001, $request, $response); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1005201001, $request, $response);
/** @var \Modules\Draw\Models\DrawImage[] $images */ /** @var \Modules\Draw\Models\DrawImage[] $images */
$images = DrawImageMapper::getAll()->sort('id', OrderType::DESC)->limit(25); $images = DrawImageMapper::getAll()->sort('id', OrderType::DESC)->limit(25)->executeGetArray();
$view->data['images'] = $images; $view->data['images'] = $images;
return $view; return $view;

View File

@ -92,7 +92,7 @@ echo $this->data['nav']->render(); ?>
<option> <option>
</select> </select>
<tr><td colspan="2"><label><?= $this->getHtml('GroupUser'); ?></label> <tr><td colspan="2"><label><?= $this->getHtml('GroupUser'); ?></label>
<tr><td><input id="iPermission" name="group" type="text" placeholder=""><td><button><?= $this->getHtml('Add', '0', '0'); ?></button> <tr><td><input id="iPermission" name="group" type="text"><td><button><?= $this->getHtml('Add', '0', '0'); ?></button>
</table> </table>
</form> </form>
</div> </div>

View File

@ -36,12 +36,13 @@ echo $this->data['nav']->render(); ?>
<td><?= $this->getHtml('Creator'); ?> <td><?= $this->getHtml('Creator'); ?>
<td><?= $this->getHtml('Created'); ?> <td><?= $this->getHtml('Created'); ?>
<tbody> <tbody>
<?php $count = 0; foreach ($images as $key => $value) : ++$count; <?php $count = 0;
foreach ($images as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('draw/view?{?}&id=' . $value->id); ?> $url = \phpOMS\Uri\UriFactory::build('draw/view?{?}&id=' . $value->id); ?>
<tr> <tr>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->media->name); ?></a> <td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->media->name); ?></a>
<td data-label="<?= $this->getHtml('Creator'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->media->createdBy->login); ?></a> <td data-label="<?= $this->getHtml('Creator'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->media->createdBy->login); ?></a>
<td data-label="<?= $this->getHtml('Created'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->media->createdAt->format('Y-m-d')); ?></a> <td data-label="<?= $this->getHtml('Created'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->media->createdAt?->format('Y-m-d')); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php if ($count === 0) : ?> <?php if ($count === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?> <tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>

View File

@ -94,7 +94,7 @@ echo $this->data['nav']->render(); ?>
<option> <option>
</select> </select>
<tr><td colspan="2"><label><?= $this->getHtml('GroupUser'); ?></label> <tr><td colspan="2"><label><?= $this->getHtml('GroupUser'); ?></label>
<tr><td><input id="iPermission" name="group" type="text" placeholder=""><td><button><?= $this->getHtml('Add', '0', '0'); ?></button> <tr><td><input id="iPermission" name="group" type="text"><td><button><?= $this->getHtml('Add', '0', '0'); ?></button>
</table> </table>
</form> </form>
</div> </div>