<commit_before><% if Refinery.version < '0.9.9' %>
  <%= stylesheet_link_tag 'portfolio' %>
  <%= javascript_include_tag 'portfolio' %>
<% else %>
  <% content_for :javascripts, javascript_include_tag('portfolio') %>
  <% content_for :stylesheets, stylesheet_link_tag('portfolio') %>
<% end %>

<%= form_for([:admin, @portfolio_entry]) do |f| %>
  <%= render :partial => "/shared/admin/error_messages",
             :locals => {
               :object => f.object,
               :include_object_name => true
             }  %>
  <div id='portfolio_body' class='field clearfix'>
    <%= f.required_label t('.title') %>
    <%= f.text_field :title, :class => "larger widest" %>
  </div>
  <% unless RefinerySetting.find_or_set(:portfolio_has_no_index, true)%>
    <div class='field'>
      <%= f.label :image -%>
      <%= render :partial => "/shared/admin/image_picker", :locals => {
        :f => f,
        :field => :title_image_id,
        :image => @portfolio_entry.title_image,
        :toggle_image_display => false
      } %>
    </div>
  <% end %>
  <div class='field clearfix'>
    <div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content'>
      <ul id='page_parts'>
        <li class='ui-state-default ui-state-active'>
          <%= link_to t('.content'), '#page_part_content'%>
        </li>
        <li class='ui-state-default'>
          <%= link_to t('.images'), '#portfolio_image_picker'%>
        </li>
      </ul>
    </div>
    <div id='page_part_editors'>
      <div id='page_part_content' class='page_part'>
        <%= f.text_area :body, :class => "wymeditor widest", :rows => 7 %>
      </div>
      <div class='page_part wym_skin_refinery' id='portfolio_image_picker'>
        <div class='wym_area_top'>
          <span class='clearfix label_inline_with_link'>
            <%= link_to t('.add_another_image').html_safe,
                        insert_admin_images_url(:dialog => true,
                                                :width => 866,
                                                :height => 510,
                                                :callback => "image_added"),
                        :id => "add_image_link" %>
          </span>
        </div>
        <div class='wym_box field images_field'>
          <ul id='portfolio_images' class='clearfix portfolio_entry_images'>
            <%= f.fields_for :images do |image_form| %>
              <li id='image_<%= image_form.object.id %>'>
                <%= image_form.hidden_field :id %>
                <%= image_fu image_form.object, '135x135#c' %>
              </li>
            <% end %>
            <li class='empty'>
              <%= hidden_field_tag "portfolio_entry[images_attributes][#{@portfolio_entry.images.size}][id]" %>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
  <% if (nested_portfolios = nested_set_options(PortfolioEntry, @portfolio_entry) {|i| "#{'-' * i.level} #{i.title}" }).present? %>
    <div class='field'>
      <%= f.label t('.parent') %>
      <%= f.select :parent_id, nested_portfolios, :include_blank => true %>
    </div>
  <% end %>

  <%= render :partial => "/shared/admin/form_actions",
             :locals => {
               :f => f,
               :continue_editing => true<commit_msg>We were not putting the tabs in the same wrapping div as the content they referenced which caused the tabs to fail. This solution works in RefineryCMS 0.9.9 as well. Closes GH-42<commit_after><% if Refinery.version < '0.9.9' %>
  <%= stylesheet_link_tag 'portfolio' %>
  <%= javascript_include_tag 'portfolio' %>
<% else %>
  <% content_for :javascripts, javascript_include_tag('portfolio') %>
  <% content_for :stylesheets, stylesheet_link_tag('portfolio') %>
<% end %>

<%= form_for([:admin, @portfolio_entry]) do |f| %>
  <%= render :partial => "/shared/admin/error_messages",
             :locals => {
               :object => f.object,
               :include_object_name => true
             }  %>
  <div id='portfolio_body' class='field clearfix'>
    <%= f.required_label t('.title') %>
    <%= f.text_field :title, :class => "larger widest" %>
  </div>
  <% unless RefinerySetting.find_or_set(:portfolio_has_no_index, true)%>
    <div class='field'>
      <%= f.label :image -%>
      <%= render :partial => "/shared/admin/image_picker", :locals => {
        :f => f,
        :field => :title_image_id,
        :image => @portfolio_entry.title_image,
        :toggle_image_display => false
      } %>
    </div>
  <% end %>
  <div class='field clearfix'>
    <div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
      <ul id='page_parts'>
        <li class='ui-state-default ui-state-active'>
          <%= link_to t('.content'), '#page_part_content'%>
        </li>
        <li class='ui-state-default'>
          <%= link_to t('.images'), '#portfolio_image_picker'%>
        </li>
      </ul>
      <div id='page_part_editors'>
        <div id='page_part_content' class='page_part'>
          <%= f.text_area :body, :class => "wymeditor widest", :rows => 7 %>
        </div>
        <div class='page_part wym_skin_refinery' id='portfolio_image_picker'>
          <div class='wym_area_top'>
            <span class='clearfix label_inline_with_link'>
              <%= link_to t('.add_another_image').html_safe,
                          insert_admin_images_url(:dialog => true,
                                                  :width => 866,
                                                  :height => 510,
                                                  :callback => "image_added"),
                          :id => "add_image_link" %>
            </span>
          </div>
          <div class='wym_box field images_field'>
            <ul id='portfolio_images' class='clearfix portfolio_entry_images'>
              <%= f.fields_for :images do |image_form| %>
                <li id='image_<%= image_form.object.id %>'>
                  <%= image_form.hidden_field :id %>
                  <%= image_fu image_form.object, '135x135#c' %>
                </li>
              <% end %>
              <li class='empty'>
                <%= hidden_field_tag "portfolio_entry[images_attributes][#{@portfolio_entry.images.size}][id]" %>
              </li>
            </ul>
          </div>
        </div>
      </div>
  </div>
  <% if (nested_portfolios = nested_set_options(PortfolioEntry, @portfolio_entry) {|i| "#{'-' * i.level} #{i.title}" }).present? %>
    <div class='field'>
      <%= f.label t('.parent') %>
      <%= f.select :parent_id, nested_portfolios, :include_blank => true %>
    </div>
  <% end %>

  <%= render :partial => "/shared/admin/form_actions",
             :locals => {
               :f => f,
               :continue_editing => true
{'fraction_non_alphanumeric': 0.16519434628975266, 'fraction_numerical': 0.005447585394581861, 'mean_word_length': 2.0682023486901535, 'pattern_counts': {'":': 0, '<': 132, '<?xml version=': 0, '>': 174, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5817917', 'n_tokens_mistral': 2251, 'n_tokens_neox': 2092, 'n_words': 394}