Skip to content
Code-Schnipsel Gruppen Projekte
Commit a0a262b5 erstellt von michael.daniel's avatar michael.daniel
Dateien durchsuchen

feat: Erste Dateien für neues Modul. Die meisten Übersetzungen sind direkt mitgeliefert.

Übergeordnete
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
![QUIQQER EventCalendar](bin/images/Readme.jpg)
QUIQQER Timeline
========
Timline and roadmap for your project.
Package Name:
quiqqer/timeline
Features
--------
- (...)
Installation
------------
The package name is: `quiqqer/timeline`
Contribute
----------
- Issue Tracker: https://dev.quiqqer.com/quiqqer/timeline/issues
- Source Code: https://dev.quiqqer.com/quiqqer/timeline/tree/master
- Wiki: https://dev.quiqqer.com/quiqqer/timeline/wikis/home
Support
-------
If you have found errors, wishes or suggestions for improvement,
you can contact us by email at support@pcsg.de.
We will try to meet your needs or send them to the responsible developers
of the project.
License
-------
PCSG QL-1.0, CC BY-NC-SA 4.0
{
"name": "quiqqer\/timeline",
"type": "quiqqer-module",
"description": "This package contains some templates to simply create time lines and road maps.",
"version": "dev-master",
"license": "",
"authors": [
{
"name": "Michael Danielczok",
"email": "michael@pcsg.de",
"homepage": "http:\/\/www.pcsg.de",
"role": "Developer"
}
],
"support": {
"email": "support@pcsg.de",
"url": "http:\/\/www.pcsg.de"
},
"require": {
"quiqqer\/quiqqer": "*@dev",
"quiqqer\/utils": ">=1.7|dev-dev",
"quiqqer\/fontawesome": "*@dev",
"quiqqer\/buttons": ">=1.0.0|dev-master|dev-dev"
},
"autoload": {
"psr-4": {
"QUI\\Timeline\\": "src/QUI/Timeline"
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<locales>
<groups name="quiqqer/timeline" datatype="php,js">
<locale name="package.title">
<de><![CDATA[QUIQQER - Timeline]]></de>
<en><![CDATA[QUIQQER - Timeline]]></en>
</locale>
<locale name="package.description" html="true">
<de><![CDATA[
(...)
]]></de>
<en><![CDATA[
(...)
]]></en>
</locale>
<!-- timeline -->
<locale name="admin.types.timeline">
<de><![CDATA[Timeline]]></de>
<en><![CDATA[Timeline]]></en>
<pl><![CDATA[Linnia czasu]]></pl>
</locale>
<locale name="admin.types.timeline.desc">
<de><![CDATA[(...)]]></de>
<en><![CDATA[(...)]]></en>
<pl><![CDATA[(...)]]></pl>
</locale>
</groups>
<groups name="quiqqer/timeline" datatype="php">
<!-- timeline -->
<locale name="timeline.settings.title">
<de><![CDATA[Timeline: Einstellungen]]></de>
<en><![CDATA[Timeline: settings]]></en>
<pl><![CDATA[Timeline: ustawienia]]></pl>
</locale>
<!-- template / display -->
<locale name="timeline.display">
<de><![CDATA[Vorlage]]></de>
<en><![CDATA[Template]]></en>
<pl><![CDATA[Template]]></pl>
</locale>
<locale name="timeline.display.VerticalBothSides">
<de><![CDATA[Verticale Linnie mit Inhalt und Icon (Bild)]]></de>
<en><![CDATA[Vertical timeline wiht content and icon (image)]]></en>
<pl><![CDATA[Wertykalna linnia czasu z treścią i ikona (obrazkiem)]]></pl>
</locale>
<!-- show short -->
<locale name="timeline.showLinks">
<de><![CDATA[Links zu den Seiten anzeigen?]]></de>
<en><![CDATA[Show hyerlinks for each site?]]></en>
<pl><![CDATA[]]></pl>
</locale>
</groups>
</locales>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<site>
<types>
<!-- Liste -->
<type type="types/timeline" icon="fa fa-list">
<locale group="quiqqer/timeline" var="admin.types.timeline"/>
<desc>
<locale group="quiqqer/timeline" var="admin.types.timeline.desc"/>
</desc>
<!-- list attributes -->
<attributes>
<attribute default="VerticalBothSides">quiqqer.timeline.display</attribute>
<attribute default="1">quiqqer.timeline.showLinks</attribute>
</attributes>
<!-- list settings -->
<settings>
<category name="timeline-settings">
<settings>
<title>
<locale group="quiqqer/timeline"
var="timeline.settings.title"/>
</title>
<select conf="quiqqer.timeline.display">
<text>
<locale group="quiqqer/timeline"
var="timeline.display"/>
</text>
<option value="VerticalBothSides">
<locale group="quiqqer/timeline"
var="timeline.display.VerticalBothSides"/>
</option>
</select>
<input conf="quiqqer.timeline.showLinks" type="checkbox">
<text>
<locale group="quiqqer/timeline"
var="timeline.showLinks"
/>
</text>
</input>
</settings>
</category>
</settings>
</type>
</types>
</site>
<?php
/**
* This file contains QUI\Timeline\Controls\Timeline
*/
namespace QUI\Timeline\Controls;
use QUI;
use QUI\Projects\Site\Utils;
/**
* Class Timeline
*
* @package quiqqer/timeline
*/
class Timeline extends QUI\Control
{
/**
* constructor
*
* @param array $attributes
*/
public function __construct($attributes = array())
{
// default options
$this->setAttributes(array(
'class' => 'timeline',
'order' => 'c_date ASC',
'parentInputList' => false, //todo später für brick
'showLinks' => true,
'display' => 'VerticalBothSides',
// Custom children template (path to html file); overwrites "display"
'displayTemplate' => false,
// Custom children template css (path to css file); overwrites "display"
'displayCss' => false,
'nodeName' => 'section',
));
parent::__construct($attributes);
}
/**
* Return the inner body of the element
* Can be overwritten
*
* @return String
*/
public function getBody()
{
$Engine = QUI::getTemplateManager()->getEngine();
$Site = $this->getSite();
$Project = $this->getProject();
if (!$Site && !$this->getAttribute('parentInputList')) {
return '';
}
$parents = $this->getAttribute('parentInputList');
if (!$parents) {
$parents = $Site->getId();
}
// only active sites
$where['active'] = 1;
if ($this->getAttribute('parentInputList')) {
// for bricks
$children = Utils::getSitesByInputList($Project, $parents, array(
'where' => $where,
'order' => $this->getAttribute('order')
));
} else {
// for site types
$children = $Site->getChildren(array(
'where' => $where,
));
}
$Engine->assign(array(
'this' => $this,
'Site' => $Site,
'Project' => $this->getProject(),
'children' => $children,
'showLinks' => $this->getAttribute('showLinks')
));
// load custom template (if set)
if ($this->getAttribute('displayTemplate')
&& file_exists($this->getAttribute('displayTemplate'))
) {
if ($this->getAttribute('displayCss')
&& file_exists($this->getAttribute('displayCss'))
) {
$this->addCSSFile($this->getAttribute('displayCss'));
}
return $Engine->fetch($this->getAttribute('displayTemplate'));
}
// template
$css = dirname(__FILE__) . $this->getAttribute('display') . '.css';
$template = dirname(__FILE__) . $this->getAttribute('display') . '.template';
$this->addCSSFile($css);
return $Engine->fetch($template);
}
/**
* @return mixed|QUI\Projects\Site
*/
protected function getSite()
{
if ($this->getAttribute('Site')) {
return $this->getAttribute('Site');
}
$Site = QUI::getRewrite()->getSite();
$this->setAttribute('Site', $Site);
return $Site;
}
}
{if $Template->getAttribute('content-body') && $Site->getAttribute('content')}
<section class="content-body quiqqer-content grid-100 mobile-grid-100 grid-parent">
{$Site->getAttribute('content')}
</section>
{/if}
<section class="content-template grid-100 mobile-grid-100 grid-parent">
{$ChildrenList->create()}
</section>
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren