3

\                 @   s   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	m
Z
mZmZ d dlmZmZ eddZed	d
Zed	dZed	dZed	dZG dd deZG dd deZG dd deZG dd deZdS )    )settings)	mark_safe)gettext_lazy)ungettext_lazy)AColumn
LinkColumnTemplateColumn)	get_class	get_modelzdashboard.tablesDashboardTable	catalogueProductCategoryAttributeOptionGroupOptionc               @   s   e Zd ZeedddeddZeeddddZeed	ed
ddZ	eeddddZ
eeddddZeeddddZdZG dd dejZdS )ProductTableTitlez*dashboard/catalogue/product_row_title.htmltitle)verbose_nametemplate_nameorder_byaccessorImagez*dashboard/catalogue/product_row_image.htmlF)r   r   	orderablezProduct typeproduct_classZproduct_class__name)r   r   r   ZVariantsz-dashboard/catalogue/product_row_variants.htmlzStock recordsz1dashboard/catalogue/product_row_stockrecords.htmlActionsz,dashboard/catalogue/product_row_actions.htmlsitemapc            	   @   s   e Zd ZeZdZdZd
ZdS )zProductTable.Metaupcdate_updatedr   imager   variantsstock_records...actionsz-date_updatedN)r   r   )	r   r   r    r   r!   r"   r#   r   r$   )__name__
__module____qualname__r   modelfieldssequencer    r+   r+   @/var/www/html/oscar2019/oscar/apps/dashboard/catalogue/tables.pyMeta-   s
    r-   N)r%   r&   r'   r	   _r   r   r    r   r   r!   r"   r$   iconr   r-   r+   r+   r+   r,   r      s4   r   c               @   st   e Zd ZededgdZeddZededgee	ddd	d
Z
edd	dZdZeddZG dd dejZdS )CategoryTablez#dashboard:catalogue-category-updatepk)argszJ{{ record.description|default:""|striptags|cut:"&nbsp;"|truncatewords:6 }})template_codez(dashboard:catalogue-category-detail-listzNumber of child categoriesget_num_childrenF)r2   r   r   r   z-dashboard/catalogue/category_row_actions.html)r   r   r   z%s Categoryz%s Categoriesc               @   s   e Zd ZeZdZdS )zCategoryTable.MetanamedescriptionN)r5   r6   )r%   r&   r'   r   r(   r)   r+   r+   r+   r,   r-   H   s   r-   N)r%   r&   r'   r   r   r5   r	   r6   r   r.   num_childrenr$   r/   r   captionr   r-   r+   r+   r+   r,   r0   5   s   


r0   c               @   sb   e Zd ZeeddddZeeddddZeed	d
ddZdZe	ddZ
G dd dejZdS )AttributeOptionGroupTableNamez8dashboard/catalogue/attribute_option_group_row_name.htmlr5   )r   r   r   zOption summaryzBdashboard/catalogue/attribute_option_group_row_option_summary.htmlF)r   r   r   r   z;dashboard/catalogue/attribute_option_group_row_actions.htmlr   z%s Attribute Option Groupz%s Attribute Option Groupsc               @   s   e Zd ZeZdZdZejZ	dS )zAttributeOptionGroupTable.Metar5   option_summaryr$   N)r5   )r5   r;   r$   )
r%   r&   r'   r   r(   r)   r*   r   OSCAR_DASHBOARD_ITEMS_PER_PAGEper_pager+   r+   r+   r,   r-   ^   s   r-   N)r%   r&   r'   r	   r.   r5   r;   r$   r/   r   r8   r   r-   r+   r+   r+   r,   r9   M   s   
r9   c               @   sP   e Zd ZeeddddZeeddddZd	Zed
dZ	G dd de
jZdS )OptionTabler:   z(dashboard/catalogue/option_row_name.htmlr5   )r   r   r   r   z+dashboard/catalogue/option_row_actions.htmlF)r   r   r   Zreorderz	%s Optionz
%s Optionsc               @   s   e Zd ZeZdZdZejZ	dS )zOptionTable.Metar5   typer$   N)r5   r?   )r5   r?   r$   )
r%   r&   r'   r   r(   r)   r*   r   r<   r=   r+   r+   r+   r,   r-   r   s   r-   N)r%   r&   r'   r	   r.   r5   r$   r/   r   r8   r   r-   r+   r+   r+   r,   r>   e   s   
r>   N)django.confr   django.utils.safestringr   django.utils.translationr   r.   r   django_tables2r   r   r   r	   oscar.core.loadingr
   r   r   r   r   r   r   r   r0   r9   r>   r+   r+   r+   r,   <module>   s   




%