Skip to content

Commit

Permalink
Update Admin | Modules events, teams ,training, vote (#780)
Browse files Browse the repository at this point in the history
Update Admin = events views | settings | index.php
Update Admin = teams views | apllication | show.php
Update Admin = teams views | applicationhistory | show.php
Update Admin = teams views | index | treat.php
Update admin = teams views settings | index.php
Update Admin = training views | index | treat.php
Update Admin = training views | settings | index.php
Update Admin = vote views | index | treat.php
  • Loading branch information
Slipi85 authored and blackcoder87 committed Sep 27, 2023
1 parent e9ed89f commit 8ee29bf
Show file tree
Hide file tree
Showing 18 changed files with 165 additions and 159 deletions.
1 change: 1 addition & 0 deletions application/layouts/clan3columns/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<link href="<?=$this->getLayoutUrl('style.css') ?>" rel="stylesheet">
<?=$this->getCustomCSS() ?>
<script src="<?=$this->getVendorUrl('twbs/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<header>
Expand Down
1 change: 1 addition & 0 deletions application/layouts/clan3columns/index_full.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<link href="<?=$this->getLayoutUrl('style.css') ?>" rel="stylesheet">
<?=$this->getCustomCSS() ?>
<script src="<?=$this->getVendorUrl('twbs/bootstrap/dist/js/bootstrap.min.js') ?>"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<header>
Expand Down
12 changes: 6 additions & 6 deletions application/libraries/Captcha/DefaultCaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,23 @@ public function setForm(string $form): DefaultCaptcha
*/
public function getCaptcha(View $view): string
{
return '<div class="form-group ' . ($view->validation()->hasError('captcha') ? 'has-error' : '') . '">
<label class="col-lg-2 control-label">
return '<div class="form-group row mb-15 ' . ($view->validation()->hasError('captcha') ? 'has-error' : '') . '">
<label class="col-xl-2 control-label">
' . $view->getTrans('captcha') . '
</label>
<div class="col-lg-8">
<div class="col-xl-8">
' . $view->getCaptchaField() . '
</div>
</div>
<div class="form-group ' . ($view->validation()->hasError('captcha') ? 'has-error' : '') . '">
<div class="col-lg-offset-2 col-lg-8 input-group captcha">
<div class="form-group row mb-15 ' . ($view->validation()->hasError('captcha') ? 'has-error' : '') . '">
<div class="offset-xl-2 col-xl-8 input-group captcha">
<input type="text"
class="form-control"
id="captcha-form"
name="captcha"
autocomplete="off"
placeholder="' . $view->getTrans('captcha') . '" />
<span class="input-group-addon">
<span class="input-group-text">
<a href="javascript:void(0)" onclick="
document.getElementById(\'captcha\').src=\'' . $view->getUrl() . '/application/libraries/Captcha/Captcha.php?\'+Math.random();
document.getElementById(\'captcha-form\').focus();"
Expand Down
8 changes: 4 additions & 4 deletions application/libraries/Ilch/Layout/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ public function getContent(): string
$text .= '<li>' . $messageText . '</li>';
}
$text .= '</ul>';
$html .= '<div class="alert alert-' . $message['type'] . ' alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
$html .= '<div class="alert alert-' . $message['type'] . ' alert-dismissable" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-hidden="true" aria-label="close"></button>
' . $text . '</div>';
} else {
$html .= '<div class="alert alert-' . $message['type'] . ' alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
$html .= '<div class="alert alert-' . $message['type'] . ' alert-dismissable" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-hidden="true" aria-label="close"></button>
' . $this->escape($message['text']) . '</div>';
}
unset($_SESSION['messages'][$key]);
Expand Down
2 changes: 1 addition & 1 deletion application/libraries/Ilch/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function load($file, $data = [])
public function getSaveBar($saveKey = 'saveButton', $nameKey = null, $deleteKey = '')
{
$html = '<div class="content_savebox">
<button type="submit" class="save_button btn btn-default" name="save'.$nameKey.'" value="save">
<button type="submit" class="save_button btn btn-outline-secondary" name="save'.$nameKey.'" value="save">
'.$this->getTrans($saveKey).'
</button>';

Expand Down
10 changes: 5 additions & 5 deletions application/modules/admin/views/admin/menu/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,18 +374,18 @@ function escapeHtml(string) {
if ($(this).val() == '0') {
$('.dyn').html('');
} else if ($(this).val() == '1') {
$('.dyn').html('<div class="form-group"><label for="href" class="col-lg-4 control-label"><?=$this->getTrans('address') ?></label>\n\
$('.dyn').html('<div class="form-group row ilch-margin-b"><label for="href" class="col-lg-4 control-label"><?=$this->getTrans('address') ?></label>\n\
<div class="col-lg-8"><input type="text" class="form-control" id="href" value="http://" /></div></div>\n\
<div class="form-group"><label for="target" class="col-lg-4 control-label"><?=$this->getTrans('target') ?></label>\n\
<div class="form-group row ilch-margin-b"><label for="target" class="col-lg-4 control-label"><?=$this->getTrans('target') ?></label>\n\
<div class="col-lg-8"><select class="form-control" id="target"><?php foreach ($targets as $target => $translation) { echo '<option value="'.$target.'">'.$this->getTrans($translation).'</option>';} ?></select></div></div>'+menuHtml);
} else if ($(this).val() == '2') {
$('.dyn').html('<div class="form-group"><label for="siteid" class="col-lg-4 control-label"><?=$this->getTrans('page') ?></label>\n\
$('.dyn').html('<div class="form-group row ilch-margin-b"><label for="siteid" class="col-lg-4 control-label"><?=$this->getTrans('page') ?></label>\n\
<div class="col-lg-8"><?php if (!empty($pages)) { echo '<select class="form-control" id="siteid">'; foreach ($pages as $page) { echo '<option value="'.$page->getId().'">'.$this->escape($page->getTitle()).'</option>';} echo '</select>'; } else { echo $this->getTrans('missingSite'); } ?></div></div>'+menuHtml);
} else if ($(this).val() == '3') {
$('.dyn').html('<div class="form-group"><label for="modulekey" class="col-lg-4 control-label"><?=$this->getTrans('module') ?></label>\n\
$('.dyn').html('<div class="form-group row ilch-margin-b"><label for="modulekey" class="col-lg-4 control-label"><?=$this->getTrans('module') ?></label>\n\
<div class="col-lg-8"><?php if (!empty($modules)) { echo '<select class="form-control" id="modulekey">'; foreach ($modules as $module) { if ($module->getHideMenu() != true) { $content = $module->getContentForLocale($this->getTranslator()->getLocale()); echo '<option value="'.$module->getKey().'">'.$content['name'].'</option>';}} echo '</select>'; } else { echo $this->getTrans('missingModule'); } ?></div></div>'+menuHtml);
} else if ($(this).val() == '4') {
$('.dyn').html('<div class="form-group"><label for="boxkey" class="col-lg-4 control-label"><?=$this->getTrans('box') ?></label>\n\
$('.dyn').html('<div class="form-group row ilch-margin-b"><label for="boxkey" class="col-lg-4 control-label"><?=$this->getTrans('box') ?></label>\n\
<div class="col-lg-8"><?='<select class="form-control" id="boxkey">';
foreach ($boxes as $box) { echo '<option value="'.$box->getModule().'_'.$box->getKey().'">'.$box->getName().'</option>'; } foreach ($selfBoxes as $box) { echo '<option value="'.$box->getId().'">self_'.$this->escape($box->getTitle()).'</option>';} echo '</select>'; ?></div></div>');
}
Expand Down
3 changes: 2 additions & 1 deletion application/modules/comment/static/css/comment.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

.comment-list .media-block .media-left {
display: block;
float: left
float: left;
margin-right: 10px;
}

.comment-list .media-block .media-body {
Expand Down
6 changes: 3 additions & 3 deletions application/modules/gallery/boxes/views/pictureofx.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

<?php if (!empty($image)) : ?>
<?php $commentsCount = $commentMapper->getCountComments('gallery/index/showimage/id/' . $image->getId()); ?>
<div class="panel panel-default">
<div class="panel-image thumbnail">
<div class="card panel-default">
<div class="card-image img-thumbnail">
<?php if (file_exists($image->getImageThumb())) : ?>
<a href="<?=$this->getUrl(['module' => 'gallery', 'controller' => 'index', 'action' => 'showimage', 'id' => $image->getId()]) ?>">
<?php $altText = (empty($image->getImageTitle())) ? basename($image->getImageUrl()) : $image->getImageTitle(); ?>
Expand All @@ -53,7 +53,7 @@
<?=$this->getTrans('pictureMissing') ?>
<?php endif; ?>
</div>
<div class="panel-footer text-center">
<div class="card-footer text-center">
<i class="fa-regular fa-comment"></i> <?=$commentsCount ?>
<i class="fa-solid fa-eye"> <?=$image->getVisits() ?></i>
</div>
Expand Down
4 changes: 3 additions & 1 deletion application/modules/gallery/static/css/gallery.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
.lib-panel .col-md-6 {
padding: 0;
background-color: #FFFFFF;
margin-left: auto;
margin-right: auto;
}

.lib-panel .lib-row {
Expand Down Expand Up @@ -58,4 +60,4 @@

.navbar-nav > li > .dropdown-menu {
background-color: #e7e7e7
}
}
43 changes: 17 additions & 26 deletions application/modules/gallery/views/index/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,38 +92,29 @@ function recGallery(\Modules\Gallery\Models\GalleryItem $item, \Modules\Gallery\
<link href="<?=$this->getModuleUrl('static/css/gallery.css') ?>" rel="stylesheet">
<h1><?=$this->getTrans('menuGallery') ?> <span class="catinfo"></span></h1>

<nav class="navbar navbar-default">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
<span class="sr-only"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<a class="navbar-brand"><?=$this->getTrans('navigation') ?></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-collapse" aria-controls="navbar-collapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand"><?=$this->getTrans('navigation') ?></a>
</div>
<div id="navbar-collapse" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="dropdown active">
<a class="dropdown-toggle" href="#" id="dropdownConfig" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa-solid fa-arrow-down"></i> <?=$this->getTrans('allCat') ?></a>
<ul id="filters" class="dropdown-menu" aria-labelledby="dropdownConfig">
<li class="active"><a href="#filter" data-filter="*"><i class="fa-solid fa-image"></i> <?=$this->getTrans('allCat') ?></a></li>
<?php if (!empty($galleryItems)) :
?>
<?php foreach ($galleryItems as $item) :
?>
<?php recCategory($item, $galleryMapper, $this); ?>
<?php
endforeach; ?>
<?php
endif; ?>
<ul class="navbar-nav">
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="dropdownConfig" data-bs-toggle="dropdown" role="button"><i class="fa-solid fa-arrow-down"></i> <?=$this->getTrans('allCat') ?></a>
<ul id="filters" class="dropdown-menu">
<li><a class="dropdown-item" href="#filter" data-filter="*"><i class="fa-solid fa-image"></i> <?=$this->getTrans('allCat') ?></a></li>
<?php if (!empty($galleryItems)): ?>
<?php foreach ($galleryItems as $item): ?>
<?php recCategory($item, $galleryMapper, $this, $imageMapper); ?>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</li>
<li id="sorts"><a href="#filter" data-sort-direction="asc" data-sort-by="name"><i class="sorticon fa-solid fa-arrow-down-9-1"></i> <?=$this->getTrans('sort') ?></a></li>
<li id="sorts" class="nav-item"><a href="#filter" data-sort-direction="asc" data-sort-by="name" class="nav-link"><i class="sorticon fa-solid fa-arrow-down-9-1"></i> <?=$this->getTrans('sort') ?></a></li>
</ul>
<form class="nav navbar-form navbar-right">
<input type="text" id="quicksearch" class="form-control" placeholder="<?=$this->getTrans('search') ?>">
<form class="d-flex">
<input type="text" id="quicksearch" class="form-control" aria-label="search" type="search" placeholder="<?=$this->getTrans('search') ?>">
</form>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions application/modules/gallery/views/index/show.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,30 @@

<link href="<?=$this->getModuleUrl('static/venobox/venobox.min.css') ?>" media="screen" rel="stylesheet">

<div id="gallery">
<div id="gallery" class="row">
<?php
/** @var \Modules\Gallery\Models\Image $image */
foreach ($this->get('image') as $image) : ?>
<?php $commentsCount = $commentMapper->getCountComments('gallery/index/showimage/id/' . $image->getId()); ?>
<div class="col-xs-6 col-md-4 col-lg-3 col-sm-4">
<div class="panel panel-default">

<div class="col-sm-6 col-lg-4 col-xl-3 col-md-4">
<div class="card card-default">
<?php if (file_exists($image->getImageThumb())) : ?>
<a class="venobox" data-gall="gallery01" href="<?= $this->getUrl() . '/' . $image->getImageUrl() ?>" title="<?= $image->getImageTitle() ?> ">
<div class="panel-image thumbnail">
<div class="card-image img-thumbnail">
<img src="<?= $this->getUrl() . '/' . $image->getImageThumb() ?>" class="panel-image-preview" alt="<?= $this->escape($image->getImageTitle()) ?>" />
</div>
</a>
<?php else : ?>
<a class="venobox" data-gall="gallery01" href="<?= $this->getUrl() . '/' . $image->getImageUrl() ?>" data-title="<?= $image->getImageTitle() ?> ">
<div class="panel-image thumbnail">
<div class="card-image img-thumbnail">
<img src="<?=$this->getBaseUrl('application/modules/media/static/img/nomedia.png') ?>" class="panel-image-preview" alt="<?=$this->getTrans('noMediaAlt') ?>" />
</div>
</a>
<?php endif; ?>

<a href="<?=$this->getUrl(['action' => 'showimage', 'id' => $image->getId()]) ?>" title="<?=$this->getTrans('description')?>">
<div class="panel-footer text-center">
<div class="card-footer text-center">
<i class="fa-regular fa-comment"></i> <?=$commentsCount ?>
<i class="fa-solid fa-eye"></i> <?=$image->getVisits() ?>
</div>
Expand Down
16 changes: 8 additions & 8 deletions application/modules/guestbook/views/index/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
</div>
</h1>
<?php if (!empty($this->get('welcomeMessage'))) : ?>
<div class="panel panel-default">
<div class="panel-body welcomeMessage"><?=$this->purify($this->get('welcomeMessage')) ?></div>
<div class="card panel-default">
<div class="card-body welcomeMessage"><?=$this->purify($this->get('welcomeMessage')) ?></div>
</div>
<?php endif; ?>
<?php foreach ($this->get('entries') as $entry): ?>
<?php $date = new \Ilch\Date($entry->getDatetime()); ?>
<div class="panel panel-default">
<div class="panel-heading">
<div class="card panel-default">
<div class="card-header">
<div class="row">
<div class="col-sm-6 col-lg-5">
<div class="col-md-6 col-xl-5">
<?=$this->getTrans('from') ?>: <?=$this->escape($entry->getName()) ?>
</div>
<div class="col-sm-6 col-lg-3">
<div class="col-md-6 col-xl-3">
<?php if ($this->getUser() && $this->getUser()->isAdmin()) : ?>
<a target="_blank" href="mailto:<?=$this->escape($entry->getEmail()) ?>">
<i class="fa-solid fa-envelope"></i>
Expand All @@ -29,12 +29,12 @@
</a>
<?php endif; ?>
</div>
<div class="col-sm-12 col-lg-4">
<div class="col-md-12 col-xl-4">
<?=$this->getTrans('date') ?>: <?=$date->format('H:i d.m.Y', true) ?>
</div>
</div>
</div>
<div class="panel-body">
<div class="card-body">
<?=$this->alwaysPurify($entry->getText()) ?>
</div>
</div>
Expand Down
Loading

0 comments on commit 8ee29bf

Please sign in to comment.