Blame view

resources/views/partials/modules/item.blade.php 2.13 KB
b7c7a5f6   Alexey Boroda   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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  <div class="col-md-3 no-padding-left">
      <div class="box box-success">
          <div class="box-header with-border">
              <h3 class="box-title"><a href="{{ url('apps/' . $module->slug) }}">{{ $module->name }}</a></h3>
  
              @if (isset($installed[$module->slug]))
                  @php $color = 'bg-green'; @endphp
  
                  @if (!$installed[$module->slug])
                      @php $color = 'bg-yellow'; @endphp
                  @endif
                  <span class="module-installed">
                      <small class="label {{ $color }}">{{ trans('modules.badge.installed') }}</small>
                  </span>
              @endif
              <!-- /.box-tools -->
          </div>
          <!-- /.box-header -->
  
          <div class="box-body text-center">
              <a href="{{ url('apps/' . $module->slug) }}">
                  @foreach ($module->files as $file)
                      @if (($file->media_type == 'image') && ($file->pivot->zone == 'thumbnail'))
                          <img src="{{ $file->path_string }}" alt="{{ $module->name }}" class="item-image">
                      @endif
                  @endforeach
              </a>
          </div>
          <!-- /.box-body -->
  
          <div class="box-footer">
              <div class="pull-left">
              @for($i = 1; $i <= $module->vote; $i++)
                  <i class="fa fa-star fa-lg"></i>
              @endfor
              @for($i = $module->vote; $i < 5; $i++)
                  <i class="fa fa-star-o fa-lg"></i>
              @endfor
              @if ($module->total_review)
                  &nbsp; ({{ $module->total_review }})
              @endif
              </div>
              <div class="pull-right">
                  @if ($module->price == '0.0000')
                      {{ trans('modules.free') }}
                  @else
                      @if (isset($module->special_price))
                          <del>{{ $module->price }}</del>
                          {{ $module->special_price }}
                      @else
                          {{ $module->price }}
                      @endif
                  @endif
              </div>
          </div>
          <!-- /.box-footer -->
      </div>
      <!-- /.box -->
  </div>