<commit_before>module Admin::TabbedNavHelper
  def tab_navigation_for(model, *extra_classes, &block)
    tabs = send("#{model.class.model_name.underscore}_tabs", model)
    tab_navigation(tabs, *extra_classes, &block)
  end

  def person_tabs(person)
    { 'Details' => admin_person_path(person),
      'Translations' => admin_person_translations_path(person),
      'Historical accounts' => admin_person_historical_accounts_path(person) }
  end

  def topic_tabs(topic)
    {
      "Details" => url_for([:admin, topic]),
      "Featured documents" => url_for([:admin, topic, :classification_featurings])
    }
  end

  def corporate_information_page_tabs(page)
    {
      'Details' => edit_admin_organisation_corporate_information_page_path(page.organisation, page),
      'Attachments' => admin_corporate_information_page_attachments_path(page.id)
    }
  end

  def policy_advisory_group_tabs(group)
    {
      'Policy advisory group' => edit_admin_policy_advisory_group_path(group),
      'Attachments' => admin_policy_advisory_group_attachments_path(group),
    }<commit_msg>Fix tabbed navigation for worldwide organisation corporate info pages<commit_after>module Admin::TabbedNavHelper
  def tab_navigation_for(model, *extra_classes, &block)
    tabs = send("#{model.class.model_name.underscore}_tabs", model)
    tab_navigation(tabs, *extra_classes, &block)
  end

  def person_tabs(person)
    { 'Details' => admin_person_path(person),
      'Translations' => admin_person_translations_path(person),
      'Historical accounts' => admin_person_historical_accounts_path(person) }
  end

  def topic_tabs(topic)
    {
      "Details" => url_for([:admin, topic]),
      "Featured documents" => url_for([:admin, topic, :classification_featurings])
    }
  end

  def corporate_information_page_tabs(page)
    {
      'Details' => polymorphic_path([:edit, :admin, page.organisation, page]),
      'Attachments' => admin_corporate_information_page_attachments_path(page.id)
    }
  end

  def policy_advisory_group_tabs(group)
    {
      'Policy advisory group' => edit_admin_policy_advisory_group_path(group),
      'Attachments' => admin_policy_advisory_group_attachments_path(group),
    }
{'fraction_non_alphanumeric': 0.11010009099181074, 'fraction_numerical': 0.0, 'mean_word_length': 4.991825613079019, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4923529', 'n_tokens_mistral': 726, 'n_tokens_neox': 692, 'n_words': 110}