fixed module image and tabs

This commit is contained in:
denisdulici 2017-11-03 09:42:46 +03:00
parent c7f7d2fdfc
commit b6023b2b87
3 changed files with 31 additions and 10 deletions

View File

@ -10,8 +10,6 @@ return [
'free' => 'FREE', 'free' => 'FREE',
'install' => 'Install', 'install' => 'Install',
'buy_now' => 'Buy Now', 'buy_now' => 'Buy Now',
'faq' => 'FAQ',
'changelog' => 'Changelog',
'token_link' => '<a href="https://akaunting.com/tokens" target="_blank">Click here</a> to get your API token.', 'token_link' => '<a href="https://akaunting.com/tokens" target="_blank">Click here</a> to get your API token.',
'installed' => ':module installed', 'installed' => ':module installed',
@ -20,6 +18,12 @@ return [
'enabled' => ':module enabled', 'enabled' => ':module enabled',
'disabled' => ':module disabled', 'disabled' => ':module disabled',
'tab' => [
'installation' => 'Installation',
'faq' => 'FAQ',
'changelog' => 'Changelog',
],
'installation' => [ 'installation' => [
'header' => 'App Installation', 'header' => 'App Installation',
'download' => 'Downloading :module file.', 'download' => 'Downloading :module file.',

View File

@ -14,30 +14,42 @@
<div class="nav-tabs-custom"> <div class="nav-tabs-custom">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"><a href="#description" data-toggle="tab" aria-expanded="true">{{ trans('general.description') }}</a></li> <li class="active"><a href="#description" data-toggle="tab" aria-expanded="true">{{ trans('general.description') }}</a></li>
<li class=""><a href="#faq" data-toggle="tab" aria-expanded="false">{{ trans('modules.faq') }}</a></li> @if ($module->installation)
<li class=""><a href="#changelog" data-toggle="tab" aria-expanded="false">{{ trans('modules.changelog') }}</a></li> <li class=""><a href="#installation" data-toggle="tab" aria-expanded="false">{{ trans('modules.tab.installation') }}</a></li>
@endif
@if ($module->faq)
<li class=""><a href="#faq" data-toggle="tab" aria-expanded="false">{{ trans('modules.tab.faq') }}</a></li>
@endif
@if ($module->changelog)
<li class=""><a href="#changelog" data-toggle="tab" aria-expanded="false">{{ trans('modules.tab.changelog') }}</a></li>
@endif
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="description"> <div class="tab-pane active" id="description">
{!! $module->description !!} {!! $module->description !!}
</div> </div>
<!-- /.tab-pane --> @if ($module->installation)
<div class="tab-pane" id="installation">
{!! $module->installation !!}
</div>
@endif
@if ($module->faq)
<div class="tab-pane" id="faq"> <div class="tab-pane" id="faq">
{!! $module->faq !!} {!! $module->faq !!}
</div> </div>
<!-- /.tab-pane --> @endif
@if ($module->changelog)
<div class="tab-pane" id="changelog"> <div class="tab-pane" id="changelog">
{!! $module->changelog !!} {!! $module->changelog !!}
</div> </div>
<!-- /.tab-pane --> @endif
</div> </div>
<!-- /.tab-content -->
</div> </div>
</div> </div>
<div class="col-md-4 no-padding-right"> <div class="col-md-4 no-padding-right">
<div class="content-header no-padding-left"> <div class="content-header no-padding-left">
<h3>Action</h3> <h3>{{ trans_choice('general.actions', 1) }}</h3>
</div> </div>
<div class="box box-success"> <div class="box box-success">

View File

@ -8,7 +8,12 @@
<div class="box-body text-center"> <div class="box-body text-center">
<a href="{{ url('apps/' . $module->slug) }}"> <a href="{{ url('apps/' . $module->slug) }}">
<img src="{{ $module->files[0]->path_string }}" alt="{{ $module->name }}" class="item-image"> @foreach ($module->files as $file)
@if (($file->media_type != 'image') || ($file->pivot->zone != 'thumbnail'))
@php continue; @endphp
@endif
<img src="{{ $file->path_string }}" alt="{{ $module->name }}" class="item-image">
@endforeach
</a> </a>
</div> </div>
<!-- /.box-body --> <!-- /.box-body -->