Viewing File: /usr/local/cpanel/whostmgr/docroot/cgi/ncssl/source/templates/table.html.twig
{% set cancelledStatuses = ['REVOKED', 'CANCELLED'] %}
<div class="certificates-table rounded border overflow-x-auto mb-2">
<table class="table table-hover mb-0 rounded" id="{{ id }}">
{% if certificates %}
<thead>
<tr>
<th>ID</th>
<th>SSL Name</th>
<th>Expires</th>
<th>Domain</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{% for certificate in certificates %}
<tr>
<td data-indexed>{{ certificate.id }}</td>
<td data-indexed>{{ productManager.getNameByType(certificate.type) }}</td>
<td>
{% if certificate.expires != 0 %}
{{ certificate.expires|date("d M Y") }}
{% elseif certificate.years > 1 %}
{{ 'valid for ' ~ certificate.years ~ 'years' }}
{% else %}
{{ 'valid for ' ~ certificate.years ~ 'year' }}
{% endif %}
</td>
<td data-indexed class="domain-cell">
{% if certificate.common_name %}
<a href="https://{{ certificate.common_name }}" target="_blank">{{ certificate.common_name }}</a>
{% else %}
<small class="text-muted">not activated yet</small>
{% endif %}
</td>
<td data-indexed>
{% if certificate.expires and date().timestamp > certificate.expires %}
<div class="dropdown">
<button class="btn btn-danger btn-sm dropdown-toggle" type="button" id="expiredMenu" data-bs-toggle="dropdown" aria-expanded="false">
Expired
</button>
<ul class="dropdown-menu" aria-labelledby="expiredMenu">
{#old php: <?php echo ($ssl['nc_user'] != $user_nc_login ? 'disabled' : '') ?>, but there are no such var#}
<li>
{% if certificate.discontinued %}
<button type="button" class="dropdown-item" data-bs-toggle="modal" data-bs-target="#reorderSymantecModal">Reorder</button>
{% else %}
<a class="dropdown-item" href="{{ ncUrl ~ 'cart/addtocart.aspx?producttype=ssl&product=' ~ certificate.type|replace({' ': '-'}) ~ '&action=purchase' }}" target="_blank">Reorder</a>
{% endif %}
</li>
</ul>
</div>
{% elseif certificate.status is same as('ACTIVE') %}
{% if date().timestamp + 2629743 > certificate.expires %}
<button class="btn btn-warning btn-sm"
data-renewal-modal-toggle
data-href="{{ ncUrl ~ 'cart/addtocart.aspx?producttype=ssl&action=renew&cids=' ~ certificate.id }}" target="_blank">Renew</button>
{% else %}
<a href="{{ generateUrlByRouteName('reissue.get', {'nc_id': certificate.id}) }}" class="btn btn-light btn-sm">Install</a>
{% endif %}
{% elseif certificate.status is same as('NEWRENEWAL') and certificate.host not in domains %}
<span class="text-danger" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-custom-class="ncssl-tooltip" title="You can install SSL activated for domain or subdomain of this сPanel account">
ineligible
</span>
{% elseif certificate.status in cancelledStatuses %}
<div class="dropdown">
<button class="btn btn-danger btn-sm dropdown-toggle" type="button" id="cancelledMenu" data-bs-toggle="dropdown" aria-expanded="false">
Cancelled
</button>
<ul class="dropdown-menu" aria-labelledby="cancelledMenu">
{#old php: <?php echo ($ssl['nc_user'] != $user_nc_login ? 'disabled' : '') ?>, but there are no such var#}
<li>
{% if certificate.discontinued %}
<button type="button" class="dropdown-item" data-bs-toggle="modal" data-bs-target="#reorderSymantecModal">Reorder</button>
{% else %}
<a class="dropdown-item" href="{{ ncUrl ~ 'cart/addtocart.aspx?producttype=ssl&product=' ~ certificate.type|replace({' ': '-'}) ~ '&action=purchase' }}" target="_blank">Reorder</a>
{% endif %}
</li>
</ul>
</div>
{% else %}
<a href="{{ generateUrlByRouteName('activation.get', {'id': certificate.id, 'years': certificate.years}) }}" class="btn btn-light btn-sm">Install</a>
{% endif %}
</td>
</tr>
{% endfor %}
<tr class="empty-search" style="display: none;">
<td colspan="5" class="text-center">No new SSL certificate matches your search</td>
</tr>
</tbody>
{% else %}
<thead>
<tr class="no-items">
<td colspan="5" class="text-center">
You don't have any SSLs to install. <br/>
Domain validation single domain SSL from your Namecheap account will show up here
</td>
</tr>
</thead>
{% endif %}
</table>
</div>
Back to Directory
File Manager