diff --git a/src/Sylius/Bundle/AddressingBundle/Resources/doc/index.md b/src/Sylius/Bundle/AddressingBundle/Resources/doc/index.md deleted file mode 100644 index f8b4285999..0000000000 --- a/src/Sylius/Bundle/AddressingBundle/Resources/doc/index.md +++ /dev/null @@ -1,157 +0,0 @@ -SyliusAddressingBundle documentation. -===================================== - -This bundle provides models and interfaces for managing addresses in Symfony2 applications. - -**Note!** This documentation is inspired by [FOSUserBundle docs](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.md). - -Installation. -------------- - -+ Installing dependencies. -+ Downloading the bundle. -+ Autoloader configuration. -+ Adding bundle to kernel. -+ Creating your Address class. -+ DIC configuration. -+ Importing routing cfgs. -+ Updating database schema. - -### Installing dependencies. - -This bundle uses Pagerfanta library and PagerfantaBundle. -The installation guide can be found [here](https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle). - -### Downloading the bundle. - -The good practice is to download the bundle to the `vendor/bundles/Sylius/Bundle/AddressingBundle` directory. - -This can be done in several ways, depending on your preference. The first -method is the standard Symfony2 method. - -**Using the vendors script.** - -Add the following lines in your `deps` file... - -``` -[SyliusAddressingBundle] - git=git://github.com/Sylius/SyliusAddressingBundle.git - target=bundles/Sylius/Bundle/AddressingBundle -``` - -Now, run the vendors script to download the bundle. - -``` bash -$ php bin/vendors install -``` - -**Using submodules.** - -If you prefer instead to use git submodules, the run the following: - -``` bash -$ git submodule add git://github.com/Sylius/SyliusAddressingBundle.git vendor/bundles/Sylius/Bundle/AssortmentBundle -$ git submodule update --init -``` - -### Autoloader configuration. - -Add the `Sylius\Bundle` namespace to your autoloader. - -``` php -registerNamespaces(array( - // ... - 'Sylius\\Bundle' => __DIR__.'/../vendor/bundles', -)); -``` - -### Adding bundle to kernel. - -Finally, enable the bundle in the kernel. - -``` php -All registered addresses in database + +list.empty: There are no addresses to display diff --git a/src/Sylius/Bundle/AddressingBundle/Resources/translations/SyliusAddressingBundle.pl.yml b/src/Sylius/Bundle/AddressingBundle/Resources/translations/SyliusAddressingBundle.pl.yml new file mode 100644 index 0000000000..a56edc4ed7 --- /dev/null +++ b/src/Sylius/Bundle/AddressingBundle/Resources/translations/SyliusAddressingBundle.pl.yml @@ -0,0 +1,24 @@ +# This file is part of the Sylius package. +# (c) Paweł Jędrzejewski + +show: szczegóły +create: stwórz +update: edytuj +delete: usuń +list: lista +save: zapisz zmiany + +address: + show: Szczegóły adresu + create: Stwórz adres + update: Edytuj adres + delete: Usuń adres + list: Lista adressów + +header: + show: Szczegóły adresu + create: Stwórz nowy adres + update: Edytuj istniejący adres + list: Lista adresów Wszystkie adresy w bazie danych + +list.empty: Brak adresów do wyświetlenia diff --git a/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/create.html.twig b/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/create.html.twig index 86859a444c..804f6fb47e 100644 --- a/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/create.html.twig +++ b/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/create.html.twig @@ -1,15 +1,17 @@ -{% extends 'SyliusAddressingBundle:Backend:layout.html.twig' %} +{% extends 'SyliusAddressingBundle::layout.html.twig' %} {% block content %} -

creating new address...

+
-{{ form_widget(form) }} - - +
+ +
-{% endblock content %} +{% endblock %} diff --git a/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/list.html.twig b/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/list.html.twig index b89cfdbec2..09950614c1 100644 --- a/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/list.html.twig +++ b/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/list.html.twig @@ -1,27 +1,51 @@ -{% extends 'SyliusAddressingBundle:Backend:layout.html.twig' %} +{% extends 'SyliusAddressingBundle::layout.html.twig' %} {% block content %} -

addresses list.

+ -{% for address in addresses %} +
+{{ "address.create" | trans({}, 'SyliusAddressingBundle') }} +
- id: {{ address.id }}
- name: {{ address.name }}
- surname: {{ address.surname }}
- city: {{ address.city }}
- postcode: {{ address.postcode }}
- street: {{ address.street }}
- - +{% if paginator.haveToPaginate() %} +{{ pagerfanta(paginator, 'twitter_bootstrap_translated') }} +{% endif %} -{% endfor %} +{% if addresses %} + + + + + + + + + {% for address in addresses %} + + + + + + {% endfor %} + +
#id
{{ address.id }}{{ address.email }} + +
+{% else %} +
+

{{ "list.empty" | trans({}, 'SyliusAddressingBundle') }}

+
+{% endif %} -

- {{ pagerfanta(paginator, 'default') }} +{% if paginator.haveToPaginate() %} +{{ pagerfanta(paginator, 'twitter_bootstrap_translated') }} +{% endif %} {% endblock %} diff --git a/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/show.html.twig b/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/show.html.twig index 98e29eb54d..91daa35386 100644 --- a/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/show.html.twig +++ b/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/show.html.twig @@ -1,19 +1,27 @@ -{% extends 'SyliusAddressingBundle:Backend:layout.html.twig' %} +{% extends 'SyliusAddressingBundle::layout.html.twig' %} {% block content %} -

address details.

+ -id: {{ address.id }}
-name: {{ address.name }}
-surname: {{ address.surname }}
-city: {{ address.city }}
-postcode: {{ address.postcode }}
-street: {{ address.street }}
+
+{{ "update" | trans({}, 'SyliusAddressingBundle') }} +{{ "delete" | trans({}, 'SyliusAddressingBundle') }} +
- + + + + + + + + + + + +
#id
{{ address.id }}
{% endblock %} diff --git a/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/update.html.twig b/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/update.html.twig index 1154687c63..2440cb18e2 100644 --- a/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/update.html.twig +++ b/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/Address/update.html.twig @@ -1,15 +1,17 @@ -{% extends 'SyliusAddressingBundle:Backend:layout.html.twig' %} +{% extends 'SandboxCoreBundle:Backend:layout.html.twig' %} {% block content %} -

updating address...

+
-{{ form_widget(form) }} - - +
+ +
-{% endblock content %} +{% endblock %} diff --git a/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/layout.html.twig b/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/layout.html.twig deleted file mode 100644 index 0dc67befd1..0000000000 --- a/src/Sylius/Bundle/AddressingBundle/Resources/views/Backend/layout.html.twig +++ /dev/null @@ -1,25 +0,0 @@ - - - - - Sylius e-commerce platform administration. - - - - - - -

backend.

- - - - {% block content %} - - {% endblock %} - - - - diff --git a/src/Sylius/Bundle/AddressingBundle/Resources/views/layout.html.twig b/src/Sylius/Bundle/AddressingBundle/Resources/views/layout.html.twig new file mode 100644 index 0000000000..b558be111b --- /dev/null +++ b/src/Sylius/Bundle/AddressingBundle/Resources/views/layout.html.twig @@ -0,0 +1,78 @@ + + + + + {% block title %} Sylius administration. {% endblock %} + + + + + + + + + + +
+
+ +
+
+
+
+ {% block content %} {% endblock %} + +
+
+ +