feat(v0.1): historia cen + jawnosc cen — milestone Initial Release
Historia cen: - Tabela wp_price_history z WP Cronem dziennym (snapshot cen) - AJAX endpoint apartamenty_get_price_history (zabezpieczony nonce) - Popup "Historia cen" w widgecie — vanilla JS, modal zgodny z projektem Jawnosc cen: - Endpointy /ceny-mieszkan.xml + /dane-gov-pl.xml (XSD-compliant) - Pliki MD5 dla obu XML - Strona admina: Narzedzia -> Jawnosc Cen z URL-ami do Ministerstwa - Transient cache 1h z inwalidacja przez cron Dokumentacja: docs/readme.md + docs/jawnosc-cen.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -156,7 +156,8 @@ class Elementor_Apartaments extends \Elementor\Widget_Base {
|
||||
<?php endif; ?>
|
||||
<tr class="apartament-card__price-history">
|
||||
<td class="apartament-card__info_table-title"></td>
|
||||
<td class="apartament-card__info_table-value">
|
||||
<td class="apartament-card__info_table-value btn-historia-cen"
|
||||
data-post-id="<?php echo esc_attr( get_the_ID() ); ?>">
|
||||
HISTORIA CEN
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="7" viewBox="0 0 12 7" fill="none">
|
||||
@@ -214,6 +215,33 @@ class Elementor_Apartaments extends \Elementor\Widget_Base {
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</div>
|
||||
|
||||
<?php // Popup historia cen — jeden globalny, wypełniany przez JS ?>
|
||||
<div class="price-history-overlay" id="price-history-overlay" aria-hidden="true">
|
||||
<div class="price-history-modal" role="dialog" aria-modal="true">
|
||||
<button class="price-history-modal__close" id="price-history-close" aria-label="Zamknij">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
|
||||
<path d="M13 1L1 13M1 1L13 13" stroke="#192C44" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<h3 class="price-history-modal__title" id="price-history-title"></h3>
|
||||
<div class="price-history-modal__current">
|
||||
<div class="price-history-modal__row price-history-modal__row--bold">
|
||||
<span>Cena brutto:</span>
|
||||
<span class="price-history-modal__val" id="price-history-price"></span>
|
||||
</div>
|
||||
<div class="price-history-modal__row">
|
||||
<span>Cena m²:</span>
|
||||
<span class="price-history-modal__val" id="price-history-sqm"> </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="price-history-modal__table-wrap">
|
||||
<table class="price-history-modal__table">
|
||||
<tbody id="price-history-tbody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user