File tree Expand file tree Collapse file tree 7 files changed +66
-44
lines changed
config/twig_hooks/shop/wishlist
views/shop/wishlist/index/content Expand file tree Collapse file tree 7 files changed +66
-44
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,22 @@ sylius_twig_hooks:
1313 template : " @BitBagSyliusWishlistPlugin/shop/wishlist/index/content/form.html.twig"
1414 priority : 0
1515
16+ ' bitbag_sylius_wishlist_plugin.wishlist.index.content.header ' :
17+ title :
18+ template : " @BitBagSyliusWishlistPlugin/shop/wishlist/index/content/header/title.html.twig"
19+ priority : 100
20+ actions :
21+ template : " @BitBagSyliusWishlistPlugin/shop/wishlist/index/content/header/actions.html.twig"
22+ priority : 0
23+
24+ ' bitbag_sylius_wishlist_plugin.wishlist.index.content.header.actions ' :
25+ clear :
26+ template : " @BitBagSyliusWishlistPlugin/shop/wishlist/index/content/header/actions/clear.html.twig"
27+ priority : 100
28+ new :
29+ template : " @BitBagSyliusWishlistPlugin/shop/wishlist/index/content/header/actions/new.html.twig"
30+ priority : 0
31+
1632 ' bitbag_sylius_wishlist_plugin.wishlist.index.content.form ' :
1733 form :
1834 template : " @BitBagSyliusWishlistPlugin/shop/wishlist/index/content/form/sections.html.twig"
Original file line number Diff line number Diff line change 44{% set form = hookable_metadata .context .form %}
55
66{% if wishlist .wishlistProducts .count > 0 %}
7- <div class =" middle aligned column" >
8- <a href =" {{ path(' bitbag_sylius_wishlist_plugin_shop_locale_wishlist_clean' , {' wishlistId' : wishlist .id }) }}" class =" bitbag-clean-wishlist" >
9- <i class =" icon remove" ></i >{{ ' bitbag_sylius_wishlist_plugin.ui.clear_wishlist' | trans }}
10- </a >
11- </div >
12-
137 <div class =" ui hidden divider" ></div >
148
159 {% hook ' form' with { wishlist , form } %}
1610{% else %}
17- <div class =" ui one column stackable grid" >
18- <div class =" column" >
19- {{ messages.info (' bitbag_sylius_wishlist_plugin.ui.your_wishlist_is_empty' | trans) }}
20- </div >
21- <a href =" {{ path(' bitbag_sylius_wishlist_plugin_shop_locale_wishlist_import_from_csv' ) }}" >
22- <button type =" button" class =" ui secondary button bb-wishlist-actions-import-button" {{ sylius_test_html_attribute(' wishlist-import-from-csv' ) }}>
23- <i class =" cart icon" ></i >
24- {{ ' bitbag_sylius_wishlist_plugin.ui.import_from_csv' | trans }}
25- </button >
26- </a >
11+ <div class =" column" >
12+ {{ messages.info (' bitbag_sylius_wishlist_plugin.ui.your_wishlist_is_empty' | trans) }}
2713 </div >
14+ <a href =" {{ path(' bitbag_sylius_wishlist_plugin_shop_locale_wishlist_import_from_csv' ) }}" >
15+ <button type =" button" class =" btn btn-light bb-wishlist-actions-import-button" {{ sylius_test_html_attribute(' wishlist-import-from-csv' ) }}>
16+ {{ ux_icon(' mdi:cart' ) }}
17+ {{ ' bitbag_sylius_wishlist_plugin.ui.import_from_csv' | trans }}
18+ </button >
19+ </a >
2820{% endif %}
Original file line number Diff line number Diff line change 11{% set wishlist = hookable_metadata .context .wishlist %}
2- {% if sylius .channel is not null %}
3- {% set wishlists = findAllByAnonymousAndChannel(sylius .channel ) %}
4- {% else %}
5- {% set wishlists = findAllByAnonymous() %}
6- {% endif %}
72
8- <h1 class =" ui header" >
9- <i class =" circular heart icon" ></i >
10- <div class =" content bb-wishlist-header" >
11- {{ wishlist .name }}
12- </div >
13- </h1 >
14-
15- {% if wishlists | length <= 1 %}
16- <div class =" middle aligned column" >
17- <button id =" create_new_wishlist_button" class =" ui right floated primary button"
18- data-bb-wishlist-add =" add-another-wishlist"
19- data-bb-wishlist-add-url =" {{ path(' bitbag_sylius_wishlist_plugin_shop_locale_wishlist_create_new_wishlist' ) }}"
20- data-bb-wishlist-add-title =" {{ ' bitbag_sylius_wishlist_plugin.ui.wishlist_modal_add_title' | trans }}"
21- data-bb-wishlist-add-perform =" {{ ' bitbag_sylius_wishlist_plugin.ui.wishlist_modal_add_perform' | trans }}"
22- data-bb-wishlist-add-cancel =" {{ ' bitbag_sylius_wishlist_plugin.ui.wishlist_modal_add_cancel' | trans }}"
23- data-bb-wishlist-add-error =" {{ ' bitbag_sylius_wishlist_plugin.ui.wishlist_modal_add_error' | trans }}"
24- >
25- {{ ' bitbag_sylius_wishlist_plugin.ui.add_another_wishlist' | trans }}
26- </button >
27- <input type =" hidden" data-bb-csrf =" {{ csrf_token(' some-name' ) }}" />
28- </div >
29- {% endif %}
30- <div class =" ui hidden divider" ></div >
3+ {% hook ' header' with { wishlist } %}
Original file line number Diff line number Diff line change 1+ {% set wishlist = hookable_metadata .context .wishlist %}
2+
3+ <div class =" d-flex justify-content-between my-3" >
4+ {% hook ' actions' with { wishlist } %}
5+ </div >
Original file line number Diff line number Diff line change 1+ {% set wishlist = hookable_metadata .context .wishlist %}
2+
3+ {% if wishlist .wishlistProducts .count > 0 %}
4+ <div class =" middle aligned column" >
5+ <a href =" {{ path(' bitbag_sylius_wishlist_plugin_shop_locale_wishlist_clean' , {' wishlistId' : wishlist .id }) }}" class =" bitbag-clean-wishlist btn btn-light" >
6+ <i class =" icon remove" ></i >{{ ' bitbag_sylius_wishlist_plugin.ui.clear_wishlist' | trans }}
7+ </a >
8+ </div >
9+ {% endif %}
Original file line number Diff line number Diff line change 1+ {% if sylius .channel is not null %}
2+ {% set wishlists = findAllByAnonymousAndChannel(sylius .channel ) %}
3+ {% else %}
4+ {% set wishlists = findAllByAnonymous() %}
5+ {% endif %}
6+
7+ {% if wishlists | length <= 1 %}
8+ <button id =" create_new_wishlist_button" class =" btn btn-primary"
9+ data-bb-wishlist-add =" add-another-wishlist"
10+ data-bb-wishlist-add-url =" {{ path(' bitbag_sylius_wishlist_plugin_shop_locale_wishlist_create_new_wishlist' ) }}"
11+ data-bb-wishlist-add-title =" {{ ' bitbag_sylius_wishlist_plugin.ui.wishlist_modal_add_title' | trans }}"
12+ data-bb-wishlist-add-perform =" {{ ' bitbag_sylius_wishlist_plugin.ui.wishlist_modal_add_perform' | trans }}"
13+ data-bb-wishlist-add-cancel =" {{ ' bitbag_sylius_wishlist_plugin.ui.wishlist_modal_add_cancel' | trans }}"
14+ data-bb-wishlist-add-error =" {{ ' bitbag_sylius_wishlist_plugin.ui.wishlist_modal_add_error' | trans }}"
15+ >
16+ {{ ' bitbag_sylius_wishlist_plugin.ui.add_another_wishlist' | trans }}
17+ </button >
18+ <input type =" hidden" data-bb-csrf =" {{ csrf_token(' some-name' ) }}" />
19+ {% endif %}
Original file line number Diff line number Diff line change 1+ {% set wishlist = hookable_metadata .context .wishlist %}
2+
3+ <h1 class =" ui header" >
4+ <i class =" circular heart icon" ></i >
5+ <div class =" content bb-wishlist-header" >
6+ {{ wishlist .name }}
7+ </div >
8+ </h1 >
You can’t perform that action at this time.
0 commit comments