Changeset 11627
- Timestamp:
- 08/17/07 14:47:26 (1 year ago)
- Files:
-
- branches/MidCOM_2_8/midgard.admin.sitewizard/handler/host.php (modified) (6 diffs)
- branches/MidCOM_2_8/midgard.admin.sitewizard/static/Andreas01.png (added)
- branches/MidCOM_2_8/midgard.admin.sitewizard/static/BusinessDesign.png (added)
- branches/MidCOM_2_8/midgard.admin.sitewizard/static/InternetServices.png (added)
- branches/MidCOM_2_8/midgard.admin.sitewizard/static/MintChocolade.png (added)
- branches/MidCOM_2_8/midgard.admin.sitewizard/static/SimpleGray.png (added)
- branches/MidCOM_2_8/midgard.admin.sitewizard/style/wizard-create-host.php (modified) (1 diff)
- branches/MidCOM_2_8/midgard.admin.sitewizard/style/wizard-select-style.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/MidCOM_2_8/midgard.admin.sitewizard/handler/host.php
r11367 r11627 191 191 } 192 192 193 function _is_customizable($style) 194 { 195 $qb = midcom_db_element::new_query_builder(); 196 $qb->add_constraint('sitegroup', '=', 0); 197 $qb->add_constraint('style', '=', $style->id); 198 $qb->add_constraint('name', '=', '__schemadb'); 199 200 $schema = $qb->execute(); 201 202 if (count($schema) > 0) 203 { 204 return $schema[0]; 205 } 206 else 207 { 208 return false; 209 } 210 } 211 193 212 /** 194 213 * Selects a template … … 245 264 $session->set("midgard_admin_sitewizard_{$this->_request_data['sitegroup']->id}", $host_settings); 246 265 247 $qb = midcom_db_element::new_query_builder(); 248 $qb->add_constraint('sitegroup', '=', 0); 249 $qb->add_constraint('style', '=', $template_style_obj[0]->id); 250 $qb->add_constraint('name', '=', '__schemadb'); 251 252 $schema = $qb->execute(); 253 254 if (count($schema) > 0) 266 $schema = $this->_is_customizable($template_style_obj[0]); 267 268 if ($schema) 255 269 { 256 270 $host_settings['template_type'] = "advanced"; 257 $host_settings['template_schemadb'] = $schema [0];271 $host_settings['template_schemadb'] = $schema; 258 272 } 259 273 else … … 279 293 $qb->add_constraint('up', '=', 0); 280 294 // TODO: Check for sitegroups? 281 $this->_request_data['templates'] = $qb->execute(); 295 $templates = $qb->execute(); 296 297 foreach($templates as $template) 298 { 299 if ($this->_is_customizable($template) && $this->_config->get('mode') == 'simple') 300 { 301 continue; 302 } 303 304 $this->_request_data['templates'][] = $template; 305 } 282 306 283 307 return true; … … 396 420 // The document has been saved, relocate the user 397 421 debug_pop(); 398 $_MIDCOM->relocate("{$prefix}finish/{$this->_host->id}/");422 //$_MIDCOM->relocate("{$prefix}finish/{$this->_host->id}/"); 399 423 // This will exit 400 424 break; … … 402 426 // User has cancelled without saving 403 427 debug_pop(); 404 $_MIDCOM->relocate("{$prefix}finish/{$this->_host->id}/");428 //$_MIDCOM->relocate("{$prefix}finish/{$this->_host->id}/"); 405 429 // This will exit 406 430 break; … … 412 436 } 413 437 438 if (array_key_exists('midgard_admin_sitewizard_process', $_POST)) 439 { 440 $_MIDCOM->relocate("{$prefix}finish/{$this->_host->id}/"); 441 } 442 443 $this->_request_data['host'] =& $this->_host; 414 444 $this->_request_data['controller'] =& $this->_controller; 415 445 branches/MidCOM_2_8/midgard.admin.sitewizard/style/wizard-create-host.php
r11351 r11627 95 95 96 96 <?php 97 if ( !$data['config']->get('mode') == 'advanced')97 if ($data['config']->get('mode') != 'advanced') 98 98 { 99 99 ?> branches/MidCOM_2_8/midgard.admin.sitewizard/style/wizard-select-style.php
r11345 r11627 47 47 48 48 // template preview thumbnail 49 $template_image = $template->getattachment('__preview. jpg');49 $template_image = $template->getattachment('__preview.png'); 50 50 if ($template_image) 51 51 { … … 54 54 else 55 55 { 56 $template_image_url = MIDCOM_STATIC_URL."/midgard.admin.sitewizard/no-style-preview.jpg";56 //$template_image_url = MIDCOM_STATIC_URL."/midgard.admin.sitewizard/no-style-preview.jpg"; 57 57 } 58 59 $template_image_url = MIDCOM_STATIC_URL."/midgard.admin.sitewizard/{$template_name}.png"; 60 58 61 ?> 59 62 <fieldset class="style">
