| 1 | <?php use_helper('I18N') ?> |
|---|
| 2 | <?php if ($editable): ?> |
|---|
| 3 | <?php // Normally we have an editor inline in the page, but in this ?> |
|---|
| 4 | <?php // case we'd rather use the picker built into the media plugin. ?> |
|---|
| 5 | <?php // So we link to the media picker and specify an 'after' URL that ?> |
|---|
| 6 | <?php // points to our slot's edit action. Setting the ajax parameter ?> |
|---|
| 7 | <?php // to false causes the edit action to redirect to the newly ?> |
|---|
| 8 | <?php // updated page. ?> |
|---|
| 9 | |
|---|
| 10 | <?php slot("a-slot-controls-$pageid-$name-$permid") ?> |
|---|
| 11 | <li class="a-controls-item choose-images"> |
|---|
| 12 | <?php echo link_to(__('Choose images', null, 'apostrophe'), |
|---|
| 13 | 'aMedia/select', |
|---|
| 14 | array( |
|---|
| 15 | 'query_string' => |
|---|
| 16 | http_build_query( |
|---|
| 17 | array_merge( |
|---|
| 18 | $options['constraints'], |
|---|
| 19 | array("multiple" => true, |
|---|
| 20 | "aMediaIds" => implode(",", $itemIds), |
|---|
| 21 | "type" => "image", |
|---|
| 22 | "label" => __("Create a Slideshow", null, 'apostrophe'), |
|---|
| 23 | "after" => url_for("aSlideshowSlot/edit") . "?" . |
|---|
| 24 | http_build_query( |
|---|
| 25 | array( |
|---|
| 26 | "slot" => $name, |
|---|
| 27 | "slug" => $slug, |
|---|
| 28 | "permid" => $permid, |
|---|
| 29 | "actual_slug" => aTools::getRealPage()->getSlug(), |
|---|
| 30 | "noajax" => 1))))), |
|---|
| 31 | 'class' => 'a-btn icon a-media')) ?> |
|---|
| 32 | </li> |
|---|
| 33 | |
|---|
| 34 | <?php include_partial('a/variant', array('pageid' => $pageid, 'name' => $name, 'permid' => $permid, 'slot' => $slot)) ?> |
|---|
| 35 | |
|---|
| 36 | <?php end_slot() ?> |
|---|
| 37 | |
|---|
| 38 | <?php endif ?> |
|---|
| 39 | |
|---|
| 40 | <?php if (count($items)): ?> |
|---|
| 41 | <?php include_component('aSlideshowSlot', 'slideshow', array('items' => $items, 'id' => $id, 'options' => $options)) ?> |
|---|
| 42 | <?php else: ?> |
|---|
| 43 | |
|---|
| 44 | <?php (isset($options['width']))? $style = 'width:' . $options['width'] .'px;': $style = 'width:100%;'; ?> |
|---|
| 45 | <?php (isset($options['height']))? $height = $options['height'] : $height = (($options['width'])? floor($options['width']*.56):'100'); ?> |
|---|
| 46 | <?php $style .= 'height:'.$height.'px;' ?> |
|---|
| 47 | |
|---|
| 48 | <div class="a-slideshow-placeholder" style="<?php echo $style ?>"> |
|---|
| 49 | <span style="line-height:<?php echo $height ?>px;"><?php echo __("Create a Slideshow", null, 'apostrophe') ?></span> |
|---|
| 50 | </div> |
|---|
| 51 | <?php endif ?> |
|---|
| 52 | |
|---|