Ejemplo n.º 1
0
 /**
  * Print out the displayType options
  * 
  * @param object SiteComponent $siteComponent
  * @param object WizardStep $step
  * @return null
  * @access protected
  * @since 5/12/08
  */
 protected function printDisplayType(SiteComponent $siteComponent, WizardStep $step)
 {
     $property = $step->addComponent('displayType', new WSelectList());
     $property->setValue($siteComponent->getDisplayType());
     $property->addOption('Block_Standard', _('Standard Block'));
     $property->addOption('Block_Sidebar', _('Sidebar Block'));
     $property->addOption('Block_Alert', _('Alert Block'));
     $property->addOption('Header', _('Header'));
     $property->addOption('Footer', _('Footer'));
     print "\n\t\t\t\t<p style='white-space: nowrap; font-weight: bold;'>";
     print "\n\t\t\t\t\t" . _('Look and feel of this content block: ') . "[[displayType]]";
     print "\n\t\t\t\t</p>";
     $property = $step->addComponent('headingDisplayType', new WSelectList());
     $property->setValue($siteComponent->getHeadingDisplayType());
     $property->addOption('Heading_1', _('Heading - Biggest'));
     $property->addOption('Heading_2', _('Heading - Big'));
     $property->addOption('Heading_3', _('Heading - Normal'));
     $property->addOption('Heading_Sidebar', _('Heading - For Sidebar'));
     print "\n\t\t\t\t<p style='white-space: nowrap; font-weight: bold;'>";
     print "\n\t\t\t\t\t" . _('Look and feel of this content block\'s heading: ') . "[[headingDisplayType]]";
     print "\n\t\t\t\t</p>";
 }
 /**
  * Apply the block style.
  * 
  * @param SiteComponent $siteComponent
  * @return void
  * @access public
  * @since 6/4/08
  */
 public function applyBlockDisplayType(SiteComponent $siteComponent)
 {
     if (RequestContext::value('displayType') && RequestContext::value('displayType') !== $siteComponent->getDisplayType()) {
         $siteComponent->setDisplayType(RequestContext::value('displayType'));
     }
 }
Ejemplo n.º 3
0
 /**
  * Print out the displayType options
  * 
  * @param object SiteComponent $siteComponent
  * @param object WizardStep $step
  * @return null
  * @access protected
  * @since 5/12/08
  */
 protected function printDisplayType(SiteComponent $siteComponent, WizardStep $step)
 {
     $property = $step->addComponent('displayType', new WSelectList());
     $property->setValue($siteComponent->getDisplayType());
     $property->addOption('Menu_Left', _('Menu on the Left'));
     $property->addOption('Menu_Right', _('Menu on the Right'));
     $property->addOption('Menu_Top', _('Menu on the Top'));
     $property->addOption('Menu_Bottom', _('Menu on the Bottom'));
     print "\n\t\t\t\t<p style='white-space: nowrap; font-weight: bold;'>";
     print "\n\t\t\t\t\t" . _('Where is this menu positioned? ') . "[[displayType]]";
     print "\n\t\t\t\t</p>";
 }
Ejemplo n.º 4
0
 /**
  * Print block style options
  * 
  * @param SiteComponent $siteComponent
  * @return void
  * @access public
  * @since 6/04/08
  */
 function printBlockStyleOptions(SiteComponent $siteComponent)
 {
     print "\n\t\t\t\t<tr><td class='ui2_settingborder'>";
     print "\n\t\t\t\t<div class='ui2_settingtitle'>";
     print _('Block Style: ') . "\n\t\t\t\t</div>";
     print "\n\t\t\t\t</td><td class='ui2_settingborder'>";
     $authZ = Services::getService("AuthZ");
     $idManager = Services::getService("Id");
     if ($authZ->isUserAuthorized($idManager->getId("edu.middlebury.authorization.modify"), $siteComponent->getQualifierId())) {
         $canEdit = true;
     } else {
         $canEdit = false;
     }
     $methods = array('Block_Standard' => _('Standard Block'), 'Block_Sidebar' => _('Sidebar Block'), 'Block_Alert' => _('Alert Block'), 'Header' => _('Header'), 'Footer' => _('Footer'));
     print "\n\t\t\t\t\t<select class='ui2_field'";
     print $canEdit ? "" : " disabled='disabled'";
     print " name='" . RequestContext::name('displayType') . "'>";
     foreach ($methods as $method => $display) {
         print "\n\t\t\t\t\t\t<option value='" . $method . "'";
         if ($siteComponent->getDisplayType() === $method) {
             print " selected='selected'";
         }
         print ">";
         print $display;
         print "</option>";
     }
     print "\n\t\t\t\t\t</select><br/> ";
     print "\n\t\t\t\t</td></tr>";
 }