Example #1
0
 /**
  * @return string
  */
 public function getContent()
 {
     if (is_array($this->Content)) {
         if ($this->Filter) {
             $this->Template->setVariable('Hash', $this->getHash());
             if (!is_numeric($this->Filter)) {
                 $this->Filter = 50;
             }
             $this->Template->setVariable('FilterSize', $this->Filter);
             if (isset($this->getGlobal()->POST['PanelSearch-' . sha1($this->Title)])) {
                 $Value = $this->getGlobal()->POST['PanelSearch-' . sha1($this->Title)];
                 $this->Template->setVariable('FilterValue', "'" . $Value . "'");
             } else {
                 $Value = '';
                 $this->Template->setVariable('FilterValue', '');
             }
             array_unshift($this->Content, '<input type="text" class="form-control search" name="PanelSearch-' . sha1($this->Title) . '" placeholder="Filtern" value="' . $Value . '">' . ($this->Filter < count($this->Content) ? new PullRight(new Label($this->Filter . ' von ' . count($this->Content) . ' Einträgen')) : new PullRight(new Label(count($this->Content) . ' Einträge'))));
         } else {
             $this->Template->setVariable('FilterValue', '');
         }
         $this->Template->setVariable('Content', array_shift($this->Content));
         $this->Template->setVariable('ContentList', $this->Content);
     } else {
         $this->Template->setVariable('Content', $this->Content);
         $this->Template->setVariable('ContentList', array());
     }
     if (is_array($this->Footer)) {
         $this->Template->setVariable('Footer', trim(implode('', $this->Footer)));
     } else {
         $this->Template->setVariable('Footer', trim((string) $this->Footer));
     }
     return $this->Template->getContent();
 }
Example #2
0
 /**
  * @return string
  */
 public function getContent()
 {
     $this->Template->setVariable('HeadList', $this->TableHead);
     $this->Template->setVariable('BodyList', $this->TableBody);
     $this->Template->setVariable('FootList', $this->TableFoot);
     $this->Template->setVariable('Hash', $this->getHash());
     return $this->Template->getContent();
 }
Example #3
0
 /**
  * @param string         $Name
  * @param IIconInterface $Icon
  */
 public function __construct($Name, IIconInterface $Icon = null)
 {
     $this->Name = $Name;
     $this->Template = $this->getTemplate(__DIR__ . '/Reset.twig');
     $this->Template->setVariable('Name', $Name);
     if (null !== $Icon) {
         $this->Template->setVariable('Icon', $Icon);
     }
 }
Example #4
0
 /**
  * @param string         $Content
  * @param IIconInterface $Icon
  */
 public function __construct($Content, IIconInterface $Icon = null)
 {
     $this->Template = $this->getTemplate(__DIR__ . '/Message.twig');
     $this->Template->setVariable('Type', 'success');
     $this->Template->setVariable('Content', $Content);
     if (null !== $Icon) {
         $this->Template->setVariable('Icon', $Icon);
     }
 }
Example #5
0
 /**
  * @param string $Route
  * @param int    $Timeout
  * @param array  $Data
  */
 public function __construct($Route, $Timeout = 15, $Data = array())
 {
     if (!empty($Data)) {
         $Data = '?' . http_build_query((new Authenticator(new Get()))->getAuthenticator()->createSignature($Data, $Route));
     } else {
         $Data = '';
     }
     // Trim /Client
     $Route = str_replace('/Client', '', $Route);
     $this->Template = $this->getTemplate(__DIR__ . '/Redirect.twig');
     $this->Template->setVariable('Route', '/' . trim($Route, '/') . $Data);
     $this->Template->setVariable('Timeout', $Timeout);
     $this->Template->setVariable('UrlBase', $this->getRequest()->getUrlBase());
 }
Example #6
0
 /**
  * @param string         $Name
  * @param                $Path
  * @param IIconInterface $Icon
  * @param array          $Data
  * @param bool|string    $ToolTip
  */
 public function __construct($Name, $Path, IIconInterface $Icon = null, $Data = array(), $ToolTip = false)
 {
     $this->Name = $Name;
     $this->Path = $Path;
     $this->Template = $this->getTemplate(__DIR__ . '/Link.twig');
     $this->Template->setVariable('ElementName', $Name);
     $this->Template->setVariable('ElementType', 'italic');
     if (null !== $Icon) {
         $this->Template->setVariable('ElementIcon', $Icon);
     }
     if (!empty($Data)) {
         $Signature = (new Authenticator(new Get()))->getAuthenticator();
         $Data = '?' . http_build_query($Signature->createSignature($Data, $this->Path));
     } else {
         $Data = '';
     }
     $this->Template->setVariable('ElementPath', $this->Path . $Data);
     $this->Template->setVariable('UrlBase', $this->getRequest()->getUrlBase());
     if ($ToolTip) {
         if (is_string($ToolTip)) {
             $this->Template->setVariable('ElementToolTip', $ToolTip);
         } else {
             $this->Template->setVariable('ElementToolTip', $Name);
         }
     }
 }
Example #7
0
 /**
  * @return string
  */
 public function getContent()
 {
     $this->Template->setVariable('FormButtonList', $this->GridButtonList);
     $this->Template->setVariable('GridGroupList', $this->GridGroupList);
     $this->Template->setVariable('Hash', $this->getHash());
     return $this->Template->getContent();
 }
Example #8
0
 /**
  * @param string         $Name
  * @param                $Path
  * @param IIconInterface $Icon
  * @param array          $Data
  * @param bool|string    $ToolTip
  */
 public function __construct($Name, $Path, IIconInterface $Icon = null, $Data = array(), $ToolTip = true)
 {
     $this->Name = $Name;
     $this->Template = $this->getTemplate(__DIR__ . '/External.twig');
     $this->Template->setVariable('ElementName', $Name);
     $this->Template->setVariable('ElementType', 'btn btn-default');
     if (null === $Icon) {
         $Icon = new Extern();
     }
     $this->Template->setVariable('ElementIcon', $Icon);
     if (!empty($Data)) {
         $Signature = (new Authenticator(new Get()))->getAuthenticator();
         $Data = '?' . http_build_query($Signature->createSignature($Data, $Path));
     } else {
         $Data = '';
     }
     $this->Template->setVariable('ElementPath', $Path . $Data);
     if ($ToolTip) {
         if (is_string($ToolTip)) {
             $this->Template->setVariable('ElementToolTip', $ToolTip);
         } else {
             $this->Template->setVariable('ElementToolTip', $Path);
         }
     }
 }
Example #9
0
 /**
  * @return string
  */
 public function getContent()
 {
     $this->Template->setVariable('StageTitle', $this->Title);
     $this->Template->setVariable('StageDescription', $this->Description);
     $this->Template->setVariable('StageMessage', $this->Message);
     $this->Template->setVariable('StageContent', $this->Content);
     $this->Template->setVariable('StageMenu', $this->Menu);
     return $this->Template->getContent();
 }
 /**
  * @param IBridgeInterface $File
  * @param string           $Title
  * @param string           $Description
  * @param array            $ButtonList
  * @param string           $Type THUMBNAIL_TYPE_DEFAULT
  */
 public function __construct(IBridgeInterface $File, $Title, $Description = '', $ButtonList = array(), $Type = self::THUMBNAIL_TYPE_DEFAULT)
 {
     if (!is_array($ButtonList)) {
         $ButtonList = array($ButtonList);
     }
     $this->Template = $this->getTemplate(__DIR__ . '/Thumbnail.twig');
     if ($File->getRealPath()) {
         $this->Template->setVariable('File', $File->getLocation());
         $Size = getimagesize($File->getRealPath());
         $this->Template->setVariable('Height', $Size[1]);
     } else {
         $File = FileSystem::getFileLoader('Common/Style/Resource/logo_kreide2.png');
         $this->Template->setVariable('File', $File->getLocation());
         $Size = getimagesize($File->getRealPath());
         $this->Template->setVariable('Height', $Size[1]);
     }
     $this->Template->setVariable('Type', $Type);
     $this->Template->setVariable('Title', $Title);
     $this->Template->setVariable('Description', $Description);
     $this->Template->setVariable('ButtonList', $ButtonList);
     $this->File = $File;
 }
Example #11
0
 /**
  * @param string         $Name
  * @param null|string    $Placeholder
  * @param null|string    $Label
  * @param IIconInterface $Icon
  * @param null|array     $Option
  */
 public function __construct($Name, $Placeholder = '', $Label = '', IIconInterface $Icon = null, $Option = null)
 {
     $this->Name = $Name;
     $this->Template = $this->getTemplate(__DIR__ . '/FileUpload.twig');
     $this->Template->setVariable('ElementName', $Name);
     $this->Template->setVariable('ElementLabel', $Label);
     $this->Template->setVariable('ElementPlaceholder', $Placeholder);
     if (null !== $Icon) {
         $this->Template->setVariable('ElementIcon', $Icon);
     }
     $this->setPostValue($this->Template, $Name, 'ElementValue');
     if (is_array($Option)) {
         $this->Template->setVariable('ElementOption', json_encode($Option));
     }
 }
Example #12
0
 /**
  * @return string
  */
 public function getContent()
 {
     if (is_array($this->Content)) {
         if ($this->Filter) {
             $this->Template->setVariable('Hash', $this->getHash());
             if (!is_numeric($this->Filter)) {
                 $this->Filter = 50;
             }
             $this->Template->setVariable('FilterSize', $this->Filter);
             array_unshift($this->Content, '<input type="text" class="form-control search" name="PanelSearch" placeholder="Filtern">' . ($this->Filter < count($this->Content) ? new PullRight(new Label($this->Filter . ' von ' . count($this->Content) . ' Einträgen')) : new PullRight(new Label(count($this->Content) . ' Einträge'))));
         }
         $this->Template->setVariable('Content', array_shift($this->Content));
         $this->Template->setVariable('ContentList', $this->Content);
     } else {
         $this->Template->setVariable('Content', $this->Content);
         $this->Template->setVariable('ContentList', array());
     }
     return $this->Template->getContent();
 }
Example #13
0
 /**
  * @param bool $NoConnection
  *
  * @return string
  */
 public function getContent($NoConnection = false)
 {
     $this->Template->setVariable('ManagerStyle', Style::getManager());
     $this->Template->setVariable('ManagerScript', Script::getManager());
     $this->Template->setVariable('NavigationCluster', implode('', $this->ClusterNavigation));
     $this->Template->setVariable('BreadcrumbCluster', $this->ClusterBreadcrumb);
     $this->Template->setVariable('NavigationApplication', implode('', $this->ApplicationNavigation));
     $this->Template->setVariable('BreadcrumbApplication', $this->ApplicationBreadcrumb);
     $this->Template->setVariable('NavigationModule', implode('', $this->ModuleNavigation));
     $this->Template->setVariable('BreadcrumbModule', $this->ModuleBreadcrumb);
     $this->Template->setVariable('NavigationService', implode('', $this->ServiceNavigation));
     $Debug = $this->getDebugger();
     $this->Template->setVariable('DebuggerProtocol', $Debug->getProtocol());
     $this->Template->setVariable('DebuggerHost', gethostname());
     $this->Template->setVariable('DebuggerRuntime', $Debug->getRuntime());
     $this->Template->setVariable('Content', implode('', $this->Content));
     $this->Template->setVariable('PathBase', $this->getRequest()->getPathBase());
     if (!$NoConnection) {
         $this->Template->setVariable('Consumer', '[' . Consumer::useService()->getConsumerBySession()->getAcronym() . '] ' . Consumer::useService()->getConsumerBySession()->getName());
     }
     return $this->Template->getContent();
 }
Example #14
0
 /**
  * @param Route     $Route
  * @param Name      $Name
  * @param Icon|null $Icon
  * @param bool      $Active
  */
 function __construct(Route $Route, Name $Name, Icon $Icon = null, $Active = false)
 {
     $this->Route = $Route;
     $this->Name = $Name;
     $this->Icon = $Icon;
     $this->Active = $Active || $this->getActive($Route);
     $this->Template = $this->getTemplate(__DIR__ . '/Link.twig');
     $this->Template->setVariable('Route', $Route->getValue());
     $this->Template->setVariable('Name', $Name->getValue());
     if (null === $Icon) {
         $this->Template->setVariable('Icon', '');
     } else {
         $this->Template->setVariable('Icon', $Icon->getValue());
     }
     if ($this->Active) {
         $this->Template->setVariable('ActiveClass', 'active');
     } else {
         $this->Template->setVariable('ActiveClass', '');
     }
 }
Example #15
0
 /**
  * @param integer|string $Code
  * @param null           $Message
  */
 function __construct($Code, $Message = null)
 {
     $this->Template = $this->getTemplate(__DIR__ . '/Error.twig');
     $this->Template->setVariable('ErrorCode', $Code);
     if (null === $Message) {
         switch ($Code) {
             case 404:
                 $this->Template->setVariable('ErrorMessage', 'Die angeforderte Ressource konnte nicht gefunden werden');
                 break;
             default:
                 $this->Template->setVariable('ErrorMessage', '');
         }
     } else {
         $this->Template->setVariable('ErrorMessage', $Message);
         $this->Template->setVariable('ErrorMenu', array(new Primary('Fehlerbericht senden', '/System/Assistance/Support/Ticket', null, array('TicketSubject' => urlencode($Code), 'TicketMessage' => urlencode($Message)))));
     }
 }
 /**
  * @return string
  */
 public function getContent()
 {
     $this->Template->setVariable('BodyList', $this->TableRow);
     return $this->Template->getContent();
 }
Example #17
0
 /**
  * @param TblAddress $tblAddress
  */
 public function __construct(TblAddress $tblAddress)
 {
     $this->Template = $this->getTemplate(__DIR__ . '/Address.twig');
     $this->Template->setVariable('Address', $tblAddress);
 }
Example #18
0
 /**
  * @param mixed $Value
  *
  * @return Field
  */
 public function setPrefixValue($Value)
 {
     $this->Template->setVariable('ElementPrefix', $Value);
     return $this;
 }
Example #19
0
 /**
  * @return string
  */
 public function getContent()
 {
     $this->Template->setVariable('Layout', $this->LayoutGroup);
     return $this->Template->getContent();
 }
Example #20
0
 /**
  * @return string
  */
 public function __toString()
 {
     $this->Template->setVariable('Hash', $this->getHash());
     return $this->getContent();
 }
Example #21
0
 /**
  * @return LayoutTab
  */
 public function setActive()
 {
     $this->Template->setVariable('TabActive', true);
     return $this;
 }
Example #22
0
 /**
  * @param LayoutTab[] $TabList
  */
 public function __construct($TabList)
 {
     $this->Template = $this->getTemplate(__DIR__ . '/LayoutTabs.twig');
     $this->Template->setVariable('TabList', implode('', $TabList));
 }
Example #23
0
 /**
  * @return string
  */
 public function getContent()
 {
     $this->Template->setVariable('LinkList', $this->LinkList);
     $this->Template->setVariable('ContentList', $this->ContentList);
     return $this->Template->getContent();
 }