Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#6008 closed defect (fixed)

multiple projects index page misses Trac information (patch)

Reported by: salmira Owned by: Jonas Borgström
Priority: low Milestone: 0.11
Component: general Version: devel
Severity: trivial Keywords:
Cc: Branch:
Release Notes:
API Changes:

Description

When Trac is setup for multiple projects, it is impossible to display any Trac information by changing index.html, because trac variable is not defined for index.html template, as well other vars.

The only available are: the projects variable (the list of projects) and functions defined and value_of - see debug output of locals() (other debug outputs failed) for a custom index.html page:

 defined: <function defined at 0x082E1FB0>
 projects: {'href': '/trac/tr1', 'name': u'Trac1', 'description': u'1st'}{'href': '/trac/tr2', 'name': u'Trac2', 'description': u'2nd'}
 value_of: <function value_of at 0x084596F0>

Is it posible to add automatic Trac version infornation for this page at least, sa it is shown for each trac environment?

Test System Information:
Apache/2.2.4 (Win32) mod_python/3.3.1 Python/2.5 SVN/1.4.3 Trac/0.11Dev_trunk-r6000

Attachments (0)

Change History (6)

comment:1 by Noah Kantrowitz, 12 years ago

What are you trying to do exactly? You may find the TracForge index suits your needs better.

comment:2 by salmira, 12 years ago

I have already projects index from the built-in system. It works OK.

I just trying to print out the version of the current Trac installation in the page that lists all my projects. Now I have to (i) either do not print the exact version information, or (ii) put the version into index.html template manually each time I upgrade the Trac.

TracForge looks interesting, but right now I do not have enough time to setup it and to change policies of all existing active projects. Moreover, TracForge is partially fucntional yet (there is no support for attachments yet)…

comment:3 by salmira, 12 years ago

Resolution: worksforme
Status: newclosed
Summary: multiple projects index page misses Trac informationmultiple projects index page misses Trac information (patch)

Patch: the following code adds Trac version information to index.html. Just add it after "data()" line in the trac.web.main.py:472 :

    data = {}
    from trac import __version__
    data['trac'] = {
        'version': __version__,
        'time': format_datetime(),
    }

With this change, it is possible to print out the current Trac version information from the index.html template:

 ${trac.version}

comment:4 by salmira, 12 years ago

Resolution: worksforme
Status: closedreopened

unfortunately, I cannot commit this small change to this SVN…

comment:5 by Christopher Lenz, 12 years ago

Resolution: fixed
Status: reopenedclosed

Done in [6010].

comment:6 by Christopher Lenz, 12 years ago

Priority: normallow
Severity: normaltrivial

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.