<div class="events-list-cover">
<a href="<?php echo $wo['event']['url']; ?>" class="event_cover" data-ajax="?link1=g-whatsapp=<?php echo($wo['event']['id']);?>">
<img src="<?php echo $wo['event']['cover']; ?>" class="events-list-cover-img">
<span><?php $language_key = $wo['event']['language']; $translations = $wo['lang'][$language_key];if (isset($translations)) {echo $translations;} else {echo $language_key;}?></span>
<div>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path fill="currentColor" d="M12,11.5A2.5,2.5 0 0,1 9.5,9A2.5,2.5 0 0,1 12,6.5A2.5,2.5 0 0,1 14.5,9A2.5,2.5 0 0,1 12,11.5M12,2A7,7 0 0,0 5,9C5,14.25 12,22 12,22C12,22 19,14.25 19,9A7,7 0 0,0 12,2Z" />
</svg> <?php echo $wo['event']['location'];?>
</div>
</a>
<!--seccion del usuario-->
<a href="<?php echo $wo['event']['url']; ?>" data-ajax="?link1=timeline&u=<?php echo $wo['event']['username'];?>" class="wow_hdr_menu_usr_lnkw img">
<img src="<?php echo ($wo['event']['avatar']); ?>" alt="<?php echo $wo['event']['avatar']; ?>" class="events-list-cover-img">
</a>
<!-- -->
<div class="event-l-info">
<div class="event-title-container">
<a href="<?php echo $wo['event']['url']; ?>" data-ajax="?link1=g-whatsapp=<?php echo($wo['event']['id']);?>" class="event-title"><?php echo $wo['event']['name']; ?></a>
</div>
<!--boton delete-->
<div class="wow_event_page_btns">
<?php if (Wo_IsAdmin() || $wo['event']['poster_id'] == $wo['user']['id']){ ?>
<button class="btn btn-default btn-mat delete-eventw" id="<?php echo $wo['event']['id']?>">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /></svg> <?php echo $wo['lang']['delete'];?>
</button>
<?php } ?>
<?php echo Wo_LoadPage('events/gw/includes/delete-eventw')?>
</div>
<!--fin buton delete-->
<!--esta funcion permite que la descipcion sea desplegable-->
<div class="wow_content negg_padd event-options-list">
<div class="page-margin wow_content">
<div class="wo_page_hdng pag_neg_padd">
<div class="toggle-description" style="cursor: pointer;"onclick="toggleDescription(<?php echo $wo['event']['id']; ?>)">
<div class="wo_page_hdng_innr">
<span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M21,6V8H3V6H21M3,18H12V16H3V18M3,13H21V11H3V13Z"></path></svg></span> <?php echo $wo['lang']['description']; ?><img src="<?php echo $wo['config']['theme_url'];?>/img/sidebar/leer_descriptionw.png" style="max-width: 100px; max-height: 23px;">
</div>
</div>
<div class="page-margin">
<p class="wo_event_desc" style="max-height: 330px; overflow-y: auto; display: none;" data-event="<?php echo $wo['event']['id']; ?>">
<?php echo $wo['event']['description']?>
</p>
</div>
<!-- -->
</div>
</div>
<div class="event-l-btns">
<?php echo Wo_GetGoingButtonw($wo['event']['id']);?>
<?php if (Wo_IsAdmin() || $wo['event']['poster_id'] == $wo['user']['id']){ ?>
<span><a href="<?php echo Wo_SeoLink('index.php?link1=g-whatsapp-edit-event&eid='.$wo['event']['id']); ?>" class="btn btn-default btn-mat"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" /></svg> <?php echo $wo['lang']['edit']; ?></a></span>
<?php } ?>
</div>
</div>
<div> <h1>...</h1></div>
</div>
</div>
<div class="clear"></div>
</div>
<script>
// Función relacionada con eliminar el evento
$(document).on("click", ".delete-eventw", function (event) {
$("#delete-eventw").attr('data-event-ident', $(this).attr('id')).modal("show")
});
// segunda Función relacionada con eliminar el evento
function Wo_DeleteEventw(id) {
if (!id) {
return true;
} else {
$.get(Wo_Ajax_Requests_File(), { f: 'delete-eventw', id: id }, function (data) {
console.log('Server response:', data);
if (data.status == 200) {
$("#delete-eventw").modal('hide');
// Agregar la opción de recargar la página en caso de éxito
location.reload();
}
});
}
}
</script>
<script>
function toggleDescription(eventId) {
var description = document.querySelector('.wo_event_desc[data-event="' + eventId + '"]');
description.style.display = (description.style.display === 'none' || description.style.display === '') ? 'block' : 'none';
}
</script>