<commit_before>package EnsEMBL::Web::Component::Export::PopulationFormats;

use strict;

use URI::Escape qw(uri_unescape);

use base 'EnsEMBL::Web::Component::Export';

sub content {
  my $self = shift;
  my $hub  = $self->hub;
  
  my $params = {
    action   => 'Export', 
    type     => 'Transcript', 
    function => 'Population',
    output   => 'gen_var'
  };
  
  my $vc = $hub->get_viewconfig('Transcript', 'Population');
  
  foreach ($vc->options) {
    my $option = $vc->get($_);
    $params->{$_} = $option unless $option =~ /^off|no$/;
  }
  
  my $href = uri_unescape($hub->url($params));
  
  my @formats = (
    [ 'HTML', 'HTML', ' rel="external"' ],
    [ 'Text', 'Text', ' rel="external"' ]
  );
  
  my @list;
  
  foreach (@formats) {
    my $format = ";_format=$_->[1]" if $_->[1];
    push @list, qq{<a class="modal_close" href="$href$format"$_->[2]>$_->[0]</a>$_->[3]};
  }<commit_msg>changing form submit url to point to new export output url<commit_after>package EnsEMBL::Web::Component::Export::PopulationFormats;

use strict;

use URI::Escape qw(uri_unescape);

use base 'EnsEMBL::Web::Component::Export';

sub content {
  my $self = shift;
  my $hub  = $self->hub;
  
  my $params = {
    action   => 'Transcript', 
    type     => 'Export/Output', 
    function => 'Population',
    output   => 'gen_var'
  };
  
  my $vc = $hub->get_viewconfig('Transcript', 'Population');
  
  foreach ($vc->options) {
    my $option = $vc->get($_);
    $params->{$_} = $option unless $option =~ /^off|no$/;
  }
  
  my $href = uri_unescape($hub->url($params));
  
  my @formats = (
    [ 'HTML', 'HTML', ' rel="external"' ],
    [ 'Text', 'Text', ' rel="external"' ]
  );
  
  my @list;
  
  foreach (@formats) {
    my $format = ";_format=$_->[1]" if $_->[1];
    push @list, qq{<a class="modal_close" href="$href$format"$_->[2]>$_->[0]</a>$_->[3]};
  }
{'fraction_non_alphanumeric': 0.22192513368983957, 'fraction_numerical': 0.0053475935828877, 'mean_word_length': 3.3110599078341014, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 37, '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': '6269063', 'n_tokens_mistral': 731, 'n_tokens_neox': 709, 'n_words': 144}