Skip to content

Commit

Permalink
partners on every pages
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Jun 18, 2014
1 parent 9e3170d commit 9239424
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
20 changes: 2 additions & 18 deletions app/TypiCMS/Modules/Pages/Views/pages/public/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class="col-sm-4">

@if($latestNews = News::latest(3))
@if($latestNews = News::latest(3) and count($latestNews))
<h3>@lang('db.Latest news')</h3>
<ul>
@foreach ($latestNews as $news)
Expand All @@ -20,7 +20,7 @@
<a href="{{ route($lang . '.news') }}" class="btn btn-default btn-xs">@lang('db.All news')</a>
@endif

@if($incomingEvents = Events::incoming())
@if($incomingEvents = Events::incoming() and count($incomingEvents))
<h3>@lang('db.Incoming events')</h3>
<ul>
@foreach ($incomingEvents as $event)
Expand All @@ -42,20 +42,4 @@

</div>

<div class="partners">
@if($partners = Partners::getAll())
<h3>
<a href="{{ route($lang . '.partners') }}">@lang('db.Partners')</a>
</h3>
<ul>
@foreach ($partners as $partner)
<li>
<img src="{{ $partner->present()->thumb(null, 50, array(), 'logo') }}" alt="">
<a href="{{ $partner->website }}" target="_blank">{{ $partner->title }}</a>
</li>
@endforeach
</ul>
@endif
</div>

@stop
20 changes: 20 additions & 0 deletions app/views/public/master.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,34 @@

@yield('main')

<div class="partners">
@if($partners = Partners::getAll() and count($partners))
<h3>
<a href="{{ route($lang . '.partners') }}">@lang('db.Partners')</a>
</h3>
<ul class="list-unstyled">
@foreach ($partners as $partner)
<li>
<a href="{{ $partner->website }}" title="{{ $partner->title }}" target="_blank">
<img src="{{ $partner->present()->thumb(null, 50, array(), 'logo') }}" alt="">
</a>
</li>
@endforeach
</ul>
@endif
</div>

@section('footer')
<div class="row">

<div class="col-sm-4">
{{ Menu::build('social', array('id' => 'social')) }}
</div>

<nav class="col-sm-8" role="navigation">
{{ Menu::build('footer') }}
</nav>

</div>
@show

Expand Down

0 comments on commit 9239424

Please sign in to comment.