Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add text summary of stats
Browse files Browse the repository at this point in the history
trymebytes committed Feb 20, 2024
1 parent 2180dc1 commit 1d4269b
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions assets/css/translation-events.css
Original file line number Diff line number Diff line change
@@ -190,3 +190,18 @@ input[type="submit"].attending-btn {
float: right;
text-decoration: none;
}
.event-stats-summary {
margin-top: 1em;
}
.event-stats-summary summary {
background: #f8f8f8;
padding: 0.4em;
cursor: pointer;
}
.event-stats-summary p.event-stats-text {
margin: 0;
background: #f8f8f8;
padding: 0.8em;
font-size: .9em;
border-top: thin solid #e0e0e0;
}
6 changes: 6 additions & 0 deletions templates/event.php
Original file line number Diff line number Diff line change
@@ -99,6 +99,12 @@
</table>
</div>
<?php endif ?>
<div>
<details class="event-stats-summary">
<summary>View stats summary in text </summary>
<p class="event-stats-text"><?php echo esc_html( sprintf( 'At the %s event, %d people contributed in %d languages (%s), translated %d strings and reviewed %d strings.', esc_html( $event_title ), esc_html( $event_stats->totals()->users ), count( $event_stats->rows() ), esc_html( implode( ',', array_keys( $event_stats->rows() ) ) ), esc_html( $event_stats->totals()->created ), esc_html( $event_stats->totals()->reviewed ) ) ); ?></p>
</details>
</div>
</div>
<div class="event-details-right">
<div class="event-details-date">

0 comments on commit 1d4269b

Please sign in to comment.