Skip to content

Commit

Permalink
Fill out API details page with CSV data
Browse files Browse the repository at this point in the history
  • Loading branch information
odlp committed Sep 28, 2020
1 parent e3b7079 commit eb25063
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions source/api_details.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,55 @@
<h1 id="<%= api.name.parameterize %>"><%= api.name %></h1>

<% if api.url.present? %>
<h2>Endpoint URL:</h2>
<ul>
<li><%= link_to(api.url, api.url) %></li>
</ul>
<% end %>

<% if api.documentation.present? %>
<h2>Documentation URL:</h2>
<ul>
<li><%= link_to(api.documentation, api.documentation) %></li>
</ul>
<% end %>

<% if api.maintainer.present? %>
<h2>Contact:</h2>
<ul>
<li><%= escape_html(api.maintainer) %></li>
</ul>
<% end %>

<% if api.description.present? %>
<h2>Description:</h2>
<%= escape_html(api.description) %>
<% end %>

<% if api.license.present? %>
<h2>License:</h2>
<ul>
<li><%= escape_html(api.license) %></li>
</ul>
<% end %>

<% if api.area_served.present? %>
<h2>Geographic Area:</h2>
<ul>
<li><%= escape_html(api.area_served) %></li>
</ul>
<% end %>

<% if api.start_date.present? %>
<h2>Start Date:</h2>
<ul>
<li><%= api.start_date.to_formatted_s(:iso8601) %></li>
</ul>
<% end %>

<% if api.end_date.present? %>
<h2>Expiry Date:</h2>
<ul>
<li><%= api.end_date.to_formatted_s(:iso8601) %></li>
</ul>
<% end %>

0 comments on commit eb25063

Please sign in to comment.