/** * Get the navigation links for given sfDoctrinePager instance * * @param sfDoctrinePager $pager * @param string $uri The uri to prefix to the links * @return string $html */ function get_sympal_pager_navigation($pager, $uri, $requestKey = 'page') { sympal_use_stylesheet('/sfSympalPlugin/css/pager.css'); $navigation = '<div class="sympal_pager_navigation">'; if ($pager->haveToPaginate()) { $uri .= (preg_match('/\\?/', $uri) ? '&' : '?') . $requestKey . '='; // First and previous page if ($pager->getPage() != 1) { $navigation .= link_to(image_tag('/sf/sf_admin/images/first.png', 'align=absmiddle'), $uri . '1'); $navigation .= link_to(image_tag('/sf/sf_admin/images/previous.png', 'align=absmiddle'), $uri . $pager->getPreviousPage()) . ' '; } // Pages one by one $links = array(); foreach ($pager->getLinks() as $page) { $links[] = '<span>' . link_to_unless($page == $pager->getPage(), $page, $uri . $page) . '</span>'; } $navigation .= join(' ', $links); // Next and last page if ($pager->getPage() != $pager->getLastPage()) { $navigation .= ' ' . link_to(image_tag('/sf/sf_admin/images/next.png', 'align=absmiddle'), $uri . $pager->getNextPage()); $navigation .= link_to(image_tag('/sf/sf_admin/images/last.png', 'align=absmiddle'), $uri . $pager->getLastPage()); } } $navigation .= '</div>'; return $navigation; }
<?php sympal_use_javascript('jquery.js'); sympal_use_javascript('jquery.ui.js'); sympal_use_stylesheet('/sfSympalAdminPlugin/css/nested_sortable/nestedsortablewidget.css'); sympal_use_javascript('/sfSympalAdminPlugin/js/nested_sortable/interface.js'); sympal_use_javascript('/sfSympalAdminPlugin/js/nested_sortable/inestedsortable.pack.js'); sympal_use_javascript('/sfSympalAdminPlugin/js/nested_sortable/jquery.nestedsortablewidget.pack.js'); ?> <?php echo button_to(__('Back to list', array(), 'sf_admin'), '@' . $sf_context->getRouting()->getCurrentRouteName()); ?> <h1><?php echo $title = __('Adjust Order'); ?> </h1> <?php $sf_response->setTitle($title); ?> <?php foreach ($pager->getResults() as $result) { ?> <?php if ($result->getNode()->isRoot()) { ?>
<?php sympal_use_stylesheet('/sfSympalAdminPlugin/admin/css/default.css', 'last'); ?>
<?php sympal_use_stylesheet('/sfSympalAdminPlugin/css/dashboard.css'); ?> <div id="sf_admin_container"> <div id="sympal-dashboard"> <h1>Add new content</h1> <ul class="new-content-type"> <?php $i = 0; ?> <?php foreach ($contentTypes as $contentType) { ?> <li<?php echo fmod($i++, 3) == 0 ? ' style="clear: left;"' : ''; ?> > <a href="<?php echo url_for('@sympal_content_create_type?type=' . $contentType->id); ?> " title="Create new <?php echo $contentType->label; ?> "> <?php echo $contentType->label; ?>
<?php sympal_use_stylesheet('/sfSympalUpgradePlugin/css/upgrade.css'); ?> <?php if ($hasNewVersion) { ?> <h1>Upgrade to <?php echo $latestVersion; ?> </h1> <div class="sympal_new_version_box"> A new version of Sympal was detected! Read below for directions on how to upgrade from your current version of <?php echo $currentVersion; ?> to <?php echo $latestVersion; ?> . </div> <?php echo sfSympalMarkdownRenderer::convertToHtml("\n\nYour installation of `sfSympalPlugin` can be found here:\n\n " . ($rootDir = $sf_context->getConfiguration()->getPluginConfiguration('sfSympalPlugin')->getRootDir()) . "\n\nTo begin the upgrade, we need to first change to the directory where `sfSympalPlugin` is located:\n\n \$ " . $commands['cd'] . "\n\nBefore upgrading to {$latestVersion} lets move the current version to a backup location:\n\n \$ " . $commands['backup'] . "\n\nNow checkout the code for {$latestVersion}:\n\n \$ " . $commands['download'] . "\n\nOnce we've done that we need to clear our cache and run the `sympal:upgrade` task:\n\n \$ cd " . sfConfig::get('sf_root_dir') . "\n \$ php symfony cc\n \$ php symfony sympal:upgrade\n\nThe above executed tasks can be automated by Sympal for you if you wish. We show you\nthe individual steps to help you get a better understanding of what Sympal will be\ndoing to upgrade your version of Sympal!\n\nTo check if a new version exists on the web use the `--download-new` option. It will\nupgrade the Sympal source code to the latest version then run any new available\nupgrade tasks.\n\n \$ php symfony sympal:upgrade --download-new\n\n"); ?> <p> You can also run the upgrade process directly from this page! Click <?php
<?php if ($helper->isNestedSet() && $sf_request->getParameter('order')) { ?> <?php include_partial('nested_sortable_index', array('pager' => $pager)); } else { ?> <?php sympal_use_stylesheet('/sfSympalMenuPlugin/css/jQuery.treeTable.css', 'first'); ?> <?php sympal_use_stylesheet('/sfSympalMenuPlugin/css/table.css', 'first'); ?> <?php sympal_use_javascript('/sfSympalMenuPlugin/js/jquery.min-1.2.6.js', 'last'); ?> <?php sympal_use_javascript('/sfSympalMenuPlugin/js/jquery-ui.min-1.5.3.js', 'last'); ?> <?php sympal_use_javascript('/sfSympalMenuPlugin/js/jquery.treeTable.min.js', 'last'); ?> <?php
<?php sympal_use_jquery(); sympal_use_javascript('/sfSympalPlugin/fancybox/jquery.fancybox.js'); sympal_use_stylesheet('/sfSympalPlugin/fancybox/jquery.fancybox.css'); ?> <?php sympal_use_stylesheet('/sfSympalAssetsPlugin/css/assets.css'); sympal_use_javascript('/sfSympalAssetsPlugin/js/assets.js'); ?> <?php use_helper('I18N'); ?> <h1><?php echo __('Sympal Assets Manager'); ?> </h1> <?php echo get_sympal_breadcrumbs(array('Dashboard' => '@sympal_dashboard', 'Assets' => '@sympal_Assets')); ?> <p><?php echo __('Manage your Sympal project assets below! An asset in Sympal is any type of file from a PDF document to an image or a video. Upload new assets, create directories to store your assets, rename and move your assets and embed or link to them in your content.'); ?>
<?php sympal_use_stylesheet('/sfSympalPlugin/css/sympal', 'first'); ?> <?php echo image_tag('/sfSympalPlugin/images/header_logo.gif'); ?> <h1>Install Sympal Now!</h1> <?php echo $form->renderFormTag(url_for('@sympal_install_run'), array('sf_method' => 'post')); ?> <?php echo $form->renderHiddenFields(); ?> <div id="user"> <h2>Setup your First User</h2> <table> <?php echo $form['user']; ?> </table> </div> <div id="database"> <h2>Configure your Database</h2>
?> <?php } ?> <?php } ?> <?php $subMenu = get_sympal_menu(sfSympalContext::getInstance()->getCurrentMenuItem(), true); ?> <?php if (has_slot('sympal_right_sidebar') || $subMenu) { ?> <?php sympal_use_stylesheet('/sfSympalPlugin/css/right.css', 'last'); ?> <?php } ?> <?php include_http_metas(); ?> <?php include_metas(); ?> <?php include_title(); ?> <?php
<?php sympal_use_javascript('jquery.js'); sympal_use_javascript('jquery.form.js'); sympal_use_stylesheet('ask_confirmation.css'); ?> <?php if ($isAjax) { ?> <script type="text/javascript"> $(function() { var updateId = $('#sympal_ask_confirmation').parent('div, span').attr('id'); $('#sympal_ask_confirmation form').ajaxForm({ target: '#' + updateId }); }); </script> <?php } ?> <div id="sympal_ask_confirmation"> <h2><?php echo __($title); ?> </h2> <p><?php echo htmlspecialchars_decode(__($message)); ?>
echo image_tag($asset->getOriginal()->getUrl(), array('id' => 'jcrop_target')); ?> </p> <input type="button" id="sympal_save_crop" value="<?php echo __('Save Crop'); ?> " /> <?php sympal_use_jquery(); ?> <?php sympal_use_javascript('/sfSympalPlugin/js/jquery.Jcrop.js'); ?> <?php sympal_use_stylesheet('/sfSympalPlugin/css/jquery.Jcrop.css'); ?> <script type="text/javascript"> $(function() { var url; $('#jcrop_target').Jcrop({ onChange: sympalSaveImageCrop }); $('#sympal_save_crop').click(function() { <?php if ($isAjax) { ?> $('#sympal_assets_container').load(url); <?php } else {
<?php sympal_use_stylesheet('/sfSympalPlugin/css/exception.css'); ?> <div class="sympal_exception"> <h2><?php echo get_class($e); ?> : <?php echo $e->getMessage(); ?> </h2> <?php $lines = explode("\n", $e->getTraceAsString()); ?> <ul> <?php foreach ($lines as $line) { ?> <li><?php echo $line; ?> </li> <?php } ?> </ul> </div>
<?php use_stylesheets_for_form($form); use_javascripts_for_form($form); ?> <?php sympal_use_stylesheet('/sfSympalPlugin/css/admin/sympal_content.css', 'last'); ?> <div class="sf_admin_form"> <?php echo form_tag_for($form, '@sympal_content'); ?> <?php echo $form->renderHiddenFields(false); ?> <?php if ($form->hasGlobalErrors()) { ?> <?php echo $form->renderGlobalErrors(); ?> <?php } ?> <?php foreach ($configuration->getFormFields($form, $form->isNew() ? 'new' : 'edit') as $fieldset => $fields) { ?>
/** * Returns the slot in its rendered form, which takes into consideration * a possible template for rendering */ protected function _getRenderedSlot() { $value = $this->_slot->render(); // render any "view" stylesheets $stylesheets = $this->getOption('stylesheets'); if ($stylesheets) { foreach ($stylesheets as $stylesheet) { sympal_use_stylesheet($stylesheet); } } /* * Set the Content record on the inline object parser so that any inline * doctrine objects try to retrieve those objects off of relationships */ $inlineObjectParser = $this->_configuration->getProjectConfiguration()->getPluginConfiguration('sfInlineObjectPlugin')->getParser(); $inlineObjectParser->setDoctrineRecord($this->_content); // Run the slot through its filters $value = $this->_configuration->getProjectConfiguration()->getPluginConfiguration('sfContentFilterPlugin')->getParser()->filter($value, $this->getOption('filters', array())); // Remove the Content record from the parser $inlineObjectParser->setDoctrineRecord(false); // If applicable, run the slot through a partial if ($this->getOption('template')) { $value = get_partial($this->getOption('template'), array('value' => $value, 'content' => $this->_content)); } return $value; }
<?php use_stylesheets_for_form($form); use_javascripts_for_form($form); ?> <?php sympal_use_stylesheet('/sfSympalAdminPlugin/css/content_admin.css', 'last'); ?> <div class="sf_admin_form"> <?php echo form_tag_for($form, '@sympal_content'); ?> <?php echo $form->renderHiddenFields(false); ?> <?php if ($form->hasGlobalErrors()) { ?> <?php echo $form->renderGlobalErrors(); ?> <?php } ?> <?php foreach ($configuration->getFormFields($form, $form->isNew() ? 'new' : 'edit') as $fieldset => $fields) { ?>
<?php } else { ?> Original image not found <?php } ?> <?php sympal_use_javascript('jquery.js'); ?> <?php sympal_use_javascript('jquery.Jcrop.js'); ?> <?php sympal_use_stylesheet('jquery.Jcrop.css'); ?> <script type="text/javascript"> $(function() { var url; $('#jcrop_target').Jcrop({ onChange: sympalSaveImageCrop }); $('#sympal_save_crop').click(function() { <?php if ($isAjax) { ?> $('#sympal_assets_container').load(url); <?php } else {