コード例 #1
0
ファイル: _normalView.php プロジェクト: hashir/UoA
<?php

// Compatible with sf_escaping_strategy: true
$editable = isset($editable) ? $sf_data->getRaw('editable') : null;
$feed = isset($feed) ? $sf_data->getRaw('feed') : null;
$invalid = isset($invalid) ? $sf_data->getRaw('invalid') : null;
$name = isset($name) ? $sf_data->getRaw('name') : null;
$pageid = isset($pageid) ? $sf_data->getRaw('pageid') : null;
$permid = isset($permid) ? $sf_data->getRaw('permid') : null;
$options = isset($options) ? $sf_data->getRaw('options') : null;
$slot = isset($slot) ? $sf_data->getRaw('slot') : null;
$url = isset($url) ? $sf_data->getRaw('url') : null;
use_helper('a');
if ($editable) {
    include_partial('a/simpleEditWithVariants', array('name' => $name, 'permid' => $permid, 'pageid' => $pageid, 'slot' => $slot, 'label' => a_get_option($options, 'editLabel', a_('Edit'))));
}
if (!isset($url)) {
    ?>
  <p class="aFeedSelect"><?php 
    echo __('Click Edit to select a feed URL.', null, 'apostrophe');
    ?>
</p>
<?php 
} elseif ($invalid) {
    ?>
  <?php 
    include_partial('aFeedSlot/invalid');
} else {
    ?>
  <ul class="a-feed">
    <?php 
コード例 #2
0
ファイル: _post.php プロジェクト: hashir/UoA
<?php

// Compatible with sf_escaping_strategy: true
$aBlogItem = isset($aBlogItem) ? $sf_data->getRaw('aBlogItem') : null;
$options = isset($options) ? $sf_data->getRaw('options') : null;
$full = a_get_option($options, 'full', false);
$template = a_get_option($options, 'template', $aBlogItem['template']);
$subtemplate = a_get_option($options, 'subtemplate', 'slot');
$templateOptionsAll = a_get_option($options, 'template_options', array());
$templateOptions = a_get_option($templateOptionsAll, $template, array());
$subtemplate = a_get_option($templateOptions, 'subtemplate', $subtemplate);
if ($full) {
    ?>
	<?php 
    $suffix = '';
} else {
    ?>
	<?php 
    $suffix = '_' . $subtemplate;
}
// Allows styling based on whether there is media in the post,
// the blog template, and the subtemplate
?>
<div id="a-blog-item-<?php 
echo $name;
?>
-<?php 
echo $permid;
?>
-<?php 
echo $aBlogItem->getId();
コード例 #3
0
ファイル: _normalView.php プロジェクト: hashir/UoA
 <?php 
    // to false causes the edit action to redirect to the newly
    ?>
 <?php 
    // updated page.
    ?>

 <?php 
    slot("a-slot-controls-{$pageid}-{$name}-{$permid}");
    ?>
   <li class="a-controls-item choose-images">
     <?php 
    aRouteTools::pushTargetEngineSlug('/admin/media', 'aMedia');
    ?>
     <?php 
    echo link_to('<span class="icon"></span>' . a_get_option($options, 'chooseLabel', a_('Choose Images')), 'aMedia/select', array('query_string' => http_build_query(array_merge($options['constraints'], array("multiple" => true, "aMediaIds" => implode(",", $itemIds), "type" => "image", "label" => a_get_option($options, 'browseLabel', a_('You are creating a slideshow of images.')), "after" => url_for("aSlideshowSlot/edit") . "?" . http_build_query(array("slot" => $name, "slug" => $slug, "permid" => $permid, "noajax" => 1))))), 'class' => 'a-btn icon a-media a-inject-actual-url'));
    ?>
     <?php 
    aRouteTools::popTargetEnginePage('aMedia');
    ?>
   </li>

   <?php 
    include_partial('a/variant', array('pageid' => $pageid, 'name' => $name, 'permid' => $permid, 'slot' => $slot));
    ?>

 <?php 
    end_slot();
    ?>

<?php 
コード例 #4
0
ファイル: _normalView.php プロジェクト: hashir/UoA
  <?php 
    // Very short labels so sidebar slots don't have wrap in their controls.
    ?>
  <?php 
    // That spoils assumptions that are being made elsewhere that they will
    ?>
  <?php 
    // amount to only one row. TODO: find a less breakage-prone solution to that problem.
    ?>

  <?php 
    slot("a-slot-controls-{$pageid}-{$name}-{$permid}");
    ?>
	    <?php 
    include_partial('aImageSlot/choose', array('action' => 'aVideoSlot/edit', 'buttonLabel' => a_get_option($options, 'chooseLabel', a_('Choose Video')), 'label' => a_get_option($options, 'browseLabel', a_('Select a Video')), 'class' => 'a-btn icon a-media', 'type' => 'video', 'constraints' => $constraints, 'itemId' => $itemId, 'name' => $name, 'slug' => $slug, 'permid' => $permid));
    ?>
			<?php 
    include_partial('a/variant', array('pageid' => $pageid, 'name' => $name, 'permid' => $permid, 'slot' => $slot));
    ?>
	
  <?php 
    end_slot();
    ?>

<?php 
}
?>

<?php 
if (!$item) {
コード例 #5
0
ファイル: _area.php プロジェクト: hashir/UoA
					<?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));
                ?>
				<?php 
            } else {
                ?>
	      	<?php 
                include_partial('a/addSlot', array('id' => $page->id, 'name' => $name, 'options' => $options, 'slotTypesInfo' => $slotTypesInfo, 'singleSlot' => true, 'areaLabel' => a_get_option($options, 'areaLabel', null)));
                ?>
				<?php 
            }
            ?>

			</li>	
			<?php 
            if ($options['history']) {
                ?>
				<?php 
                include_slot('a-history-controls');
                ?>
				
			<?php 
            }
コード例 #6
0
ファイル: _slideshowItemCompact.php プロジェクト: hashir/UoA
<?php

use_helper('a');
$options = $sf_data->getRaw('options');
$embed = $sf_data->getRaw('embed');
$item = $sf_data->getRaw('item');
$imgsrc = $item->getImgSrcUrl(a_get_option($options, 'width', false), a_get_option($options, 'height', false), a_get_option($options, 'resizeType', 's'), a_get_option($options, 'format', 'jpg'), false);
?>
			

<ul>
  <li class="a-slideshow-image" style="background-image:url(<?php 
echo $imgsrc;
?>
);<?php 
echo $n == 0 ? 'display:block' : '';
?>
"><?php 
echo $embed;
?>
</li>
  <?php 
if ($options['title'] && strlen($item->title)) {
    ?>
    <li class="a-slideshow-meta a-slideshow-title">
			<span><?php 
    echo $item->title;
    ?>
</span>
		</li>
  <?php 
コード例 #7
0
ファイル: _browser.php プロジェクト: hashir/UoA
    $typesInfo = aMediaTools::getOption('types');
    ?>
					<?php 
    foreach ($typesInfo as $typeName => $typeInfo) {
        ?>
					  <?php 
        // If a metatype such as _downloadable or _embeddable is in force show only types that support it
        ?>
					  <?php 
        $metatype = aMediaTools::getMetatype();
        ?>
					  <?php 
        if ($metatype) {
            ?>
					    <?php 
            if (!a_get_option($typeInfo, substr($metatype, 1), false)) {
                ?>
					      <?php 
                continue;
                ?>
					    <?php 
            }
            ?>
					  <?php 
        }
        ?>
	  				<div class="a-filter-option">
							<?php 
        $selected_type = $typeName == $type ? $selected : array();
        ?>
	  					<?php 
コード例 #8
0
ファイル: _normalView.php プロジェクト: hashir/UoA
  <?php 
    // Very short labels so sidebar slots don't have wrap in their controls.
    ?>
  <?php 
    // That spoils assumptions that are being made elsewhere that they will
    ?>
  <?php 
    // amount to only one row. TODO: find a less breakage-prone solution to that problem.
    ?>

	<?php 
    slot("a-slot-controls-{$pageid}-{$name}-{$permid}");
    ?>
		  <?php 
    include_partial('aImageSlot/choose', array('action' => 'aFileSlot/edit', 'buttonLabel' => a_get_option($options, 'chooseLabel', a_('Choose File')), 'label' => a_get_option($options, 'browseLabel', a_('Select a File')), 'type' => '_downloadable', 'class' => 'a-btn icon a-file', 'downloadable' => '1', 'itemId' => $itemId, 'name' => $name, 'slug' => $slug, 'permid' => $permid));
    ?>
			<?php 
    include_partial('a/variant', array('pageid' => $pageid, 'name' => $name, 'permid' => $permid, 'slot' => $slot));
    ?>
	
	<?php 
    end_slot();
    ?>
	
<?php 
}
?>

<?php 
if ($item) {
コード例 #9
0
ファイル: _normalView.php プロジェクト: hashir/UoA
  <?php 
    // updated page.
    ?>
  <?php 
    // Wrap controls in a slot to be inserted in a slightly different
    ?>
  <?php 
    // context by the _area.php template
    ?>

<?php 
    slot("a-slot-controls-{$pageid}-{$name}-{$permid}");
    ?>
	<li class="a-ui a-controls-item choose-audio">
	  <?php 
    include_partial('aImageSlot/choose', array('action' => 'aAudioSlot/edit', 'buttonLabel' => a_get_option($options, 'chooseLabel', a_('Choose Audio File')), 'label' => a_get_option($options, 'browseLabel', a_('Select an Audio File')), 'class' => 'a-btn icon a-audio', 'type' => 'audio', 'itemId' => $itemId, 'name' => $name, 'slug' => $slug, 'permid' => $permid));
    ?>
	</li>
		<?php 
    include_partial('a/variant', array('pageid' => $pageid, 'name' => $name, 'permid' => $permid, 'slot' => $slot));
    ?>
	
<?php 
    end_slot();
}
?>

<?php 
$uniqueID = $pageid . '-' . $name . '-' . $permid;
?>
コード例 #10
0
ファイル: _normalView.php プロジェクト: hashir/UoA
  <?php 
    // Very short labels so sidebar slots don't have wrap in their controls.
    ?>
  <?php 
    // That spoils assumptions that are being made elsewhere that they will
    ?>
  <?php 
    // amount to only one row. TODO: find a less breakage-prone solution to that problem.
    ?>

	<?php 
    slot("a-slot-controls-{$pageid}-{$name}-{$permid}");
    ?>
		  <?php 
    include_partial('aImageSlot/choose', array('action' => 'aPDFSlot/edit', 'chooseLabel' => a_get_option($options, 'chooseLabel', a_('Choose PDF')), 'label' => a_get_option($options, 'browseLabel', a_('Select a PDF File')), 'class' => 'a-btn icon a-pdf', 'type' => 'pdf', 'constraints' => $constraints, 'itemId' => $itemId, 'name' => $name, 'slug' => $slug, 'permid' => $permid));
    ?>
			<?php 
    include_partial('a/variant', array('pageid' => $pageid, 'name' => $name, 'permid' => $permid, 'slot' => $slot));
    ?>
	
	<?php 
    end_slot();
    ?>
	
<?php 
}
?>

<?php 
if ($item) {