Git Product home page Git Product logo

tablebundle's People

Contributors

chafiq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

cwd dclause wikub

tablebundle's Issues

Error in Examples Documentation

Hi,

Just see an error in example when you do the QueryBuilder

 public function getQueryBuilder(ObjectManager $entityManager, array $options) {
        return $entityManager
                    ->getRepository('AcmeMyBundle:City')
                        ->createQueryBuilder('c')
                        ->innerJoin('t.state', 's');

it's strange because 't' is not defined before. So, maybe it is :

` public function getQueryBuilder(ObjectManager $entityManager, array $options) {
return $entityManager
->getRepository('AcmeMyBundle:City')
->createQueryBuilder('c')
->innerJoin('c.state', 's');


Thank you for this Bundle!!

Custom ColumnType not loading during rendering

I've created a custom column type that I want to use to display boolean values.
I built it to extend IconType.

config.yml

emc_table:
    export:
    ...
    extensions:
        - MyBundle:Table\Column:boolean.html.twig

MyBundle:Table\Column:boolean.html.twig

{% block boolean_widget %}
    <i {{ block('attributes') }}></i>
{% endblock %}

services.yml

    table.column.boolean:
        class: MyBundle\Service\Table\Column\BooleanType
        tags:
            - { name: column.type, alias: boolean }

BooleanType.php

class BooleanType extends IconType
{
    /**
     * {@inheritdoc}
     */
    public function buildView(
        array &$view,
        ColumnInterface $column,
        array $data,
        array $options
    ) {
        parent::buildView($view, $column, $data, $options);

        $view['icon'] = $options['value'] ? $options['icon_true'] : $options['icon_false'];
    }

    /**
     * @param OptionsResolverInterface $resolver
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        parent::setDefaultOptions($resolver);

        $resolver->setDefaults([
            'icon_true'  => 'check',
            'icon_false' => 'ban'
        ]);

        $resolver->addAllowedTypes([
            'icon_true'  => 'string',
            'icon_false' => 'string',
        ]);
    }

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return 'boolean';
    }
}

The table renders just fine. Except in the column with the boolean type I get <i></i>. What am I missing?

Excel export file cannot be opened by MS Excel

When I run the export as Excel option, a file is generated successfully. However, when I attempt to open the file in MS Excel for Mac (v15.16) I receive warnings about errors in the Workbook Setting, Worksheet Setting, and Style. I tried running an export from your sample table at table-bundle.com and ran into the same issue.

Attached is a screenshot of the file when I open it as text (the only option permitted by Excel).
screen shot 2015-12-02 at 3 34 58 pm

Need "search" instead of "rechercher"

When I enabled filtering on a column and the filter text box is displayed, the placeholder is in French. Can we have the default be in English and add the French to the translation?

screen shot 2015-10-13 at 1 12 55 pm

Add support for callback in 'attrs' element

It would be great to be able to dynamically configure some of the attributes of cell element based on the parameter using a callback:

$builder->add(
    'foo', 
    'icon',
    [
        'params' => 'e.protected',
        'attrs'  => function ($param1) { return ['style' => true == $param1 ? 'color: red' : 'color: blue';] }
    ]
);

Or maybe I just need support for a row-wide callback in which I can leverage the $id of the cell to apply some logic.

Icon and Anchor

Hello I have a problem, I have a Table and I would like an icon like that

 $builder->add('delete', 'button', array(
            'anchor_route' => 'show_spectators_delete',
            'params' => array('id' => 's.id'),
            'icon' => 'remove',
                //'attrs' => array('class' => 'btn-xs')
        ));

But I have this error :
*The option "anchor_route" with value "show_spectators_delete" is expected to be of type "null", but is of type "string". * What I m doing wrong?

Thank you

Decouple JS for pagination and limit components from 'tfoot', 'tr', 'td'

Currently, it appears that the pages and the limit dropdown only properly function if they are children of a table row and cell. I have tried moving those components to other locations and their functionality is disabled once moved outside of the row.

I am using a custom render template and have tried moving the block('pages') and block('limit_select') to other locations on the template. Whenever I move them outside of their parent tr they cease to function. Obviously I could update the js, but I was wondering if, perhaps, it would be worth considering to decouple the logic of these components from a row element.

I believe the culprits are line 91 and 96.

Export menu clipped off window

The drop down menu from the Export link is left-justified and being clipped off the screen if the table is drawn to "edge" of the screen. In the attached screenshot, I use Bootstrap3 "container-fluid" to house the table. As you can see, the menu is clipped off by the window of the browser. Since the button is right-aligned on the table, maybe we can right-align the drop down menu to prevent it from being clipped off.

screen shot 2015-10-13 at 1 27 46 pm

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.