Skip to content

Commit

Permalink
2.42.0 Removed code to support switching to 'Classic' mode
Browse files Browse the repository at this point in the history
  • Loading branch information
classaxe committed Jul 11, 2022
1 parent 4562e2b commit 1734bda
Show file tree
Hide file tree
Showing 24 changed files with 32 additions and 110 deletions.
1 change: 0 additions & 1 deletion src/Controller/Web/Admin/Help.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function adminHelpController(
$this->session->set('route', '');
$parameters = [
'_locale' => $_locale,
'classic' => $this->systemRepository->getClassicUrl('admin/help'),
'mode' => 'Admin Help',
'system' => $system,
];
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Admin/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function controller(
}
$parameters = [
'_locale' => $_locale,
'classic' => $this->systemRepository->getClassicUrl('admin/info'),
'mode' => 'System Info',
'info' => $this->systemRepository->getPhpInfo(),
'mysql_version' => $this->systemRepository->getMySQLVersion(),
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Admin/Logon.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ public function logonController($_locale, $system, Request $request, LogonForm $
}
$parameters = [
'args' => $args,
'classic' => $this->systemRepository->getClassicUrl('logon'),
'disableLogon' => $disableLogon,
'form' => $form->createView(),
'form_class' => 'logon',
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Admin/Logsessions.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public function logsessions(
$logSessions = $this->logsessionRepository->getLogsessions($args, $columns);
$parameters = [
'args' => $args,
'classic' => $this->systemRepository->getClassicUrl('log_sessions'),
'columns' => $columns,
'form' => $form->createView(),
'_locale' => $_locale,
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Admin/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public function controller(

$parameters = [
'_locale' => $_locale,
'classic' => $this->systemRepository->getClassicUrl('admin/tools'),
'ip' => $this->visitor->getIpAddress(),
'mode' => 'Administrator Management Tools',
'system' => $system,
Expand Down
2 changes: 0 additions & 2 deletions src/Controller/Web/Admin/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public function profile(
$parameters = [
'_locale' => $_locale,
'id' => $id,
'classic' => $this->systemRepository->getClassicUrl('profile'),
'form' => $form->createView(),
'u' => $user,
'mode' => 'Your Profile',
Expand Down Expand Up @@ -267,7 +266,6 @@ public function users(
}
$parameters = [
'args' => $args,
'classic' => $this->systemRepository->getClassicUrl('users'),
'columns' => $this->userRepository->getColumns(),
'form' => $form->createView(),
'_locale' => $_locale,
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Changes/Changes.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public function controller($_locale, $system)
'_locale' => $_locale,
'mode' => 'Change Log',
'system' => $system,
'classic' => $this->systemRepository->getClassicUrl('changes'),
'changelog' => $changelog,
'count' => count($entries),
'first' => static::FIRST_COMMIT
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Cle/Cle.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ public function controller(
'_locale' => $_locale,
'mode' => $i18n->trans('CLE %NUMBER%', [ '%NUMBER%' => $cle->getCle() ]),
'system' => $system,
'classic' => $this->systemRepository->getClassicUrl('cle'),
'admin' => (int)$this->parameters['access'] & UserEntity::CLE,
'cle' => $cle,
'form' => $form->createView(),
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Donate/Donate.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public function controller($_locale, $system)
'_locale' => $_locale,
'mode' => 'Donate',
'system' => $system,
'classic' => $this->systemRepository->getClassicUrl('donate'),
'admins' => $admins,
'domain' => static::DOMAIN_COST,
'monthly' => static::MONTHLY_COST
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Help/Help.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class Help extends Base
public function helpController($_locale, $system) {
$parameters = [
'_locale' => $_locale,
'classic' => $this->systemRepository->getClassicUrl('help'),
'mode' => 'Help',
'system' => $system,
];
Expand Down
3 changes: 1 addition & 2 deletions src/Controller/Web/Listeners/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,11 @@ public function controller(
'args' => $args,
'box' => $box,
'center' => $center,
'classic' => $this->systemRepository->getClassicUrl('listeners'),
'columns' => $this->listenerRepository->getColumns('listeners'),
'form' => $form->createView(),
'listeners' => $listeners,
'_locale' => $_locale,
'mode' => 'Listeners and Locations',
'mode' => 'Locations',
'results' => [
'limit' => isset($args['limit']) ? $args['limit'] : $this->listenerRepository::defaultLimit,
'page' => isset($args['page']) ? $args['page'] : $this->listenerRepository::defaultPage,
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Maps/Maps.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function mapsController($_locale, $system)

$parameters = [
'_locale' => $_locale,
'classic' => $this->systemRepository->getClassicUrl('maps'),
'mode' => 'Maps',
'system' => $system,
'title' => $maps['title'],
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Signals/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public function signals(
'args' => $this->args,
'box' => $this->mapBox,
'center' => $this->mapCenter,
'classic' => $this->systemRepository->getClassicUrl('signals', $this->args['show']),
'columns' => $this->signalRepository->getColumns('signals'),
'expanded' => $this->expandedSections,
'form' => $form->createView(),
Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Tools/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public function index($_locale, $system, Request $request)
'args' => $request->query->get('args'),
'mode' => 'Tools',
'system' => $system,
'classic' => $this->systemRepository->getClassicUrl('tools'),
'widgets' => $widgets
];

Expand Down
1 change: 0 additions & 1 deletion src/Controller/Web/Weather/Weather.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public function controller($_locale, $system, Request $request)
'mode' => 'Weather',
'system' => $system,
'centers' => $this->weatherRepository->getCenters(),
'classic' => $this->systemRepository->getClassicUrl('weather'),
'widgets' => $widgets,
'zoom' => $zoom
];
Expand Down
48 changes: 24 additions & 24 deletions src/Repository/ModeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class ModeRepository
'access' => User::ALL,
'admin' => true,
'guest' => true,
'menu' => 'Listeners',
'title' => 'Listeners and Locations',
'menu' => 'Locations',
'title' => 'Listening Posts',
'url'=> false
],
'cle' => [
Expand Down Expand Up @@ -64,72 +64,72 @@ class ModeRepository
'title' => 'Changes',
'url'=> false
],
'help' => [
'access' => User::ALL,
'admin' => true,
'guest' => true,
'menu' => 'Help',
'title' => 'Help',
'url'=> false
],
'donate' => [
'access' => User::ALL,
'admin' => true,
'guest' => true,
'menu' => 'Donate',
'title' => 'Donate',
'url'=> false
],
],
[
'ndblistWebsite' => [
'access' => User::ALL,
'admin' => true,
'guest' => true,
'menu' => 'NDB List Website',
'menu' => 'Ndblist.info',
'title' => 'NDB List Group Information Website',
'url'=> 'http://ndblist.info/'
],
'NdbGroup' => [
'access' => User::ALL,
'admin' => true,
'guest' => true,
'menu' => 'NDB Group',
'menu' => 'NDB Grp',
'title' => 'NDB at Groups.io',
'url'=> 'https://groups.io/g/ndblist'
],
'DscGroup' => [
'access' => User::ALL,
'admin' => true,
'guest' => true,
'menu' => 'DSC Group',
'menu' => 'DSC Grp',
'title' => 'DSC at Groups.io',
'url'=> 'https://groups.io/g/dsc-list'
],
'DgpsGroup' => [
'access' => User::ALL,
'admin' => true,
'guest' => true,
'menu' => 'DGPS Group',
'menu' => 'DGPS Grp',
'title' => 'DGPS at Groups.io',
'url'=> 'https://groups.io/g/dgpslist'
],
'NavtexGroup' => [
'access' => User::ALL,
'admin' => true,
'guest' => true,
'menu' => 'NAVTEX Group',
'menu' => 'NAVTEX Grp',
'title' => 'Navtex at Groups.io',
'url'=> 'https://groups.io/g/navtexdx'
],
'logon' => [
'access' => User::PUBLIC,
'admin' => false,
'guest' => true,
'menu' => 'Log On',
'menu' => 'Logon',
'title' => 'Logon',
'url'=> false
],
'donate' => [
'access' => User::ALL,
'admin' => true,
'guest' => true,
'menu' => 'Donate',
'title' => 'Donate',
'url'=> false
],
'help' => [
'access' => User::ALL,
'admin' => true,
'guest' => true,
'menu' => 'Help',
'title' => 'Help',
'url'=> false
],
],
[
'admin/tools' => [
Expand Down
43 changes: 0 additions & 43 deletions src/Repository/SystemRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,49 +164,6 @@ public function getAdmins()
return $admins;
}

public function getClassicUrl($mode='', $submode='')
{
$response = [ 'type' => 'url', 'value' => '' ];
switch ($mode) {
case 'admin/help':
$response['value'] = 'admin_help';
break;
case 'admin/info':
$response['value'] = 'sys_info';
break;
case 'admin/tools':
$response['value'] = 'admin_manage';
break;
case 'changes':
case 'cle':
case 'donate':
case 'help':
case 'logon':
case 'maps':
case 'tools':
case 'weather':
$response['value'] = $mode;
break;
case 'listeners':
$response['value'] = 'listener_list';
break;
case 'signals':
switch ($submode) {
case 'map':
$response['value'] = 'signal_list?show=map';
break;
case 'seeklist':
$response['value'] = 'signal_seeklist';
break;
default:
$response['value'] = 'signal_list';
break;
}
break;
}
return $response;
}

public function get($code)
{
return self::SYSTEMS[$code];
Expand Down
3 changes: 0 additions & 3 deletions templates/i18n.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
{% endif %}
{% if 'Version' %}
{% trans %}Version{% endtrans %}
{% trans %}Switch{% endtrans %}
{% trans %}Classic{% endtrans %}
{% trans %}New{% endtrans %}
{% endif %}
{% if 'Menu' %}
{% trans %}Signals Received in Europe{% endtrans %}
Expand Down
2 changes: 1 addition & 1 deletion templates/listeners/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</p>
</div>
{% endif %}
{% set form_title='Customise %s Listeners List' | trans | format(system | upper) %}
{% set form_title='Customise %s Locations List' | trans | format(system | upper) %}
{% set form_class='listener_list' %}
{% include 'listeners/form.html.twig' %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/listeners/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
</style>

<h2>{{ system|upper }} {% trans %}Listeners and Locations{% endtrans %}</h2>
<h2>{{ system|upper }} {% trans %}Locations{% endtrans %}</h2>
{% if listeners|length > 0 %}
<table id="wide" class="listener results">
<thead>
Expand Down
2 changes: 1 addition & 1 deletion templates/listeners/map.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $(document).ready( function() {
<tbody>
<tr>
<td width="30%">
<h2>{{ system|upper }} {% trans %}Listeners and Locations Map{% endtrans %}</h2>
<h2>{{ system|upper }} {% trans %}Locations Map{% endtrans %}</h2>
<div class="scroll">
<div>
<table class="results" id="markerlist" style="display:none; margin: 0; max-width: 500px">
Expand Down
8 changes: 4 additions & 4 deletions templates/menu/menu.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="menu-centered" role="navigation">
<ul class="menu header">
<li>
<h2>
<h2 title="RXX Version {{ gitTag }}">
<span class="show-for-medium">{{ systems[system]['title']|trans }}</span>
<span class="show-for-small-only">{{ systems[system]['title_s']|trans }}</span>
</h2>
Expand All @@ -23,7 +23,7 @@
{% for key, modeRepo in modes[0] %}{% if ((isAdmin and modeRepo.admin) or (not isAdmin and modeRepo.guest))%}
<li{% if (app.request.get('_route') == key) %} class="is-active"{% endif %}>
<a href="{% if modeRepo.url %}{{ modeRepo.url }}{% else %}{{ url(key, { 'system' : system}) }}{% endif %}"{% if modeRepo.url %} rel="external"{% endif %}>
<span>{{ modeRepo['menu']|trans }}</span>
<span>{{ modeRepo['menu']|trans|raw }}</span>
{% if modeRepo['menu'] == 'Changes' and gitAge <= gitNew %}<span class="new">&#9673;</span>{% endif %}
</a>
</li>
Expand All @@ -33,7 +33,7 @@
{% for key, modeRepo in modes[1] %}{% if ((isAdmin and modeRepo.admin) or (not isAdmin and modeRepo.guest))%}
<li{% if (app.request.get('_route') == key) %} class="is-active"{% endif %}>
<a href="{% if modeRepo.url %}{{ modeRepo.url }}{% else %}{{ url(key, { 'system' : system}) }}{% endif %}"{% if modeRepo.url %} rel="external"{% endif %}>
{{ modeRepo['menu']|trans }}
{{ modeRepo['menu']|trans|raw }}
</a>
</li>
{% endif %}{% endfor %}
Expand All @@ -43,7 +43,7 @@
{% for key, modeRepo in modes[2] %}
{% if (access b-and modeRepo['access'])%}
<li{% if (app.request.get('_route') == key) %} class="is-active"{% endif %}>
<a href="{{ url(key, { 'system' : system }) }}">{{ modeRepo['menu']|trans }}</a>
<a href="{{ url(key, { 'system' : system }) }}">{{ modeRepo['menu']|trans|raw }}</a>
</li>
{% endif %}
{% endfor %}
Expand Down
1 change: 0 additions & 1 deletion templates/topbar.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<div class="topbar">
{% include 'user_status.html.twig' %}
{% include 'version_switcher.html.twig' %}
</div>
<script>
$(document).ready(function() {
Expand Down
15 changes: 0 additions & 15 deletions templates/version_switcher.html.twig

This file was deleted.

0 comments on commit 1734bda

Please sign in to comment.