mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-23 23:49:37 +00:00
a61c9c5e98
- Primarily moved and re-organised view files. - Included readme within views to document the convention. - Fixed some issues with page field select list in previous commit. - Tweaked some route names while going through. - Split some views out further. Closes #2805
34 lines
1.6 KiB
PHP
34 lines
1.6 KiB
PHP
{{--
|
|
$value - Setting value
|
|
$name - Setting input name
|
|
--}}
|
|
<div components="add-remove-rows"
|
|
option:add-remove-rows:row-selector=".card"
|
|
option:add-remove-rows:remove-selector="button.text-neg">
|
|
|
|
<div component="sortable-list"
|
|
option:sortable-list:handle-selector=".handle">
|
|
@foreach(array_merge($value, [['label' => '', 'url' => '']]) as $index => $link)
|
|
<div class="card drag-card {{ $loop->last ? 'hidden' : '' }}" @if($loop->last) refs="add-remove-rows@model" @endif>
|
|
<div class="handle">@icon('grip')</div>
|
|
@foreach(['label', 'url'] as $prop)
|
|
<div class="outline">
|
|
<input value="{{ $link[$prop] ?? '' }}"
|
|
placeholder="{{ trans('settings.app_footer_links_' . $prop) }}"
|
|
aria-label="{{ trans('settings.app_footer_links_' . $prop) }}"
|
|
name="{{ $name }}[{{ $loop->parent->last ? 'randrowid' : $index }}][{{$prop}}]"
|
|
type="text"
|
|
autocomplete="off"/>
|
|
</div>
|
|
@endforeach
|
|
<button type="button"
|
|
aria-label="{{ trans('common.remove') }}"
|
|
class="text-center drag-card-action text-neg">
|
|
@icon('close')
|
|
</button>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
|
|
<button refs="add-remove-rows@add" type="button" class="text-button">{{ trans('settings.app_footer_links_add') }}</button>
|
|
</div> |