show eventbooking cancellation link

master
Marek Isalski 8 years ago
parent 0be95f7177
commit a508cc83b5

@ -1,5 +1,17 @@
<tr>
<td><?php print nl2br( check_plain( $item[ 'name' ] ) ); ?></td>
<td><?php print nl2br( check_plain( $item[ 'name' ] ) ); if ( array_key_exists( 'content_object', $item ) ) {
if ( fulcrm_apiv2_url_is_type( $item[ 'content_object' ][ 'url' ], 'eventbooking' ) ) {
if ( $item[ 'content_object' ][ 'attended' ] ) {
print '<br /><strong>Thank you for coming to the event!</strong>';
} else if ( $item[ 'content_object' ][ 'didnotattend' ] ) {
print '<br /><strong>Sorry that you could not attend</strong>';
} else if ( $item[ 'content_object' ][ 'cancelled' ] ) {
print '<br /><strong>This booking has been cancelled</strong>';
} else {
print '<br /><a target="_blank" href="' . $item[ 'content_object' ][ '_urls' ][ 'cancel' ] . '">Cancel this booking</a> if you are unable to attend';
}
}
} ?></td>
<td class="text-right"><?php print check_plain( $item[ '_price' ][ 'format_item_net' ] ); ?></td>
<td class="text-right"><?php print check_plain( $item[ 'quantity' ] ); ?></td>
<td class="text-right"><?php print check_plain( $item[ '_price' ][ 'format_total' ] ); ?></td>

Loading…
Cancel
Save