Allocation tokens can be viewed in the panel now

This commit is contained in:
Pinga 2024-03-06 00:24:15 +02:00
parent 420bd952f8
commit e0f77397d8
6 changed files with 115 additions and 14 deletions

View file

@ -20,16 +20,6 @@
<!-- Page title actions -->
<div class="col-auto ms-auto d-print-none">
<div class="btn-list">
<span class="d-none d-sm-inline">
<a href="{{route('manageReserved')}}" class="btn btn-secondary">
{{ __('Manage Reserved Names') }}
</a>
</span>
<span class="d-sm-none">
<a href="{{route('manageReserved')}}" class="btn btn-secondary btn-icon" title="{{ __('Manage Reserved Names') }}" aria-label="{{ __('Manage Reserved Names') }}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 20h6" /><path d="M12 14v6" /><path d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" /><path d="M9 9h6" /></svg>
</a>
</span>
<a href="{{route('createTld')}}" class="btn btn-primary d-none d-sm-inline-block">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" /></svg>
{{ __('Create New TLD') }}

View file

@ -0,0 +1,90 @@
{% extends "layouts/app.twig" %}
{% block title %}{{ __('Manage Allocation Tokens') }}{% 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">
{{ __('Manage Allocation Tokens') }}
</h2>
</div>
</div>
</div>
</div>
<!-- Page body -->
<div class="page-body">
<div class="container-xl">
<div class="col-12">
<div class="alert alert-info" role="alert">
<div class="d-flex">
<div>
<svg xmlns="http://www.w3.org/2000/svg" class="icon alert-icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" /><path d="M12 9h.01" /><path d="M11 12h1v4h1" /></svg>
</div>
<div>
<h4 class="alert-title">{{ __('Note on Allocation Tokens') }}</h4>
<div class="text-secondary">{{ __('For the moment, allocation tokens are managed directly via the database and can only be viewed in the control panel.') }}</div>
</div>
</div>
</div>
{% include 'partials/flash.twig' %}
<div class="card">
<form action="/registry/tokens" method="post">
{{ csrf.field | raw }}
<div class="table-responsive">
<table class="table table-vcenter card-table">
<thead>
<tr>
<th>{{ __('Token') }}</th>
<th>{{ __('Domain') }}</th>
<th>{{ __('Type') }}</th>
<th>{{ __('Status') }}</th>
<th>{{ __('Registrars') }}</th>
<th>{{ __('TLDs') }}</th>
<th>{{ __('Actions') }}</th>
<th>{{ __('Premiums') }}</th>
<th>{{ __('Discounts') }}</th>
<th class="w-1"></th>
</tr>
</thead>
<tbody>
{% if tokens is not empty %}
{% for token in tokens %}
<tr>
<td class="user-select-all">{{ token.token }}</td>
<td><strong>{{ token.domain_name }}</strong></td>
<td>{{ token.tokenType is empty ? 'Default' : token.tokenType }}</td>
<td><span class="status status-blue">{{ token.tokenStatus is empty ? 'OK' : token.tokenStatus }}</span></td>
<td class="text-secondary">{{ token.registrars is empty ? 'All' : token.registrars }}</td>
<td class="text-secondary">{{ token.tlds is empty ? 'All' : token.tlds }}</td>
<td class="text-secondary">{{ token.eppActions is empty ? 'All' : token.eppActions }}</td>
<td class="text-secondary">{{ token.reducePremium is empty ? 'N/A' : token.reducePremium }}</td>
<td class="text-secondary">{{ token.reduceYears is empty ? 'N/A' : token.reduceYears }}</td>
<td>
<a href="#">Edit</a>
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="10">No tokens found.</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
{% include 'partials/footer.twig' %}
</div>
{% endblock %}