<div class="table-responsive" style="margin-top: 25px">
    <table id="sd-bonuspunkte-plugin" class="table table-striped table-bordered table-hover">
        <thead>
        <tr>
            <th>ID</th>
            <th>Kunde</th>
            <th>Email</th>
            <th>Bonusguthaben</th>
            <th>Echtes Guthaben</th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        {foreach from=$bonuses item=bonus name=bonusForeach}
            <tr data-id="{$bonus->id}" data-sum="{$bonus->sum}">
                <td>{$bonus->id}</td>
                <td class="name">{$bonus->kunde->cVorname} {$bonus->kunde->cNachname}</td>
                <td class="email">{$bonus->kunde->cMail}</td>
                <td>{$bonus->sum}</td>
                <td>{$bonus->sumLocalized}</td>
                <td class="text-right">
                    <div class="btn-group">
                        <a href="#" class="btn btn-small btn-success add-bonus" data-target="#modal-add"><i
                                    class="fa fa-plus"></i></a>
                        <a href="#" class="btn btn-small btn-warning remove-bonus" data-target="#modal-add"><i
                                    class="fa fa-minus"></i></a>
                    </div>
                </td>
            </tr>
        {/foreach}
        </tbody>
        <tfoot>
        <tr>
            <th>ID</th>
            <th>Kunde</th>
            <th>Email</th>
            <th>Bonusguthaben</th>
            <th>Echtes Guthaben</th>
            <th></th>
        </tr>
        </tfoot>
    </table>
</div>
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">History</h4>
            </div>
            <div class="modal-body">
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="modal-add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">Bonusm�nzen f�r <span class="user"></span> hinzuf�gen</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-sm-12">
                        <form action="{$actionUrl}" method="post">
                            <div class="form-group">
                                <label for="bonus_value">Value</label>
                                <input type="number" class="form-control" id="bonus_value" name="bonus_value" min="0.01"
                                       step="0.01"/>
                            </div>
                            <input type="hidden" name="bonus_id"/>
                            <button type="submit" class="btn btn-success" name="add_bonus">Add</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="modal-remove" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">Bonusm�nzen f�r <span class="user"></span> abziehen</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-sm-12">
                        <form action="{$actionUrl}" method="post">
                            <div class="form-group">
                                <label for="bonus_value">Value</label>
                                <input type="number" class="form-control" id="bonus_value" name="bonus_value" min="0.01"
                                       step="0.01"/>
                            </div>
                            <input type="hidden" name="bonus_id"/>
                            <button type="submit" class="btn btn-warning" name="reduce_bonus">Reduce</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>