| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <div class="table-responsive">
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>Статус/Источник</th>
- @foreach($channels as $channelKey => $channelName)
- <th class="text-center">
- {{ $channelName }}
- @if(!empty($disabledChannels[$channelKey]))
- <br><small class="text-muted">недоступен</small>
- @endif
- </th>
- @endforeach
- </tr>
- </thead>
- <tbody>
- @foreach($sections as $section)
- <tr>
- <td colspan="{{ count($channels) + 1 }}" style="background-color: #d4edda;">
- <strong>{{ $section['title'] }}</strong>
- </td>
- </tr>
- @foreach($section['options'] as $optionKey => $optionName)
- <tr>
- <td>
- @if(!empty($section['colors'][$optionKey]))
- <span class="badge fs-6 text-bg-{{ $section['colors'][$optionKey] }}">{{ $optionName }}</span>
- @else
- {{ $optionName }}
- @endif
- </td>
- @foreach($channels as $channelKey => $channelName)
- @php($isDisabled = !empty($disabledChannels[$channelKey]))
- <td class="text-center">
- <input class="form-check-input" type="checkbox"
- name="notification_settings[{{ $section['settingsKey'] }}][{{ $optionKey }}][{{ $channelKey }}]"
- value="1"
- @disabled($isDisabled)
- @if(!$isDisabled)
- @checked(old("notification_settings.{$section['settingsKey']}.{$optionKey}.{$channelKey}", $section['settings'][$optionKey][$channelKey] ?? false))
- @endif
- >
- </td>
- @endforeach
- </tr>
- @endforeach
- @endforeach
- </tbody>
- </table>
- </div>
|