/**
  * Renders the data cell content.
  *
  * @param integer $row the row number (zero-based)
  * @param YdActiveRecord $data the data associated with the row
  */
 protected function renderDataCellContent($row, $data)
 {
     ob_start();
     parent::renderDataCellContent($row, $data);
     $parentContents = ob_get_clean();
     if ($data instanceof CActiveRecord) {
         $links = is_callable(array($data, 'getMenuLinks')) ? call_user_func(array($data, 'getMenuLinks')) : array();
         if ($links) {
             if (is_callable(array($data, 'getUrl'))) {
                 $this->buttonOptions['type'] = TbHtml::BUTTON_TYPE_LINK;
                 $this->buttonOptions['url'] = call_user_func(array($data, 'getUrl'));
             }
             echo '<div class="filter-container">';
             $this->buttonOptions['split'] = true;
             echo TbHtml::buttonDropdown($parentContents, $links, $this->buttonOptions);
             echo '</div>';
         } else {
             $url = is_callable(array($data, 'getUrl')) ? call_user_func(array($data, 'getUrl')) : false;
             if ($url) {
                 $this->buttonOptions['class'] = isset($this->buttonOptions['class']) ? $this->buttonOptions['class'] . ' btn' : 'btn';
                 echo TbHtml::link($parentContents, $url, $this->buttonOptions);
             } else {
                 echo TbHtml::button($parentContents, $this->buttonOptions);
             }
         }
     } else {
         echo TbHtml::button($parentContents, $this->buttonOptions);
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate($id)
 {
     $model = new EacStatusLog();
     $decision = EacDecision::model()->findByPk($id);
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['EacStatusLog'])) {
         $model->attributes = $_POST['EacStatusLog'];
         $model->decision_id = $id;
         $model->approved = 0;
         //not approved
         $model->create_user_id = Yii::app()->user->id;
         $model->date_created = date('Y-m-d H:i:s');
         $model->date_updated = date('Y-m-d H:i:s');
         if ($model->save()) {
             if ($decision) {
                 $decision->implementation_status_id = $model->status_id;
                 $decision->save();
                 Yii::app()->user->setFlash(TbHtml::ALERT_COLOR_SUCCESS, 'Status updated successfully.');
             }
             $criteria = new CDbCriteria();
             $criteria->addColumnCondition(array('is_mda' => 0), 'OR');
             $mdas = $decision->getAssignedMdasIds();
             $criteria->addInCondition('mda_id', $mdas);
             $recipients = User::getNotificationSubscribers($criteria);
             $loggedInUser = User::model()->findByPk(Yii::app()->user->user_id);
             $from = "";
             if (Yii::app()->user->is_mda) {
                 $mda = $loggedInUser->mda;
                 $from = $mda->description;
             } else {
                 $meacOffice = $loggedInUser->meacOffice;
                 $from = $meacOffice->description;
             }
             $message = "Decision {$decision->decision_reference}-({$decision->description}) has been updated by " . Yii::app()->user->getState('loggedInUser') . " from {$from}<br />";
             $message .= $model->status_narrative . "<br />";
             $message .= "For more information click " . TbHtml::link("here", Yii::app()->getBaseUrl(true) . "/index.php?r=eacDecision/view&id={$decision->id}");
             $this->notify($recipients, 'Decision Update', $message);
             $this->redirect(array('/eacDecision/view', 'id' => $id));
         }
     }
     $this->render('create', array('model' => $model, 'decision' => $decision));
 }
Esempio n. 3
0
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#eac-facts-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<?php echo TbHtml::pageHeader('', 'Common Market'); ?>

<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button btn')); ?>&nbsp;
<?php echo TbHtml::link('Export to Excel',$this->createUrl('//export/exportCommonMarket'),array('class'=>'btn btn-success'));?>
<br /><br />
<div class="search-form" style="display:none">
    <?php
    $this->renderPartial('_search', array(
        'model' => $model,
    ));
    ?>
</div><!-- search-form -->

<?php
$this->widget('bootstrap.widgets.TbGridView', array(
    'id' => 'eac-facts-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
Esempio n. 4
0
File: index.php Progetto: cicb/tpc
<?php

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'eventos-form', 'enableAjaxValidation' => false));
?>
<div class='controles'>
        <h1>Administración De Eventos</h1>
		<div class='col-2'>
		<?php 
echo $form->textFieldControlGroup($model, 'EventoNom', array('append' => TbHtml::submitButton('Buscar', array('class' => 'btn')), 'span' => 3, 'placeholder' => 'Nombre del evento', 'id' => 'filtro-usuario'));
?>
		
<?php 
$this->endWidget();
?>
				<?php 
echo TbHtml::link(' Agregar Evento', array('evento/registro'), array('class' => 'fa fa-plus btn btn-primary'));
?>
		</div>
</div>

<div id='tabla-usuarios'>
		<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'eventos-grid', 'emptyText' => 'No se encontraron coincidencias', 'dataProvider' => $model->search(), 'summaryText' => '', 'type' => 'condensed hover striped', 'htmlOptions' => array('class' => 'primario'), 'columns' => array(array('header' => 'Id', 'name' => 'EventoId'), array('header' => 'Nombre', 'name' => 'EventoNom'), array('header' => 'Estatus', 'name' => 'EventoSta'), array('header' => 'Inicia', 'name' => 'EventoFecIni'), array('header' => 'Finaliza', 'name' => 'EventoFecFin'), array('class' => 'CButtonColumn', 'header' => 'Acciones', 'template' => '{editar} {alta}{baja}  ', 'buttons' => array('alta' => array('label' => '<span class="text-success fa fa-arrow-up"> Dar Alta </span>', 'url' => 'Yii::app()->createUrl("evento/conmutarEstatus",array(
													"id"=>$data["EventoId"],
											))', 'visible' => '$data["EventoSta"]!="ALTA"', 'click' => 'function(event)
											{ $.ajax({
													url:$(this).attr("href"),
															success: function(data){
																	$.fn.yiiGridView.update("eventos-grid");
															}		
												 });
Esempio n. 5
0
    ?>
    	    </div>
	    <?php 
}
?>

            <p class="help-block" style="text-align:center"><?php 
echo UserModule::t("Please fill out the following form with your login credentials:");
?>
</p>
            <div class="form">
		<?php 
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'login-form', 'layout' => TbHtml::FORM_LAYOUT_HORIZONTAL, 'helpType' => TbHtml::HELP_TYPE_BLOCK, 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>
		<?php 
//echo $form->errorSummary($model);
?>
		<?php 
echo $form->textFieldControlGroup($model, 'username');
?>
		<?php 
echo $form->passwordFieldControlGroup($model, 'password');
?>
		<div class="control-group">
		    <div class="controls">
			<?php 
echo TbHtml::link(UserModule::t("Register"), Yii::app()->getModule('user')->registrationUrl);
?>
 | <?php 
echo TbHtml::link(UserModule::t("Lost Password?"), Yii::app()->getModule('user')->recoveryUrl);
?>
Esempio n. 6
0
<?php

/**
 * @var $this DefaultController
 *
 * @author Brett O'Donnell <*****@*****.**>
 * @author Zain Ul abidin <*****@*****.**>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-audit-module
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-audit-module/master/LICENSE
 *
 * @package yii-audit-module
 */
$this->pageTitle = $this->module->getName();
$this->pageHeading = false;
$content = CHtml::tag('p', array(), Yii::t('audit', 'You may use the following tools to help audit your application.'));
foreach (array_keys($this->module->controllerMap) as $controllerName) {
    $content .= ' ' . TbHtml::link(Yii::t('audit', ucfirst($controllerName)), array($controllerName . '/index'), array('class' => 'btn btn-large btn-primary'));
}
$this->widget('bootstrap.widgets.TbHeroUnit', array('heading' => $this->module->getName(), 'content' => $content));
Esempio n. 7
0
<?php

/* @var $this RelasiPengadaanSparepartController */
/* @var $model RelasiPengadaanSparepart */
$this->breadcrumbs = array('Relasi Pengadaan Spareparts' => array('index'), $model->ID_RELASI);
?>

<h1>Daftar Sparepart yang dipilih #<?php 
echo $id;
?>
</h1>

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'relasiPengadaanSparepart-grid', 'type' => TbHtml::GRID_TYPE_HOVER, 'dataProvider' => $model->search2($id), 'template' => "{items}\n{pager}", 'columns' => array(array('header' => 'No', 'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'), array('name' => 'ID Pengadaan', 'value' => '$data->ID_PENGADAAN'), array('name' => 'Nama Sparepart', 'value' => '$data->iDSPAREPART->NAMA_BARANG'), array('name' => 'Jumlah', 'type' => 'raw', 'value' => function ($data, $row) {
    if ($data->JUMLAH == NULL) {
        return TbHtml::link("ISI JUMLAH", array("relasiPengadaanSparepart/isi", "id" => $data->ID_RELASI), array('style' => 'font-weight:900;text-decoration:none;'));
    } else {
        return $data->JUMLAH;
    }
}), array('name' => 'Harga Sementara', 'value' => '$data->HARGA_SEMENTARA'))));
Esempio n. 8
0
File: guardar.php Progetto: cicb/tpc
			<?php 
foreach ($model->zonas as $zona) {
    # Zonas de la distribucion
    $this->renderPartial('_zona', array('model' => $zona, 'scenario' => 'insert'));
}
?>
			<i id="feedback-funcion" class="fa fa-3x hidden" ></i><br/><br/>
		</div>
	<?php 
echo TbHtml::ajaxButton(' Agregar una zona', $this->createUrl('distribuciones/agregarZona', array('EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId)), array('type' => 'POST', 'success' => "function(resp){\n\t\t\t\$('#area-zonas').append(resp)\n\t\t}", 'complete' => 'function(){ $("#feedback-funcion").toggleClass("fa-spinner fa-spin","hidden"); }'), array('id' => 'btn-agregar-zona', 'class' => 'btn btn-success fa fa-2x fa-plus-circle center '));
?>
<br />
<br />
<div class='row-fluid'>
	<?php 
echo TbHtml::link(' Regresar', array('evento/actualizar', 'id' => $model->EventoId), array('class' => 'btn fa fa-arrow-left'));
?>
	<?php 
echo TbHtml::ajaxButton(' Asignar esta distribución a todas las funciones', $this->createUrl('distribuciones/asignarATodas'), array('beforeSend' => 'function(){return  confirm("¿Confirma asignar esta distribución a todas las demas funciones?\\nEsto implica perder cualquier distribución previamente asignada a las demas funciones"); }', 'success' => 'function(resp){alert(resp);}', 'type' => 'POST', 'data' => array('ForoId' => $model->ForoId, 'ForoMapIntId' => $model->ForoMapIntId, 'EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId)), array('id' => 'btn-asignar-todas', 'class' => 'btn btn-info fa fa-th'));
?>
</div>


	</div>
</div>
<?php 
$EventoId = $model->EventoId;
$FuncionesId = $model->FuncionesId;
//$ZonasId=$zona->ZonasId;
Yii::app()->clientScript->registerScript('controles', "\nfunction cambiarValores(control){\n\t\tvar key=control.attr('name');\n\t\tvar value=control.val();\n\t\tvar data={Zonas:{ EventoId:{$EventoId}, FuncionesId:{$FuncionesId}, ZonasId:control.data('id') }};\n\t\tdata['Zonas'][key]=value;\n\t\t\$.ajax({\n\t\t\t\turl: '" . $this->createUrl('AsignarValorZona') . "',\n\t\t\t\t\t\ttype:'POST',\n\t\t\t\t\t\tdata:data,\n\t\t});\n}\n\$('.ZonasCantSubZon').live('focusout',function(){\n\t\tcambiarValores(\$(this));\n});\n\$('.ZonasCanLug').live('focusout',function(){\n\t\tcambiarValores(\$(this));\n});\n\$('.ZonasCosBol').live('focusout',function(){\n\t\tcambiarValores(\$(this));\n});\n\$('.ZonasAli').live('focusout',function(){\n\t\tcambiarValores(\$(this));\n});\n\$('.ZonasTipo').live('change',function(){\n\t\tcambiarValores(\$(this));\n});\n\n\$( '.nodo-toggle').live('click',function(){\n\tvar uid= \$(this).data('uid');\n\tvar link= \$(this);\n\tif (link.data('estado')=='inicial') {\n\t\tvar href= link.attr('href');\n\t\t\$.ajax({\n\t\t\turl:href,\n\t\t\tsuccess:function(data){ \n\t\t\t\t\$('#hijos-'+uid).append(data);\n\t\t\t\tlink.data('estado','toggle')\n\t\t\t\tlink.toggleClass('fa-minus-square');\n\t\t\t}\n\t\t});\n\t}\n\telse if (link.data('estado')=='toggle'){\n\t\tlink.toggleClass('fa-minus-square');\n\t\t\$('#rama-'+uid).toggle();\n\t}\n\treturn false;\n})\n\t\t\$('.btn-generar-arbol').live('click',function(){\n\t\t\t\tvar obj=\$(this);\n\t\t\t\tvar zid=obj.data('zid');\n\t\t\t\tvar dir=obj.attr('href');\n\t\t\t\t\$.ajax({\n\t\t\t\t\t\turl:dir,\n\t\t\t\t\t\ttype:'POST',\n\t\t\t\t\t\tdata:{Zonas:{EventoId:{$EventoId},FuncionesId:{$FuncionesId},ZonasId:zid}},\n\t\t\t\t\t\tsuccess:function(resp){ \$('#arbol-'+zid).html(resp); },\n\t\t\t\t\t\tbeforeSend:function(){ \$('#arbol-'+zid).html('<i class=\\'fa fa-spinner fa-spin\\'></i> '); }\n\t\t\t\t});\n\t\t\t\treturn false;\n\t\t});\n");
?>
Esempio n. 9
0
/* @var $form \TbActiveForm */
?>
<div class="register-controller index-action">

    <h1><?php 
echo CHtml::encode(\Yii::app()->name);
?>
</h1>

    <?php 
$form = $this->beginWidget('\\TbActiveForm', array('id' => $this->formId, 'enableAjaxValidation' => true));
?>

    <p class="register-login help-block">
        <?php 
echo Helper::t('views', 'If you already have an account &ndash; {loginLink}.', array('{loginLink}' => TbHtml::link(Helper::t('views', 'Log In'), array('/account/authenticate/login'))));
?>
    </p>

    <fieldset>
        <?php 
echo $form->textFieldControlGroup($model, 'email', array('label' => false, 'placeholder' => $model->getAttributeLabel('email'), 'block' => true));
?>
        <?php 
echo $form->textFieldControlGroup($model, 'username', array('label' => false, 'placeholder' => $model->getAttributeLabel('username'), 'block' => true));
?>
        <?php 
echo $form->passwordFieldControlGroup($model, 'password', array('label' => false, 'placeholder' => $model->getAttributeLabel('password'), 'block' => true));
?>
        <?php 
echo $form->passwordFieldControlGroup($model, 'verifyPassword', array('label' => false, 'placeholder' => $model->getAttributeLabel('verifyPassword'), 'block' => true));
Esempio n. 10
0
    <link rel="shortcut icon" href="<?php 
echo Yii::app()->createAbsoluteUrl('images/favicon.ico');
?>
">    
    <title><?php 
echo Yii::t('main', 'Admin console');
?>
</title>

    <?php 
//include (dirname(__FILE__)."/scripts.php");
Yii::app()->clientScript->registerCSSFile(Yii::app()->createAbsoluteUrl('/') . '/css/main.css');
Yii::app()->bootstrap->registerCoreCss();
Yii::app()->bootstrap->registerAllScripts();
?>
    <link rel="stylesheet" media="screen" href="css/main.css" >
</head>
<body>
    <div id="top">
        <?php 
echo '<div style="margin-left: 355px;">';
$this->widget('bootstrap.widgets.TbHeroUnit', array('heading' => 'Atmosphera', 'content' => Yii::t('main', 'Admin console') . TbHtml::link('Logout', Yii::app()->createAbsoluteUrl('user/logout'), array('color' => TbHtml::BUTTON_COLOR_INVERSE, 'class' => 'btn fl-r')), 'htmlOptions' => array('style' => 'width:1080px;')));
echo '</div>';
?>
    </div>
    <div id="content" class="clearfix">
        <?php 
echo $content;
?>
    </div>
</html>
Esempio n. 11
0
File: form.php Progetto: cicb/tpc
                    max-height: 100%;
                }
                .modal-footer{
                    padding: 2px 15px;
                }
               </style>
                
                <?php 
}
?>
		</div>
	

        <div class="form-actions">
<?php 
echo TbHtml::link(' Regresar', array('index'), array('class' => ' btn fa-arrow-left '));
?>
        <?php 
echo TbHtml::submitButton($model->isNewRecord ? ' Registrar' : ' Guardar', array('size' => TbHtml::BUTTON_SIZE_LARGE, 'class' => 'btn btn-check  btn-primary fa fa-check'));
?>
    </div>



    <?php 
$this->endWidget();
?>
            <?php 
$this->widget('bootstrap.widgets.TbModal', array('id' => 'ModalPuntoVenta', 'header' => 'Punto de Venta', 'content' => $this->renderPartial('_form_pv', array('model' => $puntosventa), true), 'footer' => array(), 'htmlOptions' => array('style' => 'width: 700px;margin-left: -400px;')));
?>
<!--<button class="btn btn-primary">ok</button>-->
<?php

/**
 * @var $this AccountUserController
 * @var $accountChangePassword AccountChangePassword
 *
 * @author Brett O'Donnell <*****@*****.**>
 * @author Zain Ul abidin <*****@*****.**>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-account-module
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-account-module/master/LICENSE
 *
 * @package yii-account-module
 */
$this->pageTitle = Yii::t('account', 'Change Password');
/** @var AccountActiveForm $form */
$form = $this->beginWidget('account.components.AccountActiveForm', array('id' => 'accountChangePassword-form'));
echo $form->errorSummary($accountChangePassword);
echo $form->passwordFieldControlGroup($accountChangePassword, 'current_password');
echo $form->passwordFieldControlGroup($accountChangePassword, 'new_password');
echo $form->passwordFieldControlGroup($accountChangePassword, 'confirm_password');
echo CHtml::tag('div', array('class' => 'form-actions'), implode(' ', array(TbHtml::submitButton(Yii::t('account', 'Save'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY)), TbHtml::link(Yii::t('account', 'Back'), array('account/index'), array('class' => 'btn')))));
$this->endWidget();
Esempio n. 13
0
    <h1><?php 
echo CHtml::encode(Yii::app()->name);
?>
</h1>

    <p class="lead">This is the test application used for running automated tests on the yii-account project.</p>

    <ul class="list-unstyled">
        <?php 
if (Yii::app()->user->isGuest) {
    ?>
            <li><?php 
    echo TbHtml::link('Register', array('/account/register'));
    ?>
</li>
            <li><?php 
    echo TbHtml::link('Login', array('/account/authenticate/login'));
    ?>
</li>
        <?php 
} else {
    ?>
            <li><?php 
    echo TbHtml::link('Logout', array('/account/authenticate/logout'), array('id' => 'logoutLink'));
    ?>
</li>
        <?php 
}
?>
    </ul>
</div>
Esempio n. 14
0
        <?php 
/** @var AccountModule $account */
$account = Yii::app()->getModule('account');
$attributes = array();
if ($account->firstNameField) {
    $attributes[] = $account->firstNameField;
}
if ($account->lastNameField) {
    $attributes[] = $account->lastNameField;
}
$attributes[] = $account->emailField;
if ($account->usernameField) {
    $attributes[] = $account->usernameField;
}
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $accountUser, 'attributes' => $attributes, 'htmlOptions' => array('class' => 'table table-condensed')));
echo CHtml::tag('div', array('class' => 'form-actions'), implode(' ', array(TbHtml::link(Yii::t('account', 'Update Account'), array('account/update'), array('class' => 'btn btn-primary')), TbHtml::link(Yii::t('account', 'Change Password'), array('account/password'), array('class' => 'btn')), TbHtml::link(Yii::t('account', 'Logout'), array('account/logout'), array('class' => 'btn')))));
?>
    </div>
    <div class="span6">
        <h3><?php 
echo Yii::t('account', 'Link your account to any of the following services:');
?>
</h3>

        <div class="well">
            <?php 
$this->widget('account.widgets.AccountHybridAuthWidget', array('baseUrl' => '/account/accountUser/hybridAuth'));
?>
        </div>
    </div>
</div>
Esempio n. 15
0
File: asignar.php Progetto: cicb/tpc
		<div id="area-zonas"> 
			<?php 
foreach ($model->zonas as $zona) {
    # Zonas de la distribucion
    $this->renderPartial('_zona', array('model' => $zona, 'editar' => false));
}
?>
			<i id="feedback-funcion" class="fa fa-3x hidden" ></i><br/><br/>
		</div>
<br />
<div class='row-fluid'>
	<?php 
echo TbHtml::link(' Regresar', array('evento/actualizar', 'id' => $model->EventoId), array('class' => 'btn fa fa-arrow-left'));
?>
	<?php 
echo TbHtml::link(' Desasignar de esta distribución', array('funciones/desasignarDistribucion', 'EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId), array('id' => 'btn-desasignar', 'class' => 'btn btn-danger fa fa-minus-circle'));
?>
	<?php 
//echo  TbHtml::ajaxButton(
//' Asignar esta distribución a todas las funciones',
//$this->createUrl('distribuciones/asignarATodas'),
//array(
//'beforeSend'=>'function(){return  confirm("¿Confirma asignar esta distribución a todas las demas funciones?\nEsto implica perder cualquier distribución previamente asignada a las demas funciones"); }',
//'success'=>'function(resp){alert(resp);}',
//'type'=>'POST',
//'data'=>array(
//'ForoId'=>$model->ForoId,
//'ForoMapIntId'=>$model->ForoMapIntId,
//'EventoId'=>$model->EventoId,
//'FuncionesId'=>$model->FuncionesId,
//),
Esempio n. 16
0
<div class="row-fluid">
    <div class="span6">
        <?php 
/** @var AccountActiveForm $form */
$form = $this->beginWidget('account.components.AccountActiveForm', array('id' => 'accountLogin-form'));
echo $form->errorSummary($accountLogin);
echo $form->textFieldControlGroup($accountLogin, 'username');
echo $form->passwordFieldControlGroup($accountLogin, 'password');
echo $form->checkBoxControlGroup($accountLogin, 'remember');
if ($accountLogin->isCaptchaRequired()) {
    echo CHtml::activeLabel($accountLogin, 'captcha');
    $this->widget('account.components.AccountReCaptchaInput', array('model' => $accountLogin));
    echo CHtml::error($accountLogin, 'captcha');
}
echo CHtml::tag('div', array('class' => 'form-actions'), implode(' ', array(TbHtml::submitButton(Yii::t('account', 'Login'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY)), TbHtml::link(Yii::t('account', 'Sign up'), array('account/signUp'), array('class' => 'btn')), TbHtml::link(Yii::t('account', 'Lost password?'), array('account/lostPassword'), array('class' => 'btn')))));
$this->endWidget();
?>
    </div>
    <div class="span6">
        <h3><?php 
echo Yii::t('account', 'Log in using any of the following services:');
?>
</h3>

        <div class="well">
            <?php 
$this->widget('account.widgets.AccountHybridAuthWidget', array('baseUrl' => '/account/accountUser/hybridAuth'));
?>
        </div>
    </div>
Esempio n. 17
0
}
?>
    
    
<?php 
$box = $this->beginWidget('yiiwheels.widgets.box.WhBox', array('title' => $cust_fullname, 'headerIcon' => 'ace-icon fa fa-credit-card', 'htmlHeaderOptions' => array('class' => 'widget-header-flat widget-header-small')));
?>
    
    
    <div class="sidebar-nav" id="client_cart">
        <div class="form-group">
            <label class="col-sm-3 control-label required" for="SalePayment_payment_amount">  </label>
            <div class="col-sm-9">
                <span style="font-size:18px;font-weight:bold;color:brown">
                    <?php 
echo TbHtml::link(ucwords($cust_fullname), '#', array('class' => 'update-dialog-open-link', 'data-update-dialog-title' => Yii::t('app', 'Customer Information')));
?>
                   
                <?php 
echo '(' . Yii::t('app', 'Total Due') . ' : ' . number_format($balance, Yii::app()->shoppingCart->getDecimalPlace()) . ' )';
?>
                    
                </span>    
                
            </div>
        </div>
    </div>

    <?php 
$this->widget('bootstrap.widgets.TbTabs', array('type' => 'tabs', 'placement' => 'above', 'tabs' => array(array('label' => Yii::t('app', 'Outstanding Invoices'), 'id' => 'tab_1', 'content' => $this->renderPartial('_invoice', array('model' => $model, 'client_id' => $client_id, 'balance' => $balance), true), 'active' => true), array('label' => Yii::t('app', 'Paid Invoice'), 'id' => 'tab_2', 'content' => $this->renderPartial('_invoice_his', array('model' => $model, 'client_id' => $client_id, 'balance' => $balance), true)), array('label' => Yii::t('app', 'Payment History'), 'id' => 'tab_3', 'content' => $this->renderPartial('_sale_payment', array('model' => $model, 'client_id' => $client_id, 'balance' => $balance), true)))));
?>
Esempio n. 18
0
 public function actionAjaxUpdate()
 {
     $mdas = $_POST['value'];
     //print_r($mdas);exit;
     $excludedMdaIds = $this->unsetMdas($_POST['pk'], $mdas);
     if (!empty($excludedMdaIds)) {
         $this->notifyUnsubscribedMdas($_POST['pk'], $excludedMdaIds);
     }
     foreach ($mdas as $mda) {
         $mapping = new MdaDecisionMapping();
         $mapping->decision_id = $_POST['pk'];
         $mapping->mda_id = $mda;
         if (!$mapping->exists('decision_id=:id AND mda_id=:mda', array(':id' => $mapping->decision_id, ':mda' => $mapping->mda_id))) {
             $mapping->save();
         } else {
             echo "Unable to assign";
         }
     }
     //Notify subscribers
     $criteria = new CDbCriteria();
     $criteria->addColumnCondition(array('is_mda' => 1));
     $criteria->addInCondition('mda_id', $mdas);
     $recipients = User::getNotificationSubscribers($criteria);
     $message = "You have been assigned to report on decision " . $this->loadModel($_POST['pk'])->decision_reference . " by the  " . Yii::app()->params['owner'] . "<br />";
     $message .= "For more information click " . TbHtml::link("here", Yii::app()->getBaseUrl(true) . "/index.php?r=eacDecision/view&id={$_POST['pk']}");
     $this->notify($recipients, 'Decision Update', $message);
 }
Esempio n. 19
0
    ?>
                        <li><?php 
    echo CHtml::link(Yii::t('app', '个人收藏'), array('index/toggleCollect', 'id' => $model->id));
    ?>
</li>
                    <?php 
}
?>
                    <li><?php 
echo CHtml::link(Yii::t('app', '小组收藏'), array('//group/course/myGroup', 'courseId' => $model->id), array('class' => 'dxd-fancy-elem'));
?>
</li>
                </ul>
                <?php 
if (Yii::app()->user->checkAccess('courseOwner', array('course' => $model)) || $courseMember && $courseMember->inRoles(array('superAdmin', 'admin', 'teacher'))) {
    echo TbHtml::link(Yii::t('app', '课程管理'), array('manage/index/setBasic', 'id' => $model->id), array('class' => 'btn-course-manage'));
} else {
    echo '&nbsp;&nbsp;&nbsp;&nbsp;';
}
?>
                <span class="student-number"><?php 
echo Yii::t('app', '学习人数');
?>
 &nbsp;&nbsp;<?php 
echo $model->studentNum;
echo Yii::t('app', '人');
?>
</span>
            </div>
            <div class="cell-2">
                <?php 
                    Balance :
                    <?php 
foreach ($account as $acc) {
    ?>
                        <?php 
    echo $acc["currency_symbol"] . number_format($acc["current_balance"], Yii::app()->wshoppingCart->getDecimalPlace()) . ' - ';
    ?>
                        <?php 
    $account_name = $acc["name"];
    ?>
                    <?php 
}
?>

                    <?php 
echo TbHtml::link(ucwords($account_name), $this->createUrl('Client/View/', array('id' => $customer_id)), array('class' => 'update-dialog-open-link', 'data-update-dialog-title' => Yii::t('app', 'Customer Information')));
?>


                </li>
                </span>
            </ul>
        </div>

        <?php 
echo TbHtml::linkButton(Yii::t('app', 'Edit'), array('color' => TbHtml::BUTTON_COLOR_SUCCESS, 'size' => TbHtml::BUTTON_SIZE_MINI, 'icon' => 'glyphicon-edit white', 'class' => 'btn btn-sm edit-customer', 'url' => Yii::app()->createUrl("client/update/", array("id" => $customer_id, 'sale_mode' => 'Y'))));
?>

        <?php 
echo TbHtml::linkButton(Yii::t('app', 'Remove'), array('color' => TbHtml::BUTTON_COLOR_WARNING, 'size' => TbHtml::BUTTON_SIZE_MINI, 'icon' => 'glyphicon-remove white', 'class' => 'btn btn-sm detach-customer'));
?>
</p>
		<?php 
echo TbHtml::checkBoxList('checkDisplay', '', array('24.7' => CHtml::encode('Does your app produce assistive text which can be displayed on the device?'), '24.11' => CHtml::encode('Does your app address reading comprehension issues?')));
?>
                <p><?php 
echo TbHtml::b('External Devices');
?>
</p>
		<?php 
echo TbHtml::checkBoxList('checkExternalDevices', '', array('26.7' => CHtml::encode('Does your app produce assistive text-to-speech in conjunction with an external audio output device?'), '26.8' => CHtml::encode('Does your app produce assistive text which can be output through an external display? ')));
?>
	</div>
 <?php 
echo TbHtml::button('Back', array('onclick' => 'js:document.location.href="/mtcontrool/runs/create"', 'color' => TbHtml::BUTTON_COLOR_DEFAULT, 'size' => TbHtml::BUTTON_SIZE_LARGE));
?>
	 <?php 
echo TbHtml::link('Submit', array('runs/saveAndroidQuest', 'id' => $idRuns), array('class' => 'btn btn-success btn-large', 'confirm' => 'Are you sure?'));
?>
 
 
         <?php 
echo TbHtml::button('Cancel', array('onclick' => 'js:document.location.href="/mtcontrool"', 'color' => TbHtml::BUTTON_COLOR_DANGER, 'size' => TbHtml::BUTTON_SIZE_LARGE));
?>

       


<?php 
$this->endWidget();
?>
     
Esempio n. 22
0
<?php

/*
 *GENERA EL PRIMER NIVEL DE UN ARBOL DE CARGOS POR SERVICIO (ZONASLEVEL1)
 */
//Obtiene el nodo Raíz
$raiz = Zonaslevel1::model()->with('puntoventa')->findByPk(array('EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId, 'ZonasId' => $model->ZonasId, 'PuntosventaId' => Yii::app()->params['pvRaiz']));
//Obtiene ta taquilla del evento
$pve = Zonaslevel1::model()->with('puntoventa')->findByPk(array('EventoId' => $model->EventoId, 'FuncionesId' => $model->FuncionesId, 'ZonasId' => $model->ZonasId, 'PuntosventaId' => $model->evento->PuntosventaId));
if (is_object($pve)) {
    // Si el nodo raiz esta asignado
    $this->renderPartial('_nodoCargo', array('model' => $pve));
}
if (is_object($raiz)) {
    // Si el nodo raiz esta asignado
    $this->renderPartial('_nodoCargo', array('model' => $raiz));
}
echo TbHtml::link(' Reparar árbol de cargo por servicio', array('generarArbolCargos'), array('class' => 'btn btn-small  fa fa-sitemap btn-generar-arbol', 'id' => "btn-generarArbol-" . $model->ZonasId, 'data-zid' => $model->ZonasId));
                        <?php 
echo TbHtml::checkBoxList('checkContracts', '', array('7.1, 7.2' => CHtml::encode('Does your app is a share source?')));
?>
		<p><?php 
echo TbHtml::b('Audio and Video');
?>
</p>
			<?php 
echo TbHtml::checkBoxList('checkAudioAndVideo', '', array('9.1, 9.2' => CHtml::encode('Does your app is a music app?'), '9.3' => CHtml::encode('Does your app use voice call?'), '9.4' => CHtml::encode('Does your app have sounds?')));
?>
                
	</div>

 <?php 
echo TbHtml::button('Back', array('onclick' => 'js:document.location.href="/mtcontrool/runs/create"', 'color' => TbHtml::BUTTON_COLOR_DEFAULT, 'size' => TbHtml::BUTTON_SIZE_LARGE));
?>
	 <?php 
echo TbHtml::link('Submit', array('runs/saveWPQuest', 'id' => $idRuns), array('class' => 'btn btn-success btn-large'));
?>
 

 <?php 
echo TbHtml::button('Cancel', array('onclick' => 'js:document.location.href="/mtcontrool"', 'color' => TbHtml::BUTTON_COLOR_DANGER, 'size' => TbHtml::BUTTON_SIZE_LARGE));
?>



<?php 
$this->endWidget();
?>
    
Esempio n. 24
0
?>
<style type='text/css'>
#contextMenu {
  position: absolute;
  display:none;

}
table{cursor:default;}
</style>
<?php 
$this->widget('bootstrap.widgets.TbModal', array('id' => 'modalTarjetas', 'header' => 'Tarjetas de credito', 'content' => '<div id="tarjetas"></div>', 'footer' => implode(' ', array(TbHtml::button('Cerrar', array('data-dismiss' => 'modal'))))));
?>
 

  <div id="contextMenu" class="dropdown clearfix">
    <ul class="dropdown-menu" id="contextual" role="menu" aria-labelledby="dropdownMenu" style="display:block;position:static;margin-bottom:5px;">
	  <li><a tabindex="-1" href='#' onclick="window.location.href='<?php 
echo $this->createUrl('usuarios/historialCompras');
?>
&id='+currentId;" class="fa fa-dollar">
 Historial de compras</a></li>
	  <li>
<?php 
echo TbHtml::link(' Tarjetas registradas', '#', array('style' => TbHtml::BUTTON_COLOR_PRIMARY, 'class' => 'fa fa-credit-card', 'size' => TbHtml::BUTTON_SIZE_LARGE, 'onclick' => "\$.ajax({\n\t\t\turl:'" . $this->createUrl('usuarios/verTarjetas') . "&id='+currentId,\n\t\t\tsuccess:function(data){ \$('#tarjetas').html(data);},\n\t})", 'data-toggle' => 'modal', 'data-target' => '#modalTarjetas'));
?>
			</li>
	  <li class="divider"></li>
	  <li><a tabindex="-1" href="#" class="fa fa-arrow-down"> Dar de baja</a></li>
    </ul>
  </div>
Esempio n. 25
0
<?php
/* @var $this SiteController */

$this->pageTitle=Yii::app()->name;
?>

<?php //echo TbHtml::pageHeader('', Yii::t('strings',CHtml::encode(Yii::app()->name)))?>
<?php if(!empty(Yii::app()->user->getState('pending-decisions-message'))) : ?>
<?php echo TbHtml::alert(TbHtml::ALERT_COLOR_INFO, Yii::app()->user->getState('pending-decisions-message'),array('style'=>'position:fixed;width:50%;height:200px;margin-left:15%;margin-right:15%')); ?>
<?php Yii::app()->user->setState('pending-decisions-message','');?>
<?php endif; ?>

<?php $aboutContent = 
TbHtml::link('',$this->createUrl('//page/update',array('id'=>$model->id)),array('class'=>TbHtml::ICON_PENCIL)).
"
<h3>$model->title</h3>
<div style='font-size:14px;height:150px;'>
$model->body
</div>
" ;

?>
<?php echo TbHtml::heroUnit(null,$aboutContent);?>
Esempio n. 26
0
 /**
  * Displays the login page
  */
 public function actionLogin()
 {
     if (!Yii::app()->user->isGuest) {
         $this->redirect(array('site/index'));
     }
     $model = new LoginForm();
     // if it is ajax validation request
     if (isset($_POST['ajax']) && $_POST['ajax'] === 'login-form') {
         echo CActiveForm::validate($model);
         Yii::app()->end();
     }
     // collect user input data
     if (isset($_POST['LoginForm'])) {
         $model->attributes = $_POST['LoginForm'];
         // validate user input and redirect to the previous page if valid
         if ($model->validate() && $model->login()) {
             $details = "Logged in successfully";
             Login::log(Login::SUCCESSFUL_LOGIN, $details);
             if (Yii::app()->user->getState('pendingDecisions') > 0) {
                 //print_r(Yii::app()->user->getState('pending-decisions'));exit;
                 $pendingDecisionsCount = Yii::app()->user->getState('pendingDecisions');
                 $message = "You have {$pendingDecisionsCount} pending decision(s) to report on. ";
                 $message .= TbHtml::link('Go to Decisions', $this->createUrl('eacDecision/admin'), array('class' => 'btn btn-success'));
                 Yii::app()->user->setState('pending-decisions-message', $message);
             }
             $this->redirect(Yii::app()->user->returnUrl);
         } else {
             $details = "Login failed";
             Login::log(Login::FAILED_LOGIN, $details);
         }
     }
     // display the login form
     $this->render('login', array('model' => $model));
 }
Esempio n. 27
0
 *EDITOR DE SUBZONA
 */
?>

<div class='controles'>
<h2>Editor de subzona.</h2>
<?php 
echo TbHtml::dropDownList('SubzonaId', $subzona->SubzonaId, TbHtml::listData($subzona->hermanas, 'SubzonaId', 'nombre'), array('class' => 'input-medium panel-head'));
?>
<br />
    <?php 
echo TbHtml::buttonGroup(array(array('title' => 'Alinear todo a la izquierda', 'class' => 'fa fa-align-left fa-3x btn btn-large btn-alinear', 'url' => array('alinearSubzona', 'EventoId' => $subzona->EventoId, 'FuncionesId' => $subzona->FuncionesId, 'ZonasId' => $subzona->ZonasId, 'SubzonaId' => $subzona->SubzonaId, 'direccion' => 'izquierda')), array('title' => 'Alinear todo al centro', 'class' => 'fa fa-align-center fa-3x btn btn-large btn-alinear', 'url' => array('alinearSubzona', 'EventoId' => $subzona->EventoId, 'FuncionesId' => $subzona->FuncionesId, 'ZonasId' => $subzona->ZonasId, 'SubzonaId' => $subzona->SubzonaId, 'direccion' => 'centro')), array('title' => 'Alinear todo a la derecha', 'class' => 'fa fa-align-right fa-3x btn btn-large btn-alinear', 'url' => array('alinearSubzona', 'EventoId' => $subzona->EventoId, 'FuncionesId' => $subzona->FuncionesId, 'ZonasId' => $subzona->ZonasId, 'SubzonaId' => $subzona->SubzonaId, 'direccion' => 'derecha'))), array('vertical' => false));
?>
<br />
<?php 
echo TbHtml::link(' Regresar', array('editor', 'EventoId' => $subzona->EventoId, 'FuncionesId' => $subzona->FuncionesId, 'scenario' => 'editar', '#' => 'zona-' . $subzona->ZonasId), array('class' => 'btn fa fa-arrow-left', 'style' => 'margin:10px'));
?>

</div>
<div id='area-subzona'>
		<?php 
$this->renderPartial('_subzona', compact('subzona'));
?>
</div>
<br />
<style type="text/css" media="screen">
	table{background:#eeD}	
	th,td{margin:5px;padding:5px !important;}
	.input-mini{width:25px;text-align:center}	
	.input-warning{color:#FFF !important;background:#E74C3C !important;}	
.off{color:#C00 !important}
Esempio n. 28
0
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<div align="right">
	<?php 
echo TbHtml::formActions(array(TbHtml::linkButton('Cetak Laporan', array('submit' => array('Cetaklaporan', 'tgl_awal' => $model->from_date, 'tgl_akhir' => $model->to_date, 'toko' => $model->NAMA_TOKO, 'status' => $model->STATUS), 'target' => '_blank', 'style' => 'text-decoration:none;', 'color' => TbHtml::BUTTON_COLOR_PRIMARY))));
?>

<p></p>

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'pengadaan-grid', 'type' => TbHtml::GRID_TYPE_HOVER, 'dataProvider' => $model->search2(), 'template' => "{items}\n{pager}", 'columns' => array(array('header' => 'No', 'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'), array('name' => 'No Po', 'value' => '$data->NO_PO'), array('name' => 'Tanggal Pengadaan', 'value' => function ($data, $row) {
    if ($data->TGL_PENGADAAN != "0000-00-00") {
        return date("d-M-y", strtotime($data->TGL_PENGADAAN));
    } else {
        return '-';
    }
}), array('name' => 'Permintaan', 'value' => '$data->PERMINTAAN'), array('name' => 'Nama Toko', 'value' => '$data->NAMA_TOKO'), array('name' => 'Harga Total', 'value' => '$data->HARGA_TOTAL'), array('name' => 'Status', 'value' => '$data->STATUS'), array('name' => 'Aksi', 'type' => 'raw', 'value' => function ($data, $row) {
    if ($data->STATUS == "BARU") {
        return TbHtml::link("Pilih Sparepart", array("sparepart/admin", "id" => $data->ID_PENGADAAN), array('style' => 'font-weight:900;text-decoration:none;'));
    } else {
        if ($data->STATUS == "PENYETUJUAN KEUANGAN") {
            return TbHtml::link("Setujui", array("create3", "id" => $data->ID_PENGADAAN), array('style' => 'font-weight:900;text-decoration:none;'));
        } else {
            if ($data->STATUS == "DISETUJUI KEUANGAN") {
                return TbHtml::link("Lihat Detil", array("view", "id" => $data->ID_PENGADAAN), array('style' => 'font-weight:900;text-decoration:none;'));
            }
        }
    }
}))));
Esempio n. 29
0
<div class="view">

	<b><?php 
echo TbHtml::encode($data->getAttributeLabel('id'));
?>
:</b>
	<?php 
echo TbHtml::link(TbHtml::encode($data->id), array('view', 'id' => $data->id));
?>
	<br />

	<b><?php 
echo TbHtml::encode($data->getAttributeLabel('varname'));
?>
:</b>
	<?php 
echo TbHtml::encode($data->varname);
?>
	<br />

	<b><?php 
echo TbHtml::encode($data->getAttributeLabel('title'));
?>
:</b>
	<?php 
echo TbHtml::encode($data->title);
?>
	<br />

	<b><?php 
echo TbHtml::encode($data->getAttributeLabel('field_type'));
Esempio n. 30
0
 public function testLink()
 {
     $I = $this->codeGuy;
     $html = TbHtml::link('Link', '#', array('class' => 'link'));
     $a = $I->createNode($html, 'a.link');
     $I->seeNodeAttribute($a, 'href', '#');
     $I->seeNodeText($a, 'Link');
 }