本文整理汇总了PHP中Chtml::link方法的典型用法代码示例。如果您正苦于以下问题:PHP Chtml::link方法的具体用法?PHP Chtml::link怎么用?PHP Chtml::link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chtml
的用法示例。
在下文中一共展示了Chtml::link方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: void
<div id="link_edit">
<?php
if ($profile->attachment != NULL && $profile->attachment->secret_name != null) {
?>
<?php
echo Chtml::link(Yii::t('app', 'Изменить'), 'javascript: void(0)', array('onClick' => 'editPhoto()', 'class' => 'btn green'));
?>
<?php
echo Chtml::link(Yii::t('app', 'Удалить'), 'javascript: void(0)', array('onClick' => 'deletePhoto(' . $model->id . ', ' . $profile->attachment->id . ')', 'class' => 'btn red'));
?>
<?php
} else {
?>
<?php
echo Chtml::link(Yii::t('app', 'Загрузить'), 'javascript: void(0)', array('onClick' => 'editPhoto()', 'style' => 'margin-right: 220px; margin-top: 10px;', 'class' => 'btn green'));
?>
<?php
}
?>
</div>
</div>
</div>
<?php
if ($profile->getError('attachment__id') != "") {
?>
<div class="help-block font-red" id="usernameerror"><?php
示例2: array
</div>
</div>
<div class="mws-form-row">
<?php
echo $form->labelEx($model, 'jabatan_aktif');
?>
<div class="mws-form-item small">
<?php
echo $form->checkBox($model, 'jabatan_aktif', array('onkeypress' => 'return $(this).focusNextInputField(event);', 'checked' => 'checked'));
?>
</div>
</div>
</td>
</tr>
</table>
<div class="mws-button-row">
<?php
echo Chtml::link('Back', $url = 'index.php?r=kepegawaian/jabatanM/admin', array('class' => 'mws-button gray left'));
?>
<?php
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Create', array('class' => 'mws-button blue')) . ' ';
echo CHtml::ResetButton($model->isNewRecord ? 'Reset' : 'Reset', array('class' => 'mws-button green'));
?>
</div>
<?php
$this->endWidget();
?>
</div>
</div>
</div><!-- form -->
示例3: array
/* SVN FILE: $Id: form.php 9 2010-12-17 13:21:39Z Chris $*/
/**
* Form to manage and create Auth Items view.
*
* @copyright Copyright © 2010 PBM Web Development - All Rights Reserved
* @package RBAM
* @since V1.0.0
* @version $Revision: 9 $
* @license BSD License (see documentation)
*/
$module = $this->getModule();
$cs = Yii::app()->getClientScript();
echo '<div id="left-column">';
echo $form;
if ($this->action->id === 'manage') {
echo Chtml::link(Yii::t('RbamModule.rbam', 'Done'), $this->createUrl('index'), array('class' => 'button btn'));
$cs->registerScript('makeNameEditable', 'jQuery("#AuthItem_name").dblclick(function(){jQuery(this).removeAttr("readonly");});');
// makes default role names editable
}
echo '</div>';
if ($this->action->id === 'manage') {
echo '<div id="right-column">';
echo CHtml::tag('h3', array(), Yii::t('RbamModule.rbam', 'Manage Relationships'));
foreach (array('parents', 'children', 'unrelated') as $relationship) {
$this->widget('rbam.components.widgets.RbamRelationship', compact('item', 'relationship'));
}
Yii::app()->getClientScript()->registerScript('relationships', "jQuery().rbam.relationships('{$item->name}'," . CJavaScript::encode($this->config()) . ');');
echo '</div>';
$this->renderPartial('_assignments', compact('item', 'assignmentForm'));
}
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'rbam-dialog-done', 'options' => array('dialogClass' => 'rbam-dialog', 'autoOpen' => false, 'open' => 'js:function() {
示例4: array
?>
</div>
<div class="row">
<?php
echo $form->labelEx($dupak, 'jenis_dupak_id');
?>
<?php
echo $form->dropDownList($dupak, 'jenis_dupak_id', CHtml::listData(JenisDupak::model()->findAll(), 'id', 'nama'));
?>
<?php
echo $form->error($dupak, 'jenis_dupak_id');
?>
</div>
<div class="row buttons">
<?php
echo Chtml::link('<button>Back</button>', array('ktiItem/create'));
?>
<?php
echo CHtml::submitButton('Next');
?>
</div>
<?php
$this->endWidget();
?>
</div><!-- form -->
示例5: array
<div class="icon-nav">
<i></i>
</div>
<div class="title-nav">
Delete
</div>
</a>
</div>
</div>
<div class="table info-order" style="width: 99.5%; overflow: auto; border:1px solid #dcdcdc">
<div class="col-6" style="border-right: 1px solid #dcdcdc;">
<?php
if ($model->store() != null) {
?>
<label>Store</label>: <?php
echo Chtml::link($model->store()->s_name, array("store/login", "id" => $model->store()->id), array("class" => "link login-authorized"));
?>
<br />
<?php
}
?>
<?php
if ($model->role != null) {
?>
<label>Type Account</label>: <?php
echo $model->role->title;
?>
<br />
<?php
}
?>
示例6: array
?>
</a>
<a href ="<?php
echo Yii::app()->baseUrl;
?>
/index.php/user/sendmessages">
<?php
$this->widget('bootstrap.widgets.BootLabel', array('type' => 'success', 'label' => 'Send Items'));
?>
</a>
</div>
<?php
$model = "";
?>
<?php
echo Chtml::link('New message', '', array('class' => 'btn pull-right'));
?>
<div class ="span8">
<br/><br/><br/><br/>
<?php
foreach ($messages as $m) {
?>
<table class="well-for-table">
<tr onmouseout="$('#img_<?php
echo $m['id'];
?>
').hide()" onmouseover="$('#img_<?php
echo $m['id'];
?>
示例7: array
?>
<?php
$this->endWidget();
?>
<?php
}
?>
</div><!-- artikel -->
</td>
<td>
<?php
echo Chtml::link('Tweets by @BerKuliah', 'https://twitter.com/BerKuliah', array('class' => 'twitter-timeline', 'data-dnt' => 'true', 'data-widget-id' => '321252419063390209'));
Yii::app()->clientScript->registerScript('berkuliah-tweets', "!function(d,s,id){\n" . " var js,\n" . " fjs=d.getElementsByTagName(s)[0],\n" . " p=/^http:/.test(d.location)?'http':'https';\n" . " if(!d.getElementById(id)){\n" . " js=d.createElement(s);\n" . " js.id=id;\n" . " js.src=p+'://platform.twitter.com/widgets.js';\n" . " fjs.parentNode.insertBefore(js,fjs);\n" . " }\n" . "}(document,'script','twitter-wjs');\n");
?>
</td>
</tr>
</table>
<div id="twitter_t"></div>
<div id="twitter_m">
<div id="twitter_container">
<ul id="twitter_update_list"></ul>
</div>
</div>
<div id="twitter_b">
</div><!-- span9 -->
示例8: date
<div class="input-group round">
<?php $this->widget('application.components.widgets.AuthWidget'); ?>
</div>
</li>
<?php else: ?>
<?php $user = User::model()->findByPk(Yii::app()->user->id); ?>
<li class="logINCabinet">
<hr noshade>
<p><?= Yii::t('main', 'Особистий кабінет користувача'); ?></p>
<img src="<?= Yii::app()->baseUrl.'/uploads/users/avatars/'.$user->avatar; ?>" alt="">
<h3><?= $user->name; ?></h3>
<span><?= Yii::t('main', 'Кількість постів'); ?>: <span><?= Articles::model()->count(array('condition'=>'author_id = '.Yii::app()->user->id)); ?></span></span>
<?php $article = Articles::model()->find(array('order'=>'date DESC', 'condition'=>'author_id = '.Yii::app()->user->id)); ?>
<span><?= Yii::t('main', 'Останній пост'); ?>: <span><?= !empty($article) ? date('d-m-Y', strtotime($article->date)) : Yii::t('main', 'Немає постів'); ?></span></span>
<?= Chtml::link(Yii::t('main', 'Особистий кабінет'), array('/blog/cabinet/index'), array('class'=>'button')); ?>
<?= Chtml::link(Yii::t('main', 'Вийти'), array('/site/logout')); ?>
</li>
<?php endif; ?>
</ul>
</li>
</ul>
</nav>
</header>
<div class="topBlockInfo">
<div class="titleGarmata">
<p><?= Yii::t('main', 'Перше міське інтернет телебачення Чернігова'); ?></p> — <p><i class="fa fa-calendar"></i> <?= $this->getCurrentDate(); ?></p>
</div>
<div class="forTopButton">
<button>Реклама</button> — <button class="openModalAbout"><?= Yii::t('main', 'Редакція'); ?></button>
</div>
<div class="social">
示例9: array
</div>
<div class="row-fluid">
<?php
if ($role == 'notulen') {
$this->renderPartial('_meetingNotulen', array('meetingForm' => $meetingForm, 'deadlineForm' => $deadlineForm, 'rapat' => $rapat, 'agendas' => $agendas, 'agenda' => $agenda, 'tempAgenda' => $tempAgenda, 'role' => $role));
} else {
if ($role == 'chairperson') {
$this->renderPartial('_meetingPIC', array('meetingForm' => $meetingForm, 'rapat' => $rapat, 'agendas' => $agendas, 'agenda' => $agenda, 'tempAgenda' => $tempAgenda, 'role' => $role));
} else {
$this->renderPartial('_meetingMember', array('meetingForm' => $meetingForm, 'rapat' => $rapat, 'agendas' => $agendas, 'agenda' => $agenda, 'tempAgenda' => $tempAgenda, 'role' => $role));
}
}
?>
</div>
<?php
if ($role == 'chairperson') {
?>
<div style="padding: 10px;"></div>
<div class="b">
<div class="ta">
<h3>
<?php
echo Chtml::link('End Rapat', "index.php?r=site/endMeeting&idRapat={$rapat->id}");
?>
</h3>
</div>
</div>
<?php
}
示例10: array
/* @var $this AppellationsController */
/* @var $data Appellations */
?>
<div class="view">
<b><?php
echo CHtml::encode($data->getAttributeLabel('appelation'));
?>
:</b>
<?php
echo CHtml::link(CHtml::encode($data->id), array('view', 'id' => $data->id));
?>
<?php
echo Chtml::link(CHtml::encode($data->appellation), array('view', 'id' => $data->id));
?>
<br />
<b><?php
echo CHtml::encode($data->getAttributeLabel('country'));
?>
:</b>
<?php
echo CHtml::encode($data->country);
?>
<br />
<b><?php
echo CHtml::encode($data->getAttributeLabel('region_id'));
?>
示例11: Header
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline pull-right btn-default" data-dismiss="modal">
Schließen
</button>
</div>
</div>
</div>
</div>
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>Rechnung</h1>
<ol class="breadcrumb">
<li>
<?php echo Chtml::link('Tourplan',array('schedule')); ?>
</li>
<li class="active">
Rechnung
</li>
</ol>
<div id="some-data">
</div>
<button id="changebt" type="button" class="btn btn-primary cancel" data-toggle="modal" data-target="#guideModal">Guide Info</button>
</section>
<!-- Main content -->
<section class="content">
<div class="alert alert-success fade in" id="paysuccess" style="display: none;">
示例12: array
<p><a href="<?php
echo Yii::app()->createUrl('site/reportsBrowse');
?>
">Browse Reports</a></p>
<div>
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'grvKeywords', 'dataProvider' => $report->search(), 'filter' => $report, 'htmlOptions' => array(), 'columns' => array(array('name' => 'email', 'header' => 'Email', 'type' => 'raw', 'value' => function ($e) {
return String::build('<span title="Added on {created_at}">{email}</span>', array('email' => $e->email, 'created_at' => Time::toPretty($e->created_at)));
}), array('name' => 'last_send_at', 'header' => 'Last Update', 'filter' => false, 'value' => function ($e) {
return Time::toPretty($e->last_send_at);
}), array('header' => 'Next Update', 'value' => function ($e) {
return date(Time::FORMAT_PRETTY, strtotime($e->last_send_at) + $e->period);
}), array('header' => '', 'type' => 'raw', 'value' => function ($e) {
$links = '';
if (time() - strtotime($e->last_send_at) > 600) {
$links .= CHtml::link('Send Now', Yii::app()->createUrl('site/reportsSend', array('reportId' => $e->id))) . ' ';
}
$links .= Chtml::link('Delete', Yii::app()->createUrl('site/reportsDelete', array('reportId' => $e->id)));
return $links;
}))));
?>
</div>
<script type="text/javascript">
$("#ddlPeriod").change(function () {
$("#txfPeriod").val($(this).val());
});
</script>
示例13: array
<?php
/* @var $this SiteController */
/* @var $data Hosotimviec */
?>
<?php
$ntd = User::model()->find('id=' . $data->hosocanhan_id);
if ($ntd->getAttribute('loainguoidung') == 1 && $data->mucluong_id >= 7) {
?>
<div class="div_vieclam">
<h2 class = "bold_red">
<?php
echo Chtml::link(CHtml::encode($data->vtmongmuon), array('view', 'id' => $data->id));
?>
</h2>
<p>
<?php
//$_model=$this->loadModel($data->hosocanhan_id);
//print_r($_model)
$_md = Hosotuyendung::model()->find('user_id=' . $data->hosocanhan_id);
//echo $data->hosocanhan_id;
echo $_md->getAttribute('tencty');
//print_r($_tencty);
?>
</p>
</div>
<div class="div_vieclam" style="text-align: right;">
<blockquote>Mức lương: <?php
示例14: number_format
<?php
if (ProductsConfig::model()->_checkSwitchedPoints()) {
?>
<td><?php
echo number_format($order->points, 2, '.', '');
?>
</td>
<?php
}
?>
</tr>
<?php
}
?>
<tbody>
</table>
</div>
<div class="form-actions">
<?php
echo CHtml::submitButton(Yii::t('app', 'Сохранить'), array('class' => 'btn green'));
?>
</td>
<?php
echo Chtml::link(Yii::t('app', 'Отмена'), $this->createUrl('index'), ['class' => 'btn green']);
?>
</div>
</div>
</div>
<?php
$this->endWidget();
示例15: array
<div class="store">
<div class="title">
Store Infomation
</div>
<div class="action">
<?php
echo CHtml::link('<i></i>Edit', array('edit'));
?>
<?php
echo CHtml::link('<i></i>Delete', array('delete'));
?>
</div>
<div class="col-12">
<label>Manager: </label>
<span><?php
echo $model->userManager() != null ? Chtml::link($model->userManager()->s_fullname, array("user/detail", "id" => $model->userManager()->id), array("class" => "link")) : "N/A";
?>
</span>
</div>
<div class="col-12">
<label>Name: </label>
<span><?php
echo $model->s_name;
?>
</span>
</div>
<div class="col-12">
<label>Address: </label>
<span><?php
echo $model->s_address;
?>