Ticket #8623 (new enhancement)

Opened 2 years ago

Last modified 4 months ago

New field in the template - USERNAME

Reported by: charlie@accalio.com Assigned to: charlie@accalio.com
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

wikiprint.py (19.1 kB) - added by ajo on 01/13/13 16:27:07.
wikiprint.pyc (16.6 kB) - added by ajo on 01/13/13 16:28:11.

Change History

01/13/13 16:27:07 changed by ajo

  • attachment wikiprint.py added.

01/13/13 16:27:59 changed by ajo

Attached wikiprint.py contains the hotfix from #9854.

01/13/13 16:28:11 changed by ajo

  • attachment wikiprint.pyc added.

Add/Change #8623 (New field in the template - USERNAME)




Change Properties
Action