mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Make the product changes logged
This commit is contained in:
parent
18fb870fc5
commit
eb14333c3a
8 changed files with 218 additions and 64 deletions
|
|
@ -46,6 +46,12 @@ doctrine:
|
|||
entity_managers:
|
||||
default:
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
gedmo_loggable:
|
||||
type: annotation
|
||||
prefix: Gedmo\Loggable\Entity
|
||||
dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Loggable/Entity"
|
||||
is_bundle: false
|
||||
filters:
|
||||
softdeleteable:
|
||||
class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
|
||||
|
|
@ -59,6 +65,7 @@ stof_doctrine_extensions:
|
|||
sluggable: true
|
||||
timestampable: true
|
||||
softdeleteable: true
|
||||
loggable: true
|
||||
|
||||
fos_user:
|
||||
db_driver: orm
|
||||
|
|
|
|||
|
|
@ -55,6 +55,36 @@ class ProductController extends ResourceController
|
|||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get product history changes.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @throws NotFoundHttpException
|
||||
*/
|
||||
public function historyAction(Request $request)
|
||||
{
|
||||
$config = $this->getConfiguration();
|
||||
$logEntryRepository = $this->getManager()->getRepository('Gedmo\Loggable\Entity\LogEntry');
|
||||
|
||||
$product = $this->findOr404();
|
||||
|
||||
$data = array(
|
||||
$config->getResourceName() => $product,
|
||||
'logs' => $logEntryRepository->getLogEntries($product)
|
||||
);
|
||||
|
||||
$view = $this
|
||||
->view()
|
||||
->setTemplate($config->getTemplate('history.html'))
|
||||
->setData($data)
|
||||
;
|
||||
|
||||
return $this->handleView($view);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render product filter form.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -19,11 +19,15 @@
|
|||
<generator strategy="AUTO" />
|
||||
</id>
|
||||
|
||||
<field name="name" column="name" type="string" />
|
||||
<field name="name" column="name" type="string">
|
||||
<gedmo:versioned />
|
||||
</field>
|
||||
<field name="slug" column="slug" type="string" unique="true">
|
||||
<gedmo:slug fields="name" unique="true" />
|
||||
</field>
|
||||
<field name="description" column="description" type="text" />
|
||||
<field name="description" column="description" type="text">
|
||||
<gedmo:versioned />
|
||||
</field>
|
||||
<field name="availableOn" column="available_on" type="datetime" />
|
||||
<field name="metaKeywords" column="meta_keywords" type="string" nullable="true" />
|
||||
<field name="metaDescription" column="meta_description" type="string" nullable="true" />
|
||||
|
|
@ -42,7 +46,9 @@
|
|||
<gedmo:timestampable on="update"/>
|
||||
</field>
|
||||
<field name="deletedAt" column="deleted_at" type="datetime" nullable="true" />
|
||||
|
||||
<gedmo:soft-deleteable field-name="deletedAt" />
|
||||
<gedmo:loggable />
|
||||
</mapped-superclass>
|
||||
|
||||
</doctrine-mapping>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,14 @@ sylius_backend_product_filter_form:
|
|||
_sylius:
|
||||
template: SyliusWebBundle:Backend/Product:filterForm.html.twig
|
||||
|
||||
sylius_backend_product_history:
|
||||
pattern: /{id}/history
|
||||
methods: [GET]
|
||||
defaults:
|
||||
_controller: sylius.controller.product:historyAction
|
||||
_sylius:
|
||||
template: SyliusWebBundle:Backend/Product:history.html.twig
|
||||
|
||||
sylius_backend_product_show:
|
||||
pattern: /{id}
|
||||
methods: [GET]
|
||||
|
|
|
|||
|
|
@ -146,6 +146,10 @@
|
|||
<source>sylius.backend.menu.sidebar.general_settings</source>
|
||||
<target>General settings</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="96bc6c0af7a307a49f9ad0223ab90394" resname="sylius.backend.menu.sidebar.groups">
|
||||
<source>sylius.backend.menu.sidebar.groups</source>
|
||||
<target>Groups</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="d5ab9f2471615eb2a22c363e7aab01fc" resname="sylius.backend.menu.sidebar.homepage">
|
||||
<source>sylius.backend.menu.sidebar.homepage</source>
|
||||
<target>Back to frontend</target>
|
||||
|
|
@ -230,10 +234,6 @@
|
|||
<source>sylius.backend.menu.sidebar.users</source>
|
||||
<target>Users</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="608617987d64def83501a66c2dbce621" resname="sylius.backend.menu.sidebar.groups">
|
||||
<source>sylius.backend.menu.sidebar.groups</source>
|
||||
<target>Groups</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="edb285f095cb9752e5d3f99ef0c23e9c" resname="sylius.backend.menu.sidebar.zones">
|
||||
<source>sylius.backend.menu.sidebar.zones</source>
|
||||
<target>Zones</target>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||
<file source-language="en" datatype="plaintext" original="file.ext">
|
||||
<body>
|
||||
<trans-unit id="9539535a483916af05984ef822c1523b" resname="email.order_confirmation.subject">
|
||||
<source>email.order_confirmation.subject</source>
|
||||
<target>email.order_confirmation.subject</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="4bdaedd00f685e27f46c6472cbafbb9e" resname="sylius.account.address.action.billing">
|
||||
<source>sylius.account.address.action.billing</source>
|
||||
<target>Set as default billing address</target>
|
||||
|
|
@ -158,10 +162,6 @@
|
|||
<source>sylius.add_to_cart</source>
|
||||
<target>Add to cart</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="94508ad78d6cdae4de43ed99efed1fc7" resname="sylius.product_not_available_in_zone">
|
||||
<source>sylius.product_not_available_in_zone</source>
|
||||
<target>Not available in your country</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="b862b765ec4aedc20d6569059f66c34d" resname="sylius.address.city">
|
||||
<source>sylius.address.city</source>
|
||||
<target>City</target>
|
||||
|
|
@ -418,6 +418,10 @@
|
|||
<source>sylius.cart.empty</source>
|
||||
<target>Your cart is empty</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="f2c7c4d2119c63c4c5f6b0b3208930d0" resname="sylius.cart.summary.add_coupon">
|
||||
<source>sylius.cart.summary.add_coupon</source>
|
||||
<target>OK</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="86c015752392f3a80ba2ba37f08d8255" resname="sylius.cart.summary.checkout">
|
||||
<source>sylius.cart.summary.checkout</source>
|
||||
<target>Checkout</target>
|
||||
|
|
@ -454,14 +458,6 @@
|
|||
<source>sylius.cart.summary_header</source>
|
||||
<target>Cart summary</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="3e1b5b7f50ae18ddf6a6aaf82fc3cfd9b8ca3f50" resname="sylius.form.cart.coupon">
|
||||
<source>sylius.form.cart.coupon</source>
|
||||
<target>If you have a promotion coupon, enter it here</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="76d49756fa413fa05e6221e3bab2a029d1e582b4" resname="sylius.cart.summary.add_coupon">
|
||||
<source>sylius.cart.summary.add_coupon</source>
|
||||
<target>OK</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="eb35ce86be60840d71c11b769058114c" resname="sylius.cart.total_items">
|
||||
<source>sylius.cart.total_items</source>
|
||||
<target>1 item|%count% items</target>
|
||||
|
|
@ -722,6 +718,10 @@
|
|||
<source>sylius.filter</source>
|
||||
<target>Filter</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="fcd701dd96af1ffb980eaa25750df014" resname="sylius.form.cart.coupon">
|
||||
<source>sylius.form.cart.coupon</source>
|
||||
<target>If you have a promotion coupon, enter it here</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="232a93e364de1804028b5659ea633126" resname="sylius.form.choose_file">
|
||||
<source>sylius.form.choose_file</source>
|
||||
<target>Choose file</target>
|
||||
|
|
@ -754,6 +754,10 @@
|
|||
<source>sylius.form.login.password</source>
|
||||
<target>Password</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="872f019b57a6ebda68f4907e4e9a34c4" resname="sylius.form.option_value.add_value">
|
||||
<source>sylius.form.option_value.add_value</source>
|
||||
<target>sylius.form.option_value.add_value</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="24a58cc80b3622348ed028ea8b9793ac" resname="sylius.form.profile.email">
|
||||
<source>sylius.form.profile.email</source>
|
||||
<target>Email</target>
|
||||
|
|
@ -814,6 +818,30 @@
|
|||
<source>sylius.group.update_header</source>
|
||||
<target>Edit group</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="005db3605b9e367a0278acc6849c78ac" resname="sylius.history">
|
||||
<source>sylius.history</source>
|
||||
<target>History</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="91322fa3dfdd6e01c64f2a910ad20420" resname="sylius.history.action">
|
||||
<source>sylius.history.action</source>
|
||||
<target>Action</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="21b8915f38e4ac544181ac9604d05c1e" resname="sylius.history.author">
|
||||
<source>sylius.history.author</source>
|
||||
<target>Author</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="bc4304e80c71325c3177b8f02326d144" resname="sylius.history.data">
|
||||
<source>sylius.history.data</source>
|
||||
<target>Data</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="08820da0d0f7249caa1fe0b784c655a1" resname="sylius.history.logged_at">
|
||||
<source>sylius.history.logged_at</source>
|
||||
<target>Logged at</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="919fdd8f3061ef76722892790f6ba851" resname="sylius.history.version">
|
||||
<source>sylius.history.version</source>
|
||||
<target>Version</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ce71111cec2ffc480f4a947e170afa33" resname="sylius.homepage.splash.headline">
|
||||
<source>sylius.homepage.splash.headline</source>
|
||||
<target>Welcome to Sylius</target>
|
||||
|
|
@ -882,6 +910,10 @@
|
|||
<source>sylius.meta.frontend_title</source>
|
||||
<target>Sylius, modern ecommerce for Symfony2</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="98ba126fec782ecd1d09c3d314ff034c" resname="sylius.na">
|
||||
<source>sylius.na</source>
|
||||
<target>N/A</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="0a451a1d191ef88eb8652565ad75d763" resname="sylius.newest">
|
||||
<source>sylius.newest</source>
|
||||
<target>Newest products</target>
|
||||
|
|
@ -890,6 +922,10 @@
|
|||
<source>sylius.no</source>
|
||||
<target>no</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="7bd9116f086ce0a8e276cba33ae8c605" resname="sylius.no_results">
|
||||
<source>sylius.no_results</source>
|
||||
<target>sylius.no_results</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="347179df912bf7a59e3e61c28b39af3d" resname="sylius.option.create">
|
||||
<source>sylius.option.create</source>
|
||||
<target>Create option</target>
|
||||
|
|
@ -994,6 +1030,10 @@
|
|||
<source>sylius.order.number</source>
|
||||
<target>Number</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="1bb55d4e07056205789d3989945fe25c" resname="sylius.order.payment">
|
||||
<source>sylius.order.payment</source>
|
||||
<target>Payment</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="10b9e5ce92a2a4160da8301eb56f4b5e" resname="sylius.order.payment_state">
|
||||
<source>sylius.order.payment_state</source>
|
||||
<target>Payment state</target>
|
||||
|
|
@ -1038,22 +1078,22 @@
|
|||
<source>sylius.order.show_header</source>
|
||||
<target>Order #%number%</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="766bbaff24003cb2a5b08e12419bf722" resname="sylius.order.state.checkout">
|
||||
<source>sylius.order.state.checkout</source>
|
||||
<target>Checkout</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ceeef31deebf65053049505d50007cc4" resname="sylius.order.state.cart_locked">
|
||||
<source>sylius.order.state.cart_locked</source>
|
||||
<target>Cart locked</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="78b7b027c6a4d8fd17734d54349bb291" resname="sylius.order.state.ordered">
|
||||
<source>sylius.order.state.ordered</source>
|
||||
<target>Ordered</target>
|
||||
<trans-unit id="10a426f91048650785189baa0d8fe304" resname="sylius.order.state.checkout">
|
||||
<source>sylius.order.state.checkout</source>
|
||||
<target>Checkout</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="73389298216efee6a629bf7e2c2881d6" resname="sylius.order.state.order_confimed">
|
||||
<source>sylius.order.state.order_confimed</source>
|
||||
<target>Order confirmed</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="78b7b027c6a4d8fd17734d54349bb291" resname="sylius.order.state.ordered">
|
||||
<source>sylius.order.state.ordered</source>
|
||||
<target>Ordered</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ce513cdfe77e17927dc61fa5dba2fefd" resname="sylius.order.tax_total">
|
||||
<source>sylius.order.tax_total</source>
|
||||
<target>Tax total</target>
|
||||
|
|
@ -1142,35 +1182,35 @@
|
|||
<source>sylius.payment.state</source>
|
||||
<target>State</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="121771e965341ff8984f23b8f8342990" resname="sylius.payment.state.checkout">
|
||||
<trans-unit id="640f105cc2e1d9c056ba04e27c13e22a" resname="sylius.payment.state.checkout">
|
||||
<source>sylius.payment.state.checkout</source>
|
||||
<target>Checkout</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ffbfedb9f21ce6841a7728d875435d36" resname="sylius.payment.state.completed">
|
||||
<trans-unit id="e5315d61e8fbe8efb73270591ee83dea" resname="sylius.payment.state.completed">
|
||||
<source>sylius.payment.state.completed</source>
|
||||
<target>Completed</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="8f587db2580ef31e2507a0c18595d98d" resname="sylius.payment.state.failed">
|
||||
<trans-unit id="37efee6c76503d026268b53fc82e093b" resname="sylius.payment.state.failed">
|
||||
<source>sylius.payment.state.failed</source>
|
||||
<target>Failed</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="0e185128533dcd5614d621905f6f68b9" resname="sylius.payment.state.new">
|
||||
<trans-unit id="7bb96486438a139d2242cb650d54947f" resname="sylius.payment.state.new">
|
||||
<source>sylius.payment.state.new</source>
|
||||
<target>New</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="4ff1d61ea8920e3acf15efa3017d3af9" resname="sylius.payment.state.pending">
|
||||
<trans-unit id="a2101fdbae012c43d6221ad2552568d1" resname="sylius.payment.state.pending">
|
||||
<source>sylius.payment.state.pending</source>
|
||||
<target>Pending</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="700331d57f2cc45737edc42332d60442" resname="sylius.payment.state.processing">
|
||||
<trans-unit id="c025a98fb6e7e712642a18b70c19bca8" resname="sylius.payment.state.processing">
|
||||
<source>sylius.payment.state.processing</source>
|
||||
<target>Processing</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="cf0228f61e0aebdd9fee4840f2fdd108" resname="sylius.payment.state.unknown">
|
||||
<trans-unit id="1bd02c73e16410f089eb02c71920d724" resname="sylius.payment.state.unknown">
|
||||
<source>sylius.payment.state.unknown</source>
|
||||
<target>Unknown</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="e9eb04055e6e2430eb23b5efdd4bc2ca" resname="sylius.payment.state.void">
|
||||
<trans-unit id="dfd94175bdc662af8eb12b658af5bbda" resname="sylius.payment.state.void">
|
||||
<source>sylius.payment.state.void</source>
|
||||
<target>Void</target>
|
||||
</trans-unit>
|
||||
|
|
@ -1234,14 +1274,14 @@
|
|||
<source>sylius.product.available_on_demand</source>
|
||||
<target>Available on demand</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="765ff06097d19388b61bc3282afc2b93" resname="sylius.product.restricted_zone">
|
||||
<source>sylius.product.restricted_zone</source>
|
||||
<target>Restricted zone</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="927dac6cf9ae2b0857f51b29c4da8606" resname="sylius.product.categorization">
|
||||
<source>sylius.product.categorization</source>
|
||||
<target>Categorization</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="07e92a959c87c1cdab5a6472de322d3f" resname="sylius.product.contain_variants">
|
||||
<source>sylius.product.contain_variants</source>
|
||||
<target>Contain Variants</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="86cb1f32f7244cd8471e04549728562e" resname="sylius.product.create">
|
||||
<source>sylius.product.create</source>
|
||||
<target>Create product</target>
|
||||
|
|
@ -1294,6 +1334,10 @@
|
|||
<source>sylius.product.no_results</source>
|
||||
<target>There are no products to display.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="8be7a394aa4d7e59b74a86eb06832c12" resname="sylius.product.no_shipping_category">
|
||||
<source>sylius.product.no_shipping_category</source>
|
||||
<target>No shipping category</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="7a01a908f011a11b85743691b19c5a14" resname="sylius.product.no_short_description">
|
||||
<source>sylius.product.no_short_description</source>
|
||||
<target><i>No short description</i></target>
|
||||
|
|
@ -1306,10 +1350,6 @@
|
|||
<source>sylius.product.no_tax_category</source>
|
||||
<target>No tax category</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="8be7a394aa4d7e59b74a86eb06832c12" resname="sylius.product.no_shipping_category">
|
||||
<source>sylius.product.no_shipping_category</source>
|
||||
<target>No shipping category</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="54cc7ecdb027bf1a8a7acd6c474a1fe0" resname="sylius.product.no_taxons">
|
||||
<source>sylius.product.no_taxons</source>
|
||||
<target>There are no taxons for this product</target>
|
||||
|
|
@ -1326,6 +1366,14 @@
|
|||
<source>sylius.product.properties</source>
|
||||
<target>Properties</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="bb0c7cf5dab557853db249b1ea37ccf3" resname="sylius.product.restricted_zone">
|
||||
<source>sylius.product.restricted_zone</source>
|
||||
<target>Restricted zone</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="3b63c6858f4e05f2bdad30801fa12a21" resname="sylius.product.shipping_category">
|
||||
<source>sylius.product.shipping_category</source>
|
||||
<target>Shipping category</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="30abd1691f8557e2a6a21aa7343fa1ba" resname="sylius.product.show">
|
||||
<source>sylius.product.show</source>
|
||||
<target>View more</target>
|
||||
|
|
@ -1370,9 +1418,9 @@
|
|||
<source>sylius.product.tax_category</source>
|
||||
<target>Tax category</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="3b63c6858f4e05f2bdad30801fa12a21" resname="sylius.product.shipping_category">
|
||||
<source>sylius.product.shipping_category</source>
|
||||
<target>Shipping category</target>
|
||||
<trans-unit id="ab363cdc399fd53bbd0fa149ff5d0063" resname="sylius.product.unavailable">
|
||||
<source>sylius.product.unavailable</source>
|
||||
<target>Unavailable</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="11c4582757733cff795bf9cf6f77b1f4" resname="sylius.product.update_header">
|
||||
<source>sylius.product.update_header</source>
|
||||
|
|
@ -1386,6 +1434,14 @@
|
|||
<source>sylius.product.variant_selection_method</source>
|
||||
<target>Variant selection method</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ed5312f9de80d3b6123f05085d579c5c" resname="sylius.product.view_details">
|
||||
<source>sylius.product.view_details</source>
|
||||
<target>View %product% details.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="2ee2e47ff98940a26fddac5b2414db79" resname="sylius.product_not_available_in_zone">
|
||||
<source>sylius.product_not_available_in_zone</source>
|
||||
<target>Not available in your country</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="a4bb2c4931ba8e00c965dfc2c9c7a1d3" resname="sylius.promotion.actions">
|
||||
<source>sylius.promotion.actions</source>
|
||||
<target>Actions</target>
|
||||
|
|
@ -2190,26 +2246,6 @@
|
|||
<source>sylius.zone_member.members</source>
|
||||
<target>Members</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ed5312f9de80d3b6123f05085d579c5c" resname="sylius.product.view_details">
|
||||
<source>sylius.product.view_details</source>
|
||||
<target>View %product% details.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ab363cdc399fd53bbd0fa149ff5d0063" resname="sylius.product.unavailable">
|
||||
<source>sylius.product.unavailable</source>
|
||||
<target>Unavailable</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="98ba126fec782ecd1d09c3d314ff034c" resname="sylius.na">
|
||||
<source>sylius.na</source>
|
||||
<target>N/A</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="07e92a959c87c1cdab5a6472de322d3f" resname="sylius.product.contain_variants">
|
||||
<source>sylius.product.contain_variants</source>
|
||||
<target>Contain Variants</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="1bb55d4e07056205789d3989945fe25c" resname="sylius.order.payment">
|
||||
<source>sylius.order.payment</source>
|
||||
<target>Payment</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
{% extends 'SyliusWebBundle:Backend:layout.html.twig' %}
|
||||
|
||||
{% import 'SyliusResourceBundle:Macros:buttons.html.twig' as buttons %}
|
||||
{% import 'SyliusWebBundle:Backend/Macros:alerts.html.twig' as alerts %}
|
||||
{% import 'SyliusWebBundle:Backend/Macros:misc.html.twig' as misc %}
|
||||
|
||||
{% block topbar %}
|
||||
<ol class="breadcrumb">
|
||||
<li>{{ 'sylius.breadcrumb.assortment'|trans }}</li>
|
||||
<li><a href="{{ path('sylius_backend_product_index') }}">{{ 'sylius.breadcrumb.product.index'|trans }}</a></li>
|
||||
<li>{{ product.name }}</li>
|
||||
<li>{{ 'sylius.history'|trans }}</li>
|
||||
</ol>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page-header">
|
||||
<div class="actions-menu">
|
||||
{{ buttons.manage(path('sylius_backend_product_index'), 'sylius.product.manage'|trans) }}
|
||||
{{ buttons.edit(path('sylius_backend_product_update', {'id': product.id})) }}
|
||||
{{ buttons.delete(path('sylius_backend_product_delete', {'id': product.id}), null, false, false) }}
|
||||
<a href="{{ path('sylius_product_show', {'slug': product.slug}) }}" class="btn btn-info">
|
||||
<i class="glyphicon glyphicon-shopping-cart"></i>
|
||||
{{ 'sylius.product.show_in_store'|trans }}
|
||||
</a>
|
||||
</div>
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> {{ 'sylius.product.show_header'|trans({'%product%': product.name})|raw }}</h1>
|
||||
</div>
|
||||
|
||||
{% if logs|length > 0 %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="action">{{ 'sylius.history.action'|trans }}</th>
|
||||
<th class="version">{{ 'sylius.history.version'|trans }}</th>
|
||||
<th class="data">{{ 'sylius.history.data'|trans }}</th>
|
||||
<th class="author">{{ 'sylius.history.author'|trans }}</th>
|
||||
<th class="logged-at">{{ 'sylius.history.logged_at'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for log in logs %}
|
||||
<tr>
|
||||
<td><span class="label label-info">{{ log.action|upper }}</span></td>
|
||||
<td>#{{ log.version }}</td>
|
||||
<td>
|
||||
<ul>
|
||||
{% for key, value in log.data %}
|
||||
<li><strong>{{ key }}</strong>: {{ value }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
<td>{{ log.username }}</td>
|
||||
<td>{{ log.loggedAt|date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
{{ alerts.info('sylius.no_results'|trans) }}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
@ -23,6 +23,10 @@
|
|||
<i class="glyphicon glyphicon-shopping-cart"></i>
|
||||
{{ 'sylius.product.show_in_store'|trans }}
|
||||
</a>
|
||||
<a href="{{ path('sylius_backend_product_history', {'id': product.id}) }}" class="btn btn-info">
|
||||
<i class="glyphicon glyphicon-calendar"></i>
|
||||
{{ 'sylius.history'|trans }}
|
||||
</a>
|
||||
</div>
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> {{ 'sylius.product.show_header'|trans({'%product%': product.name})|raw }}</h1>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue