<% if @block.class == Portlet %> <% page_title "Content Library / Select Portlet Type" %> <% Portlet.types.each do |portlet_type| %>
<% link_params = {:type => portlet_type.underscore} unless params[:portlet].blank? link_params["#{portlet_type.underscore}[connect_to_page_id]"] = params[:portlet][:connect_to_page_id] link_params["#{portlet_type.underscore}[connect_to_container]"] = params[:portlet][:connect_to_container] end %> <%= link_to h(portlet_type.titleize), new_cms_portlet_path(link_params) %>
<% end %> <% @hide_buttons = true %> <% else %> <%= hidden_field_tag :type, @block.class.name.underscore, :id => "portlet_type_field" %> <%= render :partial => @block.class.form, :locals => {:f => f} %> <% end %>