
    h                     x    d dl Z d dlmZ d dlmZ d dlmZ ddlm	Z	 ddl
mZ  G d d	e      Z G d
 dee	e      Zy)    N)
strip_tags)gettext_lazy)FrontendUIItem   )
ImageMixin)GetLinkMixinc                   *    e Zd ZdZ G d d      Zd Zy)Carouselzc
    Components > "Carousel" Plugin
    https://getbootstrap.com/docs/5.0/components/carousel/
    c                        e Zd ZdZ ed      Zy)Carousel.MetaTr
   N__name__
__module____qualname__proxy_verbose_name     Z/home/dcms/DCMS/lib/python3.12/site-packages/djangocms_frontend/contrib/carousel/models.pyMetar      s    }r   r   c                 V   d| j                    d}|dj                  t        d      | j                        z  }|dj                  t        d      | j                        z  }|dj                  t        d      | j
                        z  }|dj                  t        d      | j                        z  }|dj                  t        d	      | j                        z  }|dj                  t        d
      | j                        z  }|dj                  t        d      | j                        z  }|S )N()z {}: {}Intervalz, {}: {}Controls
IndicatorsKeyboardPauseRideWrap)
templateformatr   carousel_intervalcarousel_controlscarousel_indicatorscarousel_keyboardcarousel_pausecarousel_ridecarousel_wrap)selftexts     r   get_short_descriptionzCarousel.get_short_description   s    4==/#	  :0F0FGG
!!!J-1G1GHH
!!!L/43K3KLL
!!!J-1G1GHH
!!!G*d.A.ABB
!!!F)T-?-?@@
!!!F)T-?-?@@r   N)r   r   r   __doc__r   r-   r   r   r   r
   r
      s    
% %	r   r
   c                   .    e Zd ZdZ G d d      ZdZd Zy)CarouselSlidez`
    Components > "Slide" Plugin
    https://getbootstrap.com/docs/5.0/components/carousel/
    c                        e Zd ZdZ ed      Zy)CarouselSlide.MetaTzCarousel slideNr   r   r   r   r   r2   (   s    )*r   r   carousel_imagec                 l   dx}}| j                   r| j                  t        d      }n| j                  j                  r| j                  j                  }n| j                  j                  rmt
        j                  j                  | j                  j                        d   r7t
        j                  j                  | j                  j                        d   }nd}| j                  r=t        | j                        j                         }t        |      dkD  r	|d d  d}n| }|r
|r| d| dS |xs |S )	N z<file is missing>   Imaged   z...z (r   )r3   	rel_imager   nameoriginal_filenameospathsplitcarousel_contentr   striplen)r+   
image_textcontent_textr,   s       r   r-   z#CarouselSlide.get_short_description.   s   $&&
\~~%23
$$!^^00
11bggmmDNNDdDd6efg6hWW]]4>>+K+KLQO
$
  d334::<D4y3"&t*S1"&, \L>33--r   N)r   r   r   r.   r   image_fieldr-   r   r   r   r0   r0   "   s    
+ + #K.r   r0   )r<   django.utils.htmlr   django.utils.translationr   r   djangocms_frontend.modelsr   image.modelsr   link.modelsr   r
   r0   r   r   r   <module>rJ      s3    	 ( 6 4 % &~ ,".L*n ".r   