index_ajax.blade.php 2.26 KB
<div class="w-full overflow-x-auto">
    <table class="w-full whitespace-no-wrap">
        <thead>
        <tr
            class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800"
        >
            <th class="px-4 py-3">№</th>
            <th class="px-4 py-3">Название компании</th>
            <th class="px-4 py-3">Комментатор</th>
            <th class="px-4 py-3">Заголовок/Текст</th>
            <th class="px-4 py-3">Дата коммента</th>
            <th class="px-4 py-3">Разрешить</th>
        </tr>
        </thead>
        <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800">
        @foreach($answers as $answer)
            <tr class="text-gray-700 dark:text-gray-400">
                <td class="px-4 py-3">
                    {{$answer->id}}
                </td>
                <td class="px-4 py-3">
                    {{$answer->employer->name_company}}
                </td>
                <td class="px-4 py-3">
                    {{$answer->user->name}}
                </td>
                <td class="px-4 py-3 col" >
                    <!--<div class="flex items-center text-sm">
                        <div >-->
                    <p class="font-semibold">{{$answer->title}}</p>
                    <textarea style="width:250px; height: 100px;" readonly="readonly" class="text-xs text-gray-600 dark:text-gray-400">{{ $answer->text }}</textarea>
                    <!--</div>
                </div>-->
                </td>
                <td class="px-4 py-3 text-sm">
                    {{ $answer->created_at }}
                </td>
                <td class="px-4 py-3 text-sm">
                    <input type="checkbox" class="checkban" value="{{$answer->id}}" name="moderate_{{$answer->id}}" {{ ($answer->is_moderate) ? "checked" : "" }}/>
                </td>
            </tr>
        @endforeach
        </tbody>
    </table>
</div>

<div class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800">
    <?=$answers->appends($_GET)->links('admin.pagginate'); ?>
</div>