Exemple #1
0
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2Engine".
 *****************************************************************************************/
$this->beginContent('//layouts/main');
Yii::import('application.components.leftWidget.*');
LeftWidget::registerScript();
$noBackdrop = isset($this->noBackdrop) && $this->noBackdrop ? 'no-backdrop' : '';
X2Flashes::renderTopFlashes('top-error');
?>

    <div id='sidebar-left-widget-box'>
        <?php 
if (!Yii::app()->user->isGuest) {
    $layout = Yii::app()->params->profile->getLayout();
    // $defaults = array ('RecentItems', 'ActionMenu', 'TopContacts');
    // default order
    $defaults = array('ActionMenu', 'RecentItems', 'TopContacts');
    $keys = array_merge(array_keys($this->leftWidgets), $defaults);
    $leftWidgetOrder = array_intersect_key($layout['left'], array_flip($keys));
    //Default Left Widgets;
    $leftWidgets = array('TopContacts' => array(), 'RecentItems' => array());
    $leftWidgets = array_merge($leftWidgets, $this->leftWidgets);
    // render the left widgets in order
Exemple #2
0
 public function renderConvertedNotice()
 {
     $convertedTo = $this->getConvertedTo();
     if ($convertedTo) {
         Yii::app()->user->setFlash('notice', Yii::t('x2Leads', 'This record has been converted. ' . 'To view the new record, click {here}.', array('{here}' => CHtml::link(Yii::t('x2Leads', 'here'), $convertedTo->getUrl()))));
         X2Flashes::renderTopFlashes('notice');
     }
 }