Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Commit

Permalink
Use new mixin Blade directive
Browse files Browse the repository at this point in the history
  • Loading branch information
mzur committed Jan 22, 2018
1 parent b5da458 commit 9bfd0ff
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 43 deletions.
18 changes: 4 additions & 14 deletions src/resources/views/edit.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@extends('app')
@inject('modules', 'Biigle\Services\Modules')

@section('title', "Edit volume {$volume->name}")

@push('scripts')
Expand All @@ -10,16 +8,12 @@
biigle.$declare('volumes.annotationSessions', {!! $annotationSessions !!});
biigle.$declare('volumes.images', {!! $images !!});
</script>
@foreach ($modules->getMixins('volumesEditScripts') as $module => $nestedMixins)
@include($module.'::volumesEditScripts', ['mixins' => $nestedMixins])
@endforeach
@mixin('volumesEditScripts')
@endpush

@push('styles')
<link href="{{ cachebust_asset('vendor/volumes/styles/main.css') }}" rel="stylesheet">
@foreach ($modules->getMixins('volumesEditStyles') as $module => $nestedMixins)
@include($module.'::volumesEditStyles', ['mixins' => $nestedMixins])
@endforeach
@mixin('volumesEditStyles')
@endpush

@section('navbar')
Expand All @@ -40,16 +34,12 @@
<div class="col-sm-6">
@include('volumes::edit.information')
@include('volumes::edit.annotation-sessions')
@foreach ($modules->getMixins('volumesEditLeft') as $module => $nestedMixins)
@include($module.'::volumesEditLeft', ['mixins' => $nestedMixins])
@endforeach
@mixin('volumesEditLeft')
</div>
<div class="col-sm-6">
@include('volumes::edit.images')
@include('volumes::edit.metadata')
@foreach ($modules->getMixins('volumesEditRight') as $module => $nestedMixins)
@include($module.'::volumesEditRight', ['mixins' => $nestedMixins])
@endforeach
@mixin('volumesEditRight')
</div>
</div>

Expand Down
10 changes: 2 additions & 8 deletions src/resources/views/images/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@extends('app')
@inject('modules', 'Biigle\Services\Modules')

@section('title', $image->filename)

@push('styles')
Expand All @@ -14,9 +12,7 @@
{{ $image->filename }}
<span class="pull-right">
<a href="{{route('volume', $volume->id)}}" title="Back to {{ $volume->name }}" class="btn btn-default">back</a>
@foreach ($modules->getMixins('imagesIndexButtons') as $module => $nestedMixins)
@include($module.'::imagesIndexButtons', array('mixins' => $nestedMixins))
@endforeach
@mixin('imagesIndexButtons')
</span>
</h2>
</div>
Expand All @@ -29,9 +25,7 @@
</div>
<div class="col-sm-6 col-lg-8">
<div class="row">
@foreach ($modules->getMixins('imagesIndex') as $module => $nestedMixins)
@include($module.'::imagesIndex', array('mixins' => $nestedMixins))
@endforeach
@mixin('imagesIndex')
</div>
</div>
</div>
Expand Down
5 changes: 1 addition & 4 deletions src/resources/views/manual/tutorials/image-labels.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@extends('manual.base')
@inject('modules', 'Biigle\Services\Modules')
@section('manual-title', 'Image Labels')

@section('manual-content')
Expand Down Expand Up @@ -43,8 +42,6 @@
Images can be filtered by image label in the volume overview. This can help you to quickly find, explore and annotate those images of a large volume that are relevant to you. To filter images by label, open the filter tab in the volume overview with a click on the <button class="btn btn-default btn-xs"><i class="glyphicon glyphicon-filter"></i></button> button in the sidebar. Now select the "image label" filter from the dropdown menu and enter the name of the image label in the field below. Finally, click <button class="btn btn-default btn-xs">Add rule</button> to activate the new filter rule. Of course you can combine this with other filter rules, too.
</p>

@foreach ($modules->getMixins('volumesManualImageLabels') as $module => $nestedMixins)
@include($module.'::volumesManualImageLabels')
@endforeach
@mixin('volumesManualImageLabels')
</div>
@endsection
9 changes: 3 additions & 6 deletions src/resources/views/manual/tutorials/remote-volumes.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@extends('manual.base')
@inject('modules', 'Biigle\Services\Modules')

@section('manual-title') Remote volumes @stop
@section('manual-title', 'Remote volumes')

@section('manual-content')
<div class="row">
Expand Down Expand Up @@ -70,9 +68,8 @@
<li>
Image metadata such as camera model, orientation or flash extracted from the image EXIF headers is not displayed on the image information view.
</li>
@foreach ($modules->getMixins('volumesManualRemoteVolumes') as $module => $nestedMixins)
@include($module.'::volumesManualRemoteVolumes')
@endforeach

@mixin('volumesManualRemoteVolumes')
</ul>
</div>
@endsection
14 changes: 3 additions & 11 deletions src/resources/views/show.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@extends('app')
@section('full-navbar', true)
@inject('modules', 'Biigle\Services\Modules')

@section('title', $volume->name)

@push('scripts')
Expand All @@ -23,17 +21,13 @@
biigle.$declare('volumes.labelTrees', {!!$labelTrees!!});
@endcan
</script>
@foreach ($modules->getMixins('volumesScripts') as $module => $nestedMixins)
@include($module.'::volumesScripts', ['mixins' => $nestedMixins])
@endforeach
@mixin('volumesScripts')
@endpush

@push('styles')
<link href="{{ cachebust_asset('vendor/label-trees/styles/main.css') }}" rel="stylesheet">
<link href="{{ cachebust_asset('vendor/volumes/styles/main.css') }}" rel="stylesheet">
@foreach ($modules->getMixins('volumesStyles') as $module => $nestedMixins)
@include($module.'::volumesStyles', ['mixins' => $nestedMixins])
@endforeach
@mixin('volumesStyles')
@endpush

@section('navbar')
Expand All @@ -59,9 +53,7 @@
<sidebar-tab name="sorting" icon="sort" title="Sort images" :highlight="sortingActive">
@include('volumes::show.sorting')
</sidebar-tab>
@foreach ($modules->getMixins('volumesSidebar') as $module => $nestedMixins)
@include($module.'::volumesSidebar')
@endforeach
@mixin('volumesSidebar')
</sidebar>
<div class="volume-content">
<loader-block v-cloak :active="loading"></loader-block>
Expand Down

0 comments on commit 9bfd0ff

Please sign in to comment.