lib/calamum/templates/bootstrap/index.html.erb in calamum-1.0.2 vs lib/calamum/templates/bootstrap/index.html.erb in calamum-1.1.0
- old
+ new
@@ -14,40 +14,40 @@
</head>
<body data-spy="scroll" data-target=".bs-docs-sidebar">
<header class="jumbotron subhead" id="overview">
<div class="container">
- <h1><%= @name %> Rest API Doc</h1>
+ <h1><%= @name %></h1>
<p class="lead"><%= @url %></p>
</div>
</header>
<div class="container">
<div class="row">
<div class="span3 bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav affix-top">
- <% if description %>
+ <% if @description %>
<li class="active">
<a href="#overview">
<i class="icon-chevron-right"></i>Overview</a>
</li>
<% end %>
<% @resources.keys.each_with_index do |key,index| %>
- <li class="<%= !description && (index == 0) ? 'active': '' %>">
+ <li class="<%= !@description && (index == 0) ? 'active': '' %>">
<a href="#<%= key %>_section">
<i class="icon-chevron-right"></i><%= key %></a>
</li>
<% end %>
</ul>
</div>
<div class="span9">
- <% if description %>
+ <% if @description %>
<section id="overview">
<div class="page-header">
<h2>Overview</h2>
</div>
<div id="overview-body">
- <%= description %>
+ <%= @description %>
</div>
</section>
<% end %>
<% @resources.each do |name, requests| %>
<section id="<%= name %>_section">
@@ -75,12 +75,12 @@
<div class="tab-pane" id="header_<%= req.object_id %>">
<% unless req.params.empty? %>
<table class="table table-bordered table-hover">
<thead>
<tr>
- <th>Key</th>
- <th>Value</th>
+ <th>Key</th>
+ <th>Value</th>
</tr>
</thead>
<tbody>
<% req.headers.each do |key, content| %>
<tr>
@@ -118,10 +118,14 @@
</table>
<% else %>
Request without parametres
<% end %>
</div>
- <div class="tab-pane" id="response_<%= req.object_id %>"><code><%= req.response %></code></div>
+ <div class="tab-pane content" id="response_<%= req.object_id %>">
+ <% if req.response %>
+ <pre class="prettyprint"><%= pj req.response %></pre>
+ <% end%>
+ </div>
</div>
</div>
</div>
</div>
<% end %>