Пример #1
0
$innerPrefix = \Plethora\Helper\Arrays::get($route, 'inner_prefix', '');
$innerSuffix = \Plethora\Helper\Arrays::get($route, 'inner_suffix', '');
?>

<?php 
echo $prefix;
?>
    <li class="<?php 
echo implode(' ', $classes);
?>
">
        <?php 
if ($path !== NULL) {
    ?>
            <?php 
    echo Html::a($path, $innerPrefix . '<span>' . $routeTitle . '</span>' . $innerSuffix);
    ?>
        <?php 
} else {
    ?>
            <?php 
    echo $innerPrefix . '<span>' . $routeTitle . '</span>' . $innerSuffix;
    ?>
        <?php 
}
?>
        <?php 
if ($children instanceof View) {
    ?>
            <?php 
    echo $children->render();
Пример #2
0
 /**
  * Format value.
  *
  * @access     public
  * @param    ModelCore\FileBroker $oImageBroker
  * @return    string
  * @since      1.0.0-alpha
  * @version    1.0.0-alpha
  */
 public function format($oImageBroker)
 {
     $sOutput = '';
     if ($oImageBroker instanceof ModelCore\FileBroker && $oImageBroker->getFile() instanceof \Model\File) {
         $oAttributes = Helper\Attributes::factory();
         $oField = $this->getField();
         /* @var $oField \Plethora\View\ViewField */
         $oFile = $oImageBroker->getFile();
         /* @var $oFile \Model\File */
         // set proper ALT
         if (!empty($this->sImageAltPattern)) {
             $oModel = $oField->getEntity()->getModel();
             $aFields = $oModel->getMetadata()->getFieldNames();
             if ($oModel->hasLocales()) {
                 $aFields = array_merge($aFields, $oModel->getLocalesMetadata()->getFieldNames());
             }
             $sAlt = $this->sImageAltPattern;
             foreach ($aFields as $sField) {
                 if (strpos($sAlt, ':' . $sField) !== FALSE) {
                     $sAlt = str_replace(':' . $sField, $oModel->{$sField}, $sAlt);
                 }
                 if (strpos($sAlt, ':') === FALSE) {
                     break;
                 }
             }
             $oAttributes->addToAttribute('alt', $sAlt);
         }
         // get image path
         $sFieldName = $oField->getName();
         $oFormField = $oField->getEntity()->getModel()->getConfig()->getField($sFieldName);
         /* @var $oFormField \Plethora\Form\Field\ImageModel */
         $sImagePath = $oFile->getFullPath();
         if (empty($sImagePath) && $oFormField->getDefaultImage() === NULL) {
             return NULL;
         } elseif (empty($sImagePath) && $oFormField->getDefaultImage() !== NULL) {
             $sImagePath = $oFormField->getDefaultImage();
         }
         // stylize image
         if (!empty($this->sImageStyle)) {
             $sImagePath = ImageStyles::useStyle($this->sImageStyle, $sImagePath);
         }
         $oAttributes->addToAttribute('src', Router::getBase() . '/' . $sImagePath);
         $sOutput = '<img ' . $oAttributes->renderAttributes() . ' />';
         // if this image should be linked to it's original-sized equivalent
         if ($this->bLinkToOriginalSize) {
             $sImagePathOriginal = '/' . $oFormField->getUploadPath(TRUE) . '/' . $oFile->getNameWithExt();
             $oAttributes = Helper\Attributes::factory()->setAttributes($this->aLinkAttributes);
             $sOutput = Helper\Html::a($sImagePathOriginal, $sOutput, $oAttributes);
         }
     }
     // return final output
     return $this->sPrefix . $sOutput . $this->sSuffix;
 }
Пример #3
0
<?php

/**
 * Content of e-mail with password reset link.
 *
 * @author         Krzysztof Trzos
 * @package        user
 * @subpackage     views\frontend\recovery
 * @since          2015-02-17
 * @version        2.1.0-dev
 */
use Plethora\Core;
use Plethora\Helper;
use Plethora\Route;
$siteName = Core::getAppName();
$contactUrl = Helper\Html::a(Route::factory('contact')->url(), __('CONTACT'));
?>

<?php 
/* @var $sRecoveryCode string */
/* @var $sLogin string */
?>

<?php 
$passRecoveryLink = Route::factory('password_recovery_code')->url(['code' => $sRecoveryCode]);
?>

<p><?php 
echo __('Hello :login', ['login' => $sLogin]);
?>
,</p>
Пример #4
0
<?php

/**
 * @author         Krzysztof Trzos
 * @package        base
 * @subpackage     views\view\imitation
 * @since          1.0.0-alpha
 * @version        1.0.0-alpha
 */
?>

<?php 
/* @var $sURL string */
/* @var $sTitle string */
/* @var $sValue string */
?>

<?php 
$oAttributes = \Plethora\Helper\Attributes::factory();
$oAttributes->setAttribute('title', $sTitle);
?>

<?php 
echo \Plethora\Helper\Html::a($sURL, empty($sValue) ? __('read more') : $sValue, $oAttributes);
Пример #5
0
 */
use Plethora\Helper;
use Plethora\View;
?>

<?php 
/* @var $sRouteTitle string */
/* @var $sRouteName string */
/* @var $sPath string */
/* @var $aRouteParams array */
/* @var $oSiblings View */
/* @var $aParameters array */
?>

<li <?php 
echo Helper\Attributes::factory()->renderAttributes($aParameters);
?>
>
    <?php 
echo Helper\Html::a($sPath, $sRouteTitle);
?>
    <?php 
if ($oSiblings instanceof View) {
    ?>
        <?php 
    echo $oSiblings->render();
    ?>
    <?php 
}
?>
</li>
Пример #6
0
<?php

/**
 * @author     Krzysztof Trzos <*****@*****.**>
 * @package    user
 * @subpackage views
 * @since      2.1.0-dev
 * @version    2.1.0-dev
 */
?>

<div class="login_links">
	<p><?php 
echo \Plethora\Helper\Html::a(\Plethora\Route::factory('password_recovery')->url(), __('I forgot password'));
?>
</p>
	<p><?php 
echo \Plethora\Helper\Html::a(\Plethora\Route::factory('register')->url(), __('I want to register an account'));
?>
</p>
</div>
Пример #7
0
<?php

/**
 * @author		Krzysztof Trzos
 * @package		user
 * @subpackage	views\frontend
 * @since		2.25.0, 2015-02-18
 * @version		1.0.0, 2015-02-18
 */
?>

<?php 
$sAnchor = \Plethora\Helper\Html::a(\Plethora\Route::factory('contact')->url(), __('contact'));
?>

<p class="act_txt"><?php 
echo __('An error occurred while recovering access to your account. The reason may be one of the following points');
?>
</p>
<ul class="func_list">
	<li><?php 
echo __('recovery operation has already been made under this link;');
?>
</li>
	<li><?php 
echo __('link from the e-mail was not fully copied into your browser\'s address field.');
?>
</li>
</ul>
<p class="act_txt"><?php 
echo __('If none of the above reasons does not solve the problem, please contact us via the :contact section.', array('contact' => $sAnchor));
Пример #8
0
 /**
  * Return minified View output (without any white-spaces).
  *
  * @access   public
  * @param    array $aArgs
  * @return   string
  * @since    1.0.0-alpha
  * @version  1.0.0-alpha
  */
 public function renderAndMinify(array $aArgs = [])
 {
     return HtmlHelper::minify($this->render($aArgs));
 }
Пример #9
0
<?php

/**
 * Main view for site map.
 * 
 * @author		Krzysztof Trzos
 * @package		sitemap
 * @subpackage	views
 * @since		1.0.0-dev, 2015-04-19
 * @version		1.0.0-dev, 2015-04-19
 */
?>

<?php 
/* @var $aItems array */
?>

<div id="sitemap">
	<ul>
		<?php 
foreach ($aItems as $aItem) {
    ?>
			<li><?php 
    echo \Plethora\Helper\Html::a($aItem[0], $aItem[1]);
    ?>
</li>
		<?php 
}
?>
	</ul>
</div>