/
ns.html.erb
51 lines (47 loc) · 1.38 KB
/
ns.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
45
46
47
48
49
50
<% if @ns then content_for :title, " - #{@ns.name}" end %>
<div class="grid_3">
<%= render :partial => 'lib_nav', :locals => {:lib => @library} %>
<%= render :partial => '/lib_namespaces' %>
</div>
<div class="grid_10">
<% if not @library.current %>
<div class="version_warning">
You're viewing version <%= @library.version %> of <%= @ns.name %>.
The latest stable version of <%= @ns.name %> is <%= Library.current_version_of(@library).version %>.
</div>
<% end %>
<% if @ns and @ns.doc != ""%>
<div class="doc">
<h3>DocString</h3>
<pre><%= @ns.doc.gsub("\n", "<br />") %></pre>
<div class="copyright_license">
<%= @library.copyright %>
<%= (@library.license || "See <a href='#{@library.site_url}'>#{@library.site_url}</a> for copyright and license details.")%>
</div>
</div>
<% end %>
<h3>Vars in <%= params[:ns] %></h3>
<div class="functions_list">
<% group_into_ns(@ns.functions).each do |g| %>
<h5><%= g[0] %></h5>
<div class="functions">
<% g[1].each do |f| %>
<span class="function">
<%= link_to f[:name],
:controller => 'main',
:action => 'function',
:lib => @library.url_friendly_name,
:version => params[:version],
:ns => @ns.name,
:function => f[:url_friendly_name] %>
</span>
<% end %>
</div>
<div class="clear"></div>
<% end%>
</div>
</div>
<div class="grid_3">
</div>