-
Notifications
You must be signed in to change notification settings - Fork 460
/
index.html.erb
44 lines (40 loc) · 1.37 KB
/
index.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<ul class='breadcrumb'>
<li class='active'><a href='<%= @doc[:doc_url] %><%= @doc[:link_extension] %>'><%= @doc[:name] %> <%= @doc[:resources].values.first[:version] %></a></li>
<%= render(:partial => "languages", :locals => {:doc_url => @doc[:doc_url]}) %>
<% if @versions && @versions.size > 1 %>
<li class='pull-right'>
<%= @versions.collect { |v| link_to v, Apipie.full_url(v+@doc[:link_extension]) }.join(' / ').html_safe %>
</li>
<% end %>
</ul>
<div><%= raw @doc[:info] %></div>
<h1 class='page-header'><%= t('apipie.resources') %></h1>
<% @doc[:resources].sort_by(&:first).each do |key, api| %>
<h2>
<a href='<%= api[:doc_url] %><%= @doc[:link_extension] %>'>
<%= api[:name] %>
</a><br>
<small><%= api[:short_description] %></small>
</h2>
<table class='table'>
<thead>
<tr>
<th><%= t('apipie.resource') %></th>
<th><%= t('apipie.description') %></th>
</tr>
</thead>
<tbody>
<% api[:methods].each do |m| %>
<% m[:apis].each do |a| %>
<tr>
<td><a href='<%= m[:doc_url] %><%= @doc[:link_extension] %>'><%= a[:http_method] %> <%= a[:api_url] %></a></td>
<td width='60%'><%= a[:short_description] %></td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
<% end %>
<% content_for :apipie_footer do %>
<%= raw @doc[:copyright] %>
<% end %>