Skip to content
Code-Schnipsel Gruppen Projekte
Commit 1b54fe0b erstellt von Michael Danielczok's avatar Michael Danielczok
Dateien durchsuchen

feat: Pre-defined footer area added.

feat: Payments control added.
Übergeordneter 261a3670
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -661,7 +661,8 @@ a.toTop:before {
margin-bottom: 3rem;
}
.template-footer-bricks-entry .control-header h1 {
.template-footer-bricks-entry .control-header h1,
.cologne-footer-predefined .control-header h2 {
font-size: 1.25rem;
text-align: left;
}
......@@ -676,6 +677,13 @@ a.toTop:before {
text-align: center;
}
/***************************/
/* Footer: custom template */
/***************************/
.quiqqer-control-payments-list-entry-data .quiqqer-control-payments-list-entry-data-title {
font-weight: 500;
}
/**********************/
/* Shop category menu */
/**********************/
......@@ -1140,4 +1148,4 @@ a.font-icon .fa {
a.font-icon .fa:before {
font-size: 1rem;
}
\ No newline at end of file
}
......@@ -106,8 +106,14 @@
{* footer brick area *}
{fetch template="template/footer.html" BricksManager=$BricksManager Site=$Site}
{* pre-defined footer *}
{fetch template="template/footer.predefined.html"
Site=$Site
paymentsData=$paymentsData
}
{* footer copyright *}
{fetch template="template/footerCopyright.html"}
{fetch template="template/footer.copyright.html"}
</footer>
{* to top icon *}
......
......@@ -8,7 +8,6 @@
QUI\Utils\Site::setRecursiveAttribute($Site, 'image_emotion');
QUI\Utils\Site::setRecursiveAttribute($Site, 'layout');
/**
* Header
*/
......@@ -22,7 +21,7 @@
$EngineForMenu = QUI::getTemplateManager()->getEngine();
$EngineForMenu->assign([
'Logo' => $Project->getMedia()->getLogoImage()
'Logo' => $Project->getMedia()->getLogoImage()
]);
$Menu->prependHTML($EngineForMenu->fetch(dirname(__FILE__) . '/template/menu/menuPrefix.html'));
......@@ -64,6 +63,7 @@
$LangCurrencySwitch = new \QUI\TemplateCologne\Controls\LangCurrencySwitch();
// array to assign
$templateSettings['BricksManager'] = QUI\Bricks\Manager::init();
$templateSettings['Project'] = $Project;
......
......@@ -441,6 +441,16 @@
<en><![CDATA[Display breadcrumb? <br/>For each page type, specify if you want the breadcrumb navigation to be displayed.]]></en>
</locale>
<!-- custom pre-defined footer -->
<locale name="settings.footer.title">
<de><![CDATA[Vorgefertigte Footer]]></de>
<en><![CDATA[Pre-defined footer]]></en>
</locale>
<locale name="settings.footer.text">
<de><![CDATA[Vorgefertigte Fußzeile (Footer)]]></de>
<en><![CDATA[Pre-defined footer]]></en>
</locale>
<!-- exceptions -->
<locale name="exception.user.required">
<de><![CDATA[User Objekt (QUI\Interfaces\Users\User) wird benötigt.]]></de>
......
......@@ -82,6 +82,26 @@
<type><![CDATA[bool]]></type>
<defaultvalue>1</defaultvalue>
</conf>
<!-- custom footer -->
<!-- custom footer: shop info -->
<conf name="footer.payments">
<type><![CDATA[bool]]></type>
<defaultvalue>1</defaultvalue>
</conf>
<!-- custom footer: payments -->
<conf name="customFooter.payments">
<type><![CDATA[bool]]></type>
<defaultvalue>1</defaultvalue>
</conf>
<conf name="customFooter.payments.title">
<type><![CDATA[string]]></type>
</conf>
<conf name="customFooter.payments.layout">
<type><![CDATA[string]]></type>
<defaultvalue>grid</defaultvalue>
</conf>
</section>
</config>
......@@ -451,6 +471,61 @@
</input>
</settings>
<!-- template custom footer -->
<settings title="templateCologne.settings"
name="templateCologne.settings.customFooter">
<title>
<locale group="quiqqer/template-cologne"
var="settings.customFooter.title"
/>
</title>
<text>
<locale group="quiqqer/template-cologne"
var="settings.footer.text" />
</text>
<!-- footer: payments -->
<input conf="templateCologne.settings.customFooter.payments"
type="checkbox">
<text>
<locale group="quiqqer/template-cologne"
var="settings.customFooter.payments"
/>
</text>
</input>
<!-- footer: payments title (label) -->
<input conf="templateCologne.settings.customFooter.payments.title"
type="text" data-qui="controls/lang/InputMultiLang">
<text>
<locale group="quiqqer/template-avadaagency"
var="settings.customFooter.payments.title"
/>
</text>
</input>
<!-- footer: payments layout -->
<select conf="templateCologne.settings.footer.payments.layout">
<text>
<locale group="quiqqer/template-cologne"
var="settings.footer.payments.layout"
/>
</text>
<option value="grid">
<locale group="quiqqer/template-cologne"
var="settings.footer.payments.layout.grid"
/>
</option>
<option value="list">
<locale group="quiqqer/template-cologne"
var="settings.footer.payments.layout.list"
/>
</option>
</select>
</settings>
<!-- Basket button behaviour -->
<!--<settings title="templateCologne.settings"
......
.quiqqer-control-payments-grid {
display: flex;
flex-wrap: wrap;
}
.quiqqer-control-payments-grid-entry {
max-width: 170px;
padding: 5px;
background: #fff;
margin: 0 20px 20px 0;
border: 1px solid #ddd;
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file
<div class="quiqqer-control-payments-grid">
{foreach $payments as $Payment}
{* <!-- Show all or only active? --> *}
{if $showInactive || $Payment->isActive()}
<div class="quiqqer-control-payments-grid-entry">
<img src="{$Payment->getIcon()}"
alt="{$Payment->getTitle()}"
title="{$Payment->getTitle()}"/>
</div>
{/if}
{/foreach}
</div>
\ No newline at end of file
.quiqqer-control-payments-list-entry {
align-items: flex-start;
display: flex;
flex-wrap: wrap;
margin-bottom: 10px;
}
.quiqqer-control-payments-list-entry-image {
align-items: center;
background: #fff;
border: 1px solid #ddd;
display: flex;
flex-shrink: 0;
justify-content: center;
margin-bottom: 10px;
margin-right: 15px;
max-height: 50px;
max-width: 150px;
padding: 5px;
text-align: center;
}
.quiqqer-control-payments-list-entry-data {
flex-grow: 1;
margin-bottom: 10px;
width: 190px;
}
.quiqqer-control-payments-list-entry-data-title {
font-weight: bolder;
}
.quiqqer-control-payments-list-entry-data-desc {
font-size: 0.9em;
}
.quiqqer-control-payments-list-entry-data-desc p:last-child {
margin-bottom: 0;
}
\ No newline at end of file
<div class="quiqqer-control-payments-list">
{foreach $payments as $Payment}
{* <!-- Show all or only active? --> *}
{if $showInactive || $Payment->isActive()}
<div class="quiqqer-control-payments-list-entry">
<div class="quiqqer-control-payments-list-entry-image">
<img src="{$Payment->getIcon()}"
alt="{$Payment->getTitle()}"
title="{$Payment->getTitle()}"/>
</div>
<div class="quiqqer-control-payments-list-entry-data">
<header class="quiqqer-control-payments-list-entry-data-title">
{$Payment->getTitle()}
</header>
{if $Payment->getDescription()}
<div class="quiqqer-control-payments-list-entry-data-desc">
{$Payment->getDescription()}
</div>
{/if}
</div>
</div>
{/if}
{/foreach}
</div>
\ No newline at end of file
<?php
/**
* This file contains QUI\TemplateCologne\Controls\SimpleUserInfo
*
* This control creates a list of payments that are configured in system.
* You can show it a list or grid.
*
* @author Michael Danielczok (www.pcsg.de)
*/
namespace QUI\TemplateCologne\Controls;
use QUI;
/**
* Class Payments
*/
class Payments extends QUI\Control
{
/**
* constructor
*
* @param array $attributes
*/
public function __construct($attributes = [])
{
$this->setAttributes([
'class' => 'quiqqer-payments-control',
'showInactive' => true,
'template' => 'list',
// Custom children template (path to html file); overwrites "template".
'customTemplate' => false,
// Custom children template css (path to css file); overwrites "template".
'customCss' => false,
]);
parent::__construct($attributes);
}
/**
* (non-PHPdoc)
*
* @throws QUI\Exception
* @see \QUI\Control::create()
*
*/
public function getBody()
{
$Engine = QUI::getTemplateManager()->getEngine();
$Payments = \QUI\ERP\Accounting\Payments\Payments::getInstance();
// load custom template (if set)
if ($this->getAttribute('customTemplate')
&& \file_exists($this->getAttribute('customTemplate'))
) {
if ($this->getAttribute('customCss')
&& \file_exists($this->getAttribute('customCss'))
) {
$this->addCSSFile($this->getAttribute('customCss'));
}
return $Engine->fetch($this->getAttribute('customTemplate'));
}
// control template (if custom template not set)
switch ($this->getAttribute('template')) {
case 'list':
$template = dirname(__FILE__) . '/Payments.List.html';
$css = dirname(__FILE__) . '/Payments.List.css';
break;
case 'grid':
default:
$template = dirname(__FILE__) . '/Payments.Grid.html';
$css = dirname(__FILE__) . '/Payments.Grid.css';
}
$Engine->assign([
'payments' => $Payments->getpayments(),
'showInactive' => $this->getAttribute('showInactive')
]);
$this->addCSSFile($css);
return $Engine->fetch($template);
}
}
......@@ -79,6 +79,7 @@ public static function getConfig($params)
/* @var $Template QUI\Template() */
$Project = $params['Project'];
$Template = $params['Template'];
$lang = $Project->getLang();
/**
* no header?
......@@ -122,7 +123,7 @@ public static function getConfig($params)
$siteType = 'layout-left-sidebar';
break;
}
/* site own show header */
switch ($Site->getAttribute('templateCologne.header')) {
case 'afterNav':
......@@ -166,6 +167,28 @@ public static function getConfig($params)
];
}
/**
* Payments Control
*/
$paymentsData = false;
if ($Project->getConfig('templateCologne.settings.footer.payments')) {
$paymentsData['PaymentsControl'] = new \QUI\TemplateCologne\Controls\Payments([
'template' => $Project->getConfig('templateCologne.settings.footer.payments.layout')
]);
$titles = json_decode($Project->getConfig(
'templateCologne.settings.footer.payments.title'
), true);
$title = false;
if (isset($titles[$lang])) {
$title = $titles[$lang];
}
$paymentsData['title'] = $title;
}
$config += [
'header' => $header,
'showBreadcrumb' => $showBreadcrumb,
......@@ -174,7 +197,8 @@ public static function getConfig($params)
'siteType' => $siteType,
'basketStyle' => $basketStyle,
'basketOpen' => $basketOpen,
'showCategoryMenu' => $showCategoryMenu
'showCategoryMenu' => $showCategoryMenu,
'paymentsData' => $paymentsData
];
// set cache
......
Datei verschoben
<div class="cologne-footer-predefined template-grid-container">
<div class="template-children-container clearfix">
{* <!--payments--> *}
{if $paymentsData}
<div class="footer-payments grid-50">
{if $paymentsData['title']}
<header class="control-header">
<h2>{$paymentsData['title']}</h2>
</header>
{/if}
<div class="footer-payments-control">
{$paymentsData['PaymentsControl']->create()}
</div>
</div>
{/if}
</div>
</div>
\ No newline at end of file
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren