Modify

Opened 4 years ago

Last modified 21 months ago

#8623 new enhancement

New field in the template - USERNAME

Reported by: charlie@… Owned by: charlie@…
Priority: normal Component: TracWikiPrintPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I suggest to add following code in order to enhance the fields for substitution in templates :

In def add_headers() add the two "#SUBJECT" rows as following :

        extra_content = self.get_extracontent(req)
        extra_content = extra_content.replace('#TITLE', title)
        extra_content = extra_content.replace('#VERSION', version)
        extra_content = extra_content.replace('#DATE', date)
        extra_content = extra_content.replace('#SUBJECT', subject)
        extra_content = extra_content.replace('#USER', req.remote_user)

        if book:
            frontpage = self.get_frontpage(req)
            frontpage = frontpage.replace('#TITLE', title)
            frontpage = frontpage.replace('#VERSION', version)
            frontpage = frontpage.replace('#DATE', date)
            frontpage = frontpage.replace('#SUBJECT', subject)
            frontpage = frontpage.replace('#USER', req.remote_user)

Attachments (2)

wikiprint.py (19.1 KB) - added by ajo 21 months ago.
wikiprint.pyc (16.6 KB) - added by ajo 21 months ago.

Download all attachments as: .zip

Change History (3)

Changed 21 months ago by ajo

comment:1 Changed 21 months ago by ajo

Attached wikiprint.py contains the hotfix from #9854.

Changed 21 months ago by ajo

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.