ctrlpanel/resources/views/store/index.blade.php
2021-06-05 11:26:32 +02:00

74 lines
2.8 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layouts.main')
<?php use App\Models\PaypalProduct; ?>
@section('content')
<!-- CONTENT HEADER -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Store</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a class="" href="{{route('home')}}">Dashboard</a></li>
<li class="breadcrumb-item"><a class="text-muted" href="{{route('store.index')}}">Store</a></li>
</ol>
</div>
</div>
</div>
</section>
<!-- END CONTENT HEADER -->
<!-- MAIN CONTENT -->
<section class="content">
<div class="container-fluid">
@if($isPaypalSetup && $products->count() > 0)
<div class="card">
<div class="card-header">
<h5 class="card-title"><i class="fa fa-coins mr-2"></i>Credits</h5>
</div>
<div class="card-body">
<table class="table table-striped table-responsive-sm">
<thead>
<tr>
<th>Price</th>
<th>Type</th>
<th>Description</th>
<th></th>
</tr>
</thead>
<tbody>
<?php /** @var $product PaypalProduct */?>
@foreach($products as $product)
<tr>
<td>{{$product->formatCurrency()}}</td>
<td>{{$product->type}}</td>
<td><i class="fa fa-coins mr-2"></i>{{$product->display}}</td>
<td><a href="{{route('checkout' , $product->id)}}" class="btn btn-info">Purchase</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@else
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<h4><i class="icon fa fa-ban"></i> @if($products->count() == 0) The store is temporarily
disabled! @else The store is not correctly configured! @endif
</h4>
</div>
@endif
</div>
</section>
<!-- END CONTENT -->
@endsection