protected function getOptions()
 {
     $app = JFactory::getApplication();
     $view = $app->input->getCmd('view', '');
     $parentId = $app->input->getInt('parent_id', 1);
     $catId = $app->input->getInt('id', 0);
     $options = array();
     $_options = array();
     foreach ($this->element->children() as $option) {
         if ($option->getName() != 'option') {
             continue;
         }
         $tmp = JHtml::_('select.option', (string) $option['value'], JText::alt(trim((string) $option), preg_replace('/[^a-zA-Z0-9_\\-]/', '_', $this->fieldname)), 'value', 'text', (string) $option['disabled'] == 'true');
         $tmp->class = (string) $option['class'];
         $tmp->onclick = (string) $option['onclick'];
         $options[] = $tmp;
     }
     JLoader::register('JUDirectoryFrontHelperCategory', JPATH_SITE . '/components/com_judirectory/helpers/category.php', false);
     JLoader::register('JUDirectoryHelper', JPATH_ADMINISTRATOR . '/components/com_judirectory/helpers/judirectory.php', false);
     $checkPublished = $this->element['checkpublished'] == 'true' || $this->element['checkpublished'] == '1' ? true : false;
     $checkCreatePermission = false;
     if (isset($this->element['checkcreatepermissiononcat'])) {
         if ($this->element['checkcreatepermissiononcat'] == 'true' || $this->element['checkcreatepermissiononcat'] == '1') {
             $checkCreatePermission = 'category';
         }
     } elseif ($this->element['checkcreatepermissiononlisting'] == 'true' || $this->element['checkcreatepermissiononlisting'] == '1') {
         $checkCreatePermission = 'listing';
     }
     $getSelf = $this->element['fetchself'] == 'true' || $this->element['fetchself'] == '1' ? true : false;
     $startLevel = $this->element['startlevel'] ? $this->element['startlevel'] : 0;
     $separation = $this->element['separation'] ? $this->element['separation'] : '|—';
     $ignorecat = $this->element['ignorecat'] ? explode(',', $this->element['ignorecat']) : array();
     if ($view == 'category') {
         if ($catId) {
             $_options = JUDirectoryHelper::getCategoryOptions(1, $getSelf, $checkCreatePermission, $checkPublished, array($catId), $startLevel, $separation);
         } elseif ($parentId) {
             $_options = JUDirectoryHelper::getCategoryOptions(1, $getSelf, $checkCreatePermission, $checkPublished, $ignorecat, $startLevel, $separation);
             if ($this->value == "") {
                 $this->value = $parentId;
             }
         }
     } else {
         $_options = JUDirectoryHelper::getCategoryOptions(1, $getSelf, $checkCreatePermission, $checkPublished, $ignorecat, $startLevel, $separation);
     }
     reset($options);
     $options = array_merge($options, $_options);
     return $options;
 }
$optionsStatus[] = JHtml::_('select.option', '1', 'JPUBLISHED');
$optionsStatus[] = JHtml::_('select.option', '0', 'JUNPUBLISHED');
$optionsStatus[] = JHtml::_('select.option', '*', 'JALL');
?>
			<?php 
echo JHtml::_('select.options', $optionsStatus, 'value', 'text', $this->state->get('filter.state'), true);
?>
		</select>

		<select name="filter_category" class="inputbox" onchange="this.form.submit()">
			<option value=""><?php 
echo JText::_('JOPTION_SELECT_CATEGORY');
?>
</option>
			<?php 
$options = JUDirectoryHelper::getCategoryOptions();
echo JHtml::_('select.options', $options, 'value', 'text', $this->state->get('filter.category'));
?>
		</select>

		<select name="filter_access" class="inputbox" onchange="this.form.submit()">
			<option value=""><?php 
echo JText::_('JOPTION_SELECT_ACCESS');
?>
</option>
			<?php 
echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'));
?>
		</select>
		<select name="filter_language" class="inputbox" onchange="this.form.submit()">
			<option value=""><?php 
echo JText::_('COM_JUDIRECTORY_ANY');
?>
</option>
						</select>
					</div>
				</div>
				<div class="control-group">
					<label id="jform_categories-lbl" for="categories" class="control-label"
					       title=""><?php 
echo JText::_('COM_JUDIRECTORY_CATEGORIES');
?>
</label>

					<div class="controls">
						<?php 
$options = JUDirectoryHelper::getCategoryOptions(1, true, false, true);
$defaultValue = isset($dataSearch['categories']) ? $dataSearch['categories'] : 1;
echo JHtml::_('select.genericList', $options, 'categories[]', 'multiple size="10"', 'value', 'text', $defaultValue);
?>
					</div>
				</div>
				<div class="control-group">
					<label id="jform_subcategories-lbl" for="search-sub-categories" class="control-label"
					       title=""><?php 
echo JText::_('COM_JUDIRECTORY_SUBCATEGORIES');
?>
</label>

					<div class="controls">
						<?php 
$defaultValue = isset($dataSearch['search_sub_categories']) ? $dataSearch['search_sub_categories'] : "1";
Exemple #4
0
$optionUnFeatured->value = 0;
$optionUnFeatured->text = JText::_("COM_JUDIRECTORY_UNFEATURED");
$featuredArr[] = $optionUnFeatured;
?>
				<?php 
echo JHtml::_('select.options', $featuredArr, 'value', 'text', $this->state->get('filter.featured'));
?>
			</select>

			<select name="filter_catid" class="input-medium" onchange="this.form.submit()">
				<option value=""><?php 
echo JText::_('COM_JUDIRECTORY_SELECT_CATEGORY');
?>
</option>
				<?php 
$categoryArr = JUDirectoryHelper::getCategoryOptions();
?>
				<?php 
echo JHtml::_('select.options', $categoryArr, 'value', 'text', $this->state->get('filter.catid'));
?>
			</select>
		</div>
	</fieldset>
	<?php 
if (empty($this->items)) {
    ?>
		<div class="alert alert-no-items">
			<?php 
    echo JText::_('COM_JUDIRECTORY_NO_MATCHING_RESULTS');
    ?>
		</div>
Exemple #5
0
			<legend><?php 
echo JText::_('COM_JUDIRECTORY_MOVE_CATEGORIES');
?>
</legend>
			<div class="span6">
				<div class="form-horizontal">
					<div class="control-group">
						<div class="control-label">
								<label><?php 
echo JText::_('COM_JUDIRECTORY_MOVE_TO_CATEGORY');
?>
</label>
						</div>
						<div class="controls">
							<?php 
$options = JUDirectoryHelper::getCategoryOptions(1, true, "category", false, $ignored_cat_id);
echo JHtml::_('select.genericList', $options, 'categories', '', 'value', 'text', "");
?>
						</div>
					</div>
					<div class="control-group">
						<div class="control-label">
							<label class="<?php 
echo $classTooltip;
?>
" for="extra_fields" title="<?php 
echo JText::_('COM_JUDIRECTORY_KEEP_EXTRA_FIELDS') . $separator . JText::_('COM_JUDIRECTORY_KEEP_EXTRA_FIELDS_DESC');
?>
"><?php 
echo JText::_('COM_JUDIRECTORY_KEEP_EXTRA_FIELDS');
?>
Exemple #6
0
				<div class="form-horizontal">
					<div class="control-group">
						<div class="control-label">
								<label for="categories"><?php 
echo JText::_('COM_JUDIRECTORY_MOVE_TO_CATEGORY');
?>
</label>
						</div>
						<div class="controls">
							<?php 
$fetchSelf = true;
$params = JUDirectoryHelper::getParams();
if (!$params->get('allow_add_listing_to_root', 0)) {
    $fetchSelf = false;
}
$options = JUDirectoryHelper::getCategoryOptions(1, $fetchSelf, "listing");
echo JHtml::_('select.genericList', $options, 'categories', '', 'value', 'text', '', 'categories');
?>
						</div>
					</div>
					<div class="control-group">
						<div class="control-label">
							<label class="<?php 
echo $classTooltip;
?>
" for="keep_extra_fields" title="<?php 
echo JText::_('COM_JUDIRECTORY_KEEP_EXTRA_FIELDS') . $separator . JText::_('COM_JUDIRECTORY_KEEP_EXTRA_FIELDS_DESC');
?>
"><?php 
echo JText::_('COM_JUDIRECTORY_KEEP_EXTRA_FIELDS');
?>
Exemple #7
0
echo JText::_('COM_JUDIRECTORY_COPY_CATEGORIES');
?>
</legend>
			<div class="form-horizontal">
				<div class="row-fluid">
					<div class="span6">
						<div class="control-group ">
							<div class="control-label">
								<label for="categories"><?php 
echo JText::_('COM_JUDIRECTORY_COPY_TO_CATEGORIES');
?>
</label>
							</div>
							<div class="controls">
								<?php 
$options = JUDirectoryHelper::getCategoryOptions(1, true, "category");
echo JHtml::_('select.genericList', $options, 'categories[]', 'class="inputbox" multiple size="6"', 'value', 'text', 1, 'categories');
?>
							</div>
						</div>

						<div class="row-fluid">
							<div class="span6">
								<div class="control-group ">
									<div class="control-label">
										<label class="<?php 
echo $classTooltip;
?>
" for="subcategories" title="<?php 
echo JText::_('COM_JUDIRECTORY_COPY_SUB_CATEGORIES') . $separator . JText::_('COM_JUDIRECTORY_COPY_SUB_CATEGORIES_DESC');
?>