Fix dropdown menu

This commit is contained in:
Romain Neutron
2012-06-20 17:10:20 +02:00
parent c0174d4463
commit 7ad0a0cfcc
5 changed files with 24 additions and 11 deletions

View File

@@ -9,13 +9,18 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace KonsoleKommander;
/** /**
* *
* @package
* @package KonsoleKomander
* @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com * @link www.phraseanet.com
*/ */
use Alchemy\Phrasea\Core\Configuration;
use Alchemy\Phrasea\Core\Version;
use Alchemy\Phrasea\Command\UpgradeDBDatas;
use Alchemy\Phrasea\Command\RescanTechnicalDatas;
use Alchemy\Phrasea\Command\BuildMissingSubdefs;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
@@ -25,9 +30,9 @@ use Symfony\Component\Console\Application;
require_once dirname(__FILE__) . '/../lib/classes/bootstrap.class.php'; require_once dirname(__FILE__) . '/../lib/classes/bootstrap.class.php';
bootstrap::register_autoloads(); \bootstrap::register_autoloads();
$configuration = Alchemy\Phrasea\Core\Configuration::build(); $configuration = Configuration::build();
if ($configuration->isInstalled()) { if ($configuration->isInstalled()) {
require_once dirname(__FILE__) . '/../lib/bootstrap.php'; require_once dirname(__FILE__) . '/../lib/bootstrap.php';
} }
@@ -49,8 +54,7 @@ try {
This program comes with ABSOLUTELY NO WARRANTY. This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it This is free software, and you are welcome to redistribute it
under certain conditions; type `about:license' for details.\n\n" under certain conditions; type `about:license' for details.\n\n"
. ' KONSOLE KOMMANDER', \Alchemy\Phrasea\Core\Version::getName() . ' KONSOLE KOMMANDER', Version::getName() . ' ' . Version::getNumber());
. ' ' . \Alchemy\Phrasea\Core\Version::getNumber());
$app->add(new module_console_aboutAuthors('about:authors')); $app->add(new module_console_aboutAuthors('about:authors'));
$app->add(new module_console_aboutLicense('about:license')); $app->add(new module_console_aboutLicense('about:license'));
@@ -58,7 +62,7 @@ try {
$app->add(new module_console_checkExtension('check:extension')); $app->add(new module_console_checkExtension('check:extension'));
$app->add(new module_console_systemUpgrade('system:upgrade')); $app->add(new module_console_systemUpgrade('system:upgrade'));
$app->add(new \Alchemy\Phrasea\Command\UpgradeDBDatas('system:upgrade-datas')); $app->add(new UpgradeDBDatas('system:upgrade-datas'));
$app->add(new module_console_sphinxGenerateSuggestion('sphinx:generate-suggestions')); $app->add(new module_console_sphinxGenerateSuggestion('sphinx:generate-suggestions'));
@@ -84,8 +88,8 @@ try {
$app->add(new module_console_fieldsRename('fields:rename')); $app->add(new module_console_fieldsRename('fields:rename'));
$app->add(new module_console_fieldsMerge('fields:merge')); $app->add(new module_console_fieldsMerge('fields:merge'));
$app->add(new Alchemy\Phrasea\Command\RescanTechnicalDatas('records:rescan-technical-datas')); $app->add(new RescanTechnicalDatas('records:rescan-technical-datas'));
$app->add(new Alchemy\Phrasea\Command\BuildMissingSubdefs('records:build-missing-subdefs')); $app->add(new BuildMissingSubdefs('records:build-missing-subdefs'));
$result_code = is_int($app->run()) ? : 1; $result_code = is_int($app->run()) ? : 1;
} catch (Exception $e) { } catch (Exception $e) {

View File

@@ -303,4 +303,4 @@ class Step35 implements DatasUpgraderInterface
} }
} }
} }

View File

@@ -75,6 +75,10 @@ class Upgrader implements ControllerProviderInterface
$upgrader = new \Setup_Upgrade($appbox); $upgrader = new \Setup_Upgrade($appbox);
$appbox->forceUpgrade($upgrader); $appbox->forceUpgrade($upgrader);
/**
* @todo Show recomandation instead of redirect
*/
return new \Symfony\Component\HttpFoundation\RedirectResponse('/'); return new \Symfony\Component\HttpFoundation\RedirectResponse('/');
}); });

View File

@@ -134,6 +134,11 @@ class Setup_Upgrade
$this->recommendations[] = array($recommendation, $command); $this->recommendations[] = array($recommendation, $command);
} }
/**
* Return an array of recommendations
*
* @return array
*/
public function getRecommendations() public function getRecommendations()
{ {
return $this->recommendations; return $this->recommendations;

View File

@@ -1,5 +1,5 @@
{% macro prod(record, user, entry_id)%} {% macro prod(record, user, entry_id)%}
{% if entry_id is none %} {% if not entry_id %}
<a style="float:right;padding:0;margin:0;cursor:pointer;" class="contextMenuTrigger" <a style="float:right;padding:0;margin:0;cursor:pointer;" class="contextMenuTrigger"
id="contextTrigger_{{record.get_base_id}}_{{record.get_record_id}}">&#9660;</a> id="contextTrigger_{{record.get_base_id}}_{{record.get_record_id}}">&#9660;</a>
<table cellspacing="0" cellpadding="0" style="display:none;" <table cellspacing="0" cellpadding="0" style="display:none;"