示例#1
0
	protected function _prepareData()
	{
		
		$this->order_name_array = JUDownloadFrontHelperField::getFrontEndOrdering();
		$this->order_dir_array  = JUDownloadFrontHelperField::getFrontEndDirection();
		$this->document_order   = $this->escape($this->state->get('list.ordering'));
		$this->document_dir     = $this->escape($this->state->get('list.direction'));

		$this->document_columns = (int) $this->params->get('view_search_columns', 2);
		if (!is_numeric($this->document_columns) || ($this->document_columns <= 0))
		{
			$this->document_columns = 1;
		}
		$this->document_bootstrap_columns = JUDownloadFrontHelper::getBootstrapColumns($this->document_columns);
		$this->document_row_class         = htmlspecialchars($this->params->get('view_search_add_rows_class'));
		$this->document_column_class      = htmlspecialchars($this->params->get('view_search_add_columns_class'));

		
		$this->display_download_rule_msg     = $this->params->get('show_rule_messages', 'modal');
		$this->external_download_link_target = $this->params->get('external_download_link_target', '_blank');

		
		$this->allow_user_select_view_mode = $this->params->get('allow_user_select_view_mode', 1);

		if ($this->allow_user_select_view_mode && isset($_COOKIE['judl-view-mode']) && !empty($_COOKIE['judl-view-mode']))
		{
			$viewMode = $_COOKIE['judl-view-mode'] == 'judl-view-grid' ? 2 : 1;
		}
		else
		{
			$viewMode = $this->params->get('default_view_mode', 2);
		}

		$this->view_mode = $viewMode;
	}
示例#2
0
	$totalCategoryLevel1 = 0;
	foreach ($this->all_categories AS $category)
	{
		if ($category->level == ($this->category->level + 1))
		{
			$totalCategoryLevel1++;
		}
	}

	// Get total columns
	$columns = (int) $this->params->get('all_categories_columns', 2);
	if (!is_numeric($columns) || ($columns <= 0))
	{
		$columns = 1;
	}
	$this->subcategory_bootstrap_columns = JUDownloadFrontHelper::getBootstrapColumns($columns);

	// Row and column class
	$rows_class = htmlspecialchars($this->params->get('all_categories_row_class', ''));
	$columns_class = htmlspecialchars($this->params->get('all_categories_column_class', ''));

	// Index row
	$indexRow = 0;

	// Index column
	$indexColumn = 0;

	// Index element in array
	$indexElementArray = 0;
	?>
	<div