diff options
author | Camil Staps | 2016-08-01 08:04:48 +0200 |
---|---|---|
committer | Camil Staps | 2016-08-01 08:10:55 +0200 |
commit | 3393995db8c3f191f064d2f0729b1af5fb889ee6 (patch) | |
tree | 01c3619ebbd4e1d789b246e34d6f1885af5c1f04 /include/offers-view.php | |
parent | Implement $relatively for formatting dates (diff) |
Easier accessor/mutator in Model; refreshing braintree statuses
Diffstat (limited to 'include/offers-view.php')
-rw-r--r-- | include/offers-view.php | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/include/offers-view.php b/include/offers-view.php index ec579b6..1455e43 100644 --- a/include/offers-view.php +++ b/include/offers-view.php @@ -57,7 +57,7 @@ $_offer = new Offer($_pdo, $_id); </tr>"; } if (count($assignments) == 0) { - echo "<tr><td colspan='6'>There are no assignments in the database. Why not start with creating one, below?</td></tr>"; + echo "<tr><td colspan='5'>There are no assignments in the database. Why not start with creating one, below?</td></tr>"; } ?> </tbody> @@ -99,7 +99,7 @@ $_offer = new Offer($_pdo, $_id); </tr>"; } if (count($discounts) == 0) { - echo "<tr><td colspan='6'>There are no discounts in the database. Why not start with creating one, below?</td></tr>"; + echo "<tr><td colspan='4'>There are no discounts in the database. Why not start with creating one, below?</td></tr>"; } ?> </tbody> @@ -108,6 +108,42 @@ $_offer = new Offer($_pdo, $_id); </div> </div> <div class="col-md-6"> + <div class="panel panel-default"> + <div class="panel-heading">Payments</div> + <div class="panel-body table-responsive"> + <table class="table table-bordered table-striped"> + <thead> + <tr> + <th>#</th> + <th>Braintree ID</th> + <th>Braintree status</th> + <th>Tools</th> + </tr> + </thead> + <tbody> + <?php + $payment = $_offer->getPayment(); + $payments = [$payment]; + foreach ($payments as $payment) { + echo "<tr> + <td>{$payment->id}</td> + <td>{$payment->braintree_id}</td> + <td>{$payment->braintree_status}</td> + <td class='col-min-width'> + <a title='Refresh' href='?id={$_offer->id}&refresh_payment={$payment->id}' class='btn btn-info btn-circle fa fa-refresh'></a> + </td> + </tr>"; + } + if (count($payments) == 0) { + echo "<tr><td colspan='4'>There are no payments in the database. Why not start with creating one, below?</td></tr>"; + } + ?> + </tbody> + </table> + </div> + </div> +</div> +<div class="col-lg-12"> <div class="panel panel-default" id="panel-timeline"> <div class="panel-heading"> <i class="fa fa-clock-o fa-fw"></i> Timeline |