Initial commit

This commit is contained in:
2020-01-27 08:56:08 +01:00
commit b7525048d6
27129 changed files with 3409855 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="config.xml" server="51.254.220.106//web/" local="131351950200000000" remote="131351950200000000" />
<file name="create.sql" server="51.254.220.106//web/" local="131351950200000000" remote="131351950200000000" />
<file name="insert.sql" server="51.254.220.106//web/" local="131351950200000000" remote="131351950200000000" />
<file name="module.xml" server="51.254.220.106//web/" local="131351950200000000" remote="131351950200000000" />
<file name="routing.xml" server="51.254.220.106//web/" local="131351950200000000" remote="131351950200000000" />
<file name="schema.xml" server="51.254.220.106//web/" local="131351950200000000" remote="131351950200000000" />
</dwsync>

View File

@@ -0,0 +1,41 @@
<?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="support-ticket" class="SupportTicket\Loop\SupportTicket"/>
</loops>
<forms>
<form name="support_ticket.front.create" class="SupportTicket\Form\SupportTicketFrontCreateForm"/>
<form name="support_ticket.create" class="SupportTicket\Form\SupportTicketCreateForm"/>
<form name="support_ticket.update" class="SupportTicket\Form\SupportTicketUpdateForm"/>
</forms>
<hooks>
<hook id="supportticket.hook" class="SupportTicket\Hook\ManagerHook" scope="request">
<!-- front -->
<tag name="hook.event_listener" event="account.additional" />
<!-- back -->
<tag name="hook.event_listener" event="main.top-menu-tools" type="back" />
<!--
<tag name="hook.event_listener" event="order.tab" type="back" />
<tag name="hook.event_listener" event="customer.edit" type="back" />
-->
</hook>
</hooks>
<services>
<service id="action.supportticket.support_ticket_table" class="SupportTicket\Action\SupportTicketAction" scope="request">
<argument type="service" id="thelia.parser" />
<argument type="service" id="mailer"/>
<tag name="kernel.event_subscriber"/>
</service>
<service id="supportticket.form.type.support_ticket_id" class="SupportTicket\Form\Type\SupportTicketIdType">
<argument id="thelia.translator" type="service"/>
<tag name="thelia.form.type"/>
</service>
</services>
</config>

View File

@@ -0,0 +1,50 @@
# 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;
-- ---------------------------------------------------------------------
-- support_ticket
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `support_ticket`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`status` TINYINT DEFAULT 0 NOT NULL,
`customer_id` INTEGER NOT NULL,
`admin_id` INTEGER,
`order_id` INTEGER,
`order_product_id` INTEGER,
`subject` VARCHAR(255),
`message` LONGTEXT,
`response` LONGTEXT,
`replied_at` DATETIME,
`comment` LONGTEXT,
`created_at` DATETIME,
`updated_at` DATETIME,
PRIMARY KEY (`id`),
INDEX `FI_support_ticket_customer_id` (`customer_id`),
INDEX `FI_support_ticket_admin_id` (`admin_id`),
INDEX `FI_support_ticket_order_id` (`order_id`),
INDEX `FI_support_ticket_order_product_id` (`order_product_id`),
CONSTRAINT `fk_support_ticket_customer_id`
FOREIGN KEY (`customer_id`)
REFERENCES `customer` (`id`)
ON UPDATE RESTRICT
ON DELETE CASCADE,
CONSTRAINT `fk_support_ticket_admin_id`
FOREIGN KEY (`admin_id`)
REFERENCES `admin` (`id`)
ON DELETE SET NULL,
CONSTRAINT `fk_support_ticket_order_id`
FOREIGN KEY (`order_id`)
REFERENCES `order` (`id`)
ON DELETE SET NULL,
CONSTRAINT `fk_support_ticket_order_product_id`
FOREIGN KEY (`order_product_id`)
REFERENCES `order_product` (`id`)
ON DELETE SET NULL
) ENGINE=InnoDB;
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;

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>SupportTicket\SupportTicket</fullnamespace>
<descriptive locale="en_US">
<title>Support Ticket</title>
</descriptive>
<descriptive locale="fr_FR">
<title>Support Client</title>
</descriptive>
<languages>
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>0.1</version>
<author>
<name>Julien Chanséaume</name>
<email>julien@thelia.net</email>
</author>
<type>classic</type>
<thelia>2.1.0</thelia>
<stability>alpha</stability>
</module>

View File

@@ -0,0 +1,35 @@
<?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">
<!-- front -->
<route id="supportticket.front.support_ticket.list" path="/module/SupportTicket/support" methods="get">
<default key="_controller">SupportTicket:Front:default</default>
</route>
<route id="supportticket.front.support_ticket.create" path="/module/SupportTicket/create" methods="post">
<default key="_controller">SupportTicket:Front:create</default>
</route>
<route id="supportticket.front.support_ticket.delete" path="/module/SupportTicket/delete/{supportTicketId}" methods="get">
<default key="_controller">SupportTicket:Front:delete</default>
<requirement key="supportTicketId">\d+</requirement>
</route>
<!-- back -->
<route id="supportticket.support_ticket.list" path="/admin/module/SupportTicket/support_ticket" methods="get">
<default key="_controller">SupportTicket:SupportTicket:default</default>
</route>
<!-- not implemented yet
<route id="supportticket.support_ticket.create" path="/admin/module/SupportTicket/support_ticket" methods="post">
<default key="_controller">SupportTicket:SupportTicket:create</default>
</route>
-->
<route id="supportticket.support_ticket.view" path="/admin/module/SupportTicket/support_ticket/edit" methods="get">
<default key="_controller">SupportTicket:SupportTicket:update</default>
</route>
<route id="supportticket.support_ticket.edit" path="/admin/module/SupportTicket/support_ticket/edit" methods="post">
<default key="_controller">SupportTicket:SupportTicket:processUpdate</default>
</route>
<route id="supportticket.support_ticket.delete" path="/admin/module/SupportTicket/support_ticket" methods="post">
<default key="_controller">SupportTicket:SupportTicket:delete</default>
</route>
</routes>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="support_ticket" namespace="SupportTicket\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column defaultValue="0" name="status" required="true" type="TINYINT" />
<column name="customer_id" required="true" type="INTEGER" />
<column name="admin_id" required="false" type="INTEGER" />
<column name="order_id" required="false" type="INTEGER" />
<column name="order_product_id" required="false" type="INTEGER" />
<column name="subject" size="255" type="VARCHAR" />
<column name="message" type="CLOB" />
<column name="response" type="CLOB" />
<column name="replied_at" type="TIMESTAMP" required="false" />
<column name="comment" type="CLOB" />
<foreign-key foreignTable="customer" name="fk_support_ticket_customer_id" onDelete="CASCADE" onUpdate="RESTRICT">
<reference foreign="id" local="customer_id" />
</foreign-key>
<foreign-key foreignTable="admin" name="fk_support_ticket_admin_id" onDelete="SET NULL">
<reference foreign="id" local="admin_id" />
</foreign-key>
<foreign-key foreignTable="order" name="fk_support_ticket_order_id" onDelete="SET NULL">
<reference foreign="id" local="order_id" />
</foreign-key>
<foreign-key foreignTable="order_product" name="fk_support_ticket_order_product_id" onDelete="SET NULL">
<reference foreign="id" local="order_product_id" />
</foreign-key>
<behavior name="timestampable" />
</table>
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
</database>