Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Turn descriptions into its own partial.

  • Loading branch information...
commit 4cf9aa22eb71ac4ded57e21fe9a9fa0d20211977 1 parent 6d06d48
Tobie Langel authored
7 templates/html/node.erb
View
@@ -1,12 +1,7 @@
<% d = @doc_instance %>
<%= include "partials/title", :object => @doc_instance %>
-
-<% if d.description && !d.description.empty? %>
- <%= layout_section('Description') %>
- <%= htmlize(d.description) %>
- <%= end_layout_section %>
-<% end %>
+<%= include "partials/description", :object => @doc_instance %>
<%= include "partials/namespaces", :object => @doc_instance %>
<%= include "partials/classes", :object => @doc_instance %>
5 templates/html/partials/description.erb
View
@@ -0,0 +1,5 @@
+<% if object.description && !object.description.empty? %>
+ <%= layout_section('Description') %>
+ <%= htmlize(object.description) %>
+ <%= end_layout_section %>
+<% end %>
7 templates/html/section.erb
View
@@ -1,12 +1,7 @@
<% @title = "#{@doc_instance.full_name} " %>
<%= include "partials/title", :object => @doc_instance %>
-
-<%= layout_section('Description') %>
- <%= htmlize(@doc_instance.description) %>
-<%= end_layout_section %>
-
-<% # Iterate over the items in this section. %>
+<%= include "partials/description", :object => @doc_instance %>
<% if @doc_instance.respond_to?(:utilities) && @doc_instance.utilities? %>
<%= layout_section('Utilities') %>
Please sign in to comment.
Something went wrong with that request. Please try again.