当前位置: 首页>>代码示例>>PHP>>正文


PHP category::tree方法代码示例

本文整理汇总了PHP中category::tree方法的典型用法代码示例。如果您正苦于以下问题:PHP category::tree方法的具体用法?PHP category::tree怎么用?PHP category::tree使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在category的用法示例。


在下文中一共展示了category::tree方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

print '<br/>';
print '<span>';
print '<a href="#" id="add_new_category">' . Kohana::lang('ui_main.add') . '</a>';
print '</span>';
?>
 
                                </div>

			                    <div class="report_category">
                        	    <?php 
$selected_categories = array();
if (!empty($form['incident_category']) && is_array($form['incident_category'])) {
    $selected_categories = $form['incident_category'];
}
$columns = 2;
echo category::tree($categories, $selected_categories, 'incident_category', $columns);
?>
			                       								</div>
							</div>
							
							<div id="custom_forms">
								<?php 
foreach ($disp_custom_fields as $field_id => $field_property) {
    echo "<div class=\"row\">";
    echo "<h4>" . $field_property['field_name'] . "</h4>";
    if ($field_property['field_type'] == 1) {
        // Text Field
        // Is this a date field?
        if ($field_property['field_isdate'] == 1) {
            echo form::input('custom_field[' . $field_id . ']', $form['custom_field'][$field_id], ' id="custom_field_' . $field_id . '" class="text"');
            echo '<script type="text/javascript">
开发者ID:hagaeru3sei,项目名称:Ushahidi_Web,代码行数:31,代码来源:reports_edit.php

示例2: htmlspecialchars

								<?php 
echo form::textarea('action_email_body', '');
?>
							</div>

							<div class="tab_form_item" id="action_form_add_category" style="margin-right:75px;">
								<h4><a href="#" class="tooltip" title="<?php 
echo htmlspecialchars(Kohana::lang("tooltips.actions.add_to_category"));
?>
"><?php 
echo Kohana::lang('ui_admin.add_to_category');
?>
:</a></h4>
								<?php 
// categories, selected_categories, form field name, number of columns
echo category::tree($categories, FALSE, array(), 'action_add_category', 2);
?>
							</div>

							<div class="tab_form_item" id="action_form_report_title" style="margin-right:75px;">
								<h4><a href="#" class="tooltip" title="<?php 
echo htmlspecialchars(Kohana::lang("tooltips.actions.report_title"));
?>
"><?php 
echo Kohana::lang('ui_admin.report_title');
?>
:</a></h4>
								<?php 
echo form::input('action_report_title', '');
?>
							</div>
开发者ID:nemmy,项目名称:Ushahidi_Web,代码行数:31,代码来源:actions.php

示例3: is_array

</h2>
		
		<div style="clear: left; width: 100%; float: left;">
			<input type="checkbox" id="category_all" name="category_all" onclick="CheckAll(this.id, 'category')"/><strong><?php 
echo utf8::strtoupper(Kohana::lang('ui_main.select_all'));
?>
</strong>
		</div>
		<?php 
$selected_categories = (!empty($form['incident_category']) and is_array($form['incident_category'])) ? $selected_categories = $form['incident_category'] : array();
if (method_exists('category', 'form_tree')) {
    echo category::form_tree('category', $selected_categories, 2, TRUE);
} elseif (Kohana::config('settings.ushahidi_version') >= 2.4 and Kohana::config('settings.ushahidi_version') <= 2.5) {
    echo category::tree(ORM::factory('category')->find_all(), TRUE, $selected_categories, 'category', 2, TRUE);
} elseif (Kohana::config('settings.ushahidi_version') < 2.4) {
    echo category::tree(ORM::factory('category')->find_all(), $selected_categories, 'category', 2, TRUE);
}
?>
	</div>
	<div>
		<!-- JP: Reformated the layout. -->
		<table style="width: 100%; clear: both;">
			<tr>
				<td style="width: 50%">
					<h2><?php 
echo Kohana::lang('ui_main.verification');
?>
</h2>
					<table>
						<tr>
							<td>
开发者ID:niiyatii,项目名称:crowdmap,代码行数:31,代码来源:download_reports.php

示例4: is_array

?>
</span>
						</div>
					</div>
				</div>
				<div class="step-3">
					<h2><?php 
echo Kohana::lang('ui_main.alerts_step3_select_catgories');
?>
</h2>
					<div class="holder">
						<div class="box">
							<div class="report_category" id="categories">
							<?php 
$selected_categories = (!empty($form['alert_category']) and is_array($form['alert_category'])) ? $selected_categories = $form['alert_category'] : array();
echo category::tree($categories, $selected_categories, 'alert_category', 2, TRUE);
?>
							</div>
						</div>
					</div>
				</div>
				<input id="btn-send-alerts" class="btn_submit" type="submit" value="<?php 
echo Kohana::lang('ui_main.alerts_btn_send');
?>
" />
				<BR /><BR />
				<a href="<?php 
echo url::site() . "alerts/confirm";
?>
"><?php 
echo Kohana::lang('ui_main.alert_confirm_previous');
开发者ID:rabbit09,项目名称:Taarifa_Web,代码行数:31,代码来源:alerts.php

示例5: is_array

)</small>
						<?php 
}
?>
					</div>
					<div style="clear:both; display:block;" id="incident_date_time"></div>
				</div>
				<div class="report_row">
					<h4><?php 
echo Kohana::lang('ui_main.reports_categories');
?>
 <span class="required">*</span></h4>
					<div class="report_category" id="categories">
					<?php 
$selected_categories = (!empty($form['incident_category']) and is_array($form['incident_category'])) ? $selected_categories = $form['incident_category'] : array();
echo category::tree($categories, TRUE, $selected_categories, 'incident_category', 2);
?>
					</div>
				</div>


				<?php 
// Action::report_form - Runs right after the report categories
Event::run('ushahidi_action.report_form');
?>

				<?php 
echo $custom_forms;
?>

				<div class="report_optional">
开发者ID:nanangsyaifudin,项目名称:HAC-2012,代码行数:31,代码来源:submit.php


注:本文中的category::tree方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。