Last active
October 9, 2015 10:16
-
-
Save simkimsia/ad86c45a8dbc6c9d5706 to your computer and use it in GitHub Desktop.
bootstrap 3 table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <table class="table table-striped table-borderless table-vcenter" style="table-layout:fixed;"> | |
| <tbody> | |
| <?php foreach ($cartData as $id => $item) : ?> | |
| <?php $hash = 'post_' . hash('md5', $id); ?> | |
| <tr> | |
| <form name="<?= $hash ?>" action="cart.php" method="POST"> | |
| <input type="hidden" value="<?= $id ?>" name="id" /> | |
| <input type="hidden" value="remove" name="action" /> | |
| </form> | |
| <td class="col-md-1 text-center"> | |
| <a href="#" onclick="if (confirm('Are you sure you want to delete <?= $item['code'] ?>')) { document.<?= $hash ?>.submit(); } event.returnValue = false; return false;" class="btn btn-effect-ripple btn-xs btn-danger pull-right"><i class="fa fa-times"></i></a> | |
| </td> | |
| <!-- i need to hide this when the screen gets too small --> | |
| <td style="col-md-2 visible-md" > | |
| <a href="<?= imageUrl($item['code']) ?>" data-toggle="lightbox-image" title="<?= $securities[$item['code']]['name'] ?>"> | |
| <img src="<?= imageUrl($item['code']) ?>" alt="Image" class="img-responsive center-block" style="max-width: 100px;"> | |
| </a> | |
| </td> | |
| <td class="col-md-5"> | |
| <div class="row"> | |
| <div class="col-md-10"><b><?= $securities[$item['code']]['name'] ?></b></div> | |
| </div> | |
| <div class="row"> | |
| <div class="col-md-10"> | |
| <span class="help-block"><?= $item['type'] ?> on <?= ucwords($item['purchase']) ?></span> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="col-md-2"> | |
| <b>SGX:<?= $item['code'] ?></b> | |
| </td> | |
| <td class="col-md-1 text-right"> | |
| <strong>$<?= $item['price'] ?></strong> | |
| </td> | |
| </tr> | |
| <?php endforeach; ?> | |
| </tbody> | |
| </table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment