<h1>Plugins</h1>

<% [:installed, :available].each do |type| %>
  <div class="plugin_list">
    <h3><%= Inflector.humanize(type) %> Plugins</h3>
    
    <ul>
    <% Dir["#{RAILS_ROOT}/builder_plugins/#{type}/*"].each do |plugin| %>
      <% name = File.basename(plugin) %>
      <li><%= link_to Inflector.titleize(name.sub(/\.rb$/, '')), :action => 'plugins', :type => type, :name => name %></li>
    <% end %>
    </ul>
  </div>
<% end %>


<div id="plugin_documentation">
  <% if @file %>
    <h1><%= @plugin_title + " Plugin" %></h1>
    <%= render_plugin_doc @file || '' %>
  <% else %>
    <%= render :partial => 'about_plugins' %>
  <% end %>
</div>