diff --git a/resources/views/themes/base/admin/create_album.blade.php b/resources/views/themes/base/admin/create_album.blade.php
index 718b0e1..e58be58 100644
--- a/resources/views/themes/base/admin/create_album.blade.php
+++ b/resources/views/themes/base/admin/create_album.blade.php
@@ -32,7 +32,7 @@
-
+
diff --git a/resources/views/themes/base/admin/show_album.blade.php b/resources/views/themes/base/admin/show_album.blade.php
index 561b959..1a98a45 100644
--- a/resources/views/themes/base/admin/show_album.blade.php
+++ b/resources/views/themes/base/admin/show_album.blade.php
@@ -88,10 +88,12 @@
// Populate the list of albums in the view model
@foreach ($albums as $album)
- editViewModel.data.albums.push({
- 'id': '{{ $album->id }}',
- 'name': '{!! addslashes($album->name) !!}'
- });
+ @if(Gate::check('edit', $album) && Gate::check('upload-photos', $album))
+ editViewModel.data.albums.push({
+ 'id': '{{ $album->id }}',
+ 'name': '{!! addslashes($album->name) !!}'
+ });
+ @endif
@endforeach
$(document).ready(function() {
@@ -124,11 +126,11 @@
{{-- Select All/None links on the permissions tab --}}
$('a.select-all').click(function() {
- $('input:checkbox', $(this).closest('.panel-body')).prop('checked', true);
+ $('input:checkbox', $(this).closest('.card-block')).prop('checked', true);
return false;
});
$('a.select-none').click(function() {
- $('input:checkbox', $(this).closest('.panel-body')).prop('checked', false);
+ $('input:checkbox', $(this).closest('.card-block')).prop('checked', false);
return false;
});