Even more UI improvements

This commit is contained in:
Pinga 2025-04-03 13:36:21 +03:00
parent 3a5e3388e3
commit 4e3e788952
6 changed files with 199 additions and 114 deletions

View file

@ -976,8 +976,6 @@ class SystemController extends Controller
$premium_pricing = $db->selectRow('SELECT * FROM premium_domain_pricing WHERE tld_id = ?', $premium_pricing = $db->selectRow('SELECT * FROM premium_domain_pricing WHERE tld_id = ?',
[ $tld['id'] ]); [ $tld['id'] ]);
$premium_categories = $db->select('SELECT * FROM premium_domain_categories'); $premium_categories = $db->select('SELECT * FROM premium_domain_categories');
$launch_phases = $db->select('SELECT * FROM launch_phases WHERE tld_id = ?',
[ $tld['id'] ]);
// Mapping of regex patterns to script names // Mapping of regex patterns to script names
$regexToScriptName = [ $regexToScriptName = [
@ -1167,7 +1165,6 @@ class SystemController extends Controller
'tld_restore' => $tld_restore, 'tld_restore' => $tld_restore,
'premium_pricing' => $premium_pricing, 'premium_pricing' => $premium_pricing,
'premium_categories' => $premium_categories, 'premium_categories' => $premium_categories,
'launch_phases' => $launch_phases,
'secureTld' => $secureTld, 'secureTld' => $secureTld,
'dnssecData' => $dnssecData, 'dnssecData' => $dnssecData,
'currentUri' => $uri 'currentUri' => $uri
@ -1632,7 +1629,61 @@ class SystemController extends Controller
} }
} }
public function viewPhases(Request $request, Response $response, $args)
{
if ($_SESSION["auth_roles"] != 0) {
return $response->withHeader('Location', '/dashboard')->withStatus(302);
}
$db = $this->container->get('db');
// Get the current URI
$uri = $request->getUri()->getPath();
if ($args) {
$args = trim($args);
if (!preg_match('/^\.(xn--[a-zA-Z0-9-]+|[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)?)$/', $args)) {
$this->container->get('flash')->addMessage('error', 'Invalid TLD format');
return $response->withHeader('Location', '/registry/tlds')->withStatus(302);
}
$tld = $db->selectRow('SELECT id, tld, idn_table, secure FROM domain_tld WHERE tld = ?',
[ $args ]);
if ($tld) {
$launch_phases = $db->select('SELECT * FROM launch_phases WHERE tld_id = ?',
[ $tld['id'] ]);
if (strpos(strtolower($tld['tld']), '.xn--') === 0) {
$tld['tld'] = ltrim($tld['tld'], '.');
$tld_u = '.'.idn_to_utf8($tld['tld'], 0, INTL_IDNA_VARIANT_UTS46);
$tld['tld'] = '.'.$tld['tld'];
} else {
$tld_u = $tld['tld'];
}
$_SESSION['u_tld_id'] = [$tld['id']];
$_SESSION['u_tld_extension'] = [$tld['tld']];
return view($response,'admin/system/viewPhase.twig', [
'tld' => $tld,
'tld_u' => $tld_u,
'launch_phases' => $launch_phases,
'currentUri' => $uri
]);
} else {
// TLD does not exist, redirect to the tlds view
return $response->withHeader('Location', '/registry/tlds')->withStatus(302);
}
} else {
// Redirect to the tlds view
return $response->withHeader('Location', '/registry/tlds')->withStatus(302);
}
}
public function managePhases(Request $request, Response $response) public function managePhases(Request $request, Response $response)
{ {
if ($_SESSION["auth_roles"] != 0) { if ($_SESSION["auth_roles"] != 0) {
@ -1647,14 +1698,14 @@ class SystemController extends Controller
if (!empty($_SESSION['u_tld_id'])) { if (!empty($_SESSION['u_tld_id'])) {
$tld_id = $_SESSION['u_tld_id'][0]; $tld_id = $_SESSION['u_tld_id'][0];
} else { } else {
$this->container->get('flash')->addMessage('error', 'No TLD specified for promotions'); $this->container->get('flash')->addMessage('error', 'No TLD specified for launch phases');
return $response->withHeader('Location', '/registry/tlds')->withStatus(302); return $response->withHeader('Location', '/registry/tlds')->withStatus(302);
} }
if (!empty($_SESSION['u_tld_extension'])) { if (!empty($_SESSION['u_tld_extension'])) {
$tld_extension = $_SESSION['u_tld_extension'][0]; $tld_extension = $_SESSION['u_tld_extension'][0];
} else { } else {
$this->container->get('flash')->addMessage('error', 'No TLD specified for promotions'); $this->container->get('flash')->addMessage('error', 'No TLD specified for launch phases');
return $response->withHeader('Location', '/registry/tlds')->withStatus(302); return $response->withHeader('Location', '/registry/tlds')->withStatus(302);
} }
@ -1673,7 +1724,7 @@ class SystemController extends Controller
$sData['phaseEnd'] = str_replace('T', ' ', $data['phaseEnd']) . ':00'; $sData['phaseEnd'] = str_replace('T', ' ', $data['phaseEnd']) . ':00';
} elseif (!in_array($sData['phaseType'], ['open', 'custom'])) { } elseif (!in_array($sData['phaseType'], ['open', 'custom'])) {
$this->container->get('flash')->addMessage('error', "Error: phaseEnd is required for phaseType '{$sData['phaseType']}'"); $this->container->get('flash')->addMessage('error', "Error: phaseEnd is required for phaseType '{$sData['phaseType']}'");
return $response->withHeader('Location', '/registry/tld/'.$sData['extension'])->withStatus(302); return $response->withHeader('Location', '/registry/phases/'.$sData['extension'])->withStatus(302);
} }
try { try {
@ -1686,7 +1737,7 @@ class SystemController extends Controller
if ($sData['phaseType'] === 'custom' && (empty($sData['phaseName']) || is_null($sData['phaseName']))) { if ($sData['phaseType'] === 'custom' && (empty($sData['phaseName']) || is_null($sData['phaseName']))) {
// Handle the error scenario // Handle the error scenario
$this->container->get('flash')->addMessage('error', 'Phase name is required when the type is Custom.'); $this->container->get('flash')->addMessage('error', 'Phase name is required when the type is Custom.');
return $response->withHeader('Location', '/registry/tld/'.$sData['extension'])->withStatus(302); return $response->withHeader('Location', '/registry/phases/'.$sData['extension'])->withStatus(302);
} }
// Check for existing phase_type (excluding 'custom' with different phase_name) or date overlap (excluding 'custom' and 'open' types) // Check for existing phase_type (excluding 'custom' with different phase_name) or date overlap (excluding 'custom' and 'open' types)
@ -1731,20 +1782,20 @@ class SystemController extends Controller
// phase_type already exists for the tldid // phase_type already exists for the tldid
$db->rollBack(); $db->rollBack();
$this->container->get('flash')->addMessage('error', 'The phase type already exists for this TLD.'); $this->container->get('flash')->addMessage('error', 'The phase type already exists for this TLD.');
return $response->withHeader('Location', '/registry/tld/'.$sData['extension'])->withStatus(302); return $response->withHeader('Location', '/registry/phases/'.$sData['extension'])->withStatus(302);
} }
if ($result['duplicatePhaseNameExists'] > 0) { if ($result['duplicatePhaseNameExists'] > 0) {
$db->rollBack(); $db->rollBack();
$this->container->get('flash')->addMessage('error', 'A phase with this name already exists for this TLD.'); $this->container->get('flash')->addMessage('error', 'A phase with this name already exists for this TLD.');
return $response->withHeader('Location', '/registry/tld/'.$sData['extension'])->withStatus(302); return $response->withHeader('Location', '/registry/phases/'.$sData['extension'])->withStatus(302);
} }
if ($result['dateOverlapExists'] > 0) { if ($result['dateOverlapExists'] > 0) {
// Date range overlaps with an existing entry // Date range overlaps with an existing entry
$db->rollBack(); $db->rollBack();
$this->container->get('flash')->addMessage('error', 'Date range overlaps with an existing phase for this TLD.'); $this->container->get('flash')->addMessage('error', 'Date range overlaps with an existing phase for this TLD.');
return $response->withHeader('Location', '/registry/tld/'.$sData['extension'])->withStatus(302); return $response->withHeader('Location', '/registry/phases/'.$sData['extension'])->withStatus(302);
} }
$db->insert( $db->insert(
@ -1767,11 +1818,11 @@ class SystemController extends Controller
unset($_SESSION['u_tld_extension']); unset($_SESSION['u_tld_extension']);
$this->container->get('flash')->addMessage('success', 'Launch phase updates for the ' . $sData['extension'] . ' TLD have been successfully applied'); $this->container->get('flash')->addMessage('success', 'Launch phase updates for the ' . $sData['extension'] . ' TLD have been successfully applied');
return $response->withHeader('Location', '/registry/tld/'.$sData['extension'])->withStatus(302); return $response->withHeader('Location', '/registry/phases/'.$sData['extension'])->withStatus(302);
} catch (Exception $e) { } catch (Exception $e) {
$db->rollBack(); $db->rollBack();
$this->container->get('flash')->addMessage('error', 'Database failure: ' . $e->getMessage()); $this->container->get('flash')->addMessage('error', 'Database failure: ' . $e->getMessage());
return $response->withHeader('Location', '/registry/tld/'.$sData['extension'])->withStatus(302); return $response->withHeader('Location', '/registry/phases/'.$sData['extension'])->withStatus(302);
} }
} else { } else {

View file

@ -320,104 +320,6 @@
</div> </div>
</form> </form>
<div class="card">
<div class="card-header">
<h5 class="card-title">{{ __('Manage Launch Phases') }}</h5>
</div>
<div class="card-body">
<div class="table-responsive mb-3">
<table class="table">
<thead>
<tr>
<th>{{ __('Phase Type') }}</th>
<th>{{ __('Phase Name') }}</th>
<th>{{ __('Phase Category') }}</th>
<th>{{ __('Phase Description') }}</th>
<th>{{ __('Start Date') }}</th>
<th>{{ __('End Date') }}</th>
</tr>
</thead>
<tbody>
{% for phase in launch_phases %}
<tr>
<td>{{ phase.phase_type|capitalize }}</td>
<td>{{ phase.phase_name|default('N/A') }}</td>
<td>{{ phase.phase_category }}</td>
<td>{{ phase.phase_description }}</td>
<td>{{ phase.start_date }}</td>
<td>{{ phase.end_date|default('N/A') }}</td>
</tr>
{% else %}
<tr>
<td colspan="7">{{ __('No launch phases found.') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<h5 class="card-title mb-3">{{ __('Create New Phase') }}</h5>
<form action="/registry/phases" method="post">
{{ csrf.field | raw }}
<div class="mb-3">
<label for="phaseType" class="form-label required">{{ __('Phase Type') }}</label>
<select class="form-select" id="phaseType" name="phaseType" required>
<option value="sunrise">Sunrise</option>
<option value="landrush">Landrush</option>
<option value="claims">Claims</option>
<option value="open">Open</option>
<option value="custom">Custom</option>
</select>
</div>
<div class="mb-3">
<label for="phaseName" class="form-label">{{ __('Phase Name') }}</label>
<input type="text" class="form-control" id="phaseName" name="phaseName" placeholder="Enter phase name">
<small class="form-hint">The "Phase Name" field is required only if the "Type" is set to "Custom".</small>
</div>
<div class="mb-3">
<div class="form-label">{{ __('Phase Category') }}</div>
<div>
<label class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="phaseCategory" id="First-Come-First-Serve" value="First-Come-First-Serve" checked>
<span class="form-check-label">First-Come-First-Serve</span>
<small class="form-hint">{{ __('Single application only.') }}</small>
</label>
<label class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="phaseCategory" id="Application" value="Application">
<span class="form-check-label">Application</span>
<small class="form-hint">{{ __('Multiple applications allowed.') }}</small>
</label>
</div>
</div>
<div class="mb-3">
<label for="phaseDescription" class="form-label required">{{ __('Phase Description') }}</label>
<textarea class="form-control" id="phaseDescription" name="phaseDescription" rows="3" placeholder="{{ __('Enter phase description') }}" required></textarea>
</div>
<div class="row">
<div class="col-sm-6 col-md-6">
<div class="mb-3">
<label for="phaseStart" class="form-label required">{{ __('Phase Start Date') }}</label>
<input type="datetime-local" class="form-control" placeholder="e.g., 01/01/2023" id="phaseStart" name="phaseStart" required>
<small class="form-text text-muted"><strong>{{ __('Please Note:') }}</strong> {{ __('All times displayed are in') }} <strong>Coordinated Universal Time (UTC)</strong></small>
</div>
</div>
<div class="col-sm-6 col-md-6">
<div class="mb-3">
<label for="phaseEnd" class="form-label">{{ __('Phase End Date') }}</label>
<input type="datetime-local" class="form-control" placeholder="e.g., 01/01/2023" id="phaseEnd" name="phaseEnd">
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row align-items-center">
<div class="col-auto">
<button type="submit" class="btn btn-primary">{{ __('Update Phases') }}</button>
</div>
</div>
</form>
</div>
</div>
</div> </div>
</div> </div>
{% include 'partials/footer.twig' %} {% include 'partials/footer.twig' %}

View file

@ -0,0 +1,131 @@
{% extends "layouts/app.twig" %}
{% block title %}{{ __('Manage Launch Phases') }} {{ __('for') }} {{ tld_u }}{% 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 Launch Phases') }} {{ __('for') }} {{ tld_u }}
</h2>
</div>
</div>
</div>
</div>
<!-- Page body -->
<div class="page-body">
<div class="container-xl">
<div class="col-12">
{% include 'partials/flash.twig' %}
<div class="card">
<div class="card-header">
<h5 class="card-title">{{ __('Manage Launch Phases') }}</h5>
</div>
<div class="card-body">
<div class="table-responsive mb-3">
<table class="table">
<thead>
<tr>
<th>{{ __('Phase Type') }}</th>
<th>{{ __('Phase Name') }}</th>
<th>{{ __('Phase Category') }}</th>
<th>{{ __('Phase Description') }}</th>
<th>{{ __('Start Date') }}</th>
<th>{{ __('End Date') }}</th>
</tr>
</thead>
<tbody>
{% for phase in launch_phases %}
<tr>
<td>{{ phase.phase_type|capitalize }}</td>
<td>{{ phase.phase_name|default('N/A') }}</td>
<td>{{ phase.phase_category }}</td>
<td>{{ phase.phase_description }}</td>
<td>{{ phase.start_date }}</td>
<td>{{ phase.end_date|default('N/A') }}</td>
</tr>
{% else %}
<tr>
<td colspan="7">{{ __('No launch phases found.') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<h5 class="card-title mb-3">{{ __('Create New Phase') }}</h5>
<form action="/registry/phases" method="post">
{{ csrf.field | raw }}
<div class="mb-3">
<label for="phaseType" class="form-label required">{{ __('Phase Type') }}</label>
<select class="form-select" id="phaseType" name="phaseType" required>
<option value="sunrise">Sunrise</option>
<option value="landrush">Landrush</option>
<option value="claims">Claims</option>
<option value="open">Open</option>
<option value="custom">Custom</option>
</select>
</div>
<div class="mb-3">
<label for="phaseName" class="form-label">{{ __('Phase Name') }}</label>
<input type="text" class="form-control" id="phaseName" name="phaseName" placeholder="Enter phase name">
<small class="form-hint">The "Phase Name" field is required only if the "Type" is set to "Custom".</small>
</div>
<div class="mb-3">
<div class="form-label">{{ __('Phase Category') }}</div>
<div>
<label class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="phaseCategory" id="First-Come-First-Serve" value="First-Come-First-Serve" checked>
<span class="form-check-label">First-Come-First-Serve</span>
<small class="form-hint">{{ __('Single application only.') }}</small>
</label>
<label class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="phaseCategory" id="Application" value="Application">
<span class="form-check-label">Application</span>
<small class="form-hint">{{ __('Multiple applications allowed.') }}</small>
</label>
</div>
</div>
<div class="mb-3">
<label for="phaseDescription" class="form-label required">{{ __('Phase Description') }}</label>
<textarea class="form-control" id="phaseDescription" name="phaseDescription" rows="3" placeholder="{{ __('Enter phase description') }}" required></textarea>
</div>
<div class="row">
<div class="col-sm-6 col-md-6">
<div class="mb-3">
<label for="phaseStart" class="form-label required">{{ __('Phase Start Date') }}</label>
<input type="datetime-local" class="form-control" placeholder="e.g., 01/01/2023" id="phaseStart" name="phaseStart" required>
<small class="form-text text-muted"><strong>{{ __('Please Note:') }}</strong> {{ __('All times displayed are in') }} <strong>Coordinated Universal Time (UTC)</strong></small>
</div>
</div>
<div class="col-sm-6 col-md-6">
<div class="mb-3">
<label for="phaseEnd" class="form-label">{{ __('Phase End Date') }}</label>
<input type="datetime-local" class="form-control" placeholder="e.g., 01/01/2023" id="phaseEnd" name="phaseEnd">
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row align-items-center">
<div class="col-auto">
<button type="submit" class="btn btn-primary">{{ __('Update Phases') }}</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{% include 'partials/footer.twig' %}
</div>
{% endblock %}

View file

@ -26,7 +26,7 @@
<div class="col-12"> <div class="col-12">
{% include 'partials/flash.twig' %} {% include 'partials/flash.twig' %}
<div class="card mb-3"> <div class="card">
<div class="card-header"> <div class="card-header">
<h5 class="card-title">{{ __('Manage Promotions') }} {{ __('for') }} {{ tld_u }}</h5> <h5 class="card-title">{{ __('Manage Promotions') }} {{ __('for') }} {{ tld_u }}</h5>
</div> </div>

View file

@ -24,7 +24,7 @@
} }
function actionsFormatter(cell, formatterParams, onRendered) { function actionsFormatter(cell, formatterParams, onRendered) {
return `<a class="btn btn-icon btn-outline-primary" href="/registry/tld/${cell.getRow().getData().tld_o}" title="{{ __('Manage Settings') }}"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5" /></svg></a> <a class="btn btn-icon btn-outline-green" href="/registry/promotion/${cell.getRow().getData().tld_o}" title="{{ __('Manage Promotions') }}"><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="M17 17m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M7 7m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M6 18l12 -12" /></svg></a> <a class="btn btn-icon btn-outline-orange" href="/registry/idnexport/${cell.getRow().getData().tld_o}" title="{{ __('Export IDN Table') }}" target="_blank"><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="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M11.5 21h-4.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v5m-5 6h7m-3 -3l3 3l-3 3" /></svg></a>`; return `<a class="btn btn-icon btn-outline-primary" href="/registry/tld/${cell.getRow().getData().tld_o}" title="{{ __('Manage Settings') }}"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5" /></svg></a> <a class="btn btn-icon btn-outline-green" href="/registry/promotion/${cell.getRow().getData().tld_o}" title="{{ __('Manage Promotions') }}"><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="M17 17m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M7 7m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M6 18l12 -12" /></svg></a> <a class="btn btn-icon btn-outline-indigo" href="/registry/phases/${cell.getRow().getData().tld_o}" title="{{ __('Manage Launch Phases') }}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M16 2c.183 0 .355 .05 .502 .135l.033 .02c.28 .177 .465 .49 .465 .845v1h1a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h1v-1a1 1 0 0 1 .514 -.874l.093 -.046l.066 -.025l.1 -.029l.107 -.019l.12 -.007q .083 0 .161 .013l.122 .029l.04 .012l.06 .023c.328 .135 .568 .44 .61 .806l.007 .117v1h6v-1a1 1 0 0 1 1 -1m3 7h-14v9.625c0 .705 .386 1.286 .883 1.366l.117 .009h12c.513 0 .936 -.53 .993 -1.215l.007 -.16z" /><path d="M9.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1" /><path d="M13.015 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1" /><path d="M17.02 13a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1" /><path d="M12.02 15a1 1 0 0 1 0 2a1.001 1.001 0 1 1 -.005 -2z" /><path d="M9.015 16a1 1 0 0 1 -1 1a1.001 1.001 0 1 1 -.005 -2c.557 0 1.005 .448 1.005 1" /></svg></a> <a class="btn btn-icon btn-outline-orange" href="/registry/idnexport/${cell.getRow().getData().tld_o}" title="{{ __('Export IDN Table') }}" target="_blank"><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="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M11.5 21h-4.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v5m-5 6h7m-3 -3l3 3l-3 3" /></svg></a>`;
} }
// Mapping of database string values to script names // Mapping of database string values to script names
@ -76,7 +76,7 @@
{title:"TLD", field:"tld", minWidth:50, headerSort:true, resizable:false, formatter: tldLinkFormatter, responsive:0}, {title:"TLD", field:"tld", minWidth:50, headerSort:true, resizable:false, formatter: tldLinkFormatter, responsive:0},
{ title: "{{ __('Script') }}", field: "idn_table", width:300, minWidth:80, headerSort:true, resizable:false, formatter: scriptNameFormatter, responsive:2}, { title: "{{ __('Script') }}", field: "idn_table", width:300, minWidth:80, headerSort:true, resizable:false, formatter: scriptNameFormatter, responsive:2},
{title:"DNSSEC", field:"secure", width:250, minWidth:80, headerSort:true, resizable:false, formatter: secureFormatter, responsive:2}, {title:"DNSSEC", field:"secure", width:250, minWidth:80, headerSort:true, resizable:false, formatter: secureFormatter, responsive:2},
{title: "{{ __('Actions') }}", formatter: actionsFormatter, headerSort: false, resizable:false, download:false, hozAlign: "center", responsive:0, cellClick:function(e, cell){ e.stopPropagation(); }}, {title: "{{ __('Actions') }}", formatter: actionsFormatter, minWidth:200, headerSort: false, resizable:false, download:false, hozAlign: "center", responsive:0, cellClick:function(e, cell){ e.stopPropagation(); }},
] ]
}); });
var searchInput = document.getElementById("search-input"); var searchInput = document.getElementById("search-input");

View file

@ -147,6 +147,7 @@ $app->group('', function ($route) {
$route->map(['GET', 'POST'], '/registry/tokens/delete/{token}', SystemController::class . ':deleteToken')->setName('deleteToken'); $route->map(['GET', 'POST'], '/registry/tokens/delete/{token}', SystemController::class . ':deleteToken')->setName('deleteToken');
$route->get('/registry/promotion/{tld}', SystemController::class . ':viewPromo')->setName('viewPromo'); $route->get('/registry/promotion/{tld}', SystemController::class . ':viewPromo')->setName('viewPromo');
$route->post('/registry/promotions', SystemController::class . ':managePromo')->setName('managePromo'); $route->post('/registry/promotions', SystemController::class . ':managePromo')->setName('managePromo');
$route->get('/registry/phases/{tld}', SystemController::class . ':viewPhases')->setName('viewPhases');
$route->post('/registry/phases', SystemController::class . ':managePhases')->setName('managePhases'); $route->post('/registry/phases', SystemController::class . ':managePhases')->setName('managePhases');
$route->get('/registry/idnexport/{script}', SystemController::class .':idnexport')->setName('idnexport'); $route->get('/registry/idnexport/{script}', SystemController::class .':idnexport')->setName('idnexport');