getnamingo-registry/cp/resources/views/admin/domains/viewDomain.twig
2025-04-03 08:40:12 +03:00

213 lines
No EOL
12 KiB
Twig

{% extends "layouts/app.twig" %}
{% block title %}{{ __('Domain Details') }}{% endblock %}
{% block content %}
<div class="page-wrapper">
<!-- Page header -->
<div class="page-header d-print-none">
<div class="container-xl">
<div class="row g-2 align-items-center">
<div class="col">
<!-- Page pre-title -->
<div class="page-pretitle">
{{ __('Overview') }}
</div>
<h2 class="page-title">
{{ __('Domain Details') }}
</h2>
</div>
<!-- Page title actions -->
<div class="col-auto ms-auto d-print-none">
<div class="btn-list">
<a href="/domain/renew/{{ domain.name_o }}" class="btn btn-outline-success d-none d-sm-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" /><path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" /></svg>
{{ __('Renew Domain') }}
</a>
<a href="/domain/renew/{{ domain.name_o }}" class="btn btn-outline-success d-sm-none btn-icon" aria-label="{{ __('Renew Domain') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" /><path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" /></svg>
</a>
<a href="/domain/update/{{ domain.name_o }}" class="btn btn-primary d-none d-sm-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" /><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" /><path d="M16 5l3 3" /></svg>
{{ __('Update Domain') }}
</a>
<a href="/domain/update/{{ domain.name_o }}" class="btn btn-primary d-sm-none btn-icon" aria-label="{{ __('Update Domain') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1" /><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z" /><path d="M16 5l3 3" /></svg>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- Page body -->
<div class="page-body">
<div class="container-xl">
<div class="col-12">
<div class="card mb-3">
<div class="card-header">
<h3 class="card-title">
{{ __('Domain') }} {{ domain.name }}&nbsp;
{% if domainStatus is defined and domainStatus | length > 0 %}
{# Iterate over the domainStatus array #}
{% for statusItem in domainStatus %}
<span class="status status-green" title="Status">{{ statusItem.status }}</span>&nbsp;
{% endfor %}
{% endif %}
{# Display RGP status if present #}
{% if domain.rgpstatus %}
<span class="status status-info" title="Status">{{ domain.rgpstatus }}</span>
{% endif %}
{# Fallback to 'ok' if no status or rgpstatus exists #}
{% if (domainStatus is not defined or domainStatus | length == 0) and domain.rgpstatus is not defined %}
<span class="status status-info" title="Status">ok</span>
{% endif %}
</h3>
</div>
<div class="card-body">
<div class="datagrid">
<div class="datagrid-item">
<div class="datagrid-title">{{ __('Registered On') }}</div>
<div class="datagrid-content">{{ domain.crdate }}</div>
</div>
<div class="datagrid-item">
<div class="datagrid-title">{{ __('Last Updated') }}</div>
<div class="datagrid-content">{{ domain.lastupdate }}</div>
</div>
<div class="datagrid-item">
<div class="datagrid-title">{{ __('Expiration Date') }}</div>
<div class="datagrid-content">{{ domain.exdate }}</div>
</div>
<div class="datagrid-item">
<div class="datagrid-title">{{ __('Registrar') }}</div>
<div class="datagrid-content">{{ registrars.name }}</div>
</div>{% if minimum_data == 'false' %}
<div class="datagrid-item">
<div class="datagrid-title">{{ __('Registrant') }}</div>
<div class="datagrid-content"><strong><a href="/contact/view/{{ domainRegistrant.identifier }}">{{ domainRegistrant.identifier }}</a></strong></div>
</div>
{% for contact in domainContacts %}
<div class="datagrid-item">
<div class="datagrid-title">{{ contact.type }} {{ __('contact') }}</div>
<div class="datagrid-content"><strong><a href="/contact/view/{{ contact.identifier }}">{{ contact.identifier }}</a></strong></div>
</div>
{% endfor %}{% endif %}
<div class="datagrid-item">
<div class="datagrid-title">{{ __('Auth Info') }}</div>
<div class="datagrid-content blur" id="authInfo" onclick="toggleBlur()">
{{ domainAuth.authinfo }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-md-12">
<div class="card h-100">
<div class="card-body">
<h5 class="card-title">{{ __('Nameservers') }}</h5>
{% if domainHosts is not empty %}
<div class="datagrid">
{% for host in domainHosts %}
<div class="datagrid-item">
<div class="datagrid-title">{{ __('Nameserver') }} {{ loop.index }}</div>
<div class="datagrid-content">
<strong><a href="/host/view/{{ host.name }}">{{ host.name }}</a></strong>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-md-12">
<div class="card h-100">
<div class="card-body">
<h5 class="card-title">{{ __('DNSSEC Data') }}</h5>
{% if domainSecdns|length > 0 %}
<div id="dnssecTable" class="mb-3">
<div class="table-responsive">
<table class="table table-vcenter card-table table-striped">
<thead>
<tr>
{% set dsDataExists = false %}
{% set keyDataExists = false %}
{% for row in domainSecdns %}
{% if row.interface == 'dsData' %}
{% set dsDataExists = true %}
{% elseif row.interface == 'keyData' %}
{% set keyDataExists = true %}
{% endif %}
{% endfor %}
<!-- Headers for dsData -->
{% if dsDataExists %}
<th>Keytag</th>
<th>Algorithm</th>
<th>Digest Type</th>
<th>Digest</th>
{% endif %}
<!-- Headers for keyData -->
{% if keyDataExists %}
<th>Flags</th>
<th>Protocol</th>
<th>Keydata Algorithm</th>
<th>Public Key</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for row in domainSecdns %}
<tr>
{% if row.interface == 'dsData' %}
<td>{{ row.keytag }}</td>
<td>{{ row.alg }}</td>
<td>{{ row.digesttype }}</td>
<td>{{ row.digest }}</td>
{% elseif row.interface == 'keyData' %}
<td>{{ row.flags }}</td>
<td>{{ row.protocol }}</td>
<td>{{ row.keydata_alg }}</td>
<td>{{ row.pubkey }}</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
{% include 'partials/footer.twig' %}
</div>
<style>
.blur {
filter: blur(5px);
cursor: pointer;
}
.blur:hover {
filter: blur(2px);
}
</style>
<script>
function toggleBlur() {
var authInfo = document.getElementById("authInfo");
authInfo.classList.toggle("blur");
}
</script>
{% endblock %}