hiding main blocks is confusing
git-svn-id: file:///home/shish/svn/shimmie2/trunk@13 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
		
							parent
							
								
									94c0446f97
								
							
						
					
					
						commit
						d45e3af215
					
				| @ -4,24 +4,30 @@ $base_href = $config->get_string('base_href'); | |||||||
| $data_href = $config->get_string('data_href'); | $data_href = $config->get_string('data_href'); | ||||||
| $contact_link = $config->get_string('contact_link'); | $contact_link = $config->get_string('contact_link'); | ||||||
| 
 | 
 | ||||||
| function block_to_html($block) { | function block_to_html($block, $hidable=false) { | ||||||
| 	$h = $block->header; | 	$h = $block->header; | ||||||
| 	$b = $block->body; | 	$b = $block->body; | ||||||
| 	$i = str_replace(' ', '_', $h); |  | ||||||
| 	$html = ""; | 	$html = ""; | ||||||
| 	if(!is_null($h)) $html .= "\n<h3 id='$i-toggle' onclick=\"toggle('$i')\">$h</h3>\n"; | 	if($hidable) { | ||||||
| 	if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n"; | 		$i = str_replace(' ', '_', $h); | ||||||
|  | 		if(!is_null($h)) $html .= "\n<h3 id='$i-toggle' onclick=\"toggle('$i')\">$h</h3>\n"; | ||||||
|  | 		if(!is_null($b)) $html .= "<div id='$i'>$b</div>\n"; | ||||||
|  | 	} | ||||||
|  | 	else { | ||||||
|  | 		if(!is_null($h)) $html .= "\n<h3>$h</h3>\n"; | ||||||
|  | 		if(!is_null($b)) $html .= "<div>$b</div>\n"; | ||||||
|  | 	} | ||||||
| 	return $html; | 	return $html; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $sideblock_html = ""; | $sideblock_html = ""; | ||||||
| foreach($this->sideblocks as $block) { | foreach($this->sideblocks as $block) { | ||||||
| 	$sideblock_html .= block_to_html($block); | 	$sideblock_html .= block_to_html($block, true); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $mainblock_html = ""; | $mainblock_html = ""; | ||||||
| foreach($this->mainblocks as $block) { | foreach($this->mainblocks as $block) { | ||||||
| 	$mainblock_html .= block_to_html($block); | 	$mainblock_html .= block_to_html($block, false); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $scripts = glob("scripts/*.js"); | $scripts = glob("scripts/*.js"); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user