Skip to content
Code-Schnipsel Gruppen Projekte

Revisionen vergleichen

Änderungen werden so angezeigt, als ob die Quellrevision mit der Zielrevision zusammengeführt würde. Erfahre mehr über den Vergleich von Revisionen.

Quelle

Zielprojekt auswählen
No results found

Ziel

Zielprojekt auswählen
  • quiqqer/timeline
1 Ergebnis
Änderungen anzeigen
Commits auf Quelle (19)
werden angezeigt mit 425 Ergänzungen und 23 Löschungen
# Ignore developer files when exporting
.gitattributes export-ignore
.gitignore export-ignore
.gitlab-ci.yml export-ignore
.phive export-ignore
captainhook.json export-ignore
phpcs.xml.dist export-ignore
phpstan-baseline.neon export-ignore
phpstan.dist.neon export-ignore
phpunit.dist.xml export-ignore
tests export-ignore
# Explicitly set file type and line endings for PHP files, improves git diff output
*.php text eol=lf diff=php
\ No newline at end of file
tools/
phpstan.neon
.phpunit.result.cache
phpunit.xml
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="1.11.1" installed="1.11.1" location="./tools/phpstan" copy="false"/>
<phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/>
</phive>
<?xml version="1.0" encoding="UTF-8"?>
<quiqqer>
<bricks>
<!-- available standard bricks -->
<brick control="\QUI\Timeline\Bricks\Timeline">
<title>
<locale group="quiqqer/timeline" var="brick.timeline.title"/>
</title>
<description>
<locale group="quiqqer/timeline" var="brick.timeline.description"/>
</description>
<settings>
<setting name="site" data-qui="controls/projects/project/site/Select">
<locale group="quiqqer/timeline" var="brick.timeline.setting.site"/>
</setting>
<setting name="image" type="select">
<locale group="quiqqer/timeline"
var="brick.timeline.setting.image"/>
<option value="original">
<locale group="quiqqer/timeline"
var="brick.timeline.setting.image.original"/>
</option>
<option value="cover">
<locale group="quiqqer/timeline"
var="brick.timeline.setting.image.cover"/>
</option>
</setting>
<setting name="order" type="select">
<locale group="quiqqer/timeline"
var="brick.timeline.setting.order"/>
<option value="c_date ASC">
<locale group="quiqqer/timeline"
var="brick.timeline.setting.order.original"/>
</option>
<option value="c_date DESC">
<locale group="quiqqer/timeline"
var="brick.timeline.setting.order.inverted"/>
</option>
</setting>
<setting name="showLinks" type="checkbox">
<locale group="quiqqer/timeline" var="brick.timeline.setting.showLinks"/>
</setting>
<setting name="template" type="select">
<locale group="quiqqer/timeline"
var="brick.timeline.setting.order"/>
<option value="VerticalBothSides">
<locale group="quiqqer/timeline"
var="brick.timeline.setting.template.verticalBothSides"/>
</option>
</setting>
<setting name="limit" type="number">
<locale group="quiqqer/timeline"
var="brick.timeline.setting.limit"/>
</setting>
</settings>
</brick>
</bricks>
</quiqqer>
......@@ -4,14 +4,18 @@
<locale name="package.title">
<de><![CDATA[QUIQQER - Timeline]]></de>
<en><![CDATA[QUIQQER - Timeline]]></en>
<en><![CDATA[QUIQQER - Linia czasu]]></en>
</locale>
<locale name="package.description" html="true">
<de><![CDATA[
(...)
Das Paket ermöglicht das einfache Erstellen von Timelines oder Roadmaps.
]]></de>
<en><![CDATA[
(...)
The package allows you to easily create timelines or roadmaps.
]]></en>
<pl><![CDATA[
Za pomocą tego rozszerzenia możliwe jest szybie i proste dodanie do Twojego projekt dtzw. linni czasu albo "road map".
]]></pl>
</locale>
<!-- timeline -->
......@@ -21,9 +25,79 @@
<pl><![CDATA[Linnia czasu]]></pl>
</locale>
<locale name="admin.types.timeline.desc">
<de><![CDATA[(...)]]></de>
<en><![CDATA[(...)]]></en>
<pl><![CDATA[(...)]]></pl>
<de><![CDATA[Die Seite wird alle ihre Unterseite in Form von einer Timeline auflisten. Um gutes Ergebnis zu bekommen ist es notwendig, jede Unterseite mit Titel, Kurzbeschreibung und einer Icon bzw. Seitenbild zu versehen.]]></de>
<en><![CDATA[This site type will list all of its subpages in the form of a timline. It is necessary to add a title, short description and an icon or page image to each subpage.]]></en>
<pl><![CDATA[Ta strona wylistuje wszystkie jej podstrony w formie tzw. linni czasowej. Żeby uzyskać najlepszy efekt, musisz ustawić każdej stronie tytuł, krótki opis oraz ikonę lub obrazek.]]></pl>
</locale>
<!-- timeline brick -->
<locale name="brick.timeline.title">
<de><![CDATA[Brick: Timeline]]></de>
<en><![CDATA[Brick: Timeline]]></en>
</locale>
<locale name="brick.timeline.description">
<de><![CDATA[
Das Paket ermöglicht das einfache Erstellen von Timelines oder Roadmaps.
]]></de>
<en><![CDATA[
The package allows you to easily create timelines or roadmaps.
]]></en>
</locale>
<locale name="brick.timeline.setting.site">
<de><![CDATA[Seite(n) auswählen]]></de>
<en><![CDATA[Select site(s)]]></en>
</locale>
<locale name="brick.timeline.setting.image">
<de><![CDATA[Bild]]></de>
<en><![CDATA[Image]]></en>
</locale>
<locale name="brick.timeline.setting.image.original">
<de><![CDATA[Original]]></de>
<en><![CDATA[Original]]></en>
</locale>
<locale name="brick.timeline.setting.image.cover">
<de><![CDATA[Cover (Bild kann gestreckt werden)]]></de>
<en><![CDATA[Cover (image can be stretched)]]></en>
</locale>
<locale name="brick.timeline.setting.order">
<de><![CDATA[Befehl]]></de>
<en><![CDATA[Original]]></en>
</locale>
<locale name="brick.timeline.setting.order.original">
<de><![CDATA[Original]]></de>
<en><![CDATA[Original]]></en>
</locale>
<locale name="brick.timeline.setting.order.inverted">
<de><![CDATA[Invertiert]]></de>
<en><![CDATA[Inverted]]></en>
</locale>
<locale name="brick.timeline.setting.showLinks">
<de><![CDATA[Hyperlinks für jede Site anzeigen?]]></de>
<en><![CDATA[Show hyperlinks for each site?]]></en>
</locale>
<locale name="brick.timeline.setting.template">
<de><![CDATA[Vorlage]]></de>
<en><![CDATA[Template]]></en>
</locale>
<locale name="brick.timeline.setting.template.verticalBothSides">
<de><![CDATA[Vertikale Zeitleiste mit Inhalt und Symbol (Bild)]]></de>
<en><![CDATA[Vertical timeline wiht content and icon (image)]]></en>
</locale>
<locale name="brick.timeline.setting.limit">
<de><![CDATA[Limit (Grundlimit 10)]]></de>
<en><![CDATA[Limit (basic limit it 10)]]></en>
</locale>
</groups>
......@@ -48,13 +122,31 @@
<pl><![CDATA[Wertykalna linnia czasu z treścią i ikona (obrazkiem)]]></pl>
</locale>
<!-- show short -->
<!-- show url -->
<locale name="timeline.showLinks">
<de><![CDATA[Links zu den Seiten anzeigen?]]></de>
<en><![CDATA[Show hyerlinks for each site?]]></en>
<pl><![CDATA[]]></pl>
</locale>
<!-- image fit -->
<locale name="timeline.imageFit">
<de><![CDATA[Bild]]></de>
<en><![CDATA[Image]]></en>
</locale>
<locale name="timeline.imageFit.desc">
<de><![CDATA[Die Einstellung bezieht sich nur auf die Bilder, nicht auf die Icons]]></de>
<en><![CDATA[The setting refers only to the images, not to the icons]]></en>
</locale>
<locale name="timeline.imageFit.original">
<de><![CDATA[Original]]></de>
<en><![CDATA[Original]]></en>
</locale>
<locale name="timeline.imageFit.cover">
<de><![CDATA[Decken (Bild kann gestreckt werden)]]></de>
<en><![CDATA[Cover (image can be stretched)]]></en>
</locale>
<!-- counter text -->
<locale name="timeline.verticalBothSides.counterText">
<de><![CDATA[STEP]]></de>
......@@ -62,5 +154,12 @@
<pl><![CDATA[STEP]]></pl>
</locale>
<!-- more button -->
<locale name="timeline.more">
<de><![CDATA[mehr]]></de>
<en><![CDATA[more]]></en>
<pl><![CDATA[więcej]]></pl>
</locale>
</groups>
</locales>
\ No newline at end of file
<quiqqer>
<package>
<title>
<locale group="quiqqer/timeline" var="package.title"/>
</title>
<description>
<locale group="quiqqer/timeline" var="package.description"/>
</description>
<image src="URL_OPT_DIR/quiqqer/timeline/bin/images/Logo.jpg"/>
<preview>
<image src="URL_OPT_DIR/quiqqer/timeline/bin/images/preview/1.jpg"/>
<image src="URL_OPT_DIR/quiqqer/timeline/bin/images/preview/2.jpg"/>
</preview>
<support>
<email>support@pcsg.de</email>
<forum>https://community.quiqqer.com</forum>
<source>https://dev.quiqqer.com/quiqqer/timeline</source>
<issues>https://dev.quiqqer.com/quiqqer/timeline/issues</issues>
<wiki>https://dev.quiqqer.com/quiqqer/timeline/wikis/home</wiki>
</support>
<copyright>
<name><![CDATA[PCSG - Computer & Internet Service OHG]]></name>
<license>PCSG QL-1.0</license>
<license>CC BY-NC-SA 4.0</license>
</copyright>
</package>
</quiqqer>
\ No newline at end of file
includes:
- phpstan-baseline.neon
parameters:
level: 8
paths:
- src
- types
tipsOfTheDay: false
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="tests/phpunit-bootstrap.php">
<testsuites>
<testsuite name="Tests">
<directory>tests/</directory>
</testsuite>
</testsuites>
</phpunit>
......@@ -13,6 +13,7 @@
<attributes>
<attribute default="VerticalBothSides">quiqqer.timeline.display</attribute>
<attribute default="1">quiqqer.timeline.showLinks</attribute>
<attribute default="original">quiqqer.timeline.imageFit</attribute>
</attributes>
<!-- list settings -->
......@@ -43,6 +44,26 @@
</text>
</input>
<select conf="quiqqer.timeline.imageFit">
<text>
<locale group="quiqqer/timeline"
var="timeline.imageFit"/>
</text>
<description>
<locale group="quiqqer/timeline"
var="timeline.imageFit.desc"/>
</description>
<option value="original">
<locale group="quiqqer/timeline"
var="timeline.imageFit.original"/>
</option>
<option value="cover">
<locale group="quiqqer/timeline"
var="timeline.imageFit.cover"/>
</option>
</select>
</settings>
</category>
</settings>
......
{$body}
<?php
/**
* This file contains QUI\Timeline\Bricks\Timeline
*/
namespace QUI\Timeline\Bricks;
use QUI;
/**
* Class Timeline
*
* @package quiqqer/timeline
*/
class Timeline extends QUI\Control
{
/**
* constructor
*
* @param array $attributes
*/
public function __construct($attributes = [])
{
// default options
$this->setAttributes([
'image' => 'original', // original, cover
'order' => 'c_date ASC',
'showLinks' => true,
'template' => 'VerticalBothSides',
'limit' => 10
]);
parent::__construct($attributes);
$this->setAttribute('cacheable', 0);
}
/**
* Return the inner body of the element
* Can be overwritten
*
* @return String
*/
public function getBody()
{
$Engine = QUI::getTemplateManager()->getEngine();
$Control = new QUI\Timeline\Controls\Timeline();
$limit = $this->getAttribute('limit');
if ($limit === '') {
$limit = 10;
}
if ($limit <= 0) {
$limit = 1;
}
$Control->setAttribute('parentInputList', $this->getAttribute('site'));
$Control->setAttribute('imageFit', $this->getAttribute('image'));
$Control->setAttribute('order', $this->getAttribute('order'));
$Control->setAttribute('showLinks', $this->getAttribute('showLinks'));
$Control->setAttribute('display', $this->getAttribute('template'));
$Control->setAttribute('limit', $limit);
$result = $Control->create();
$this->addCSSFiles($Control->getCSSFiles());
$options = [
'body' => $result
];
$Engine->assign($options);
return $Engine->fetch(\dirname(__FILE__) . '/Timeline.html');
}
}
......@@ -33,7 +33,6 @@
justify-content: center;
align-items: center;
border-radius: 50%;
padding: 20px;
position: relative;
margin-top: 12px;
}
......@@ -45,13 +44,31 @@
top: calc(50% - 20px);
background: none;
width: 0;
height: 0px;
height: 0;
border-right: none;
border-bottom: 20px solid transparent;
border-top: 20px solid transparent;
border-left: 30px solid #aaa;
}
/* image */
.timeline-entry-icon-wrapper picture {
overflow: hidden;
border-radius: 50%;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.timeline-entry-icon-wrapper picture img.image-fit-cover {
object-fit: cover;
width: 100%;
height: 100%;
}
/* line - middle */
.timeline-entry-line {
width: 60px;
......
......@@ -6,7 +6,7 @@
{/if}
{if $this->getAttribute('content') != ""}
<div class="control-content">
<div class="control-content default-content">
{$this->getAttribute('content')}
</div>
{/if}
......@@ -26,13 +26,18 @@
itemtype="{$this->getAttribute('child-itemtype')}"
class="timeline-entry"
>
{assign var=imageFitClass value=''}
{if $imageFit == 'cover'}
{assign var=imageFitClass value='image-fit-cover'}
{/if}
<!-- Entry Icon -->
<div class="timeline-entry-icon">
{if $Child->getAttribute('image_site')}
<div class="timeline-entry-icon-wrapper">
{image src=$Child->getAttribute('image_site') width="500" type="resize"
title="{$Child->getAttribute('title')}"}
{image src=$Child->getAttribute('image_site') max-width="500" max-height="500" type="resize"
title="{$Child->getAttribute('title')}"
class="$imageFitClass"}
</div>
{/if}
</div>
......@@ -67,15 +72,18 @@
{/if}
</header>
<p>
{$Child->getAttribute('short')|nl2br}
{if $showLinks}
<a itemprop="url" href="{url site=$Child}"
class="timeline-entry-desc-link">
{locale group="quiqqer/sitetypes" value="list.more"}
</a>
{/if}
</p>
<div class="default-content">
<p>
{$Child->getAttribute('short')|nl2br}
{if $showLinks}
<a itemprop="url" href="{url site=$Child}"
class="timeline-entry-desc-link">
{locale group="quiqqer/timeline" value="timeline.more"}
</a>
{/if}
</p>
</div>
</div>
</article>
......
......@@ -30,7 +30,9 @@ public function __construct($attributes = array())
'order' => 'c_date ASC',
'parentInputList' => false, //todo später für brick
'showLinks' => true,
'imageFit' => 'original', // original, cover
'display' => 'VerticalBothSides',
'limit' => 10,
// Custom children template (path to html file); overwrites "display"
'displayTemplate' => false,
// Custom children template css (path to css file); overwrites "display"
......@@ -72,7 +74,8 @@ public function getBody()
// for bricks
$children = Utils::getSitesByInputList($Project, $parents, array(
'where' => $where,
'order' => $this->getAttribute('order')
'order' => $this->getAttribute('order'),
'limit' => $this->getAttribute('limit')
));
} else {
// for site types
......@@ -86,7 +89,8 @@ public function getBody()
'Site' => $Site,
'Project' => $this->getProject(),
'children' => $children,
'showLinks' => $this->getAttribute('showLinks')
'showLinks' => $this->getAttribute('showLinks'),
'imageFit' => $this->getAttribute('imageFit')
));
// load custom template (if set)
......
<?php
if (!defined('QUIQQER_SYSTEM')) {
define('QUIQQER_SYSTEM', true);
}
if (!defined('QUIQQER_AJAX')) {
define('QUIQQER_AJAX', true);
}
putenv("QUIQQER_OTHER_AUTOLOADERS=KEEP");
require_once __DIR__ . '/../../../../bootstrap.php';
<?php
if (!defined('QUIQQER_SYSTEM')) {
define('QUIQQER_SYSTEM', true);
}
if (!defined('QUIQQER_AJAX')) {
define('QUIQQER_AJAX', true);
}
require_once __DIR__ . '/../../../../bootstrap.php';
......@@ -9,7 +9,8 @@
'showLinks' => $Site->getAttribute('quiqqer.timeline.showLinks'),
'itemtype' => 'http://schema.org/ItemList',
'child-itemtype' => 'http://schema.org/ListItem',
'display' => $Site->getAttribute('quiqqer.timeline.display')
'display' => $Site->getAttribute('quiqqer.timeline.display'),
'imageFit' => $Site->getAttribute('quiqqer.timeline.imageFit')
));
$Engine->assign(array(
......