<commit_before><%
  title "#{@paper.title} (#{@paper.full_reference}) &mdash; #{@body.name}, #{@legislative_term}. Wahlperiode"
  description @paper.description
  thumb = @paper.thumbnail_url
  opengraph do |graph|
    graph.title @paper.title
    graph.description @paper.description
    graph.image thumb unless thumb.nil?
  end
  twitter_card('summary') do |card|
    card.title @paper.title
    card.description @paper.description
    card.image thumb unless thumb.nil?
  end
-%>
<%- content_for :head do %>
<%= tag 'link', href: paper_path(@body, @legislative_term, @paper, {format: :json}), rel: 'alternate', type: 'application/json' -%>
<%= tag 'link', href: paper_path(@body, @legislative_term, @paper, {format: :txt}), rel: 'alternate', type: 'text/plain' -%>
<%- end -%>
<% content_for :main_class do %>page-paper<% end %>
<% content_for :main_fullwidth_prepend do %>
<div class="page-header page-paper-header">
  <div class="container">
    <ol class="breadcrumb">
      <li><%= link_to @body.name, @body %></li>
      <li><%= link_to "#{@legislative_term.to_s}. Wahlperiode", legislative_term_path(@body, @legislative_term) %></li>
      <li class="active">Drucksache <%= @paper.reference %></li>
    </ol>

    <h1><span class="label label-default label-big paper-reference hidden-xs"><%= @paper.full_reference %></span> <%= @paper.title %></h1>
  </div>
</div>
<% end %>

<div class="row">
  <div class="col-md-3 col-md-push-9">
    <p><%= @paper.doctype_human.titleize %></p>
    <p>
      Eingereicht von:<br class="hidden-xs hidden-sm"/>
      <%-
        o_people = @paper.originator_people.collect(&:name)
        o_orgs = @paper.originator_organizations
      -%>
      <%= o_people.join(', ') %><% if o_people.size > 0 %><span class="visible-xs-inline visible-sm-inline">,</span><br class="hidden-xs hidden-sm" /><% end %>
      <%= safe_join(o_orgs.map { |org| link_to org.name, organization_path(@body, org) }, ', ') %>
    </p>
    <% if @paper.answerer_ministries.size > 0 %>
    <p>
      Beantwortet von:<br class="hidden-xs hidden-sm"/>
      <%= safe_join(@paper.answerer_ministries.map {|ministry| link_to ministry.name, ministry_path(@body, ministry) }, ', ') %>
    </p>
    <% end %>
    <% unless @paper.published_at.nil? %>
    <p>Veröffentlicht am <%= l @paper.published_at %></p>
    <% end %>
    <p>
      <%= link_to 'PDF herunterladen', paper_path(@body, @legislative_term, @paper, {format: :pdf}), {class: 'btn btn-primary', target: '_blank'} %>
      <br/>
      <small>
        <%= @paper.page_count || '?' %> <%= t :pages, count: @paper.page_count || 0 %>
        <% if @body.use_mirror_for_download? %>
          &mdash; Gespiegelte Version <%= link_to '(?)', info_path %>
        <% end %>
        <% if @paper.contents.size > 0 %>
          &mdash; <%= link_to "als Text", paper_path(@body, @legislative_term, @paper, {format: :txt}), {target: '_blank'} %>
        <% end %>
        <% unless @paper.source_url.blank? %>
          &mdash; <%= link_to "Quelle", @paper.source_url %>
        <% end %>
      </small>
    </p>
    <p>
      <label for="shorturl" class="shorturl-label">Kurz-URL:</label>
      <input type="text" name="shorturl" id="shorturl" value="<%= paper_short_url(@paper) %>" readonly="readonly" class="shorturl-input"/>
    </p>
    <% if @paper.contains_table? %>
    <div class="paper-contains-table">
      <h4>Daten extrahieren</h4>
      <p>Diese Anfrage enthält eine oder mehrere Tabellen. Um diese einfach exportieren zu können, ist u.a. <a href="http://tabula.technology">Tabula</a> hilfreich.</p>
    </div>
    <% end %>
  </div>
  <div class="col-md-9 col-md-pull-3 paper-viewer-wrapper">
    <% if o_orgs.collect(&:name).map(&:downcase).include? 'npd' %>
    <div class="alert alert-nuts">
      <p><strong>Hinweis:</strong> Diese Anfrage kann Spuren von Rechtsextremismus enthalten.</p>
    </div>
    <% end %>
    <iframe src="<%= paper_pdf_viewer_path %>" width="100%" height="600px" frameborder="0" allowfullscreen="allowfullscreen" id="paper-viewer-iframe"></iframe>
  </div>
</div>
<commit_msg>paper: use blank?, contents can be nil<commit_after><%
  title "#{@paper.title} (#{@paper.full_reference}) &mdash; #{@body.name}, #{@legislative_term}. Wahlperiode"
  description @paper.description
  thumb = @paper.thumbnail_url
  opengraph do |graph|
    graph.title @paper.title
    graph.description @paper.description
    graph.image thumb unless thumb.nil?
  end
  twitter_card('summary') do |card|
    card.title @paper.title
    card.description @paper.description
    card.image thumb unless thumb.nil?
  end
-%>
<%- content_for :head do %>
<%= tag 'link', href: paper_path(@body, @legislative_term, @paper, {format: :json}), rel: 'alternate', type: 'application/json' -%>
<%= tag 'link', href: paper_path(@body, @legislative_term, @paper, {format: :txt}), rel: 'alternate', type: 'text/plain' -%>
<%- end -%>
<% content_for :main_class do %>page-paper<% end %>
<% content_for :main_fullwidth_prepend do %>
<div class="page-header page-paper-header">
  <div class="container">
    <ol class="breadcrumb">
      <li><%= link_to @body.name, @body %></li>
      <li><%= link_to "#{@legislative_term.to_s}. Wahlperiode", legislative_term_path(@body, @legislative_term) %></li>
      <li class="active">Drucksache <%= @paper.reference %></li>
    </ol>

    <h1><span class="label label-default label-big paper-reference hidden-xs"><%= @paper.full_reference %></span> <%= @paper.title %></h1>
  </div>
</div>
<% end %>

<div class="row">
  <div class="col-md-3 col-md-push-9">
    <p><%= @paper.doctype_human.titleize %></p>
    <p>
      Eingereicht von:<br class="hidden-xs hidden-sm"/>
      <%-
        o_people = @paper.originator_people.collect(&:name)
        o_orgs = @paper.originator_organizations
      -%>
      <%= o_people.join(', ') %><% if o_people.size > 0 %><span class="visible-xs-inline visible-sm-inline">,</span><br class="hidden-xs hidden-sm" /><% end %>
      <%= safe_join(o_orgs.map { |org| link_to org.name, organization_path(@body, org) }, ', ') %>
    </p>
    <% if @paper.answerer_ministries.size > 0 %>
    <p>
      Beantwortet von:<br class="hidden-xs hidden-sm"/>
      <%= safe_join(@paper.answerer_ministries.map {|ministry| link_to ministry.name, ministry_path(@body, ministry) }, ', ') %>
    </p>
    <% end %>
    <% unless @paper.published_at.nil? %>
    <p>Veröffentlicht am <%= l @paper.published_at %></p>
    <% end %>
    <p>
      <%= link_to 'PDF herunterladen', paper_path(@body, @legislative_term, @paper, {format: :pdf}), {class: 'btn btn-primary', target: '_blank'} %>
      <br/>
      <small>
        <%= @paper.page_count || '?' %> <%= t :pages, count: @paper.page_count || 0 %>
        <% if @body.use_mirror_for_download? %>
          &mdash; Gespiegelte Version <%= link_to '(?)', info_path %>
        <% end %>
        <% unless @paper.contents.blank? %>
          &mdash; <%= link_to "als Text", paper_path(@body, @legislative_term, @paper, {format: :txt}), {target: '_blank'} %>
        <% end %>
        <% unless @paper.source_url.blank? %>
          &mdash; <%= link_to "Quelle", @paper.source_url %>
        <% end %>
      </small>
    </p>
    <p>
      <label for="shorturl" class="shorturl-label">Kurz-URL:</label>
      <input type="text" name="shorturl" id="shorturl" value="<%= paper_short_url(@paper) %>" readonly="readonly" class="shorturl-input"/>
    </p>
    <% if @paper.contains_table? %>
    <div class="paper-contains-table">
      <h4>Daten extrahieren</h4>
      <p>Diese Anfrage enthält eine oder mehrere Tabellen. Um diese einfach exportieren zu können, ist u.a. <a href="http://tabula.technology">Tabula</a> hilfreich.</p>
    </div>
    <% end %>
  </div>
  <div class="col-md-9 col-md-pull-3 paper-viewer-wrapper">
    <% if o_orgs.collect(&:name).map(&:downcase).include? 'npd' %>
    <div class="alert alert-nuts">
      <p><strong>Hinweis:</strong> Diese Anfrage kann Spuren von Rechtsextremismus enthalten.</p>
    </div>
    <% end %>
    <iframe src="<%= paper_pdf_viewer_path %>" width="100%" height="600px" frameborder="0" allowfullscreen="allowfullscreen" id="paper-viewer-iframe"></iframe>
  </div>
</div>

{'fraction_non_alphanumeric': 0.19941384784466967, 'fraction_numerical': 0.0045182561973378926, 'mean_word_length': 3.5677635248187394, 'pattern_counts': {'":': 0, '<': 213, '<?xml version=': 0, '>': 218, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '216941', 'n_tokens_mistral': 3069, 'n_tokens_neox': 2897, 'n_words': 587}