breadcrumbs() public static method

Generates a breadcrumb menu.
public static breadcrumbs ( array $links, array $htmlOptions = [] ) : string
$links array the breadcrumb links.
$htmlOptions array additional HTML attributes.
return string the generated breadcrumb.
コード例 #1
0
ファイル: TbBreadcrumb.php プロジェクト: ShuiMuQinHua/yiishop
 /**
  * Runs the widget.
  */
 public function run()
 {
     // todo: consider adding control property for displaying breadcrumbs even when empty.
     if (!empty($this->links)) {
         $links = array();
         if ($this->homeLabel !== false) {
             $label = $this->homeLabel !== null ? $this->homeLabel : TbHtml::icon('home');
             $links[$label] = $this->homeUrl !== null ? $this->homeUrl : Yii::app()->homeUrl;
         }
         foreach ($this->links as $label => $url) {
             if (is_string($label) || is_array($url)) {
                 if ($this->encodeLabel) {
                     $label = CHtml::encode($label);
                 }
                 $links[$label] = $url;
             } else {
                 $links[] = $this->encodeLabel ? CHtml::encode($url) : $url;
             }
         }
         echo TbHtml::breadcrumbs($links, $this->htmlOptions);
     }
 }
コード例 #2
0
 *   list of conditions and the following disclaimer in the documentation and/or
 *   other materials provided with the distribution.
 *
 * * Neither the name of the organization nor the names of its
 *   contributors may be used to endorse or promote products derived from
 *   this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
/**
 * @var YiiEmbedController $this
 * @var string $content
 */
echo '<h1>' . $this->pageTitle . '</h1>';
if ($this->breadcrumbs) {
    echo TbHtml::breadcrumbs($this->getPageBreadcrumbs());
}
if ($this->menu) {
    $this->widget('bootstrap.widgets.TbNav', array('type' => TbHtml::NAV_TYPE_TABS, 'items' => $this->menu));
}
echo Yii::app()->user->multiFlash();
echo $content;
コード例 #3
0
ファイル: admin.php プロジェクト: coderay1100/morena
<div class="span-22">
	<div id="content">
<?php 
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'Users Management' => array('/user/admin'), 'Manage Profile Field'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n    \$('.search-form').toggle();\n    return false;\n});\n\$('.search-form form').submit(function(){\n    \$.fn.yiiGridView.update('profile-field-grid', {\n        data: \$(this).serialize()\n    });\n    return false;\n});\n");
?>
<h1><?php 
echo UserModule::t('Manage Profile Fields');
?>
</h1>

<p><?php 
echo UserModule::t("You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.");
?>
</p>

<?php 
echo CHtml::link(UserModule::t('Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<br/>
<br/>
<?php 
$this->widget('bootstrap.widgets.TbGridView', array('dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'varname', 'type' => 'raw', 'value' => 'UHtml::markSearch($data,"varname")'), array('name' => 'title', 'value' => 'UserModule::t($data->title)'), array('name' => 'field_type', 'value' => '$data->field_type', 'filter' => ProfileField::itemAlias("field_type")), 'field_size', array('name' => 'required', 'value' => 'ProfileField::itemAlias("required",$data->required)', 'filter' => ProfileField::itemAlias("required")), 'position', array('name' => 'visible', 'value' => 'ProfileField::itemAlias("visible",$data->visible)', 'filter' => ProfileField::itemAlias("visible")), array('class' => 'bootstrap.widgets.TbButtonColumn'))));
?>
</div>
</div>
コード例 #4
0
ファイル: error.php プロジェクト: coderay1100/morena
<div class="span-22">
	<div id="content">

<?php 
/* @var $this ListgajiController */
/* @var $model Listgaji */
echo TbHtml::breadcrumbs(array('Home' => '/', 'Error'));
?>

<h2>Error <?php 
echo $code;
?>
</h2>

<div class="error">
<?php 
echo CHtml::encode($message);
?>
</div>
</div>
</div>
<div class="span-6 last">
	<div id="sidebar">
<?php 
?>
	
	<div class="well" style="max-width: 340px; padding: 8px 0;">
    <?php 
echo TbHtml::navList(array(array('label' => 'Home', 'url' => array('/')), array('label' => 'My Profile', 'url' => array('/user/profile/profile')), array('label' => 'Change Password', 'url' => array('/user/profile/changepassword')), TbHtml::menuDivider(), array('label' => 'Another list header'), array('label' => 'About', 'url' => array('/site/page&view=about'))));
?>
</div>
コード例 #5
0
ファイル: view.php プロジェクト: coderay1100/morena
<div class="span-22">
	<div id="content">
<?php 
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'Manage payroll' => array('/listgaji'), 'View Salary Slip'));
?>

<h2>View Salary Slip User - <?php 
echo $model->nip;
?>
</h2>
<hr/>
<?php 
$dateObj = DateTime::createFromFormat('!m', $model->month);
$monthName = $dateObj->format('F');
?>

<table class="items table table-condensed table-bordered table-striped table-hover">
	<thead>
		<tr>
			<th colspan=2>Data's Employee</th>
		</tr>
	</thead>
	<tbody>
		<tr class="odd">
			<td style="width:40%;text-align:right;"><b>Number Salary Slip</b></td>
			<td><?php 
echo $model->noSlipGaji;
?>
</td>
		</tr>
		<tr class="even">
コード例 #6
0
 public function testBreadcrumbs()
 {
     $I = $this->codeGuy;
     $links = array('Home' => '#', 'Library' => '#', 'Data');
     $html = TbHtml::breadcrumbs($links, array('class' => 'ul'));
     $ul = $I->createNode($html, 'ul.breadcrumb');
     $I->seeNodeCssClass($ul, 'ul');
     $I->seeNodeNumChildren($ul, 3);
     foreach ($ul->children() as $i => $liElement) {
         $li = $I->createNode($liElement);
         switch ($i) {
             case 0:
                 $a = $li->filter('a');
                 $I->seeNodeAttribute($a, 'href', '#');
                 $I->seeNodeText($a, 'Home');
                 break;
             case 1:
                 $a = $li->filter('a');
                 $I->seeNodeAttribute($a, 'href', '#');
                 $I->seeNodeText($a, 'Library');
                 break;
             case 2:
                 $I->seeNodeText($li, 'Data');
                 break;
         }
     }
 }
コード例 #7
0
ファイル: about.php プロジェクト: coderay1100/morena
	<div id="content">
		
<?php 
/* @var $this ListgajiController */
echo TbHtml::breadcrumbs(array('Home' => '/', 'About'));
?>

<h2 style="text-align:center">About</h2>
<hr/>
<p style="text-align:center">This is an online web payroll copyright by PT Prawathiya Karsa Pradiphta. June, 19, 2015.</p>
</div>

コード例 #8
0
ファイル: components.php プロジェクト: crisu83/yiistrap-docs
</section>

<!-- Breadcrumbs
   ================================================== -->
<section id="breadcrumbs">

   <div class="page-header">
      <h1>Breadcrumbs</h1>
   </div>

   <div class="bs-docs-example">
      <?php 
echo TbHtml::breadcrumbs(array('Home' => '#', 'Library'));
?>
      <?php 
echo TbHtml::breadcrumbs(array('Home' => '#', 'Library' => '#', 'Data'));
?>
   </div>

   <pre class="prettyprint linenums">
&lt;?php echo TbHtml::breadcrumbs(array(
    'Home' => '#',
    'Library' => '#',
    'Data',
)); ?></pre>

</section>

<!-- Labels and badges
   ================================================== -->
<section id="labels-badges">
コード例 #9
0
ファイル: view.php プロジェクト: coderay1100/morena
<div class="span-22">
	<div id="content">
<?php 
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'Users Management' => array('/user/admin'), 'View User'));
?>
<h2><?php 
echo UserModule::t('View User') . ' "' . $model->username . '"';
?>
</h2>
<hr/>
<?php 
$attributes = array('id', 'username');
$profileFields = ProfileField::model()->forOwner()->sort()->findAll();
if ($profileFields) {
    foreach ($profileFields as $field) {
        array_push($attributes, array('label' => UserModule::t($field->title), 'name' => $field->varname, 'type' => 'raw', 'value' => $field->widgetView($model->profile) ? $field->widgetView($model->profile) : ($field->range ? Profile::range($field->range, $model->profile->getAttribute($field->varname)) : $model->profile->getAttribute($field->varname))));
    }
}
array_push($attributes, 'password', 'email', 'activkey', 'create_at', 'lastvisit_at', array('name' => 'superuser', 'value' => User::itemAlias("AdminStatus", $model->superuser)), array('name' => 'status', 'value' => User::itemAlias("UserStatus", $model->status)));
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'htmlOptions' => array('class' => 'table table-striped table-condensed table-hover'), 'attributes' => $attributes));
?>
</div>
</div>

<div class="span-6 last">
	<div id="sidebar">
<?php 
?>
	
	<div class="well" style="max-width: 340px; padding: 8px 0;">
    <?php 
コード例 #10
0
ファイル: contact.php プロジェクト: coderay1100/morena
	<div id="content">
		
<?php 
/* @var $this ListgajiController */
echo TbHtml::breadcrumbs(array('Home' => '/', 'Contact Us'));
?>

<h2 style="text-align:center">Contact Us</h2>
<hr/>
<p style="text-align:center">If you have questions, please contact Accounting Tax Mr. Faizal or Technical Support Mr. Mukhlis Nursamsyu. Thank you. <br/>June, 19, 2015.</p>
</div>
コード例 #11
0
ファイル: changepassword.php プロジェクト: coderay1100/morena
<div class="span-22">
	<div id="content">
<?php 
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'My Profile'));
?>

<h1><?php 
echo UserModule::t("Change password");
?>
</h1>

<div class="form">
<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'changepassword-form', 'enableAjaxValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>

	<p class="note"><?php 
echo UserModule::t('Fields with <span class="required">*</span> are required.');
?>
</p>
	<?php 
echo $form->errorSummary($model);
?>
	
	<div class="row">
	<?php 
echo $form->labelEx($model, 'oldPassword');
?>
	<?php 
echo $form->passwordField($model, 'oldPassword');
?>
コード例 #12
0
ファイル: _content.php プロジェクト: cornernote/yii-ace-admin
<?php

/**
 * @var $this CController
 */
?>


<div class="main-content">
    <?php 
if ($this->breadcrumbs) {
    ?>
        <div class="breadcrumbs breadcrumbs-fixed">
            <?php 
    echo TbHtml::breadcrumbs($this->breadcrumbs);
    ?>
        </div>
    <?php 
}
?>

    <div class="page-content">

        <div class="page-header">
            <h1>
                <?php 
echo $this->pageTitle;
?>
            </h1>
        </div>
コード例 #13
0
ファイル: main.php プロジェクト: jackycgq/advanced
			    <?php 
$this->widget('widgets.default.WMainMenu');
?>
                        </div>
                    </div>
                </div>
            </div>
	</div>
	<div class="container">
	    <?php 
if ($this->breadcrumbs) {
    ?>
    	    <div class="row">
    		<div class="span12" style="margin-top:20px">
			<?php 
    echo TbHtml::breadcrumbs(array_merge(array('首页' => Yii::app()->homeUrl), $this->breadcrumbs));
    ?>
<!-- breadcrumbs -->
    		</div>
    	    </div>
<?php 
}
echo $content;
?>


	</div>

	<div class="clear"></div>

	<div id="footer">
コード例 #14
0
ファイル: admin.php プロジェクト: coderay1100/morena
			

<div class="span-22">
	<div id="content">

<?php 
/* @var $this ListgajiController */
/* @var $model Listgaji */
echo TbHtml::breadcrumbs(array('Home' => '/', 'Manage Payroll'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#listgaji-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n\n");
?>

<h2>Manage Payroll</h2>
<hr/>
<?php 
//==================== MESSAGE SUCCESS AND FAILED UPLOAD DATA ======================//
if ($sukses > 0) {
    Yii::app()->user->setFlash(TbHtml::ALERT_COLOR_SUCCESS, '<strong>Well done!</strong> You successfully insert ' . $sukses . ' data.');
    $this->widget('bootstrap.widgets.TbAlert');
    ?>
	
<?php 
}
?>
	
<?php 
if ($gagal > 0) {
    Yii::app()->user->setFlash(TbHtml::ALERT_COLOR_ERROR, '<strong>Oh Snap!</strong> You failed insert ' . $gagal . ' data.');
    $this->widget('bootstrap.widgets.TbAlert');
    ?>
	
コード例 #15
0
ファイル: index.php プロジェクト: coderay1100/morena
<div class="span-22">
	<div id="content">
<?php 
echo $updatePass;
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'Users Management'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n    \$('.search-form').toggle();\n    return false;\n});\t\n\$('.search-form form').submit(function(){\n    \$.fn.yiiGridView.update('user-grid', {\n        data: \$(this).serialize()\n    });\n    return false;\n});\n");
?>
<h2><?php 
echo UserModule::t("Manage Users");
?>
</h2>
<hr/>

<?php 
//==================== MESSAGE SUCCESS AND FAILED UPLOAD DATA ======================//
if ($sukses > 0) {
    Yii::app()->user->setFlash(TbHtml::ALERT_COLOR_SUCCESS, '<strong>Well done!</strong> You successfully insert ' . $sukses . ' data.');
    $this->widget('bootstrap.widgets.TbAlert');
    ?>
	
<?php 
}
?>
	
<?php 
if ($gagal > 0) {
    Yii::app()->user->setFlash(TbHtml::ALERT_COLOR_ERROR, '<strong>Oh Snap!</strong> You failed insert ' . $gagal . ' data.');
}
$totalUserExist = '';
if ($alreadyUser > 0) {
    foreach ($userExists as $exist) {
コード例 #16
0
ファイル: mySlip.php プロジェクト: coderay1100/morena
			<div class="span-22">
	<div id="content">

<?php 
echo TbHtml::breadcrumbs(array('Home' => '/', 'My Slip Salary'));
Yii::app()->clientScript->registerScript('search', "\r\n\$('.search-button').click(function(){\r\n\t\$('.search-form').toggle();\r\n\treturn false;\r\n});\r\n\$('.search-form form').submit(function(){\r\n\t\$('#listgaji-grid').yiiGridView('update', {\r\n\t\tdata: \$(this).serialize()\r\n\t});\r\n\treturn false;\r\n});\r\n\r\n");
?>

<h2>My Salary Slip</h2>
<hr/>


<?php 
//=============== BUTTON ADVANCED SEARCH, UPLOAD, DOWNLOAD ==============
?>
<b>Please insert month and year to view salary slip</b><br/><br/>
<div style="float:left;">
<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'form-id', 'action' => Yii::app()->createUrl('listgaji/mySlip'), 'method' => 'get'));
?>

	<select id="dropDown" class="span2" name="month" >
		<option value="1"><?php 
echo 'January';
?>
</option>
		<option value="2"><?php 
echo 'February';
?>
</option>
		<option value="3"><?php 
コード例 #17
0
ファイル: index.php プロジェクト: coderay1100/morena
<div class="span-22">
	<div id="content">
<?php 
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'Users Management' => array('/user/admin'), 'List Employee'));
if (UserModule::isAdmin()) {
    $this->layout = '//layouts/column2';
}
?>

<h2><?php 
echo UserModule::t("List Employee");
?>
</h2>
<hr/>
<?php 
$this->widget('bootstrap.widgets.TbGridView', array('dataProvider' => $dataProvider, 'columns' => array(array('name' => 'username', 'type' => 'raw', 'value' => 'CHtml::link(CHtml::encode($data->username),array("user/view","id"=>$data->id))'), 'create_at', 'lastvisit_at')));
?>
</div>
</div>
<div class="span-6 last">
	<div id="sidebar">
<?php 
?>
	
	<div class="well" style="max-width: 340px; padding: 8px 0;">
    <?php 
echo TbHtml::navList(array(array('label' => 'Home', 'url' => array('/')), array('label' => 'My Profile', 'url' => array('/user/profile/profile')), array('label' => 'Change Password', 'url' => array('/user/profile/changepassword')), TbHtml::menuDivider(), array('label' => 'Users Management'), array('label' => 'Create User', 'url' => array('/user/admin/create')), array('label' => 'Manage Users', 'url' => array('/user/admin')), array('label' => 'List Employee', 'url' => array('/user'), 'active' => true), array('label' => 'Role Users Management', 'url' => array('/rights')), array('label' => 'Profile Header'), array('label' => 'Create Profile Field', 'url' => array('/user/profileField/create')), array('label' => 'Manage Profile Field', 'url' => array('/user/profileField/admin')), array('label' => 'Another list header'), array('label' => 'Payroll Management', 'url' => array('/listgaji')), array('label' => 'About', 'url' => array('/site/page&view=about'))));
?>
</div>
<?php 
コード例 #18
0
ファイル: login.php プロジェクト: phongsathon-jk/wil_webapp
<?php

/* @var $this SiteController */
/* @var $model LoginForm */
/* @var $form CActiveForm  */
$this->pageTitle = Yii::app()->name . ' - Login';
echo TbHtml::breadcrumbs(array('Home' => Yii::app()->baseUrl, 'Login'));
?>

<h1>Login</h1>

<p>Please fill out the following form with your login credentials:</p>

<div class="form">
<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'login-form', 'enableClientValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'username');
?>
		<?php 
echo $form->textField($model, 'username');
?>
		<?php 
echo $form->error($model, 'username');
?>
	</div>