Quelques modifs de style front-office

This commit is contained in:
2019-11-19 15:24:51 +01:00
parent 9f74ec1089
commit b098026dd7
139 changed files with 7559 additions and 22427 deletions

View File

@@ -0,0 +1,31 @@
<?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">
<forms>
<form name="stockalert.subscribe.form" class="StockAlert\Form\StockAlertSubscribe" />
<form name= "stockalert.configuration.form" class="StockAlert\Form\StockAlertConfig" />
</forms>
<loops>
<loop name="restocking-alert" class="StockAlert\Loop\RestockingAlertLoop" />
</loops>
<services>
<service id="stockalert.alert.manager" class="StockAlert\EventListeners\StockAlertManager" scope="request">
<argument type="service" id="mailer"/>
<tag name="kernel.event_subscriber"/>
</service>
</services>
<hooks>
<hook id="stockalert.hook" class="StockAlert\Hook\StockAlertHook" scope="request">
<tag name="hook.event_listener" event="product.stock-alert" type="front" method="onProductDetailsBottom" />
<tag name="hook.event_listener" event="product.details-bottom" type="front" method="onProductDetailsBottom" />
<tag name="hook.event_listener" event="product.javascript-initialization" type="front" />
<tag name="hook.event_listener" event="module.configuration" type="back" />
</hook>
</hooks>
</config>

View File

@@ -0,0 +1,2 @@
DROP TABLE IF EXISTS `restocking_alert`;

View File

@@ -0,0 +1,24 @@
<?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_1.xsd">
<fullnamespace>StockAlert\StockAlert</fullnamespace>
<descriptive locale="en_US">
<title>Stock Alerts</title>
</descriptive>
<descriptive locale="fr_FR">
<title>Alertes Stock</title>
</descriptive>
<languages>
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>1.2</version>
<author>
<name>Julien Chanséaume</name>
<email>julien@thelia.net</email>
</author>
<type>classic</type>
<thelia>2.1.0</thelia>
<stability>rc</stability>
</module>

View File

@@ -0,0 +1,15 @@
<?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">
<route id="stockalert.front.subscribe" path="/module/stockalert/subscribe" methods="post">
<default key="_controller">StockAlert\Controller\StockAlertFrontOfficeController::subscribe</default>
</route>
<route id="stockalert.back.subscribe" path="/admin/module/stockalert/configuration" methods="post">
<default key="_controller">StockAlert\Controller\StockAlertBackOfficeController::configuration</default>
</route>
</routes>

View File

@@ -0,0 +1,22 @@
<database defaultIdMethod="native" name="thelia"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../core/vendor/propel/propel/resources/xsd/database.xsd" >
<table name="restocking_alert" namespace="StockAlert\Model">
<column name="id" primaryKey="true" autoIncrement="true" required="true" type="INTEGER" />
<column name="product_sale_elements_id" required="true" type="INTEGER" />
<column name="email" size="255" type="VARCHAR" />
<column name="locale" size="45" type="VARCHAR" />
<foreign-key foreignTable="product_sale_elements" name="fk_restocking_alert_product_sale_elements_id" onDelete="CASCADE" >
<reference foreign="id" local="product_sale_elements_id" />
</foreign-key>
<behavior name="timestampable" />
</table>
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
</database>

View File

@@ -0,0 +1,29 @@
# 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;
-- ---------------------------------------------------------------------
-- restocking_alert
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `restocking_alert`;
CREATE TABLE `restocking_alert`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`product_sale_elements_id` INTEGER NOT NULL,
`email` VARCHAR(255),
`locale` VARCHAR(45),
`created_at` DATETIME,
`updated_at` DATETIME,
PRIMARY KEY (`id`),
INDEX `FI_restocking_alert_product_sale_elements_id` (`product_sale_elements_id`),
CONSTRAINT `fk_restocking_alert_product_sale_elements_id`
FOREIGN KEY (`product_sale_elements_id`)
REFERENCES `product_sale_elements` (`id`)
ON DELETE CASCADE
) ENGINE=InnoDB;
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;