summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-02-16 05:41:02 (UTC)
committerChris Johns <chrisj@rtems.org>2018-02-16 05:41:02 (UTC)
commit12a8cc733aae900fefacae3505f07f9fe733c1e1 (patch)
tree8faa021c7c6a7765885459ff7fc542de7b367898
parentd9f944603846aaa70dec3ee73f76ecf1130e5c72 (diff)
Add links to releases and branches for Doxygen.
-rw-r--r--docs/docs.rtems.org/configuration.ini9
-rw-r--r--docs/docs.rtems.org/configuration.py26
-rw-r--r--docs/docs.rtems.org/static/rtems/js/catalogue.js11
3 files changed, 37 insertions, 9 deletions
diff --git a/docs/docs.rtems.org/configuration.ini b/docs/docs.rtems.org/configuration.ini
index a83fc6a..0aace29 100644
--- a/docs/docs.rtems.org/configuration.ini
+++ b/docs/docs.rtems.org/configuration.ini
@@ -72,14 +72,19 @@ started_ada = "Getting Started with GNAT/RTEMS"
;
; RTEMS 4.11
;
+[doxygen-no-legacy-template]
+legacy = no
+doxygen = yes
+
[no-legacy-template]
legacy = no
+doxygen = no
[rtems-docs-4.11.3]
-template = no-legacy-template
+template = doxygen-no-legacy-template
[rtems-docs-4.11.2]
-template = no-legacy-template
+template = doxygen-no-legacy-template
[rtems-docs-4.11.1]
template = no-legacy-template
diff --git a/docs/docs.rtems.org/configuration.py b/docs/docs.rtems.org/configuration.py
index c14f871..14625aa 100644
--- a/docs/docs.rtems.org/configuration.py
+++ b/docs/docs.rtems.org/configuration.py
@@ -168,6 +168,10 @@ class configuration:
for d in rel['manuals'] + rel['supplements']:
if d.lower() not in self.titles:
self.ctx.fatal('title not found in %s: %s' % (label, d))
+ else:
+ rel['doxygen'] = self._get_item(template, 'doxygen', False)
+ if rel['doxygen'] is None:
+ rel['doxygen'] = 'no'
def get_release(self, release):
if self.releases is None:
@@ -177,12 +181,20 @@ class configuration:
return r[0], r[1], self.releases[r[1]]
self.ctx.fatal('cannot find release: %s' % (release))
- def is_legacy_releases(self, release):
+ def is_legacy_release(self, release):
if self.releases is None:
self.ctx.fatal('no configuration loaded')
name, label, rel = self.get_release(release)
return rel['legacy'] == 'yes'
+ def is_doxygen_release(self, release):
+ if self.releases is None:
+ self.ctx.fatal('no configuration loaded')
+ name, label, rel = self.get_release(release)
+ if not 'doxygen' in rel:
+ return False
+ return rel['doxygen'] == 'yes'
+
def get_legacy_releases(self):
if self.releases is None:
self.ctx.fatal('no configuration loaded')
@@ -235,7 +247,7 @@ class configuration:
path = branch[1]
tag = _branch_tag(branch)
return \
- '<script> loadCatalogue("branches/%s/catalogue.xml", "branches/%s", "%s", false); </script>\n' \
+ '<script> loadCatalogue("branches/%s/catalogue.xml", "branches/%s", "%s", true, false); </script>\n' \
% (path, path, tag)
def _release_tag(release):
@@ -244,15 +256,19 @@ class configuration:
name = release[0]
label = release[1]
tag = _release_tag(release)
- if self.is_legacy_releases(name):
+ if self.is_legacy_release(name):
catalogue = "releases/%s.xml" % (name)
path = 'releases'
else:
catalogue = "releases/%s/catalogue.xml" % (label)
path = 'releases/%s' % (label)
+ if self.is_doxygen_release(name):
+ doxygen = "true"
+ else:
+ doxygen = "false"
return \
- '<script> loadCatalogue("%s", "%s", "%s", false); </script>\n' \
- % (catalogue, path, tag)
+ '<script> loadCatalogue("%s", "%s", "%s", %s, false); </script>\n' \
+ % (catalogue, path, tag, doxygen)
def _match_all(tag):
return True
diff --git a/docs/docs.rtems.org/static/rtems/js/catalogue.js b/docs/docs.rtems.org/static/rtems/js/catalogue.js
index d341db1..d0ac089 100644
--- a/docs/docs.rtems.org/static/rtems/js/catalogue.js
+++ b/docs/docs.rtems.org/static/rtems/js/catalogue.js
@@ -50,7 +50,7 @@ function panel_handlers(tag, id, show) {
$('#' + id + '1').collapse('show');
}
-function paintCatalogue(xml, path, tag, show) {
+function paintCatalogue(xml, path, tag, doxygen, show) {
var el_cat = $('#rtems-catalogue-' + tag);
if (path.slice(-1) != '/')
path = path + '/';
@@ -64,6 +64,7 @@ function paintCatalogue(xml, path, tag, show) {
var title = $(docs).find('catalogue');
var id = title.text().replace(/\.| |\(|\)|\[|\]/g, '_');
var table = catalogueHeader(id, title.text(), date);
+ var empty = '<td></a></td>\n';
$(docs).find('doc').each(function() {
var name = $(this).find('name').text();
var title = $(this).find('title').text();
@@ -72,7 +73,6 @@ function paintCatalogue(xml, path, tag, show) {
var html = $(this).find('html').text();
var pdf = $(this).find('pdf').text();
var singlehtml = $(this).find('singlehtml').text();
- var empty = '<td></a></td>\n';
table += '<tr>\n';
if (html)
table += '<td><a href="' + path + html + '">' + title + '</a></td>\n';
@@ -90,6 +90,13 @@ function paintCatalogue(xml, path, tag, show) {
table += empty;
table += '</tr>\n';
});
+ if (doxygen == true) {
+ table += '<tr>\n';
+ table += '<td><a href="doxygen/' + path + '">RTEMS CPU Kit Doxygen</a></td>\n';
+ table += empty;
+ table += empty;
+ table += '</tr>\n';
+ }
table += catalogueFooter();
el_cat.html(table);
panel_handlers(tag, id, show);