diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-31 20:35:18 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-31 20:35:18 +0100 |
commit | b940c8b01a379519dcfc2ac88c7beca86aa79854 (patch) | |
tree | b40eff44ab39a316c1b70862d4ec2317df30a1ed /web/views | |
parent | 59ca7dcc45cae63309795d3b30822fa06d4b7cb1 (diff) | |
download | taginfo-b940c8b01a379519dcfc2ac88c7beca86aa79854.tar taginfo-b940c8b01a379519dcfc2ac88c7beca86aa79854.tar.gz |
Hide unfinished reports.
Reports without sources are now "hidden", ie. they are not visible in the list
of reports. But if you know the URL you can access them. This allows them to be
tested before they are publicly released. Similarly APIs being tested can now
use the API version 0, which will make them invisible in the API documentation.
Diffstat (limited to 'web/views')
-rw-r--r-- | web/views/index.erb | 2 | ||||
-rw-r--r-- | web/views/reports/index.erb | 2 | ||||
-rw-r--r-- | web/views/taginfo/apidoc.erb | 34 |
3 files changed, 21 insertions, 17 deletions
diff --git a/web/views/index.erb b/web/views/index.erb index 381fa94..80a872e 100644 --- a/web/views/index.erb +++ b/web/views/index.erb @@ -19,7 +19,7 @@ <td rowspan="5" class="box"> <p><%= t.pages.reports.intro %></p> <ul style="margin: 0 0 0 18px; padding: 0;"> -<% Report.each do |report| %> +<% Report.each_visible do |report| %> <li><a href="<%= report.url %>"><%= t.reports[report.name].name %></a></li> <% end %> </ul> diff --git a/web/views/reports/index.erb b/web/views/reports/index.erb index 1717977..1bd6e8b 100644 --- a/web/views/reports/index.erb +++ b/web/views/reports/index.erb @@ -6,7 +6,7 @@ <h2><%= t.pages.reports.list %></h2> <table class="list"> <tr><th class="tc" colspan="<%= Source.visible.size %>"/><%= t.pages.reports.data_sources %></th><th class="tl"><%= t.taginfo.report %></th></tr> - <% Report.each_with_index do |report, n| c = (n%2!=0) ? ' even' : '' %> + <% Report.each_visible_with_index do |report, n| c = (n%2!=0) ? ' even' : '' %> <tr> <% Source.visible.each do |source| %> <td class="tc<%= c %>" width="40"><%= source.img(16, t.taginfo.uses_data_from) if report.uses_source?(source.id) %></td> diff --git a/web/views/taginfo/apidoc.erb b/web/views/taginfo/apidoc.erb index 2dec778..0dcd903 100644 --- a/web/views/taginfo/apidoc.erb +++ b/web/views/taginfo/apidoc.erb @@ -13,21 +13,24 @@ <h2>Table of Contents</h2> <ul> -<% API.paths.keys.sort.each do |version| - API.paths[version].keys.sort.each do |path| - doc = API.paths[version][path] - if !doc.deprecated? || params[:show_deprecated] %> +<% API.paths.keys.sort.each do |version| + if version > 0 + API.paths[version].keys.sort.each do |path| + doc = API.paths[version][path] + if !doc.deprecated? || params[:show_deprecated] %> <li><a href="#<%= doc.complete_path.tr('/', '_')[1,1000] %>"><%= doc.complete_path %></a><%= doc.deprecated? ? " <span class='bad'>Deprecated. Use <a href='##{ doc.superseded_by.tr('/', '_')[1,1000] }'>#{ doc.superseded_by }</a> instead.</span>" : '' %></li> -<% end - end - end %> +<% end + end + end + end %> </ul> -<% API.paths.keys.sort.each do |version| - API.paths[version].keys.sort.each do |path| - doc = API.paths[version][path] - if !doc.deprecated? || params[:show_deprecated] - hashpath = doc.complete_path.tr('/', '_')[1,1000] %> +<% API.paths.keys.sort.each do |version| + if version > 0 + API.paths[version].keys.sort.each do |path| + doc = API.paths[version][path] + if !doc.deprecated? || params[:show_deprecated] + hashpath = doc.complete_path.tr('/', '_')[1,1000] %> <a name="<%= hashpath %>"></a> <h2><%= doc.complete_path %><%= doc.deprecated? ? " <span class='bad'>Deprecated. Use <a href='##{ doc.superseded_by.tr('/', '_')[1,1000] }'>#{ doc.superseded_by }</a> instead.</span>" : '' %></h2> <table class="desc"> @@ -74,6 +77,7 @@ </tr> <% end %> </table> -<% end - end - end %> +<% end + end + end + end %> |