Blame view

src/app/frontend/views/partial/recentSales.php 1.56 KB
1ea3b987   Administrator   maby first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
      <!-- Indicators -->
      <?php $indicators = count($classic_sales) / 4 ?>
      <?php if($indicators > 1): ?>
          <ol class="carousel-indicators">
              <?php for($i = 0; $i < $indicators; $i++): ?>
                  <li data-target="#carousel-example-generic" data-slide-to="<?= $i ?>"<?= $i == 0 ?' class="active"' : ''?>></li>
              <?php endfor; ?>
          </ol>
      <?php endif; ?>
  
      <!-- Wrapper for slides -->
      <div class="carousel-inner" role="listbox">
          <?php foreach($classic_sales as $k => $sale): ?>
              <?php if($k % 4 == 0): ?>
                  <div class="item<?= ($k == 0) ? ' active' : '' ?>">
              <?php endif; ?>
              <?= $this->partial('partial/one_sale', ['k' => $k, 'sale' => $sale]) ?>
              <?php if((($k + 1) % 4 == 0) || empty($classic_sales[$k + 1])): ?>
                  </div>
              <?php endif; ?>
          <?php endforeach; ?>
      </div>
  
      <!-- Controls -->
      <?php if($indicators > 1): ?>
          <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
              <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
              <span class="sr-only">Previous</span>
          </a>
          <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
              <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
              <span class="sr-only">Next</span>
          </a>
      <?php endif; ?>
  </div>