本文整理汇总了PHP中html::icon方法的典型用法代码示例。如果您正苦于以下问题:PHP html::icon方法的具体用法?PHP html::icon怎么用?PHP html::icon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类html
的用法示例。
在下文中一共展示了html::icon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: convert_tree_to_options_multi
/**
* Convert tree to options multi
*
* @param array $data
* @param int $level
* @param array $options
* @param array $result
*/
public static function convert_tree_to_options_multi($data, $level = 0, $options = [], &$result)
{
// convert to array
if (!empty($options['skip_keys']) && !is_array($options['skip_keys'])) {
$options['skip_keys'] = [$options['skip_keys']];
}
foreach ($data as $k => $v) {
// if we are skipping certain keys
if (!empty($options['skip_keys']) && in_array($k, $options['skip_keys'])) {
continue;
}
// assemble variable
$value = $v;
$value['name'] = !empty($options['i18n']) ? i18n(null, $v[$options['name_field']]) : $v[$options['name_field']];
$value['level'] = $level;
if (!empty($options['icon_field'])) {
$value['icon_class'] = html::icon(['type' => $v[$options['icon_field']], 'class_only' => true]);
}
if (!empty($options['disabled_field'])) {
$value['disabled'] = !empty($v[$options['disabled_field']]);
}
$result[$k] = $value;
// if we have options
if (!empty($v['options'])) {
self::convert_tree_to_options_multi($v['options'], $level + 1, $options, $result);
}
}
}
示例2: name
/**
* Generate name
*
* @param string $name
* @param string $icon
* @param boolean $no_i18n
*/
public static function name($name, $icon = null, $no_i18n = false)
{
if (!$no_i18n) {
$name = i18n(null, $name);
}
if (!empty($icon)) {
$name = html::icon(['type' => $icon]) . ' ' . $name;
}
return $name;
}
示例3: calendar
/**
* see html::calendar()
*/
public static function calendar($options = [])
{
// include js & css files
if (empty($options['readonly'])) {
layout::add_js('/numbers/media_submodules/numbers_frontend_components_calendar_numbers_media_js_base.js');
layout::add_css('/numbers/media_submodules/numbers_frontend_components_calendar_numbers_media_css_base.css');
}
// font awesome icons
library::add('fontawesome');
// widget parameters
$type = $options['calendar_type'] ?? $options['type'] ?? 'date';
$widget_options = ['id' => $options['id'], 'type' => $type, 'format' => $options['calendar_format'] ?? format::get_date_format($type), 'date_week_start_day' => $options['calendar_date_week_start_day'] ?? 1, 'date_disable_week_days' => $options['calendar_date_disable_week_days'] ?? null, 'master_id' => $options['calendar_master_id'] ?? null, 'slave_id' => $options['calendar_slave_id'] ?? null];
$options['type'] = 'text';
// determine input size
$placeholder = format::get_date_placeholder($widget_options['format']);
$options['size'] = strlen($placeholder);
// set placeholder
if (!empty($options['placeholder']) && $options['placeholder'] == 'format::get_date_placeholder') {
$options['placeholder'] = $placeholder;
$options['title'] = ($options['title'] ?? '') . ' (' . $placeholder . ')';
}
if (isset($options['calendar_icon']) && ($options['calendar_icon'] == 'left' || $options['calendar_icon'] == 'right')) {
$position = $options['calendar_icon'];
if (i18n::rtl()) {
if ($position == 'left') {
$position = 'right';
} else {
$position = 'left';
}
}
$icon_type = $type == 'time' ? 'clock-o' : 'calendar';
unset($options['calendar_icon']);
if (empty($options['readonly'])) {
$icon_onclick = 'numbers_calendar_var_' . $options['id'] . '.show();';
} else {
$icon_onclick = null;
}
$icon_value = html::span(['onclick' => $icon_onclick, 'class' => 'numbers_calendar_icon numbers_prevent_selection', 'value' => html::icon(['type' => $icon_type])]);
$result = html::input_group(['value' => html::input($options), $position => $icon_value, 'dir' => 'ltr']);
$div_id = $options['id'] . '_div_holder';
$result .= html::div(['id' => $div_id, 'class' => 'numbers_calendar_div_holder']);
$widget_options['holder_div_id'] = $div_id;
} else {
$result = html::input($options);
}
// we do not render a widget if readonly
if (empty($options['readonly'])) {
layout::onload('numbers_calendar(' . json_encode($widget_options) . ');');
}
return $result;
}
示例4:
<span class='prefix'><?php
echo html::icon($lang->icons['usecase']);
?>
<strong><?php
echo $run->case->id;
?>
</strong></span>
<strong><?php
echo $run->case->title;
?>
</strong>
<small class='text-muted'> <?php
echo $lang->testtask->runCase;
?>
<?php
echo html::icon($lang->icons['run']);
?>
</small>
</div>
</div>
<div class='main'>
<form class='form-condensed' method='post'>
<table class='table table-bordered table-form'>
<thead>
<tr>
<td colspan='5'><strong><?php
echo $lang->testcase->precondition;
?>
</strong> <?php
echo $run->case->precondition;
?>
示例5:
/**
* The install view file of extension module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package extension
* @version $Id$
* @link http://www.zentao.net
*/
include '../../common/view/header.lite.html.php';
?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='EXTENSION'><?php
echo html::icon($lang->icons['extension']);
?>
</span>
<strong><?php
echo $title;
?>
</strong>
</div>
</div>
<?php
if ($error) {
?>
<div class='alert alert-danger with-icon'>
<i class='icon-info-sign'></i>
<div class='content'>
<h3><?php
示例6:
* @link http://www.ranzhico.com
*/
include '../../common/view/header.html.php';
?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix' title='GROUP'><?php
echo html::icon($lang->icons['group']);
?>
</span>
<strong><?php
echo $lang->group->copy;
?>
</strong>
<small class='text-muted'> <?php
echo html::icon($lang->icons['copy']);
?>
</small>
</div>
</div>
<form class='form-condensed mw-500px pdb-20' method='post' target='hiddenwin'>
<table align='center' class='table table-form'>
<tr>
<th class='w-100px'><?php
echo $lang->group->name;
?>
</th>
<td><?php
echo html::input('name', $group->name, "class='form-control'");
?>
示例7:
/**
* The html template file of index method of index module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yangyang Shi <shiyangyang@cnezsoft.com>
* @package ZenTaoPMS
* @version $Id$
*/
include '../../common/view/header.html.php';
include '../../common/view/sparkline.html.php';
include '../../common/view/sortable.html.php';
?>
<div id='featurebar'>
<div class='heading'><?php
echo html::icon($lang->icons['product']) . ' ' . $lang->product->index;
?>
</div>
<div class='actions'>
<?php
echo html::a($this->createLink('product', 'create'), "<i class='icon-plus'></i> " . $lang->product->create, '', "class='btn'");
?>
</div>
<ul class='nav'>
<?php
echo "<li id='noclosedTab'>" . html::a(inlink("index", "locate=no&productID={$productID}&status=noclosed"), $lang->product->unclosed) . '</li>';
?>
<?php
echo "<li id='closedTab'>" . html::a(inlink("index", "locate=no&productID={$productID}&status=closed"), $lang->product->statusList['closed']) . '</li>';
?>
<?php
示例8:
<li class='<?php
if ($type == 'story') {
echo 'active';
}
?>
'><a href='#stories' data-toggle='tab'><?php
echo html::icon($lang->icons['story']) . ' ' . $lang->productplan->linkedStories;
?>
</a></li>
<li class='<?php
if ($type == 'bug') {
echo 'active';
}
?>
'><a href='#bugs' data-toggle='tab'><?php
echo html::icon($lang->icons['bug']) . ' ' . $lang->productplan->linkedBugs;
?>
</a></li>
</ul>
<div class='tab-content'>
<div id='stories' class='tab-pane <?php
if ($type == 'story') {
echo 'active';
}
?>
'>
<?php
if (common::hasPriv('productplan', 'linkStory')) {
?>
<div class='action'><?php
echo html::a("javascript:showLink({$plan->id}, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-sm btn-primary'");
示例9:
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package productplan
* @version $Id: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
include '../../common/view/header.html.php';
include '../../common/view/datepicker.html.php';
include '../../common/view/kindeditor.html.php';
js::import($jsRoot . 'misc/date.js');
?>
<div class='container mw-1400px'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php
echo html::icon($lang->icons['plan']);
?>
</span>
<strong><small class='text-muted'><i class='icon icon-plus'></i></small> <?php
echo $lang->productplan->create;
?>
</strong>
</div>
</div>
<form class='form-condensed' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-80px'><?php
echo $lang->productplan->product;
?>
</th>
示例10:
<div class='container mw-700px'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php
echo html::icon($lang->icons['mail']);
?>
</span>
<strong><?php
echo $lang->mail->common;
?>
</strong>
<small class='text-muted'> <?php
echo $lang->mail->test;
?>
<?php
echo html::icon($lang->icons['test']);
?>
</small>
</div>
<div class='actions'><div class='text text-info'><?php
echo $lang->mail->sendmailTips;
?>
</div></div>
</div>
<form class='form-condensed' method='post' target='resultWin'>
<table class='table table-form'>
<tr>
<td><?php
echo html::select('to', $users, $app->user->account, "class='form-control chosen'");
?>
</td>
示例11:
<span class='prefix'><?php
echo html::icon($lang->icons['task']);
?>
<strong><?php
echo $task->id;
?>
</strong></span>
<strong><?php
echo html::a($this->createLink('task', 'view', 'task=' . $task->id), $task->name, '_blank');
?>
</strong>
<small class='text-success'> <?php
echo $lang->task->finish;
?>
<?php
echo html::icon($lang->icons['finish']);
?>
</small>
</div>
</div>
<form class='form-condensed' method='post' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='w-80px'><?php
echo $lang->task->consumed;
?>
</th>
<td class='w-p25-f'><div class='input-group'><?php
echo html::input('consumed', $task->consumed, "class='form-control'");
?>
<span class='input-group-addon'><?php
示例12:
<span class='prefix' title='GROUP'><?php
echo html::icon($lang->icons['group']);
?>
<strong><?php
echo $group->id;
?>
</strong></span>
<strong><?php
echo $group->name;
?>
</strong>
<small class='text-muted'> <?php
echo $lang->group->manageMember;
?>
<?php
echo html::icon($lang->icons['manage']);
?>
</small>
</div>
</div>
<form class='form-condensed pdb-20' method='post' target='hiddenwin'>
<table align='center' class='table table-form'>
<?php
if ($groupUsers) {
?>
<tr>
<th class='w-100px'><?php
echo $lang->group->inside;
echo html::selectAll('group', 'checkbox', true);
?>
示例13:
<span class='prefix'><?php
echo html::icon($lang->icons['project']);
?>
<strong><?php
echo $project->id;
?>
</strong></span>
<strong><?php
echo html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');
?>
</strong>
<small class='text-success'> <?php
echo $lang->project->activate;
?>
<?php
echo html::icon($lang->icons['activate']);
?>
</small>
</div>
</div>
<form class='form-condensed' method='post' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='w-60px'><?php
echo $lang->comment;
?>
</th>
<td><?php
echo html::textarea('comment', '', "rows='6' class='form-control'");
?>
</td>
示例14:
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package todo
* @version $Id: edit.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
include '../../common/view/header.html.php';
?>
<?php
include '../../common/view/datepicker.html.php';
include '../../common/view/kindeditor.html.php';
?>
<div class='container mw-700px'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php
echo html::icon($lang->icons['todo']);
?>
<strong><?php
echo $todo->id;
?>
</strong></span>
<strong><?php
echo html::a($this->createLink('todo', 'view', 'todo=' . $todo->id), $todo->name);
?>
</strong>
<small class='text-muted'> <?php
echo $lang->todo->edit;
?>
</small>
</div>
</div>
示例15:
common::printIcon('doc', 'create', "libID={$libID}&moduleID={$moduleID}&productID={$productID}&projectID={$projectID}&from=doc");
?>
</div>
<div id='querybox' class='<?php
if ($browseType == 'bysearch') {
echo 'show';
}
?>
'></div>
</div>
<div class='side' id='treebox'>
<a class='side-handle' data-id='treebox'><i class='icon-caret-left'></i></a>
<div class='side-body'>
<div class='panel panel-sm'>
<div class='panel-heading nobr'><?php
echo html::icon('folder-close-alt');
?>
<strong><?php
echo $libName;
?>
</strong></div>
<div class='panel-body'>
<?php
echo $moduleTree;
?>
<div class='text-right'>
<?php
common::printLink('tree', 'browse', "rootID={$libID}&view=doc", $lang->doc->manageType);
?>
<?php
if (is_numeric($libID)) {