@extends('layouts.app')
@section('title')
{{ Auth::user()->name }}
@parent
@stop
@section('header_styles')
<meta name="csrf_token" content="{{ csrf_token() }}">
<link href="{{ asset('assets/vendors/jasny-bootstrap/css/jasny-bootstrap.css') }}" rel="stylesheet" />
<link href="{{ asset('assets/vendors/x-editable/css/bootstrap-editable.css') }}" rel="stylesheet" />
<link href="{{ asset('assets/css/pages/user_profile.css') }}" rel="stylesheet" />
<link href="{{ asset('assets/css/datatable.css') }}" rel="stylesheet" />
<!-- custom styling -->
<link rel="stylesheet" href="{{ asset('dashboard/css/style.css') }}">
<?php
if (empty($param['user_theme']->user_css)) {
?>
    <style>
        .navbar-item {
            color: #e0e1e2;
            transition: .4s all ease-in-out;
            padding: 20px;
            font-size: 15px;
            background-color: #252f3f;
        }

        .navbar-item:hover {
            background-color: #000;
            color: #fff;
        }

        .navbar-item:not(last-child) {
            border-bottom: 1px solid #484848;
        }

        .sticky-navbar-nav {
            position: sticky;
            top: 70px;
        }

        .sticky-navbar-nav .nav-item {
            text-align: left !important;
        }

        .sticky-navbar-nav .nav-item a {
            padding-left: 12px;
            padding-right: 12px;
        }

        .sticky-navbar-nav .nav-item .icon {
            font-size: 18px !important;
            margin-right: 6px;
        }
    </style>
<?php
} else {
?>
    <style>
        <?php echo $param['user_theme']->user_css ?>
    </style>
<?php
}
?>

@stop

{{-- Page content --}}

@section('content')
<section class="pt-0">
    <div class="container-fluid">
        <div class="row py-3" id="user_theme">
            <!-- Left Menu -->
            <div class="col-md-2">
                <ul class="navbar-nav sticky-navbar-nav rounded overflow-hidden">
                    <li class="nav-item">
                        <a class="nav-link navbar-item" href="/home">
                            <i class="fa-solid fa-house icon"></i> Dashboard</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link navbar-item" href="/member">
                            <i class="fa-solid fa-shop"></i> My Member Institute/Societies</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link navbar-item" href="/member/awaiting-manuscript">
                            <i class="fa-solid fa-hourglass-half icon"></i> Awaiting Manuscript Approval</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link navbar-item" href="/member/approved-manuscript">
                            <i class="fa-solid fa-wallet icon"></i> Approved Manuscript</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link navbar-item" href="/member/rejected-manuscript">
                            <i class="fa-solid fa-rectangle-xmark icon"></i> Rejected Manuscript</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link navbar-item" href="/member/pending-invoice">
                            <i class="fa-solid fa-inbox icon"></i> Pending Invoices</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link navbar-item" href="/member/paid-invoice">
                            <i class="fa-regular fa-credit-card icon"></i> Paid Invoices</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link navbar-item" href="/member/open-access">
                            <i class="fa-solid fa-book-open"></i> Open Access Content</a>
                    </li>
                </ul>
            </div>
            <!-- End Left Menu -->
            <div class="col-md-10">
                @if($pages=='')
                <div class="card p-3 shadow rounded">
                    <div class="row border-bottom mb-3">
                        <h4 class="p-3 mb-0">Institutes/Societies</h4>
                    </div>
                    <div class="table-responsive overflow-v">
                        <table class="table table-striped" id="table1">
                            <thead class="table-warning" id="user_theme_table1">
                                <tr>
                                    <th class="text-black">S.#</th>
                                    <th class="text-black">Institute/Society Name</th>
                                    <th class="text-black">City</th>
                                    <th class="text-black">State</th>
                                    <th class="text-black">Country</th>
                                    <th class="text-black">Published Content</th>
                                </tr>
                            </thead>
                            <tbody>
                                @php $a=1; @endphp
                                @foreach($member_publish_manuscript as $key => $value)
                                <tr>
                                    <td>{{ $a }}</td>
                                    <td>{{ $value->name }}</td>
                                    <td>{{ $value->city }}</td>
                                    <td>{{ $value->state }}</td>
                                    <td>{{ $value->country }}</td>
                                    <td>
                                        @if($value->total == 0)
                                        {{$value->total}}
                                        @elseif(!empty($param['institution_associations']))
                                        <a class="text-dark" href="/member/manuscript-list/{{$value->institution_id}}"><b>({{$value->total}})</b></a>
                                        @else
                                        <a class="text-dark" href="/member/society-manuscript-list/{{$value->society_id}}"><b>({{$value->total}})</b></a>
                                    </td>
                                    @endif
                                </tr>
                                @php $a++ @endphp
                                @endforeach
                            </tbody>
                        </table>
                    </div>
                </div>

                @elseif($pages=='awaiting-manuscript')
                @include('includes.awaiting_manuscript')

                @elseif($pages=='approved-manuscript')
                @include('includes.approved_manuscript')

                @elseif($pages=='rejected-manuscript')
                @include('includes.rejected_manuscript')

                @elseif($pages=='pending-invoice')
                @include('includes.pending_invoice')

                @elseif($pages=='paid-invoice')
                @include('includes.paid_invoice')

                @elseif($pages=='manuscript-list')
                @include('includes.institute_manuscript')

                @elseif($pages=='detail-manuscript')
                @include('includes.detail_manuscript')

                @elseif($pages=='society-manuscript-list')
                @include('includes.society_manuscript')

                @elseif($pages=='open-access')
                @include('includes.open_access_user')

                @elseif($pages=='open-access-content')
                @include('includes.open_access_content')
                @endif
            </div>
        </div>
    </div>
</section>
@stop


{{-- page level scripts --}}
@section('footer_scripts')
<script>
    $(document).ready(function() {
        $.noConflict();
        $('#table1').DataTable();
    });
</script>
<!-- Bootstrap WYSIHTML5 -->
<script src="{{ asset('assets/vendors/jasny-bootstrap/js/jasny-bootstrap.js') }}" type="text/javascript"></script>
<!-- bootstrap javascript cdn -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<!-- fontawesome cdn -->
<script src="https://kit.fontawesome.com/1cb4e2d48a.js" crossorigin="anonymous"></script>
<!-- ApexChar cdn -->
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
<!-- javascript file -->
<script src="{{ asset('dashboard/js/app.js') }}"></script>
<script src="{{ asset('dashboard/js/app.js') }}"></script>
<script src="{{ asset('assets/js/datatable.js') }}"></script>
@stop