Skip to content

Commit

Permalink
Fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
trymebytes committed Feb 20, 2024
1 parent d15182f commit a60434a
Showing 1 changed file with 16 additions and 33 deletions.
49 changes: 16 additions & 33 deletions templates/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,7 @@
<div class="event-page-content">
<?php echo esc_html( $event_description ); ?>
</div>
</div>
<div class="event-details-right">
<div class="event-details-date">
<p><span class="dashicons dashicons-clock"></span> <time class="event-utc-time" datetime="<?php echo esc_attr( $event_start ); ?>"></time> - <time class="event-utc-time" datetime="<?php echo esc_attr( $event_end ); ?>"></time></p>
</div>
<?php if ( is_user_logged_in() ) : ?>
<div class="event-details-join">
<?php
$current_time = gmdate( 'Y-m-d H:i:s' );
if ( strtotime( $current_time ) > strtotime( $event_end ) ) :
?>
<?php if ( $user_is_attending ) : ?>
<span class="event-details-join-expired"><?php esc_html_e( 'You attended', 'gp-translation-events' ); ?></span>
<?php endif ?>
<?php else : ?>
<form class="event-details-attend" method="post" action="<?php echo esc_url( gp_url( "/events/attend/$event_id" ) ); ?>">
<?php if ( ! $user_is_attending ) : ?>
<input type="submit" class="button is-primary" value="Attend Event"/>
<?php else : ?>
<input type="submit" class="button is-secondary" value="You're attending"/>
<?php endif ?>
</form>
<?php endif ?>
</div>
<?php endif; ?>
</div>
<?php if ( ! empty( $event_stats->rows() ) ) : ?>
<?php if ( ! empty( $event_stats->rows() ) ) : ?>
<div class="event-details-stats">
<h2>Stats</h2>
<table>
Expand Down Expand Up @@ -113,13 +87,22 @@
</div>
<?php if ( is_user_logged_in() ) : ?>
<div class="event-details-join">
<form class="event-details-attend" method="post" action="<?php echo esc_url( gp_url( "/events/attend/$event_id" ) ); ?>">
<?php if ( ! $user_is_attending ) : ?>
<input type="submit" class="button is-primary attend-btn" value="Attend Event"/>
<?php else : ?>
<input type="submit" class="button is-secondary attending-btn" value="You're attending"/>
<?php
$current_time = gmdate( 'Y-m-d H:i:s' );
if ( strtotime( $current_time ) > strtotime( $event_end ) ) :
?>
<?php if ( $user_is_attending ) : ?>
<span class="event-details-join-expired"><?php esc_html_e( 'You attended', 'gp-translation-events' ); ?></span>
<?php endif ?>
</form>
<?php else : ?>
<form class="event-details-attend" method="post" action="<?php echo esc_url( gp_url( "/events/attend/$event_id" ) ); ?>">
<?php if ( ! $user_is_attending ) : ?>
<input type="submit" class="button is-primary attend-btn" value="Attend Event"/>
<?php else : ?>
<input type="submit" class="button is-secondary attending-btn" value="You're attending"/>
<?php endif ?>
</form>
<?php endif ?>
</div>
<?php endif; ?>
</div>
Expand Down

0 comments on commit a60434a

Please sign in to comment.