예제 #1
0
 /**
  * Answer the plugin content for a block
  * 
  * @param object BlockSiteComponent $block
  * @return string
  * @access public
  * @since 1/7/08
  */
 function getPluginContent($block)
 {
     if ($block->getId() != $this->_node->getId()) {
         return parent::getPluginContent($block);
     }
     $harmoni = Harmoni::instance();
     $pluginManager = Services::getService('PluginManager');
     $plugin = $pluginManager->getPlugin($block->getAsset());
     ob_start();
     print "\n<form action='" . SiteDispatcher::quickURL('versioning', 'compare_versions', array('node' => SiteDispatcher::getCurrentNodeId())) . "' method='post'>";
     print "\n\t<div style='float: right;'>";
     print "\n\t<input type='submit' value='" . _("Compare Selected Revisions &raquo;") . "'";
     if (count($plugin->getVersions()) <= 1) {
         print " disabled='disabled'";
     }
     print "/>";
     print "\n\t</div>";
     print "\n\t<div style='float: left;'>\n\t\t<a href='" . $harmoni->history->getReturnURL('view_history_' . $block->getId()) . "'>";
     print "\n\t\t\t<input type='button' value='" . _("&laquo; Go Back") . "'/>\n\t\t</a>\n\t</div>";
     print "\n\t\t<input type='hidden' name='module' value='versioning'/>";
     print "\n\t<input type='hidden' name='action' value='compare_versions'/>";
     print "\n\t<input type='hidden' name='node' value='" . SiteDispatcher::getCurrentNodeId() . "'/>";
     print $this->getVersionTable($plugin);
     print "\n</form>";
     print $this->getVersionChoiceJS();
     return ob_get_clean();
 }
 /**
  * Visit a menu organizer and return the menu GUI component that corresponds
  * to it.
  * 
  * @param object MenuOrganizerSiteComponent
  * @return object Component
  * @access public
  * @since 1/15/07
  */
 public function visitFlowOrganizer(FlowOrganizerSiteComponent $organizer)
 {
     if ($this->editModeVisitor->isHeaderOrFooter($organizer)) {
         return $organizer->acceptVisitor($this->editModeVisitor);
     } else {
         return parent::visitFlowOrganizer($organizer);
     }
 }