Giter Site home page Giter Site logo

Comments (4)

castwayalldc avatar castwayalldc commented on May 13, 2024 4

Hey guys, also some buttons are not visible on admin ui. For example, Show order button on orders page is not visible because it's taking bootstrap classes:

Captura de Pantalla 2019-04-18 a la(s) 11 02 07

from bootstraptheme.

castwayalldc avatar castwayalldc commented on May 13, 2024 1

Hey guys, just wanted to share that I fixed this by ra-naming the form theme file to
sylius-store/themes/bootstrap/SyliusShopBundle/views/Form/bootstrapTheme.html.twig
so I don't override the default form theme file.

Then extended all of the theme forms from it
{% form_theme form '@SyliusShop/Form/bootstrapTheme.html.twig' %}
instead of
{% form_theme form '@SyliusShop/Form/theme.html.twig' %}

For more specific cases like Show button on orders grid page in the shop, I had to create a new grid action "bootstrapShow":

sylius_grid: grids: sylius_shop_account_order: actions: item: show: type: bootstrapShow templates: action: bootstrapShow: "@SyliusUi/Grid/Action/bootstrapShow.html.twig"

Then in bootstrapShow.html.twig:

{% set path = options.link.url|default(path(options.link.route|default(grid.requestConfiguration.getRouteName('show')), options.link.parameters|default({'id': data.id}))) %} <a href="{{ path }}" class="btn btn-primary">{{ action.label|trans }}</a>

And last case I could notice until now, is the search bar in products list page. I created a custom botstrapString template to override the one from SyliusUIBundle:

sylius_grid: grids: sylius_shop_product: filters: search: template: "@SyliusUi/Grid/Filter/bootstrapString.html.twig"

The content of bootstrapString.html.twig:
{% form_theme form '@SyliusShop/Form/bootstrapTheme.html.twig' %} {% if form.type is defined %} {{ form_row(form.type, {'label': filter.label}) }} {% endif %} {{ form_row(form.value, {'label': form.type is defined ? form.value.vars.label : filter.label}) }}

from bootstraptheme.

kulczy avatar kulczy commented on May 13, 2024

thanks, I'll check it

from bootstraptheme.

alekseyp avatar alekseyp commented on May 13, 2024

Do I hear PR? 😃

from bootstraptheme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.