<?php // points to our slot's edit action. Setting the ajax parameter ?> <?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 echo link_to(__('Choose images', null, 'apostrophe'), 'aMedia/select', array('query_string' => http_build_query(array_merge($options['constraints'], array("multiple" => true, "aMediaIds" => implode(",", $itemIds), "type" => "image", "label" => __("Create a Slideshow", null, 'apostrophe'), "after" => url_for("aSlideshowSlot/edit") . "?" . http_build_query(array("slot" => $name, "slug" => $slug, "permid" => $permid, "actual_slug" => aTools::getRealPage()->getSlug(), 'actual_url' => aTools::getRealUrl(), "noajax" => 1))))), 'class' => 'a-btn icon a-media')); ?> </li> <?php include_partial('a/variant', array('pageid' => $pageid, 'name' => $name, 'permid' => $permid, 'slot' => $slot)); ?> <?php end_slot(); ?> <?php } ?>
<li> <?php // We want to eliminate jQuery helpers, but writing this link as raw HTML is tricky because ?> <?php // of the need to quote the title option right. And link_to doesn't like '#' as a URL. So we use ?> <?php // content_tag, Symfony's lower-level helper for outputting any tag and its content programmatically ?> <?php echo content_tag('a', '<span class="icon"></span>' . (isset($label) ? a_($label) : a_("Edit")), array('href' => '#edit-slot-' . $pageid . '-' . $name . '-' . $permid, 'id' => "a-slot-edit-{$pageid}-{$name}-{$permid}", 'class' => isset($class) ? $class : 'a-btn icon a-edit', 'title' => isset($title) ? $title : a_('Edit'))); ?> <?php a_js_call('apostrophe.slotEnableEditButton(?, ?, ?, ?, ?)', $pageid, $name, $permid, url_for($slot->type . 'Slot/ajaxEditView'), aTools::getRealUrl()); ?> </li> <?php if ($controlsSlot) { ?> <?php end_slot(); ?> <?php } } ?>
<?php // Make sure we target the administrative media engine page and not a public instance aRouteTools::pushTargetEnginePage('/admin/media'); $after = url_for($action) . "?" . http_build_query(array("slot" => $name, "slug" => $slug, "actual_slug" => aTools::getRealPage() ? aTools::getRealPage()->getSlug() : 'global', "actual_url" => aTools::getRealUrl(), "permid" => $permid, "noajax" => 1)); echo link_to($buttonLabel, 'aMedia/select', array('query_string' => http_build_query(array_merge($constraints, array("aMediaId" => $itemId, "type" => $type, "label" => $label, "after" => $after))), 'class' => $class)); aRouteTools::popTargetEnginePage('aMedia');