From 86108189bea0df33aa2be9df76e5c2d595ecf30e Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Fri, 10 Apr 2015 16:44:00 -0400 Subject: [PATCH] Update formatting of teams page Make the teams page a little easier to use. * Add section titles for clarity and for hrefs, so you can link to say the mission of a team (neutron.html#mission) * List each tag on its own line. As the number of tags grow putting all the tags for a given repo on a single line will become unwieldy. Change-Id: I1aef7897f718ab851a5ac83a1a979ee8ca48f6c2 --- doc/source/_exts/teams.py | 32 +++++++++++++++++++------------- reference/projects/index.rst | 1 + 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/doc/source/_exts/teams.py b/doc/source/_exts/teams.py index c519b462d..770032a86 100644 --- a/doc/source/_exts/teams.py +++ b/doc/source/_exts/teams.py @@ -36,6 +36,9 @@ def _team_to_rst(name, info): yield '' mission = info.get('mission', '').rstrip() if mission: + yield "Mission" + yield '-------' + yield '' yield mission yield '' tags = [ @@ -43,23 +46,26 @@ def _team_to_rst(name, info): for t in info.get('tags', []) ] if tags: - yield 'Team based tags:' - yield '%s' % ', '.join(tags) + yield 'Team based tags' + yield '----------------' yield '' - yield 'Repositories (tags):' + for tag in tags: + yield '- %s' % tag + yield '' + yield 'Repositories and Tags' + yield '---------------------' yield '' for project in info.get('projects', []): - tags = [ - ':ref:`tag-%s`' % t['name'] - for t in project.get('tags', []) - ] - if tags: - tag_references = '(%s)' % ', '.join(tags) - else: - tag_references = '' - yield '- :repo:`%s` %s' % (project['repo'], tag_references) + yield '- :repo:`%s`' % project['repo'] + tags = project.get('tags', []) + if tags is not []: + yield '' + for tag in tags: + yield ' - :ref:`tag-%s`' % tag['name'] yield '' - yield '.. extraatcstable:: :ref:`Extra ATCs `' + yield 'Extra ATCs' + yield '-----------' + yield '.. extraatcstable:: ' yield ' :project: %s' % name yield '' diff --git a/reference/projects/index.rst b/reference/projects/index.rst index 86df53ed7..ce5e16800 100644 --- a/reference/projects/index.rst +++ b/reference/projects/index.rst @@ -4,5 +4,6 @@ .. toctree:: :glob: + :titlesonly: *