
    >Tf                     4    d dl mZ d dlmZ dZd Zd Zd ZdS )    )gettext_lazy)registry)get_table_orderinglinkify_phoneregister_table_columnc                     d| j         v r| j         d         pdS | j        j        r,| j        j                            d|j         d          x}r|S dS dS )z
    Given a request, return the prescribed table ordering, if any. This may be necessary to determine prior to rendering
    the table itself.
    sortNztables.z	.ordering)GETuseris_authenticatedconfigget__name__)requesttable
preferences      5/var/www/html/netbox-4.1.3/netbox/utilities/tables.pyr   r      sz     {6"*d* |$  ,001T5>1T1T1TUUU: 	 	 	    c                 <    | dS d|                      dd           S )z3
    Render a telephone number as a hyperlink.
    Nztel:  )replace)values    r   r   r      s*     }t*%--R((***r   c                     |D ]T}t           d         |         }||v r6t          t          d                              ||j                            | ||<   UdS )z
    Register a custom column for use on one or more tables.

    Args:
        column: The column instance to register
        name: The name of the table column
        tables: One or more table classes
    tablesz?A column named {name} is already defined for table {table_name})name
table_nameN)r   
ValueError_formatr   )columnr   r   r   regs        r   r   r   #   s|       x '3;;Q`aahhen i      D		 r   N)	django.utils.translationr   r   netbox.registryr   __all__r   r   r    r   r   <module>r'      sg    6 6 6 6 6 6 $ $ $ $ $ $  + + +    r   