Skip to content

Commit

Permalink
Separate the First Time column
Browse files Browse the repository at this point in the history
  • Loading branch information
renintw committed Jul 20, 2023
1 parent 8e2ada6 commit 4291fad
Showing 1 changed file with 41 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
/** @var DateTime $end_date */
/** @var string $statuses */

$gender_legend = '<span class="description small">Gender: F / M / ?</span>';
$first_time_legend = '<span class="description small">Y / N / ?</span>';
$gender_legend = '<span class="description small"><span class="total">Total</span> / F / M / ?</span>';
$first_time_legend = 'First Time<br><span class="description small"><span class="total">Total</span> / Y / N / ?</span>';

?>

Expand Down Expand Up @@ -43,7 +43,7 @@
<td>Type</td>
<td>Total</td>
<td>Unique</td>
<td>First time<br><?php echo $first_time_legend; ?></td>
<td>First Time<br><span class="description small">Y / N / ?</span></td>
</tr>
<tr>
<td>Registered Attendees</td>
Expand Down Expand Up @@ -157,39 +157,27 @@
<td>Registered Attendees<?php if ( ! empty( $data['genders'] ) ) :
?><br /><?php echo $gender_legend; ?><?php endif; ?></td>
<td>Organizers
<br>
<span class="description small">First time: </span>
<?php echo $first_time_legend; ?>
<?php if ( ! empty( $data['genders'] ) ) : ?>
<br />
<?php echo $gender_legend; ?>
<?php endif; ?>
</td>
<td>Sessions</td>
<td>Speakers
<br>
<span class="description small">First time: </span>
<?php echo $first_time_legend; ?>
<?php if ( ! empty( $data['genders'] ) ) : ?>
<br />
<?php echo $gender_legend; ?>
<?php endif; ?>
</td>
<td>Sponsors
<br>
<span class="description small">First time: </span>
<?php echo $first_time_legend; ?>
</td>
<td>Sponsors</td>
<td>
Volunteers
<br>
<span class="description small">First time: </span>
<?php echo $first_time_legend; ?>
<?php if ( ! empty( $data['genders'] ) ) : ?>
<br>
<?php echo $gender_legend; ?>
<?php endif; ?>
</td>
<td><?php echo $first_time_legend; ?></td>
</tr>

<?php foreach ( $data['wordcamps'] as $event ) : ?>
Expand All @@ -198,6 +186,7 @@
<td><?php echo esc_html( $event['info']['Start Date (YYYY-mm-dd)'] ); ?></td>
<td><?php echo esc_html( $event['info']['Status'] ); ?></td>

<!-- Registered Attendees -->
<td class="number">
<span class="total"><?php echo number_format_i18n( $event['totals']['attendee'] ); ?></span>
<?php if ( ! empty( $data['genders'] ) ) : ?>
Expand All @@ -207,15 +196,11 @@
<?php endif; ?>
</td>

<!-- Organizers -->
<td class="number">
<span class="total">Total: <?php echo number_format_i18n( $event['totals']['organizer'] ); ?></span>
<br>
FT: <?php echo number_format_i18n( $event['first_times']['organizer']['yes'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['organizer']['no'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['organizer']['unsure'] ); ?>
<span class="total"><?php echo number_format_i18n( $event['totals']['organizer'] ); ?></span>
<?php if ( ! empty( $data['genders'] ) ) : ?>
<br>
G: <?php echo number_format_i18n( $event['genders']['organizer']['female'] ); ?>
/ <?php echo number_format_i18n( $event['genders']['organizer']['female'] ); ?>
/ <?php echo number_format_i18n( $event['genders']['organizer']['male'] ); ?>
/ <?php echo number_format_i18n( $event['genders']['organizer']['unknown'] ); ?>
<?php endif; ?>
Expand All @@ -226,40 +211,53 @@
</td>

<td class="number">
<span class="total">Total: <?php echo number_format_i18n( $event['totals']['speaker'] ); ?></span>
<br>
FT: <?php echo number_format_i18n( $event['first_times']['speaker']['yes'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['speaker']['no'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['speaker']['unsure'] ); ?>
<span class="total"><?php echo number_format_i18n( $event['totals']['speaker'] ); ?></span>
<?php if ( ! empty( $data['genders'] ) ) : ?>
<br>
G: <?php echo number_format_i18n( $event['genders']['speaker']['female'] ); ?>
/ <?php echo number_format_i18n( $event['genders']['speaker']['female'] ); ?>
/ <?php echo number_format_i18n( $event['genders']['speaker']['male'] ); ?>
/ <?php echo number_format_i18n( $event['genders']['speaker']['unknown'] ); ?>
<?php endif; ?>
</td>

<td class="number">
<span class="total">Total: <?php echo number_format_i18n( $event['totals']['sponsor'] ); ?></span>
<br>
FT: <?php echo number_format_i18n( $event['first_times']['sponsor']['yes'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['sponsor']['no'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['sponsor']['unsure'] ); ?>
<span class="total"><?php echo number_format_i18n( $event['totals']['sponsor'] ); ?></span>
</td>

<td class="number">
<span class="total">Total: <?php echo number_format_i18n( $event['totals']['volunteer'] ); ?></span>
<br>
FT: <?php echo number_format_i18n( $event['first_times']['volunteer']['yes'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['volunteer']['no'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['volunteer']['unsure'] ); ?>
<span class="total"><?php echo number_format_i18n( $event['totals']['volunteer'] ); ?></span>
<?php if ( ! empty( $data['genders'] ) ) : ?>
<br>
G: <?php echo number_format_i18n( $event['genders']['volunteer']['female'] ); ?>
/ <?php echo number_format_i18n( $event['genders']['volunteer']['female'] ); ?>
/ <?php echo number_format_i18n( $event['genders']['volunteer']['male'] ); ?>
/ <?php echo number_format_i18n( $event['genders']['volunteer']['unknown'] ); ?>
<?php endif; ?>
</td>

<td class="number">
Organizers:
<span class="total"><?php echo number_format_i18n( $event['totals']['organizer'] ); ?></span>
/ <?php echo number_format_i18n( $event['first_times']['organizer']['yes'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['organizer']['no'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['organizer']['unsure'] ); ?>
<br>
Speakers:
<span class="total"><?php echo number_format_i18n( $event['totals']['speaker'] ); ?></span>
/ <?php echo number_format_i18n( $event['first_times']['speaker']['yes'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['speaker']['no'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['speaker']['unsure'] ); ?>
<br>
Sponsors:
<span class="total"><?php echo number_format_i18n( $event['totals']['sponsor'] ); ?></span>
/ <?php echo number_format_i18n( $event['first_times']['sponsor']['yes'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['sponsor']['no'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['sponsor']['unsure'] ); ?>
<br>
Volunteers:
<span class="total"><?php echo number_format_i18n( $event['totals']['volunteer'] ); ?></span>
/ <?php echo number_format_i18n( $event['first_times']['volunteer']['yes'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['volunteer']['no'] ); ?>
/ <?php echo number_format_i18n( $event['first_times']['volunteer']['unsure'] ); ?>
</td>

</tr>
<?php endforeach; ?>
</table>
Expand Down

0 comments on commit 4291fad

Please sign in to comment.