% content_for :page_title do %> <%= controller.controller_name.humanize.capitalize %> <% end %> <% content_for :tab_line_buttons do %> <% if controller.model_class.creatable? %> <% if controller.model_class.name == 'User' %> <%= link_to "Add a new #{controller.model_class.to_s.underscore.gsub '_', ' '}", setup_user_popup_path, {class: 'btn btn-primary pull-right', :remote => true, 'data-toggle' => "modal", 'data-target' => '#user-setup-modal-window', return_to: request.url} %>
<% else %> <%= button_to "Add a new #{controller.controller_name.singularize.humanize.downcase}", { action: 'create' }, { class: 'btn btn-primary pull-right' } %> <% end %> <% end %> <% end %> <%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.index_pane_list }%>