Saved filter item – řádek uloženého filtru

Tlačítka nesou data-filter-action="watch|delete" a data-filter-id.

V kartě Uložené filtry

  • Uložené filtry

    Vaše poslední hledání ukládáme automaticky. Hlídač z nich uděláte zapnutím hlídání.
    2 filtry
  •         {% embed "@Components/user-card/user-card.twig" with { props: {
      title: "Uložené filtry",
      subtitle: "Vaše poslední hledání ukládáme automaticky. Hlídač z nich uděláte zapnutím hlídání.",
      icon: { src: "svg/user-section/funnel.svg" },
      count: "2 filtry"
    } } %}
      {% block body %}
        {% include "@Components/saved-filter-item/saved-filter-item.twig" with { props: {
          id: 201,
          title: "Byty 2+kk Praha 4",
          url: "#",
          total: 6,
          totalLabel: "6 nemovitostí",
          watchButton: { title: "Zapnout hlídání" },
          deleteButton: { title: "Smazat filtr" }
        } } %}
        {% include "@Components/saved-filter-item/saved-filter-item.twig" with { props: {
          id: 202,
          title: "Chaty a chalupy na prodej, Jihočeský kraj, okres Český Krumlov, do 3 000 000 Kč, pozemek od 500 m²",
          url: "#",
          total: 41,
          totalLabel: "41 nemovitostí",
          watchButton: { title: "Zapnout hlídání" },
          deleteButton: { title: "Smazat filtr" }
        } } %}
      {% endblock %}
    {% endembed %}
    
          
  •           <section class="user-card">    <header class="user-card__header">
                  <span class="user-card__icon" aria-hidden="true">
              <span class="icon">
          <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 4.5h14l-5.4 6.2V16l-3.2-1.8v-3.5L3 4.5z"/></svg>
      
      </span>
            </span>
                <div class="user-card__heading">
            <h2 class="user-card__title">Uložené filtry</h2>
                      <div class="user-card__subtitle">Vaše poslední hledání ukládáme automaticky. Hlídač z nich uděláte zapnutím hlídání.</div>
                  </div>
          <div class="user-card__aside"><span class="user-card__count">2 filtry</span></div>
        </header>
      
      
      <div class="user-card__panel">
        <div class="user-card__body">
              <div class="saved-filter-item user-card__row" data-filter-id="201">
      <div class="saved-filter-item__main">
        <a class="saved-filter-item__title" href="#">Byty 2+kk Praha 4</a>
              <div class="saved-filter-item__total">6 nemovitostí</div>
          </div>
    
      <div class="saved-filter-item__actions">
              <button type="button" class="user-action-btn user-action-btn--primary saved-filter-item__watch" data-filter-action="watch" data-filter-id="201">
            <span class="icon">
          <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 3a4.5 4.5 0 00-4.5 4.5c0 3-1.3 4.2-1.3 4.2h11.6s-1.3-1.2-1.3-4.2A4.5 4.5 0 0010 3z"/><path d="M8.4 14.6a1.7 1.7 0 003.2 0"/></svg>
      
      </span>
            <span>Zapnout hlídání</span>
          </button>
                  <button type="button" class="user-action-btn user-action-btn--danger user-action-btn--icon" data-filter-action="delete" data-filter-id="201" aria-label="Smazat filtr" title="Smazat filtr">
            <span class="icon">
          <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 6h12M8 6V4h4v2M6 6l0.8 10h6.4L14 6M8.6 9v4.4M11.4 9v4.4"/></svg>
      
      </span>
          </button>
          </div>
    </div>
        <div class="saved-filter-item user-card__row" data-filter-id="202">
      <div class="saved-filter-item__main">
        <a class="saved-filter-item__title" href="#">Chaty a chalupy na prodej, Jihočeský kraj, okres Český Krumlov, do 3 000 000 Kč, pozemek od 500 m²</a>
              <div class="saved-filter-item__total">41 nemovitostí</div>
          </div>
    
      <div class="saved-filter-item__actions">
              <button type="button" class="user-action-btn user-action-btn--primary saved-filter-item__watch" data-filter-action="watch" data-filter-id="202">
            <span class="icon">
          <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 3a4.5 4.5 0 00-4.5 4.5c0 3-1.3 4.2-1.3 4.2h11.6s-1.3-1.2-1.3-4.2A4.5 4.5 0 0010 3z"/><path d="M8.4 14.6a1.7 1.7 0 003.2 0"/></svg>
      
      </span>
            <span>Zapnout hlídání</span>
          </button>
                  <button type="button" class="user-action-btn user-action-btn--danger user-action-btn--icon" data-filter-action="delete" data-filter-id="202" aria-label="Smazat filtr" title="Smazat filtr">
            <span class="icon">
          <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 6h12M8 6V4h4v2M6 6l0.8 10h6.4L14 6M8.6 9v4.4M11.4 9v4.4"/></svg>
      
      </span>
          </button>
          </div>
    </div>
          </div>
    
        
        
        
        
          </div>
    </section>
    
            

Schema

    {
  "props": {
    "id": {
      "type": "string | number",
      "description": "Id filtru; jde do data-filter-id na řádku i na tlačítkách"
    },
    "title": {
      "type": "string",
      "description": "Název filtru (odkaz). Texty se vypisují bez escapování (autoescape je vypnutý) – uživatelský obsah musí escapovat aplikace."
    },
    "url": {
      "type": "string",
      "description": "Odkaz na výpis nemovitostí filtru"
    },
    "total": {
      "type": "number",
      "description": "Počet nemovitostí (jen informativně, text je v totalLabel)"
    },
    "totalLabel": {
      "type": "string",
      "description": "Hotový text, např. „6 nemovitostí“"
    },
    "watchButton": {
      "type": "object",
      "description": "{ title, attributes[] } – tlačítko „Zapnout hlídání“ s data-filter-action=\"watch\""
    },
    "deleteButton": {
      "type": "object",
      "description": "{ title, attributes[] } – ikonové tlačítko koše s data-filter-action=\"delete\"; title je aria-label"
    },
    "extraClass": {
      "type": "string",
      "description": "Extra CSS class"
    }
  }
}