Plugin Directory

Changeset 3474201


Ignore:
Timestamp:
03/04/2026 05:51:47 AM (4 weeks ago)
Author:
formdev
Message:

not showing formation in calendar if not module

Location:
formdev/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • formdev/trunk/formdev.php

    r3473710 r3474201  
    55 * Plugin URI: https://www.form-dev.fr
    66 * Description: Synchroniser automatiquement les formations présentes dans votre CRM Formdev
    7  * Version: 1.4.7
     7 * Version: 1.4.8
    88 * Author: Formdev
    99 * Author URI: https://app.form-dev.fr
     
    1616// Définition de la version du plugin
    1717if (!defined('FORMEDEV_VERSION')) {
    18     define('FORMEDEV_VERSION', '1.4.7');
     18    define('FORMEDEV_VERSION', '1.4.8');
    1919}
    2020
  • formdev/trunk/readme.txt

    r3473710 r3474201  
    55Tested up to: 6.9.1 
    66Requires PHP: 7.4 
    7 Stable tag: 1.4.7
     7Stable tag: 1.4.8
    88License: GPLv2 or later 
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html 
     
    6868
    6969== Changelog ==
     70= 1.4.8 =
     71* not showing formation in calendar if not module
     72
    7073= 1.4.7 =
    7174* fix planning start date and slider
  • formdev/trunk/templates/planning-calendar.php

    r3473710 r3474201  
    363363
    364364                $is_active = ($index === $current_index);
     365
     366                // Ne garder que les formations qui ont au moins un module dans ce mois
     367                $sessions_rows_this_month = [];
     368                foreach ($sessions_rows as $session_key => $row) {
     369                    $has_module_in_month = false;
     370                    foreach ($month_days as $md) {
     371                        if (!empty($row['days'][$md['date']])) {
     372                            $has_module_in_month = true;
     373                            break;
     374                        }
     375                    }
     376                    if ($has_module_in_month) {
     377                        $sessions_rows_this_month[$session_key] = $row;
     378                    }
     379                }
    365380                ?>
    366381                <table class="calendar-table calendar-table-sessions-view calendar-month <?php echo $is_active ? 'is-active' : 'is-hidden'; ?>"
     
    380395                    <tbody>
    381396                        <?php
    382                         if (empty($sessions_rows)) :
     397                        if (empty($sessions_rows_this_month)) :
    383398                            ?>
    384399                            <tr>
     
    387402                        <?php
    388403                        else :
    389                             foreach ($sessions_rows as $session_key => $row) :
     404                            foreach ($sessions_rows_this_month as $session_key => $row) :
    390405                                $formation_url = null;
    391406                                $product_id = null;
Note: See TracChangeset for help on using the changeset viewer.