-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4abaf37
commit 229cd36
Showing
23 changed files
with
138 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,7 @@ class AbilityBulk extends Bulk | |
'ability_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,7 @@ class CalendarBulk extends Bulk | |
'tags', | ||
'private_choice', | ||
'format', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,7 @@ class ConversationBulk extends Bulk | |
'name', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,7 @@ class CreatureBulk extends Bulk | |
'creature_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,7 @@ class DiceRollBulk extends Bulk | |
'character_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,7 @@ class EventBulk extends Bulk | |
'location_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,7 @@ class FamilyBulk extends Bulk | |
'location_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,7 @@ class ItemBulk extends Bulk | |
'character_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,7 @@ class JournalBulk extends Bulk | |
'location_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,7 @@ class LocationBulk extends Bulk | |
'location_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,7 @@ class MapBulk extends Bulk | |
'map_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,7 @@ class NoteBulk extends Bulk | |
'note_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,7 @@ class RaceBulk extends Bulk | |
'race_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,7 @@ class TimelineBulk extends Bulk | |
'timeline_id', | ||
'tags', | ||
'private_choice', | ||
'entity_image', | ||
'entity_header', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,52 @@ | ||
@php | ||
$name = 'entity_header_uuid'; | ||
$label = __('fields.gallery-header.description'); | ||
$description = __('crud.fields.image'); | ||
if (isset($bulk)) { | ||
$name = 'entity_header'; | ||
$label = __('fields.header-image.title'); | ||
$description = ''; | ||
} | ||
$preset = null; | ||
if (isset($model) && $model->entity && $model->entity->header_uuid) { | ||
$preset = $model->entity->header; | ||
} else { | ||
$preset = FormCopy::field('header')->entity()->select(); | ||
} | ||
@endphp | ||
<x-forms.field | ||
field="header-gallery" | ||
:label="__('fields.gallery-header.description')"> | ||
<x-grid type="3/4"> | ||
<div class="col-span-3"> | ||
<x-forms.foreign | ||
:campaign="$campaign" | ||
name="entity_header_uuid" | ||
:allowClear="true" | ||
:route="route('images.find', $campaign)" | ||
:label="__('crud.fields.image')" | ||
:placeholder="__('fields.gallery.placeholder')" | ||
:selected="$preset"> | ||
</x-forms.foreign> | ||
</div> | ||
|
||
<div class="preview"> | ||
@if (!empty($model->entity) && !empty($model->entity->header_uuid) && !empty($model->entity->header)) | ||
@include('cruds.fields._image_preview', [ | ||
'image' => $model->entity->header->getUrl(80, null, 'header_image'), | ||
'title' => $model->name, | ||
]) | ||
@endif | ||
</div> | ||
</x-grid> | ||
</x-forms.field> | ||
@if (isset($bulk) && !$campaign->boosted()) | ||
@include('cruds.fields.helpers.boosted', ['key' => 'fields.header-image.boosted-description']) | ||
@else | ||
<x-forms.field | ||
field="header-gallery" | ||
:label="$label"> | ||
<x-grid type="3/4"> | ||
<div class="col-span-3"> | ||
<x-forms.foreign | ||
:campaign="$campaign" | ||
:name="$name" | ||
:allowClear="true" | ||
:route="route('images.find', $campaign)" | ||
:label="$description" | ||
:placeholder="__('fields.gallery.placeholder')" | ||
:selected="$preset"> | ||
</x-forms.foreign> | ||
</div> | ||
|
||
<div class="preview"> | ||
@if (!empty($model->entity) && !empty($model->entity->header_uuid) && !empty($model->entity->header)) | ||
@include('cruds.fields._image_preview', [ | ||
'image' => $model->entity->header->getUrl(80, null, 'header_image'), | ||
'title' => $model->name, | ||
]) | ||
@endif | ||
</div> | ||
</x-grid> | ||
</x-forms.field> | ||
@endif | ||
@if (!empty($model->entity) && !empty($model->entity->image_uuid) && empty($model->entity->image)) | ||
<input type="hidden" name="entity_image_uuid" value="{{ $model->entity->image_uuid }}" /> | ||
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,41 @@ | ||
|
||
@php | ||
$preset = null; | ||
if (isset($model) && $model->entity && $model->entity->image_uuid) { | ||
$preset = $model->entity->image; | ||
} else { | ||
$preset = FormCopy::field('image')->entity()->select(); | ||
} | ||
@endphp | ||
@php | ||
$preset = null; | ||
$name = 'entity_image_uuid'; | ||
if (isset($bulk)) { | ||
$name = 'entity_image'; | ||
} | ||
if (isset($model) && $model->entity && $model->entity->image_uuid) { | ||
$preset = $model->entity->image; | ||
} else { | ||
$preset = FormCopy::field('image')->entity()->select(); | ||
} | ||
@endphp | ||
@if(!isset($bulk)) | ||
<x-helper> | ||
{{ __('fields.gallery-image.description') }} | ||
</x-helper> | ||
<x-grid type="3/4"> | ||
<div class="col-span-3"> | ||
<x-forms.foreign | ||
:campaign="$campaign" | ||
name="entity_image_uuid" | ||
:allowClear="true" | ||
:route="route('images.find', $campaign)" | ||
:label="__('crud.fields.image')" | ||
:placeholder="__('fields.gallery.placeholder')" | ||
:selected="$preset"> | ||
</x-forms.foreign> | ||
</div> | ||
@if (!empty($model->entity) && !empty($model->entity->image_uuid) && !empty($model->entity->image)) | ||
<div class="preview-v2"> | ||
<a class="h-28 cover-background relative inline-block w-full text-white bg-red-900/50 hover:bg-red-900/90" href="{{ route('campaign.gallery.index', [$campaign, 'folder_id' => $model->entity->image->folder_id]) }}" style="background-image: url('{{ $model->entity->image->getUrl(240,112) }}')" title="{{ $model->name }}"> | ||
</a> | ||
</div> | ||
@endif | ||
</x-grid> | ||
@if (!empty($model->entity) && !empty($model->entity->image_uuid) && empty($model->entity->image)) | ||
<input type="hidden" name="entity_image_uuid" value="{{ $model->entity->image_uuid }}" /> | ||
@endif | ||
@endif | ||
<x-grid type="3/4"> | ||
<div class="col-span-3"> | ||
<x-forms.foreign | ||
:campaign="$campaign" | ||
:name="$name" | ||
:allowClear="true" | ||
:route="route('images.find', $campaign)" | ||
:label="__('crud.fields.image')" | ||
:placeholder="__('fields.gallery.placeholder')" | ||
:selected="$preset"> | ||
</x-forms.foreign> | ||
</div> | ||
@if (!empty($model->entity) && !empty($model->entity->image_uuid) && !empty($model->entity->image)) | ||
<div class="preview-v2"> | ||
<a class="h-28 cover-background relative inline-block w-full text-white bg-red-900/50 hover:bg-red-900/90" href="{{ route('campaign.gallery.index', [$campaign, 'folder_id' => $model->entity->image->folder_id]) }}" style="background-image: url('{{ $model->entity->image->getUrl(240,112) }}')" title="{{ $model->name }}"> | ||
</a> | ||
</div> | ||
@endif | ||
</x-grid> | ||
@if (!empty($model->entity) && !empty($model->entity->image_uuid) && empty($model->entity->image)) | ||
<input type="hidden" name="entity_image_uuid" value="{{ $model->entity->image_uuid }}" /> | ||
@endif |