Project

General

Profile

Feature #101 ยป 0001-Generate-valid-doc-URLs-for-nested-classes.patch

Frank Sweetser, 04/16/2010 04:36 PM

View differences:

app/controllers/puppetclasses_controller.rb
def rdoc
@puppetclass = Puppetclass.find(params[:id])
@name = @puppetclass.name
@name_url = @name.gsub('::', '/')
#redirect_to "http://#{Facter.fqdn}/puppet/rdoc/development/classes/#{@name}.html"
@environments = Environment.all.map(&:name).sort
end
app/views/puppetclasses/rdoc.erb
<% @environments.in_groups_of(cols) do |group| -%>
<tr>
<% for col in (0..(cols - 1)) -%>
<td><%= link_to(group[col], "http://#{Facter.fqdn}/puppet/rdoc/#{group[col]}/classes/#{@name}.html") if group[col] -%></td>
<td><%= link_to(group[col], "http://#{Facter.fqdn}/puppet/rdoc/#{group[col]}/classes/#{@name_url}.html") if group[col] -%></td>
<% end -%>
</tr>
<% end -%>
</table>
</table>
    (1-1/1)