-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathfeatured-related.blade.php
71 lines (65 loc) · 2.65 KB
/
featured-related.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<a17-fieldset id="side_related" title="Sidebar Related">
@formField('browser', [
'routePrefix' => $routePrefix,
'moduleName' => $moduleName,
'name' => 'sidebar_items',
'label' => 'Sidebar items',
'max' => 6,
'endpoints' => [
[
'label' => 'Article',
'value' => moduleRoute('articles', 'collection.articles_publications', 'browser', ['is_unlisted' => false]),
],
[
'label' => 'Highlight',
'value' => moduleRoute('highlights', 'collection', 'browser'),
],
[
'label' => 'Event',
'value' => moduleRoute('events', 'exhibitions_events', 'browser'),
],
[
'label' => 'Exhibition',
'value' => moduleRoute('exhibitions', 'exhibitions_events', 'browser'),
],
[
'label' => 'Interactive Feature',
'value' => moduleRoute('experiences', 'collection.interactive_features', 'browser'),
],
[
'label' => 'Digital Publication',
'value' => moduleRoute('digitalPublications', 'collection.articles_publications', 'browser'),
],
[
'label' => 'Digital Publication Article',
'value' => moduleRoute('digitalPublications.articles', 'collection.articles_publications', 'browserbrowser'),
],
[
'label' => 'Video',
'value' => moduleRoute('videos', 'collection.articles_publications', 'browser'),
],
],
])
@formField('checkbox', [
'name' => 'toggle_autorelated',
'label' => 'Suppress auto-related items',
'default' => false,
])
<br>
@component('twill::partials.form.utils._connected_fields', [
'fieldName' => 'toggle_autorelated',
'fieldValues' => false,
'renderForBlocks' => false
])
@if(count($autoRelated) > 0)
<p>These items are automatically related and will fill the sidebar along with any of the above selected items.</p>
<ol style="margin: 1em 0; padding-left: 40px">
@foreach($autoRelated as $related)
<li style="list-style-type: decimal; margin-bottom: 0.5em">
{!! Str::title($related->present()->articleType) . (Str::title($related->present()->articleType) ? ":" : "") !!} <a href="{{$related->admin_edit_url}}">{{ $related->title }}</a>
</li>
@endforeach
</ol>
@endif
@endcomponent
</a17-fieldset>