Exemplo n.º 1
0
Arquivo: _area.php Projeto: hashir/UoA
    <?php 
        if ($infinite) {
            ?>

		<ul class="a-ui a-controls a-area-controls clearfix">

		<?php 
            # Slot Controls
            ?>
			<li>

				<?php 
            $addslot_button_style = sfConfig::get('app_a_addslot_button_style', 'big');
            ?>
				<?php 
            $slotTypesInfo = aTools::getSlotTypesInfo($options);
            ?>

				<?php 
            if (count($slotTypesInfo) > 1) {
                ?>
					<?php 
                echo a_js_button(a_get_option($options, 'areaLabel', a_('Add Content')), array('a-add', 'a-add-slot', 'icon', 'big'), 'a-add-slot-' . $pageid . '-' . $name);
                ?>
					<ul class="a-ui a-options a-area-options dropshadow">
		      	<?php 
                include_partial('a/addSlot', array('id' => $page->id, 'name' => $name, 'options' => $options, 'slotTypesInfo' => $slotTypesInfo));
                ?>
					</ul>
					<?php 
                a_js_call('apostrophe.menuToggle(?)', array('button' => '#a-add-slot-' . $pageid . '-' . $name, 'classname' => 'a-options-open', 'overlay' => false));
Exemplo n.º 2
0
 /**
  * DOCUMENT ME
  * @param sfWebRequest $request
  */
 public function executeAddSlot(sfWebRequest $request)
 {
     $page = $this->retrievePageForAreaEditing();
     aTools::setCurrentPage($page);
     $this->type = $this->getRequestParameter('type');
     $this->options = aTools::getAreaOptions($page->id, $this->name);
     aTools::setRealUrl($request->getParameter('actual_url'));
     if (!in_array($this->type, array_keys(aTools::getSlotTypesInfo($this->options)))) {
         $this->forward404();
     }
 }
Exemplo n.º 3
0
<?php

// Compatible with sf_escaping_strategy: true
$id = isset($id) ? $sf_data->getRaw('id') : null;
$name = isset($name) ? $sf_data->getRaw('name') : null;
$options = isset($options) ? $sf_data->getRaw('options') : null;
$areaLabel = isset($areaLabel) ? $sf_data->getRaw('areaLabel') : null;
$singleSlot = isset($singleSlot) ? $sf_data->getRaw('singleSlot') : null;
$slotTypesInfo = isset($slotTypesInfo) ? $sf_data->getRaw('slotTypesInfo') : aTools::getSlotTypesInfo($options);
use_helper('a');
?>

<?php 
foreach ($slotTypesInfo as $type => $info) {
    ?>

	<?php 
    if (!$singleSlot) {
        ?>
		<li class="a-options-item">
	<?php 
    }
    ?>

		<?php 
    $label = $info['label'];
    ?>
		<?php 
    if ($singleSlot) {
        ?>
			<?php