Skip to content

Commit

Permalink
2.58.2 Donations system tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
classaxe committed Aug 27, 2023
1 parent 942ac3b commit 2ee1818
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
22 changes: 22 additions & 0 deletions src/Repository/DonationRepository.php
Expand Up @@ -77,6 +77,28 @@ public function getRecords($args)
return $qb->getQuery()->getArrayResult();
}

public function getDonationsPublic()
{
$qb = $this
->createQueryBuilder('d')
->select('
d.date,
(CASE WHEN donor.anonymous = 1 THEN CONCAT(\'Donor #\', donor.id) ELSE donor.display END) as name,
(CASE WHEN donor.anonymous = 1 THEN (CASE WHEN donor.callsign != \'\' THEN \'<i>(Hidden)</i>\' ELSE \'\' END) ELSE donor.callsign END) as callsign,
donor.sp,
donor.itu,
d.amount,
(CASE WHEN donor.anonymous = 1 THEN (CASE WHEN d.message != \'\' THEN \'<i>(Message is hidden)</i>\' ELSE \'\' END) ELSE d.message END) as message')
->innerJoin(
'\App\Entity\Donor',
'donor',
Join::WITH,
'd.name = donor.name'
)
->addOrderBy('d.date DESC, name');
return $qb->getQuery()->getArrayResult();
}

public function getTabs($donation = false, $isAdmin = false)
{
if (!is_object($donation) || !$donation->getId()) {
Expand Down
2 changes: 1 addition & 1 deletion templates/donations/list.html.twig
@@ -1,5 +1,5 @@
<div class="main fullwidth">
<h2>{{ mode }} <small>[ <a href="{{ url('donor', { 'system' : system, 'id': 'new' }) }}" data-popup="1">Add...</a> ]</small></h2>
<h2>{{ mode }} <small>[ <a href="{{ url('donations', { 'system' : system, 'id': 'new' }) }}" data-popup="1">Add...</a> ]</small></h2>
<div class="controlPanel">
{% include 'status.html.twig' %}
{{ form_start(form) }}
Expand Down
6 changes: 4 additions & 2 deletions templates/donors/list.html.twig
Expand Up @@ -7,7 +7,7 @@
{{ form_end(form) }}

{% if records|length > 0 %}
<table id="wide" class="donors results short">
<table id="wide" class="donors results short" style="width: auto">
<thead>
<tr>
{% for key, column in columns %}
Expand Down Expand Up @@ -35,7 +35,9 @@
if key == 'name'
%}<a href="{{ url('donor', { 'system' : system, 'id': record.id }) }}" data-popup="1">{{ value|raw }}</a>{%
elseif key == 'anonymous'
%}{{ value ? 'YES'|trans : 'NO'|trans }}{%
%}{{ value ? 'YES'|trans : '' }}{%
elseif key == 'email'
%}{{ (value ? '<a href="mailto:' ~ value ~ '">' ~ value ~ '</a>' : '') | raw }}{%
else
%}{{ value|raw }}{%
endif
Expand Down
14 changes: 7 additions & 7 deletions templates/help/index.html.twig
Expand Up @@ -18,7 +18,7 @@ Quick Links [

<ul>
<li>
<h2><a name='quick'></a>Quick Start Guide</h2> <small>[ <a href='#top'><b>Top</b></a> ]</small><br />
<h2><a name='quick'></a>Quick Start Guide <small>[ <a href='#top'><b>Top</b></a> ]</small></h2>
<p>The following systems are available:</p>
<ul>
<li><b>RNA</b>&#010;shows stations known to have been received in North America</li>
Expand All @@ -31,7 +31,7 @@ Quick Links [
</li>

<li>
<h2><a name='ndbs'></a>About NDBs</h2> <small>[ <a href='#top'><b>Top</b></a> ]</small><br />
<h2><a name='ndbs'></a>About NDBs <small>[ <a href='#top'><b>Top</b></a> ]</small></h2>
<p>NDBs (or 'Non Directional Beacons') are like radio lighthouses, guiding aircraft to airport runways and keeping ships away from dangerous waters.</p>
<table cellpadding='0' cellspacing='0' border='0'>
<tr>
Expand All @@ -45,7 +45,7 @@ Quick Links [
</li>

<li>
<h2><a name='about'></a>About this system</h2> <small>[ <a href='#top'><b>Top</b></a> ]</small><br />
<h2><a name='about'></a>About this system <small>[ <a href='#top'><b>Top</b></a> ]</small></h2>
<p>This system was based on a concept by <b>Andy Robins</b> and was initially seeded using his originally compiled data.<br>
The version you are now using was designed and programmed by <a href="#" data-contact=" metsyS02%{{ system|upper|reverse }}=tcejbus?{{ 'martin@classaxe.com'|reverse|replace({'@':'#'}) }}:otliam "><b>Martin Francis</b></a>
and was originally created exclusively to show loggings of NDBs, however several contributors provide details of other utility signals received and so it has now been expanded to include other forms of transmission.<br>
Expand All @@ -55,7 +55,7 @@ Quick Links [
</li>

<li>
<h2><a name='signal_list'></a>Signal Listings</h2> <small>[ <a href='#top'><b>Top</b></a> ]</small><br />
<h2><a name='signal_list'></a>Signal Listings <small>[ <a href='#top'><b>Top</b></a> ]</small></h2>
<p>To access information on all types of signal, press the 'Signals' option from the main menu. Here is an example of what you might see, but note this picture is for illustrative purposes only:</p>
<p><img src="{{ asset('image/help/help_signal_list.gif') }}" alt='Example of Signal listing' width='709' height='289'></p>
<p>The table presented shows the frequency and Callsign / IDs of all stations heard.<br>
Expand Down Expand Up @@ -296,14 +296,14 @@ Quick Links [
</li>

<li>
<h2><a name='signal_profile'></a>Signal Profile</h2> &nbsp; <small>[ <a href='#top'><b>Top</b></a> ]</small><br />
<h2><a name='signal_profile'></a>Signal Profile <small>[ <a href='#top'><b>Top</b></a> ]</small></h2>
<p>This screen shows more information on the signal and includes buttons to view all loggings of the station and the current weather at weather stations near to the transmitter location.<br>
<img src="{{ asset('image/help/help_signal_profile.gif') }}" width='651' height='411' alt='Signal Profile for TRI in Trinidad'>
</li>


<li>
<h2><a name='listeners'></a>Listener Listings</h2> &nbsp; <small>[ <a href='#top'><b>Top</b></a> ]</small><br />
<h2><a name='listeners'></a>Listener Listings <small>[ <a href='#top'><b>Top</b></a> ]</small></h2>
<p>To see a list of listeners whose logs are included in the reports, click the Listeners tab on the main menu.<br>
<ul>
<li>
Expand Down Expand Up @@ -332,7 +332,7 @@ Quick Links [
</li>

<li>
<h2><a name='included'></a>Getting YOUR log information included</h2> &nbsp; <small>[ <a href='#top'><b>Top</b></a> ]</small><br />
<h2><a name='included'></a>Getting YOUR log information included <small>[ <a href='#top'><b>Top</b></a> ]</small></h2>
<p>
The best way to do this is to subscribe to the NDB List at <a href='http://www.ndblist.info'>http://www.ndblist.info</a> - it's free and open only to bonafide NDB DXers. You will have to search through information at the beaconworld site, but that's part of the test for joining! Once you are subscribed to the NDBList, post your logs to the list and the editor managing the system (see below) will import your posted logs into the system. This process automatically assigns GSQ, State / Province, Country and even DX in KM and Miles automatically.
</p>
Expand Down

0 comments on commit 2ee1818

Please sign in to comment.