HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/tracopt/ticket/__pycache__/clone.cpython-310.pyc
o

�k�`F�@sDddlmZmZddlmZddlmZmZmZGdd�de�Z	dS)�)�	Component�
implements)�IRequestFilter)�ITemplateProvider�
add_script�add_script_datac@s:eZdZdZeee�dd�Zdd�Zdd�Z	dd	�Z
d
S)�TicketCloneButtonz�Add a ''Clone'' button in the ticket box and in ticket comments.

    This button is located next to the 'Reply' to description button,
    and pressing it will send a request for creating a new ticket
    which will be based on the cloned one.
    cCs|S�N�)�self�req�handlerr
r
�6/usr/lib/python3/dist-packages/tracopt/ticket/clone.py�pre_process_request�z%TicketCloneButton.pre_process_requestcCsP|dkr#|�d�}|r#|jr#t|d�t||�d�d|j�d�id�|||fS)Nzticket.html�ticketzticketopt/ticketclone.js�	newticket�use_symbolszui.use_symbols)�newticket_href�ui)�get�existsrr�href�session)rr�template�data�metadatarr
r
r�post_process_request"s



��
z&TicketCloneButton.post_process_requestccs"�ddlm}d|td�fVdS)Nr)�resource_filename�	ticketopt�htdocs)�
pkg_resourcesr�__name__)rrr
r
r�get_htdocs_dirs/s�z!TicketCloneButton.get_htdocs_dirscCsgSr	r
)rr
r
r�get_templates_dirs3rz$TicketCloneButton.get_templates_dirsN)r"�
__module__�__qualname__�__doc__rrrrrr#r$r
r
r
rrs

rN)
�	trac.corerr�trac.web.apir�trac.web.chromerrrrr
r
r
r�<module>s