本文整理汇总了PHP中picto_tag函数的典型用法代码示例。如果您正苦于以下问题:PHP picto_tag函数的具体用法?PHP picto_tag怎么用?PHP picto_tag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了picto_tag函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: filters_switcher_link
function filters_switcher_link($mainFilterSwitchOn)
{
$options_on = $options_off = array();
$options_on['id'] = 'filter_switch_on';
$options_off['id'] = 'filter_switch_off';
if ($mainFilterSwitchOn) {
$options_off['style'] = 'display: none;';
} else {
$options_on['style'] = 'display: none;';
}
$html = picto_tag('action_on', __('some filters active'), $options_on);
$html .= picto_tag('action_off', __('some filters have been defined but are not activated'), $options_off);
if (defined('PUN_ROOT')) {
// we are in the forum
// it is not possible to activate/disactivate filter because the FiltersSwitchFilter will not get executed.
// moreover, forums are not filtered on activities, regions, langs.
return $html;
} else {
return link_to_function($html, "\$('#indicator').show();" . "\$.ajax('" . url_for('@default?module=common&action=switchallfilters') . "')" . ".done(function() { \$('#filter_switch_on, #filter_switch_off').toggle(); window.location.reload(); })" . ".always(function() { \$('#indicator').hide(); })");
}
}
示例2: start_section_tag
function start_section_tag($label, $container_id, $state = 'opened', $map = false, $first = false, $hide = false, $show_tip = true)
{
$class = 'article_titre_bg';
if ($first) {
$class .= ' hfirst';
}
$picto_class = $state == 'opened' ? 'picto_close' : 'picto_open';
$status = __($state == 'opened' ? 'section close' : 'section open');
$label = picto_tag($picto_class, '', array('id' => $container_id . '_toggle')) . __($label);
if ($show_tip && !c2cTools::mobileVersion()) {
$label .= '<span id="tip_' . $container_id . '" class="tips">[' . $status . ']</span>';
$up = '<a href="#header">' . picto_tag('action_up', __('menu'), array('class' => 'go_up')) . '</a>';
} else {
$up = '';
}
$style = $hide ? '" style="display:none' : '';
$html = '<div class="' . $class . '" id="' . $container_id . '_tbg' . $style . '">' . '<div class="title" id="' . $container_id . '_section_title" title="' . $status . '">' . '<a href="#" id="' . $container_id . '" data-toggle-view="' . $container_id . '">' . $label . '</a>' . $up . '</div>' . '</div>';
if (!$map) {
$display = $state == 'opened' && !$hide ? '' : ' style="display:none;"';
$html .= '<section id="' . $container_id . '_section_container" class="section"' . $display . '>';
}
return $html;
}
示例3: picto_header_list_tag
function picto_header_list_tag($picto, $title = '')
{
sfLoader::loadHelpers(array('General'));
return '<th>' . picto_tag($picto, __($title)) . '</th>';
}
示例4: use_helper
<?php
use_helper('Field', 'Link');
$item_i18n = $item['ProductI18n'][0];
?>
<div><?php
echo list_link($item_i18n, 'products');
?>
</div>
<div><?php
echo displayWithSuffix($item['elevation'], 'meters'), ' - ', get_paginated_value_from_list($item['product_type'], 'mod_products_types_list');
if (isset($item['linked_docs'])) {
echo '<div>', __('access'), ' ';
include_partial('parkings/parkings4list', array('parkings' => $item['linked_docs']));
echo '</div>';
}
?>
<div><?php
include_partial('documents/regions4list', array('geoassociations' => $item['geoassociations']));
?>
</div>
<div><?php
echo picto_tag('picto_images', __('nb_linked_images')), ' ', isset($item['nb_images']) ? $item['nb_images'] : '0', ' ', picto_tag('action_comment', __('nb_comments')), ' ', isset($item['nb_comments']) ? link_to($item['nb_comments'], '@document_comment?module=products&id=' . $item_i18n['id'] . '&lang=' . $item_i18n['culture']) : '0';
?>
</div>
示例5: use_helper
<?php
use_helper('General');
?>
<br />
<?php
echo picto_tag('picto_huts') . __('Hut:') . ' ' . (isset($autofocus) ? input_tag('hnam', null, array('autofocus' => 'autofocus')) : input_tag('hnam'));
echo __('elevation') . ' ' . elevation_selector('halt');
?>
<br />
<?php
echo __('shelter_type') . ' ' . field_value_selector('htyp', 'mod_huts_shelter_types_list', array('keepfirst' => false, 'multiple' => true));
echo __('is_staffed') . __(' :') . ' ' . bool_selector('hsta');
?>
<br />
<?php
echo __('staffed_capacity') . ' ' . elevation_selector('hscap', null);
?>
<br />
<?php
echo __('unstaffed_capacity') . ' ' . elevation_selector('hucap', null);
?>
<br />
<?php
echo __('has_unstaffed_matress') . ' ' . field_value_selector('hmat', 'app_boolean_list');
echo __('has_unstaffed_blanket') . ' ' . field_value_selector('hbla', 'app_boolean_list');
echo __('has_unstaffed_gas') . ' ' . field_value_selector('hgas', 'app_boolean_list');
echo __('has_unstaffed_wood') . ' ' . field_value_selector('hwoo', 'app_boolean_list');
示例6: simple_pager_navigation
echo simple_pager_navigation($count, count($routes_outings), 'routings_group_');
}
?>
</div>
<?php
}
// routes outings list link
include_partial('outings/linked_outings', array('id' => $ids, 'module' => 'routes', 'nb_outings' => $nb_routes_outings, 'document' => $document));
}
}
// new outing button
if ($show_link_tool) {
echo '<div class="add_content">' . link_to(picto_tag('picto_add', __('Associate new outing')) . __('Associate new outing'), "outings/edit?link={$id}") . '</div>';
}
echo end_section_tag();
// associated images section
include_partial('documents/images', array('images' => $associated_images, 'document_id' => $id, 'dissociation' => 'moderator', 'is_protected' => $document->get('is_protected')));
if ($mobile_version) {
include_partial('documents/mobile_comments', array('id' => $id, 'lang' => $lang, 'nb_comments' => $nb_comments));
if ($is_connected) {
$version = $document->getVersion();
$txt = __('Edit');
echo '<div id="edit_route_button" class="add_content">', link_to(picto_tag('picto_tools', $txt) . $txt, "@document_edit_archive?module=routes&id={$id}&lang={$lang}&version={$version}"), '</div>';
}
}
// annex docs section
include_partial('documents/annex_docs', array('document' => $document, 'related_articles' => $associated_articles, 'related_portals' => $related_portals, 'show_link_to_delete' => $show_link_to_delete));
}
include_partial('documents/license', array('license' => 'by-sa', 'version' => $current_version, 'created_at' => isset($created_at) ? $created_at : null, 'timer' => $timer));
echo end_content_tag();
include_partial('common/content_bottom');
示例7: select_tag
if (array_key_exists($cat, $choices)) {
$choices[$cat] .= ' *';
}
}
echo select_tag("categories[{$image_number}]", options_for_select($choices), array('multiple' => true, 'size' => 6));
?>
</div>
<br />
<div class="image_form_error"<?php
echo isset($image_title) ? ' style="display:none"' : '';
?>
>
↓ <?php
echo __('this name is too short (4 characters minimum)');
?>
↓</div>
<?php
// if image_title is set, we prefill the title input
// note that we use raw value, since input_tag will escape values anyway
// and we thus prevent double escaping
$image_title = isset($image_title) ? $sf_data->getRaw('image_title') : '';
echo __('name'), ' ', input_tag("name[{$image_number}]", $image_title, array('maxlength' => '150', 'class' => 'large_input', 'placeholder' => __('write a caption'))), ' ', input_hidden_tag("image_unique_filename[{$image_number}]", $image_filename);
echo '<br /><br />';
$license_choices = array_map('__', sfConfig::get('mod_images_type_list'));
if ($default_license == 1) {
$types = sfConfig::get('mod_images_type_list');
echo __('image_type') . ' ' . __($types[1]) . ' ' . link_to(picto_tag('cc-by-sa-mini', 'CC-by-sa'), getMetaArticleRoute('licenses', false, 'cc-by-sa'));
echo input_hidden_tag("image_type[{$image_number}]", 1);
} else {
echo __('image_type') . ' ' . select_tag("image_type[{$image_number}]", options_for_select($license_choices, $default_license));
}
示例8: use_helper
<?php
use_helper('FilterForm', 'General', 'MyForm');
$is_connected = $sf_user->isConnected();
echo around_selector('sarnd');
$ranges_raw = $sf_data->getRaw('ranges');
$selected_areas_raw = $sf_data->getRaw('selected_areas');
include_partial('areas/areas_selector', array('ranges' => $ranges_raw, 'selected_areas' => $selected_areas_raw, 'use_personalization' => true));
?>
<br />
<br />
<?php
echo '<div class="fieldname">' . picto_tag('picto_outings') . __('name') . ' </div>' . input_tag('onam', null, array('autofocus' => 'autofocus'));
echo georef_selector('With GPS track:');
$activities_raw = $sf_data->getRaw('activities');
include_partial('routes_filter', array('activities' => $activities_raw));
include_partial('summits/summits_short_filter');
include_partial('huts/huts_short_filter');
include_partial('parkings/parkings_filter');
echo __('outing_with_public_transportation') . ' ' . bool_selector('owtp');
?>
<br /><br />
<?php
echo __('Date') . __(' :') . ' ' . date_selector(array('month' => true, 'year' => true, 'day' => true));
?>
<div data-act-filter="1 2 5 7" style="display:none">
<?php
echo __('avalanche_infos') . ' ' . select_tag('avdate', options_for_select(array('2-3-4-5' => __('yes'), '1' => __('no'), ' ' => __('filled in'), '-' => __('nonwell informed')), '', array('include_blank' => true)));
?>
</div>
<br />
示例9: field_export
function field_export($module, $id, $lang, $version = null)
{
$route_suffix = !empty($version) ? "_version?version={$version}&" : '?';
$route_suffix .= "module={$module}&id={$id}&lang={$lang}";
$title = 'download geo data under %1% format';
$result = '<div class="no_print">' . content_tag('span', __('Export:'), array('class' => 'section_subtitle', 'id' => 'geo_export', 'data-tooltip' => '')) . ' ' . picto_tag('action_gps') . ' ' . link_to('GPX', "@export_gpx{$route_suffix}", array('title' => __($title, array('%1%' => 'GPX')), 'rel' => 'nofollow'));
if (!c2cTools::mobileVersion()) {
$result .= ' ' . picto_tag('action_kml') . ' ' . link_to('KML', "@export_kml{$route_suffix}", array('title' => __($title, array('%1%' => 'KML')), 'rel' => 'nofollow')) . ' ' . picto_tag('action_json') . ' ' . link_to('JSON', "@export_json{$route_suffix}", array('title' => __($title, array('%1%' => 'JSON')), 'rel' => 'nofollow'));
}
$result .= '</div>';
return $result;
}
示例10: picto_tag
echo picto_tag('action_edit') . f_link_to(__('User profile'), 'profile.php?section=personality');
?>
</li>
<li><?php
echo picto_tag('action_contact') . link_to(__('Mailing lists link'), 'users/mailinglists');
?>
</li>
<?php
} else {
?>
<li><?php
echo picto_tag('action_edit') . link_to(__('create an account?'), getMetaArticleRoute('create_account'));
?>
</li>
<?php
}
if ($is_connected) {
?>
<li class="lilast"><?php
echo picto_tag('action_cc') . link_to(__('User image management'), 'users/manageimages');
?>
</li>
<?php
}
?>
</ul>
</li>
</ul>
<br class="clearer" />
</div>
示例11: start_section_tag
if ($is_not_archive && $is_not_merged) {
echo start_section_tag('Linked documents', 'associated_docs');
$id_no_associated_docs = "no_associated_docs";
$id_list_associated_docs = "list_associated_docs";
if (!count($associated_documents)) {
echo '<p class="default_text" id="' . $id_no_associated_docs . '">' . __("No document uses this picture.") . '</p>';
}
if (count($associated_documents) > 0) {
echo '<ul id="' . $id_list_associated_docs . '">';
foreach ($associated_documents as $doc) {
$doc_id = $doc['id'];
$module = $doc['module'];
$type = c2cTools::Module2Letter($module) . 'i';
$idstring = $type . '_' . $doc_id;
echo '<li id="', $idstring, '">';
echo picto_tag('picto_' . $module, __($module));
echo ' ' . link_to($doc['name'], "@document_by_id_lang_slug?module={$module}&id=" . $doc_id . '&lang=' . $doc['culture'] . '&slug=' . make_slug($doc['name']));
if ($show_link_to_delete) {
echo c2c_link_to_delete_element($type, $doc_id, $id, false, 1);
}
echo '</li>';
}
echo '</ul>';
} elseif ($show_link_tool) {
echo '<ul id="' . $id_list_associated_docs . '"><li style="display:none"></li></ul>';
}
if ($show_link_tool) {
?>
<div id="association_tool" class="plus">
<p><?php
echo __('You can associate this picture with any existing document using the following tool:');
示例12: foreach
foreach ($alist as $k => $act) {
if (!in_array($k + 1, $act_filter)) {
$unselected_act[] = $k;
}
}
foreach ($unselected_act as $act_id) {
$light[$act_id] = '_light';
}
foreach ($act_filter as $act_id) {
$activities_class[] = 'act' . $act_id;
}
}
?>
<div id="quick_switch<?php
echo empty($activities_class) ? '' : '" class="' . implode(' ', $activities_class);
?>
">
<?php
foreach ($alist as $act_id => $activity) {
$alt = $act_filter == array($act_id) ? __('switch_off_activity_personalisation') : __('switch_to_' . $alist[$act_id]);
$image_tag = picto_tag('activity_' . ($act_id + 1) . $light[$act_id], $alt);
echo link_to($image_tag, '@quick_activity?activity=' . ($act_id + 1), array('class' => 'qck_sw'));
}
?>
</div>
<?php
include_partial('common/menu_content', array('sf_cache_key' => ($is_connected ? 'connected' : 'not_connected') . '_' . $lang, 'lang' => $lang, 'is_connected' => $is_connected));
?>
</div>
示例13: use_helper
<?php
use_helper('General');
?>
<br />
<?php
echo '<div class="fieldname">' . picto_tag('picto_summits') . __('Summit:') . ' </div>' . input_tag('snam');
echo __('elevation') . ' ' . elevation_selector('salt');
echo __('summit_type') . ' ' . field_value_selector('styp', 'app_summits_summit_types', array('blank' => true));
示例14: use_helper
use_helper('General');
$mobile_version = c2cTools::mobileVersion();
?>
<fieldset id="fs_area">
<legend class="select_title">
<?php
if (!isset($show_picto)) {
$show_picto = true;
}
if ($show_picto) {
echo picto_tag('picto_areas') . ' - ';
}
echo link_to_function(__('ranges'), "console.log('plop');\$('#indicator').show();\n \$.ajax('" . url_for('/areas/getmultipleselect?area_type=1') . "')\n .always(function() { \$('#indicator').hide(); })\n .done(function(data) { \$('#area_selector').html(data); })") . ' - ' . link_to_function(__('regions'), "\$('#indicator').show();\n \$.ajax('" . url_for('/areas/getmultipleselect?area_type=3') . "')\n .always(function() { \$('#indicator').hide(); })\n .done(function(data) { \$('#area_selector').html(data); })") . ' - ' . link_to_function(__('countries'), "\$('#indicator').show();\n \$.ajax('" . url_for('/areas/getmultipleselect?area_type=2') . "')\n .always(function() { \$('#indicator').hide(); })\n .done(function(data) { \$('#area_selector').html(data); })");
if (!$mobile_version) {
echo ' - ' . picto_tag('picto_close', __('Reduce the list'), array('onclick' => "C2C.changeSelectSize('places', false)")) . picto_tag('picto_open', __('Enlarge the list'), array('onclick' => "C2C.changeSelectSize('places', true)"));
}
?>
</legend>
<div id="area_selector">
<?php
//rq FIXME bug in symfony 1.0.11 which does not work with optgroups and escaping, see http://trac.symfony-project.org/ticket/3923
// plus using sf_data->getRaw is not enough because it is passed through different partials
$ranges_raw = array();
foreach ($ranges as $key => $value) {
if ($value instanceof sfOutputEscaperArrayDecorator) {
$rr = array();
foreach ($value as $k => $v) {
$rr[$k] = $v;
}
$ranges_raw[$key] = $rr;
示例15: use_helper
<?php
use_helper('Field');
$id = $sf_params->get('id');
$is_connected = $sf_user->isConnected();
$is_not_archive = !$document->isArchive();
$is_not_merged = !$document->get('redirects_to');
$mobile_version = c2cTools::mobileVersion();
$is_gite_camping = $document->get('shelter_type') == 5 || $document->get('shelter_type') == 6;
$show_link_tool = !$is_gite_camping && $is_not_archive && $is_not_merged && $is_connected && !$mobile_version;
if ($is_gite_camping) {
$access_label = 'access';
} else {
$access_label = null;
}
echo field_text_data_if_set($document, 'staffed_period', null, array('needs_translation' => $needs_translation, 'images' => $images));
echo field_text_data_if_set($document, 'description', null, array('needs_translation' => $needs_translation, 'images' => $images));
if (count($associated_routes)) {
echo field_text_data($document, 'pedestrian_access', $access_label, array('needs_translation' => $needs_translation, 'images' => $images));
include_partial('routes/linked_routes', array('associated_routes' => $associated_routes, 'document' => $document, 'id' => $id, 'module' => 'huts', 'type' => '', 'strict' => true, 'show_list_link' => false));
} else {
echo field_text_data_if_set($document, 'pedestrian_access', $access_label, array('needs_translation' => $needs_translation, 'images' => $images));
}
if ($show_link_tool) {
echo '<div class="add_content">' . link_to(picto_tag('picto_add', __('Associate new access')) . __('Associate new access'), "@hut_addroute?document_id={$id}") . '</div>';
}