Initial commit

This commit is contained in:
2021-03-23 13:54:38 +01:00
commit 82b142ff95
16941 changed files with 2617212 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<config xmlns="http://thelia.net/schema/dic/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
<loops>
<loop name="shortcuts" class="Shortcuts\Loop\ShortcutsLoop" />
</loops>
<forms>
<form name="thelia.admin.shortcut.creation" class="Shortcuts\Form\ShortcutForm" />
</forms>
<hooks>
<hook id="shortcuts.hook" class="Shortcuts\Hook\Shortcuts" scope="request">
<tag name="hook.event_listener" event="main.topbar-top" active="1" type="back" method="onMainTopbarTop" />
</hook>
</hooks>
</config>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" ?>
<config xmlns="http://thelia.net/schema/dic/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
<loops>
<!-- sample definition
<loop name="MySuperLoop" class="Shortcuts\Loop\MySuperLoop" />
-->
</loops>
<forms>
<!--
<form name="MyFormName" class="Shortcuts\Form\MySuperForm" />
-->
</forms>
<commands>
<!--
<command class="Shortcuts\Command\MySuperCommand" />
-->
</commands>
<!--
<services>
</services>
-->
<!--
<hooks>
<hook id="shortcuts.hook" class="Shortcuts\Hook\MySuperHook">
<tag name="hook.event_listener" event="main.body.bottom" type="front|back|pdf|email" method="onMainBodyBottom" />
</hook>
</hooks>
-->
<!--
<exports>
</exports>
-->
<!--
<imports>
</imports>
-->
</config>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" ?>
<config xmlns="http://thelia.net/schema/dic/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
<loops>
<!-- sample definition
<loop name="MySuperLoop" class="Shortcuts\Loop\MySuperLoop" />
-->
</loops>
<forms>
<!--
<form name="MyFormName" class="Shortcuts\Form\MySuperForm" />
-->
</forms>
<commands>
<!--
<command class="Shortcuts\Command\MySuperCommand" />
-->
</commands>
<!--
<services>
</services>
-->
<!--
<hooks>
<hook id="shortcuts.hook" class="Shortcuts\Hook\MySuperHook">
<tag name="hook.event_listener" event="main.body.bottom" type="front|back|pdf|email" method="onMainBodyBottom" />
</hook>
</hooks>
-->
<!--
<exports>
</exports>
-->
<!--
<imports>
</imports>
-->
</config>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" ?>
<config xmlns="http://thelia.net/schema/dic/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
<loops>
<!-- sample definition
<loop name="MySuperLoop" class="Shortcuts\Loop\MySuperLoop" />
-->
</loops>
<forms>
<!--
<form name="MyFormName" class="Shortcuts\Form\MySuperForm" />
-->
</forms>
<commands>
<!--
<command class="Shortcuts\Command\MySuperCommand" />
-->
</commands>
<!--
<services>
</services>
-->
<!--
<hooks>
<hook id="shortcuts.hook" class="Shortcuts\Hook\MySuperHook">
<tag name="hook.event_listener" event="main.body.bottom" type="front|back|pdf|email" method="onMainBodyBottom" />
</hook>
</hooks>
-->
<!--
<exports>
</exports>
-->
<!--
<imports>
</imports>
-->
</config>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="http://thelia.net/schema/dic/module"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://thelia.net/schema/dic/module http://thelia.net/schema/dic/module/module-2_2.xsd">
<fullnamespace>Shortcuts\Shortcuts</fullnamespace>
<descriptive locale="en_US">
<title>Shortcuts</title>
<description>Fast access to the backoffice pages you use the most</description>
</descriptive>
<descriptive locale="fr_FR">
<title>Raccourcis</title>
<description>Accédez rapidement aux pages du backoffice que vous utilisez le plus</description>
</descriptive>
<!-- <logo></logo> -->
<!--<images-folder>images</images-folder>-->
<languages>
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>0.2.0</version>
<author>
<name>Nicolas Léon</name>
<email>nicolas@omnitic.com</email>
</author>
<type>classic</type>
<thelia>2.0.0</thelia>
<stability>alpha</stability>
</module>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<!--
if a /admin/module/shortcuts/ route is provided, a "Configuration" button will be displayed
for the module in the module list. Clicking this button will invoke this route.
<route id="my_route_id" path="/admin/module/shortcuts">
<default key="_controller">Shortcuts\Full\Class\Name\Of\YourConfigurationController::methodName</default>
</route>
<route id="my_route_id" path="/admin/module/shortcuts/route-name">
<default key="_controller">Shortcuts\Full\Class\Name\Of\YourAdminController::methodName</default>
</route>
<route id="my_route_id" path="/my/route/name">
<default key="_controller">Shortcuts\Full\Class\Name\Of\YourOtherController::methodName</default>
</route>
...add as many routes as required.
<route>
...
</route>
-->
<route id="shortcuts-settings" path="/admin/module/Shortcuts">
<default key="_controller">Shortcuts:Shortcuts:index</default>
</route>
<route id="shortcuts.create-shortcut" path="/admin/module/Shortcuts/create">
<default key="_controller">Shortcuts:Shortcuts:create</default>
</route>
<route id="shortcuts.delete-shortcut" path="/admin/module/Shortcuts/delete">
<default key="_controller">Shortcuts:Shortcuts:delete</default>
</route>
</routes>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<database defaultIdMethod="native" name="thelia"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../vendor/propel/propel/resources/xsd/database.xsd" >
<!-- See propel documentation on http://propelorm.org for all information about schema file -->
<table name="shortcuts" namespace="Shortcuts\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="title" size="255" type="VARCHAR" required="true"/>
<column defaultValue="0" name="position" required="true" type="INTEGER" />
<column name="url" required="true" type="VARCHAR" />
<column name="admin_id" required="false" type="INTEGER" />
<behavior name="i18n">
<parameter name="i18n_columns" value="title"/>
</behavior>
<foreign-key foreignTable="admin" name="fk_admin_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="admin_id" />
</foreign-key>
<!-- <behavior name="timestampable" /> -->
</table>
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
</database>

View File

@@ -0,0 +1,6 @@
-- Shotcuts inception
INSERT INTO `shortcuts` (`id`, `position`, `url`, `visible`, `admin_id`) VALUES
(1, 1, '/admin/module/Shortcuts', 1, 1);
INSERT INTO `shortcuts_i18n` (`id`, `locale`, `title`) VALUES
(1, 'en_US', 'Shortcuts'),
(1, 'fr_FR', 'Raccourcis');

View File

@@ -0,0 +1,2 @@
# Sqlfile -> Database map
thelia.sql=thelia

View File

@@ -0,0 +1,46 @@
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;
-- ---------------------------------------------------------------------
-- shortcuts
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `shortcuts`;
CREATE TABLE `shortcuts`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`position` INTEGER DEFAULT 0 NOT NULL,
`url` VARCHAR(255) NOT NULL,
`admin_id` INTEGER,
PRIMARY KEY (`id`),
INDEX `FI_admin_id` (`admin_id`),
CONSTRAINT `fk_admin_id`
FOREIGN KEY (`admin_id`)
REFERENCES `admin` (`id`)
ON UPDATE RESTRICT
ON DELETE CASCADE
) ENGINE=InnoDB;
-- ---------------------------------------------------------------------
-- shortcuts_i18n
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `shortcuts_i18n`;
CREATE TABLE `shortcuts_i18n`
(
`id` INTEGER NOT NULL,
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
`title` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`,`locale`),
CONSTRAINT `shortcuts_i18n_FK_1`
FOREIGN KEY (`id`)
REFERENCES `shortcuts` (`id`)
ON DELETE CASCADE
) ENGINE=InnoDB;
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;