Blame Identity/Models/Html/Trac/ArtworkToc.py

d6e8d8
# -*- coding: utf-8 -*-
d6e8d8
"""
d6e8d8
This macro shows the CentOS Artwork Table of Content.
d6e8d8
"""
d6e8d8
d6e8d8
TOC = [('Identity',	   		                '

1. Identity:

'),
d6e8d8
       ('IdentityConcept',                  '1.1. Concept'),
d6e8d8
       ('IdentityLogo',			            '1.2. Logo'),
d6e8d8
       ('IdentityTypography',	            '1.3. Typography'),
d6e8d8
       ('IdentityColors',                   '1.4. Colors'),
d6e8d8
       ('IdentityNewIdeas',		            '1.5. New Ideas'),
d6e8d8
       ('Anaconda',	   		                '

2. Anaconda:

'),
d6e8d8
       ('AnacondaPrompt',   	    	    '2.1. Prompt'),
d6e8d8
       ('AnacondaHeader',	                '2.2. Header'),
d6e8d8
       ('AnacondaSplash',		            '2.3. Spalsh'),
d6e8d8
       ('AnacondaProgress', 		        '2.4. Progress'),
d6e8d8
       ('AnacondaProgressSlides', 		    '2.4.1. Slides'),
d6e8d8
       ('AnacondaFirstboot', 		        '2.5. First Boot'),
d6e8d8
       ('BootUp',			                '

3. Boot Up:

'),
d6e8d8
       ('BootUpGRUB',			            '3.1. GRUB'),
d6e8d8
       ('BootUpRHGB',			            '3.2. RHGB'),
d6e8d8
       ('BootUpGDM',			            '3.3. GDM'),
d6e8d8
       ('BootUpGnomeSplash',		        '3.3. GnomeSplash'),
d6e8d8
       ('HighVisibility',		            '

4. High Visibility:

'),
d6e8d8
       ('HighVisibilityWallpapers',	        '4.1. Wallpapers'),
d6e8d8
       ('Promo',			                '

5. Promotion:

'),
d6e8d8
       ('PromoMedia',			            '5.1.  Media'),
d6e8d8
       ('PromoPosters',			            '5.2. Posters'),
d6e8d8
       ('PromoTShirts',			            '5.3. T-Shirts'),
d6e8d8
       ('PromoOOoTemplates',		        '5.5. OOo Templates'),
d6e8d8
       ('Repo',				                '

6. Image Repositories:

'),
d6e8d8
       ('RepoWidgets',			            '6.1. Widgets'),
d6e8d8
       ('Theming',			                '

7. Theming:

'),
d6e8d8
       ('ThemingApache',		            '7.1. Apache Web Server'),
d6e8d8
       ('ThemingSquid',		                '7.2. Squid Cache Proxy'),
d6e8d8
       ('ThemingBrowserDefaultPage',        '7.3. Browser Default Page'),
d6e8d8
       ('ThemingMantis',		            '7.4. Mantis'),
d6e8d8
       ('ThemingMoin',		                '7.5. Moin'),
d6e8d8
       ('ThemingTrac',		                '7.5. Trac'),
d6e8d8
       ('ThemingPunbb',		                '7.5. Punbb'),
d6e8d8
       ('ThemingPuntal',		            '7.5. Puntal'),
d6e8d8
       ]
d6e8d8
d6e8d8
def execute(hdf, args, env):
d6e8d8
    html = '
' \
d6e8d8
           '

Table of Contents

' \
d6e8d8
           '
    '
d6e8d8
    curpage = '%s' % hdf.getValue('wiki.page_name', '')
d6e8d8
    lang, page = '/' in curpage and curpage.split('/', 1) or ('', curpage)
d6e8d8
    for ref, title in TOC:
d6e8d8
        if page == ref:
d6e8d8
            cls =  ' class="active"'
d6e8d8
        else:
d6e8d8
            cls = ''
d6e8d8
        html += '<li%s>%s' \
d6e8d8
                % (cls, env.href.wiki(lang+ref), title)
d6e8d8
    return html + ''