mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Merge pull request #1586 from bburnichon/PHRAS-831
Remove legacy classic configuration
This commit is contained in:
@@ -123,19 +123,6 @@ class RegistryManipulator
|
||||
'auto-select-collections' => true,
|
||||
'auto-register-enabled' => false,
|
||||
],
|
||||
'classic' => [
|
||||
'search-tab' => 1,
|
||||
'adv-search-tab' => 2,
|
||||
'topics-tab' => 0,
|
||||
'active-tab' => 1,
|
||||
'render-topics' => 'tree',
|
||||
'stories-preview' => true,
|
||||
'basket-rollover' => true,
|
||||
'collection-presentation' => 'checkbox',
|
||||
'basket-size-display' => true,
|
||||
'auto-show-proposals' => true,
|
||||
'collection-display' => true,
|
||||
],
|
||||
'maintenance' => [
|
||||
'message' => 'The application is down for maintenance',
|
||||
'enabled' => false,
|
||||
|
@@ -16,7 +16,7 @@ class Version
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $number = '4.0.0-alpha.2';
|
||||
private $number = '4.0.0-alpha.3';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
@@ -1,66 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2014 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Alchemy\Phrasea\Form\Configuration;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ClassicFormType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder->add('search-tab', 'integer', [
|
||||
'label' => 'Search tab position',
|
||||
]);
|
||||
$builder->add('adv-search-tab', 'integer', [
|
||||
'label' => 'Advanced search tab position',
|
||||
]);
|
||||
$builder->add('topics-tab', 'integer', [
|
||||
'label' => 'Topics tab position',
|
||||
]);
|
||||
$builder->add('active-tab', 'integer', [
|
||||
'label' => 'Active tab position',
|
||||
]);
|
||||
|
||||
$builder->add('render-topics', 'choice', [
|
||||
'label' => 'Topics display mode',
|
||||
'choices' => ['tree' => 'Trees', 'popups' => 'Drop-down'],
|
||||
]);
|
||||
|
||||
$builder->add('stories-preview', 'checkbox', [
|
||||
'label' => 'Enable roll-over on stories',
|
||||
]);
|
||||
$builder->add('basket-rollover', 'checkbox', [
|
||||
'label' => 'Enable roll-over on basket elements',
|
||||
]);
|
||||
|
||||
$builder->add('collection-presentation', 'choice', [
|
||||
'label' => 'Collections display mode',
|
||||
'choices' => ['popup' => 'Drop-down', 'checkbox' => 'Check-box'],
|
||||
]);
|
||||
|
||||
$builder->add('basket-size-display', 'checkbox', [
|
||||
'label' => 'Display the total size of the document basket',
|
||||
]);
|
||||
$builder->add('auto-show-proposals', 'checkbox', [
|
||||
'label' => 'Display proposals tab',
|
||||
]);
|
||||
$builder->add('collection-display', 'checkbox', [
|
||||
'label' => 'Display the name of databases and collections',
|
||||
]);
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -44,9 +44,6 @@ class MainConfigurationFormType extends AbstractType
|
||||
$builder->add('registration', new RegistrationFormType(), [
|
||||
'label' => 'Registration',
|
||||
]);
|
||||
$builder->add('classic', new ClassicFormType(), [
|
||||
'label' => 'Client',
|
||||
]);
|
||||
$builder->add('maintenance', new MaintenanceFormType(), [
|
||||
'label' => 'Maintenance state',
|
||||
]);
|
||||
|
67
lib/classes/patch/400alpha3a.php
Normal file
67
lib/classes/patch/400alpha3a.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2015 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Alchemy\Phrasea\Core\Configuration\PropertyAccess;
|
||||
|
||||
class patch_400alpha3a implements patchInterface
|
||||
{
|
||||
/** @var string */
|
||||
private $release = '4.0.0-alpha.3';
|
||||
|
||||
/** @var array */
|
||||
private $concern = [base::APPLICATION_BOX];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_release()
|
||||
{
|
||||
return $this->release;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getDoctrineMigrations()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function require_all_upgrades()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function concern()
|
||||
{
|
||||
return $this->concern;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function apply(base $databox, Application $app)
|
||||
{
|
||||
/** @var PropertyAccess $registry */
|
||||
$registry = $app['conf'];
|
||||
|
||||
$registry->remove(['registry', 'classic']);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Tests\Phrasea\Form\Configuration;
|
||||
|
||||
use Alchemy\Phrasea\Form\Configuration\ClassicFormType;
|
||||
use Alchemy\Tests\Phrasea\Form\FormTestCase;
|
||||
|
||||
/**
|
||||
* @group functional
|
||||
* @group legacy
|
||||
*/
|
||||
class ClassicFormTypeTest extends FormTestCase
|
||||
{
|
||||
public function getForm()
|
||||
{
|
||||
return new ClassicFormType();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user