feat: VivesPOS landing on Winter CMS 1.2 — theme + plugin + Dockerfile
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
- Base: wintercms/winter branch 1.2 (full framework) - Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS - Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication - Partials: hero (offline-first), features, modes (offline/nube toggle), screenshots, pricing (3 planes), comparison, FAQ, CTA - Plugin VivesPOS.Site with ContactForm - Dockerfile: PHP 8.2 Apache, port 80, healthcheck - Added winter/wn-pages, blog, sitemap, seo plugins - Active theme set to vivespos
This commit is contained in:
@@ -0,0 +1,153 @@
|
||||
<div class="permissioneditor <?= $this->previewMode ? 'control-disabled' : '' ?>" <?= $field->getAttributes() ?>>
|
||||
<table>
|
||||
<?php
|
||||
$globalIndex = 0;
|
||||
$checkboxMode = !($this->mode === 'radio');
|
||||
?>
|
||||
<?php foreach ($permissions as $tab => $tabPermissions): ?>
|
||||
<tr class="section">
|
||||
<th class="tab"><?= e(trans($tab)) ?></th>
|
||||
|
||||
<th class="permission-type" title="<?= e(trans('backend::lang.user.permissions_toggle_section_allow')) ?>"><?= e(trans('backend::lang.user.allow')) ?></th>
|
||||
|
||||
<?php if ($this->mode === 'radio'): ?>
|
||||
<th class="permission-type" title="<?= e(trans('backend::lang.user.permissions_toggle_section_inherit')) ?>"><?= e(trans('backend::lang.user.inherit')) ?></th>
|
||||
<th class="permission-type" title="<?= e(trans('backend::lang.user.permissions_toggle_section_deny')) ?>"><?= e(trans('backend::lang.user.deny')) ?></th>
|
||||
<?php endif; ?>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$lastIndex = count($tabPermissions) - 1;
|
||||
?>
|
||||
<?php foreach ($tabPermissions as $index => $permission): ?>
|
||||
|
||||
<?php
|
||||
$globalIndex++;
|
||||
|
||||
switch ($this->mode) {
|
||||
case 'radio':
|
||||
$permissionValue = array_key_exists($permission->code, $permissionsData)
|
||||
? $permissionsData[$permission->code]
|
||||
: 0;
|
||||
break;
|
||||
case 'switch':
|
||||
$isChecked = !((int) @$permissionsData[$permission->code] === -1);
|
||||
break;
|
||||
case 'checkbox':
|
||||
default:
|
||||
$isChecked = array_key_exists($permission->code, $permissionsData);
|
||||
break;
|
||||
}
|
||||
|
||||
$allowId = $this->getId('permission-' . $globalIndex . '-allow');
|
||||
$inheritId = $this->getId('permission-' . $globalIndex . '-inherit');
|
||||
$denyId = $this->getId('permission-' . $globalIndex . '-deny');
|
||||
?>
|
||||
|
||||
<tr class="<?= $lastIndex == $index ? 'last-section-row' : '' ?>
|
||||
<?= $checkboxMode ? 'mode-checkbox' : 'mode-radio' ?>
|
||||
<?= $checkboxMode && !$isChecked ? 'disabled' : '' ?>
|
||||
<?= !$checkboxMode && $permissionValue == -1 ? 'disabled' : '' ?>
|
||||
">
|
||||
|
||||
<td class="permission-name">
|
||||
<?= e(trans($permission->label)) ?>
|
||||
<?php if ($permission->comment): ?>
|
||||
<span
|
||||
class="text-info wn-icon-circle-info"
|
||||
data-toggle="tooltip"
|
||||
title="<?= e(trans($permission->comment)) ?>"
|
||||
tabindex="0"
|
||||
role="img"
|
||||
aria-label="<?= e(trans($permission->comment)) ?>"
|
||||
></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<?php if ($this->mode === 'radio'): ?>
|
||||
<td class="permission-value">
|
||||
<div class="radio custom-radio">
|
||||
<input
|
||||
id="<?= $allowId ?>"
|
||||
name="<?= e($baseFieldName) ?>[<?= e($permission->code) ?>]"
|
||||
value="1"
|
||||
type="radio"
|
||||
<?= $permissionValue == 1 ? 'checked="checked"' : '' ?>
|
||||
data-radio-color="green"
|
||||
>
|
||||
|
||||
<label for="<?= $allowId ?>"><span>Allow</span></label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="permission-value">
|
||||
<div class="radio custom-radio">
|
||||
<input
|
||||
id="<?= $inheritId ?>"
|
||||
name="<?= e($baseFieldName) ?>[<?= e($permission->code) ?>]"
|
||||
value="0"
|
||||
<?= $permissionValue == 0 ? 'checked="checked"' : '' ?>
|
||||
type="radio"
|
||||
>
|
||||
|
||||
<label for="<?= $inheritId ?>"><span>Inherit</span></label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="permission-value">
|
||||
<div class="radio custom-radio">
|
||||
<input
|
||||
id="<?= $denyId ?>"
|
||||
name="<?= e($baseFieldName) ?>[<?= e($permission->code) ?>]"
|
||||
value="-1"
|
||||
<?= $permissionValue == -1 ? 'checked="checked"' : '' ?>
|
||||
type="radio"
|
||||
data-radio-color="red"
|
||||
>
|
||||
|
||||
<label for="<?= $denyId ?>"><span>Deny</span></label>
|
||||
</div>
|
||||
</td>
|
||||
<?php elseif ($this->mode === 'switch'): ?>
|
||||
<td class="permission-value">
|
||||
<input
|
||||
type="hidden"
|
||||
name="<?= e($baseFieldName) ?>[<?= e($permission->code) ?>]"
|
||||
value="-1"
|
||||
>
|
||||
|
||||
<label class="custom-switch">
|
||||
<input
|
||||
id="<?= $allowId ?>"
|
||||
name="<?= e($baseFieldName) ?>[<?= e($permission->code) ?>]"
|
||||
value="1"
|
||||
type="checkbox"
|
||||
<?= $isChecked ? 'checked="checked"' : '' ?>
|
||||
>
|
||||
<span><span><?= e(trans('backend::lang.list.column_switch_true')) ?></span><span><?= e(trans('backend::lang.list.column_switch_false')) ?></span></span>
|
||||
<a class="slide-button"></a>
|
||||
</label>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td class="permission-value">
|
||||
<div class="checkbox custom-checkbox">
|
||||
<input
|
||||
id="<?= $allowId ?>"
|
||||
name="<?= e($baseFieldName) ?>[<?= e($permission->code) ?>]"
|
||||
value="1"
|
||||
type="checkbox"
|
||||
<?= $isChecked ? 'checked="checked"' : '' ?>
|
||||
>
|
||||
|
||||
<label for="<?= $allowId ?>"><span>Allow</span></label>
|
||||
</div>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<div class="permissions-overlay"></div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user