本文整理匯總了PHP中FabrikHelperHTML::icon方法的典型用法代碼示例。如果您正苦於以下問題:PHP FabrikHelperHTML::icon方法的具體用法?PHP FabrikHelperHTML::icon怎麽用?PHP FabrikHelperHTML::icon使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FabrikHelperHTML
的用法示例。
在下文中一共展示了FabrikHelperHTML::icon方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
} else {
?>
<a href="<?php
echo $d->href;
?>
" <?php
echo $class;
?>
>
<?php
if ($d->downloadImg !== '') {
?>
<img src="<?php
echo $d->downloadImg;
?>
" alt="<?php
echo $d->title;
?>
" />
<?php
} else {
?>
<?php
echo FabrikHelperHTML::icon('icon-download icon-white') . ' ' . FText::_('PLG_ELEMENT_FILEUPLOAD_DOWNLOAD');
?>
<?php
}
?>
</a>
<?php
}
示例2:
?>
" name="annonymous[]" class="inputbox" value="1" />
<?php
}
?>
</td>
</tr>
<?php
}
?>
<tr>
<td colspan="2">
<button class="button btn btn-success submit" style="margin-left:0">
<?php
echo FabrikHelperHTML::icon('icon-comments-2');
?>
<?php
echo FText::_('PLG_FORM_COMMENT_POST_COMMENT');
?>
</button>
<input type="hidden" name="reply_to" value="<?php
echo $d->replyTo;
?>
" />
<input type="hidden" name="renderOrder" value="<?php
echo $d->renderOrder;
?>
" />
</td>
</tr>
示例3:
}
?>
<table class="filtertable table table-striped">
<thead>
<tr class="fabrik___heading">
<th><?php
echo FText::_('COM_FABRIK_SEARCH');
?>
:</th>
<th style="text-align:right">
<?php
if ($d->showClearFilters) {
?>
<a class="clearFilters" href="#">
<?php
echo FabrikHelperHTML::icon('icon-refresh', FText::_('COM_FABRIK_CLEAR'));
?>
</a>
<?php
}
?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="2"></td>
</tr>
</tfoot>
<?php
$c = 0;
示例4: _loadTmplBottom
/**
* Create the form bottom hidden fields
*
* @param object &$form Object containing form view properties
*
* @return void
*/
protected function _loadTmplBottom(&$form)
{
$input = $this->app->input;
$itemId = FabrikWorker::itemId();
/** @var FabrikFEModelForm $model */
$model = $this->getModel();
$listModel = $model->getListModel();
$row = JArrayHelper::toObject($model->data);
$canDelete = $listModel->canDelete($row);
$params = $model->getParams();
$task = 'form.process';
$refer = $input->server->get('HTTP_REFERER', '', 'string');
// $$$rob - if returning from a failed validation then we should use the fabrik_referrer post var
$refer = str_replace('&', '&', $input->get('fabrik_referrer', $refer, 'string'));
$thisRowId = is_array($model->getRowId()) ? implode('|', $model->getRowId()) : $model->getRowId();
$fields = array();
$fields[] = '<input type="hidden" name="listid" value="' . $listModel->getId() . '" />';
$fields[] = '<input type="hidden" name="listref" value="' . $listModel->getId() . '" />';
$fields[] = '<input type="hidden" name="rowid" value="' . $thisRowId . '" />';
$fields[] = '<input type="hidden" name="Itemid" value="' . $itemId . '" />';
$fields[] = '<input type="hidden" name="option" value="com_' . $this->package . '" />';
$fields[] = '<input type="hidden" name="task" value="' . $task . '" />';
$fields[] = '<input type="hidden" name="isMambot" value="' . $this->isMambot . '" />';
$fields[] = '<input type="hidden" name="formid" value="' . $model->get('id') . '" />';
$fields[] = '<input type="hidden" name="returntoform" value="0" />';
$fields[] = '<input type="hidden" name="fabrik_referrer" value="' . $refer . '" />';
$fields[] = '<input type="hidden" name="fabrik_ajax" value="' . (int) $model->isAjax() . '" />';
$fields[] = '<input type="hidden" name="package" value="' . $this->app->getUserState('com_fabrik.package', 'fabrik') . '" />';
$fields[] = '<input type="hidden" name="packageId" value="' . $model->packageId . '" />';
if ($useKey = FabrikWorker::getMenuOrRequestVar('usekey', '')) {
// $$$rob v's been set from -1 to the actual row id - so ignore usekey not sure if we should comment this out
// see http://fabrikar.com/forums/showthread.php?t=10297&page=5
$fields[] = '<input type="hidden" name="usekey" value="' . $useKey . '" />';
$pk_val = FArrayHelper::getValue($model->data, $listModel->getPrimaryKey(true));
if (empty($pk_val)) {
$fields[] = '<input type="hidden" name="usekey_newrecord" value="1" />';
}
}
/** $$$ hugh - testing a fix for pagination issue when submitting a 'search form'.
* If this is a search form, we need to clear 'limitstart', otherwise ... say we
* were last on page 4 of the (unfiltered) target table, and the search yields less than 4 pages,
* we end up with a blank table 'cos the wrong LIMIT's are applied to the query
*/
$saveInSessions = $params->get('save_insession', '');
if (is_array($saveInSessions)) {
foreach ($saveInSessions as $saveInSession) {
if ($saveInSession == '1') {
$fields[] = '<input type="hidden" name="limitstart" value="0" />';
break;
}
}
}
$fields[] = JHTML::_('form.token');
$resetLabel = FText::_($params->get('reset_button_label'));
$resetIcon = $params->get('reset_icon', '');
$copyLabel = FText::_($params->get('copy_button_label'));
$copyIcon = $params->get('copy_icon', '');
$applyLabel = FText::_($params->get('apply_button_label'));
$applyIcon = $params->get('apply_icon', '');
$deleteLabel = FText::_($params->get('delete_button_label', 'Delete'));
$deleteIcon = $params->get('delete_icon', '');
$goBackLabel = FText::_($params->get('goback_button_label'));
$goBackIcon = $params->get('goback_icon', '');
$btnLayout = FabrikHelperHTML::getLayout('fabrik-button');
if ($resetIcon !== '') {
$resetIcon = FabrikHelperHTML::icon($resetIcon);
$before = $params->get('reset_icon_location', 'before') == 'before';
$resetLabel = $before ? $resetIcon . ' ' . $resetLabel : $resetLabel . ' ' . $resetIcon;
}
$layoutData = (object) array('type' => 'reset', 'class' => 'btn-warning button', 'name' => 'Reset', 'label' => $resetLabel);
$form->resetButton = $params->get('reset_button', 0) && $this->editable == '1' ? $btnLayout->render($layoutData) : '';
if ($copyIcon !== '') {
$copyIcon = FabrikHelperHTML::icon($copyIcon);
$copyLabel = $params->get('copy_icon_location', 'before') == 'before' ? $copyIcon . ' ' . $copyLabel : $copyLabel . ' ' . $copyIcon;
}
$layoutData = (object) array('type' => 'submit', 'class' => 'button', 'name' => 'Copy', 'label' => $copyLabel);
$form->copyButton = $params->get('copy_button', 0) && $this->editable && $model->getRowId() != '' ? $btnLayout->render($layoutData) : '';
if ($applyIcon !== '') {
$applyIcon = FabrikHelperHTML::icon($applyIcon);
$before = $params->get('apply_icon_location', 'before') == 'before';
$applyLabel = $before ? $applyIcon . ' ' . $applyLabel : $applyLabel . ' ' . $applyIcon;
}
$layoutData = (object) array('type' => $model->isAjax() ? 'button' : 'submit', 'class' => 'button', 'name' => 'apply', 'label' => $applyLabel);
$form->applyButton = $params->get('apply_button', 0) && $this->editable ? $btnLayout->render($layoutData) : '';
if ($deleteIcon !== '') {
$deleteIcon = FabrikHelperHTML::icon($deleteIcon);
$before = $params->get('delete_icon_location', 'before') == 'before';
$deleteLabel = $before ? $deleteIcon . ' ' . $deleteLabel : $deleteLabel . ' ' . $deleteIcon;
}
$layoutData = (object) array('type' => 'submit', 'class' => 'btn-danger button', 'name' => 'delete', 'label' => $deleteLabel);
$form->deleteButton = $params->get('delete_button', 0) && $canDelete && $this->editable && $thisRowId != '' ? $btnLayout->render($layoutData) : '';
if ($goBackIcon !== '') {
$goBackIcon = FabrikHelperHTML::icon($goBackIcon);
//.........這裏部分代碼省略.........
示例5: foreach
echo FabrikHelperHTML::icon('icon-refresh');
?>
<?php
echo FText::_('COM_FABRIK_CLEAR');
?>
</a>
</th>
</tr>
</thead>
<tfoot>
<tr>
<th colspan="2" style="text-align:right;">
<button type="submit" class="btn btn-primary">
<?php
echo FabrikHelperHTML::icon('icon-filter');
?>
<?php
echo FText::_('COM_FABRIK_GO');
?>
</button>
</th>
</tr>
</tfoot>
<tbody>
<?php
$c = 0;
foreach ($filters as $filter) {
$required = $filter->required == 1 ? ' class="notempty"' : '';
?>
示例6:
<?php
/**
* Layout for modal filter state, per element
*
* @package Joomla
* @subpackage Fabrik
* @copyright Copyright (C) 2005-2016 fabrikar.com - All rights reserved.
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
*/
$d = $displayData;
?>
<span class="label label-inverse">
<span data-modal-state-label><?php
echo $d->label;
?>
</span>:
<span data-modal-state-value><?php
echo $d->displayValue . ' ';
?>
</span>
<a data-filter-clear="<?php
echo $d->key;
?>
" href="#" style="color: white;">
<?php
echo FabrikHelperHTML::icon('icon-cancel', '', 'style="text-align: right; "');
?>
</a>
</span>
示例7: getToField
/**
* Get to field
*
* @return string
*/
public function getToField()
{
$input = $this->app->input;
$this->_type = 'table';
$this->_id = $input->getInt('id', 0);
$params = $this->getParams();
$toType = $this->_toType();
if ($toType == 'field') {
$to = $this->_emailTo();
switch ($params->get('emailtable_email_to_field_how', 'readonly')) {
case 'editable':
$input = '<input type="text" name="list_email_to" id="list_email_to" value="' . $to . '" />';
break;
case 'hidden':
$input = '<input name="list_email_to" id="list_email_to" value="' . $to . '" type="hidden" />';
break;
case 'readonly':
default:
$input = '<input type="text" name="list_email_to" id="list_email_to" value="' . $to . '" readonly="readonly" />';
break;
}
return $input;
} elseif ($toType == 'list') {
return $this->formModel->getElementList('list_email_to');
} elseif ($toType == 'table' || $toType == 'table_picklist') {
$table = $params->get('emailtable_to_table_table');
$tableEmail = $params->get('emailtable_to_table_email');
$tableName = $params->get('emailtable_to_table_name');
$toTableModel = JModelLegacy::getInstance('list', 'FabrikFEModel');
$toTableModel->setId($table);
$toDb = $toTableModel->getDb();
$tableName = FabrikString::safeColName($tableName);
$tableEmail = FabrikString::safeColName($tableEmail);
$emailTableTo_table = $toDb->qn($toTableModel->getTable()->db_table_name);
$query = $toDb->getQuery(true);
$query->select($tableEmail . ' AS email, ' . $tableName . ' AS name')->from($emailTableTo_table)->order('name ASC');
$toDb->setQuery($query);
$results = $toDb->loadObjectList();
if (empty($results)) {
return FText::_('PLG_LIST_EMAIL_TO_TABLE_NO_DATA');
}
$empty = new stdClass();
$attribs = 'class="fabrikinput inputbox input-medium" multiple="multiple" size="5"';
if ($toType == 'table_picklist') {
$html = '<div class="pull-left" style="margin:0 20px 20px 0">';
$html .= JHTML::_('select.genericlist', $results, 'email_to_selectfrom[]', $attribs, 'email', 'name', '', 'email_to_selectfrom');
$html .= '<br /><a href="#" class="btn btn-small" id="email_add">' . FabrikHelperHTML::icon('icon-plus') . ' ' . FText::_('COM_FABRIK_ADD') . ' >></a>';
$html .= '</div>';
$html .= '<div class="span6">';
$html .= JHTML::_('select.genericlist', $empty, 'list_email_to[]', $attribs, 'email', 'name', '', 'list_email_to');
$html .= '<br /><a href="#" class="btn btn-small" id="email_remove"><< ' . FText::_('COM_FABRIK_DELETE') . ' ' . FabrikHelperHTML::icon('icon-delete') . '</a>';
$html .= '</div>';
$html .= '<div style="clear:both"></div>';
} else {
$attribs = 'class="fabrikinput inputbox input-large" multiple="multiple" size="5"';
$html = JHTML::_('select.genericlist', $results, 'list_email_to[]', $attribs, 'email', 'name', '', 'list_email_to');
}
return $html;
}
}
示例8:
}
if ($this->params->get('show_week', true)) {
?>
<button class="btn weekViewLink"><?php
echo FabrikHelperHTML::icon('icon-list');
?>
<?php
echo FText::_('PLG_VISUALIZATION_CALENDAR_WEEK');
?>
</button>
<?php
}
if ($this->params->get('show_month', true)) {
?>
<button class="btn monthViewLink"><?php
echo FabrikHelperHTML::icon('icon-calendar');
?>
<?php
echo FText::_('PLG_VISUALIZATION_CALENDAR_MONTH');
?>
</button>
<?php
}
?>
</div>
</div>
</div>
<?php
if ($row->intro_text != '') {
?>
示例9: tagIcon
/**
* Get the tag icon
*
* @return string
*/
protected function tagIcon()
{
$params = $this->getParams();
$icon = $params->get('tag_icon', '');
$icon = $icon === '' ? '' : FabrikHelperHTML::icon($icon);
return $icon;
}
示例10: onRenderAdminSettings
//.........這裏部分代碼省略.........
if ($mode === 'nav-tabs') {
$this->renderFromNavTabHeadings($form, $str, $repeatCounter);
$str[] = '<div class="tab-content">';
}
$c = 0;
$fieldsets = $form->getFieldsets();
if (count($fieldsets) <= 1) {
$mode = null;
}
// Filer the forms fieldsets for those starting with the correct $searchName prefix
foreach ($fieldsets as $fieldset) {
if ($mode === 'nav-tabs') {
$tabClass = $c === 0 ? ' active' : '';
$str[] = '<div role="tabpanel" class="tab-pane' . $tabClass . '" id="tab-' . $fieldset->name . '-' . $repeatCounter . '">';
}
$class = $j3 ? 'form-horizontal ' : 'adminform ';
$class .= $type . 'Settings page-' . $this->_name;
$repeat = isset($fieldset->repeatcontrols) && $fieldset->repeatcontrols == 1;
// Bind data for repeat groups
$repeatDataMax = 1;
if ($repeat) {
$opts = new stdClass();
$opts->repeatmin = isset($fieldset->repeatmin) ? $fieldset->repeatmin : 1;
$repeatScript[] = "new FbRepeatGroup('{$fieldset->name}', " . json_encode($opts) . ');';
$repeatData = array();
foreach ($form->getFieldset($fieldset->name) as $field) {
if ($repeatDataMax < count($field->value)) {
$repeatDataMax = count($field->value);
}
}
$form->bind($repeatData);
}
$id = isset($fieldset->name) ? ' id="' . $fieldset->name . '"' : '';
$style = isset($fieldset->modal) && $fieldset->modal ? 'style="display:none"' : '';
$str[] = '<fieldset class="' . $class . '"' . $id . ' ' . $style . '>';
if ($mode == '' && $fieldset->label != '') {
$str[] = '<legend>' . FText::_($fieldset->label) . '</legend>';
}
$form->repeat = $repeat;
$j3 = FabrikWorker::j3();
if ($repeat) {
if ($j3) {
$str[] = '<a class="btn" href="#" data-button="addButton">' . FabrikHelperHTML::icon('icon-plus', FText::_('COM_FABRIK_ADD')) . '</a>';
$str[] = '<a class="btn" href="#" data-button="deleteButton">' . FabrikHelperHTML::icon('icon-minus', FText::_('COM_FABRIK_REMOVE')) . '</a>';
} else {
$str[] = '<a class="addButton" href="#" data-button="addButton">' . FabrikHelperHTML::icon('icon-plus', FText::_('COM_FABRIK_ADD')) . '</a>';
}
}
for ($r = 0; $r < $repeatDataMax; $r++) {
if ($repeat) {
$str[] = '<div class="repeatGroup">';
$form->repeatCounter = $r;
}
if (!$j3) {
$str[] = '<ul class="adminformlist">';
}
foreach ($form->getFieldset($fieldset->name) as $field) {
if ($repeat) {
if (is_array($field->value)) {
if (array_key_exists($r, $field->value)) {
$field->setValue($field->value[$r]);
} else {
$field->setValue('');
}
}
}
if ($j3) {
$str[] = '<div class="control-group">';
$str[] = '<div class="control-label">' . $field->label . '</div>';
$str[] = '<div class="controls">' . $field->input . '</div>';
$str[] = '</div>';
} else {
$str[] = '<li>' . $field->label . $field->input . '</li>';
}
}
if ($repeat && !$j3) {
$str[] = '<li><a class="removeButton delete btn" href="#">' . FabrikHelperHTML::icon('icon-minus-sign', FText::_('COM_FABRIK_REMOVE')) . '</a></li>';
}
if (!$j3) {
$str[] = '</ul>';
}
if ($repeat) {
$str[] = "</div>";
}
}
$str[] = '</fieldset>';
if ($mode === 'nav-tabs') {
$str[] = '</div>';
}
$c++;
}
if ($mode === 'nav-tabs') {
$str[] = '</div>';
}
if (!empty($repeatScript)) {
$repeatScript = "window.addEvent('domready', function () {\n" . implode("\n", $repeatScript) . "\n})\n";
FabrikHelperHTML::script('administrator/components/com_fabrik/models/fields/repeatgroup.js', $repeatScript);
}
return implode("\n", $str);
}
示例11: defined
<?php
/**
* Repeat group delete button
*/
defined('JPATH_BASE') or die;
$d = $displayData;
?>
<a class="deleteGroup btn btn-small btn-danger" href="#" data-toggle="tooltip" title="<?php
echo FText::_('COM_FABRIK_DELETE_GROUP');
?>
">
<?php
echo FabrikHelperHTML::icon('icon-minus');
?>
</a>
示例12: defined
<?php
/**
* Email form layout
*/
defined('JPATH_BASE') or die;
$d = $displayData;
?>
<a class="btn" data-fabrik-print href="<?php
echo $d->link;
?>
">
<?php
echo FabrikHelperHTML::icon('icon-print', FText::_('COM_FABRIK_PRINT'));
?>
</a>
示例13: defined
<?php
/**
* Email form layout
*/
defined('JPATH_BASE') or die;
$d = $displayData;
if (!$d->popup) {
?>
<a class="btn btn-default fabrikWin" rel='{"title":"<?php
echo FText::_('JGLOBAL_EMAIL');
?>
", "loadMethod":"iframe", "height":"300px"}' href="<?php
echo $d->link;
?>
">
<?php
echo FabrikHelperHTML::icon('icon-envelope', FText::_('JGLOBAL_EMAIL'));
?>
</a>
<?php
}
示例14: defined
<?php
/**
* Repeat group delete button for table format
*/
defined('JPATH_BASE') or die;
$d = $displayData;
?>
<a class="deleteGroup" href="#">
<?php
echo FabrikHelperHTML::icon('icon-minus fabrikTip tip-small', '', 'data-role="fabrik_delete_group" opts="{trigger: \'hover\'}" title="' . FText::_('COM_FABRIK_DELETE_GROUP') . '"');
?>
</a>
示例15: defined
<?php
/**
* Repeat group add button
*/
defined('JPATH_BASE') or die;
$d = $displayData;
?>
<a class="addGroup btn btn-small btn-success" href="#">
<?php
echo FabrikHelperHTML::icon('icon-plus fabrikTip tip-small', '', 'data-role="fabrik_duplicate_group" opts="{trigger: \'hover\'}" title="' . FText::_('COM_FABRIK_ADD_GROUP') . '"');
?>
</a>