<div class="container-fluid">

<div class="card border-0 shadow-sm mb-4">

<div class="card-body">

<h2 class="fw-bold">
Indexing Readiness Center
</h2>

<div class="text-muted">
Scopus, DOAJ, Google Scholar, Dimensions and OpenAlex readiness.
</div>

</div>

</div>

<div class="card border-0 shadow-sm">

<div class="card-header bg-success text-white">

Indexing Readiness Assessment

</div>

<div class="card-body">

<div class="table-responsive">

<table class="table table-bordered table-hover align-middle">

<thead>

<tr>

<th>ID</th>

<th>Submission</th>

<th>Title</th>

<th>Issue</th>

<th>DOI</th>

<th>Galley</th>

<th>Score</th>

<th>Status</th>

</tr>

</thead>

<tbody>

<?php foreach($rows as $r): ?>

<tr>

<td>
<?= (int)$r['id'] ?>
</td>

<td>
<?= htmlspecialchars($r['submission_no']) ?>
</td>

<td>
<?= htmlspecialchars($r['title']) ?>
</td>

<td>
<?= (int)$r['issue_id'] ?>
</td>

<td>

<?php if(!empty($r['doi'])): ?>

<span class="badge bg-success">
DOI
</span>

<?php else: ?>

<span class="badge bg-danger">
Missing
</span>

<?php endif; ?>

</td>

<td>

<?php if(!empty($r['galley_id'])): ?>

<span class="badge bg-success">
Approved
</span>

<?php else: ?>

<span class="badge bg-danger">
Missing
</span>

<?php endif; ?>

</td>

<td>

<div class="fw-bold">

<?= (int)$r['readiness_score'] ?>%

</div>

</td>

<td>

<?php
$score =
    (int)$r['readiness_score'];
?>

<?php if($score >= 90): ?>

<span class="badge bg-success">
Ready
</span>

<?php elseif($score >= 70): ?>

<span class="badge bg-warning text-dark">
Nearly Ready
</span>

<?php else: ?>

<span class="badge bg-danger">
Needs Work
</span>

<?php endif; ?>

</td>

</tr>

<?php endforeach; ?>

</tbody>

</table>

</div>

</div>

</div>

<div class="card border-0 shadow-sm mt-4">

<div class="card-header bg-primary text-white">

Index Targets

</div>

<div class="card-body">

<ul>

<li>Scopus Readiness</li>

<li>DOAJ Readiness</li>

<li>Google Scholar Readiness</li>

<li>Dimensions Readiness</li>

<li>OpenAlex Readiness</li>

<li>CrossRef Readiness</li>

</ul>

</div>

</div>

</div>
