<commit_before>{% import "_sources.html" as sources %}
{% extends "layout.html" %}

{% block title %}
    {% if relation.get_attribute('title_text') %}
        {{relation['title_text'].value}}; {{relation.schema.label}} ({{relation.target['name'].value}})
    {% else %}
        {{relation.schema.label}}: {{relation.source['name'].value}} - {{relation.target['name'].value}}
    {% endif %}
{% endblock %}

{% block description %}
  {{ (relation['grant_subject'].value or relation['contract_description'].value or "An " + relation.schema.label + " between " + relation.source['name'].value + " and " + relation.target['name'].value + " as part of OpenInterests, a catalogue of interests regarding the institutions of the European Union.")
    | striptags | truncate(length=155) | trim | safe }}
{% endblock %}

{% block content %}
    <h2>{{relation.schema.label}}</h2>

    <div class="row">
        <div class="col-xs-12">
            <div class="btn-toolbar entity-toolbar" role="toolbar">
                <div class="btn-group pull-right">
                    {% if relation.source['asktheeu_slug'] or relation.source['asktheeu_slug'] %}
                        <a class="btn btn-default" href="{{ relation | relation_wob_link }}">
                            <img class="icon" src="http://www.asktheeu.org/asktheeu-theme/images/favicon.ico"> Request detailed information
                        </a>
                    {% endif %}
                    <a class="btn btn-default" href="{{url_for('relations_api.view', id=relation.id)}}">
                        <i class="fa fa-code"></i> JSON
                    </a>
                </div>
            </div>
        </div>
    </div>

    <table class="table table-condensed">
        <tr>
            <th width="40%" class="attributes">Origin</th>
            <td colspan="2"><a href="{{url_for('entities.view', id=relation.source.id)}}">{{relation.source['name'].value}}</a></td>
        </tr>
        <tr>
            <th width="40%" class="attributes">Destination</th>
            <td colspan="2"><a href="{{url_for('entities.view', id=relation.target.id)}}">{{relation.target['name'].value}}</a></td>
        </tr>
        {% for prop in relation.active_properties if not relation.get_attribute(prop.name).hidden %}            
            <tr>
                <th width="40%" class="attributes">{{relation.get_attribute(prop.name).label or prop.name}}</th>
                <td>{{prop.value | safe}}</td>
                <td class="source">{{ sources.link(prop) }}</td>
            </tr>
        {% endfor %}
    </table>
{% endblock %}

{% block js %}{% endblock %}<commit_msg>Don't show "None" props. <commit_after>{% import "_sources.html" as sources %}
{% extends "layout.html" %}

{% block title %}
    {% if relation.get_attribute('title_text') %}
        {{relation['title_text'].value}}; {{relation.schema.label}} ({{relation.target['name'].value}})
    {% else %}
        {{relation.schema.label}}: {{relation.source['name'].value}} - {{relation.target['name'].value}}
    {% endif %}
{% endblock %}

{% block description %}
  {{ (relation['grant_subject'].value or relation['contract_description'].value or "An " + relation.schema.label + " between " + relation.source['name'].value + " and " + relation.target['name'].value + " as part of OpenInterests, a catalogue of interests regarding the institutions of the European Union.")
    | striptags | truncate(length=155) | trim | safe }}
{% endblock %}

{% block content %}
    <h2>{{relation.schema.label}}</h2>

    <div class="row">
        <div class="col-xs-12">
            <div class="btn-toolbar entity-toolbar" role="toolbar">
                <div class="btn-group pull-right">
                    {% if relation.source['asktheeu_slug'] or relation.source['asktheeu_slug'] %}
                        <a class="btn btn-default" href="{{ relation | relation_wob_link }}">
                            <img class="icon" src="http://www.asktheeu.org/asktheeu-theme/images/favicon.ico"> Request detailed information
                        </a>
                    {% endif %}
                    <a class="btn btn-default" href="{{url_for('relations_api.view', id=relation.id)}}">
                        <i class="fa fa-code"></i> JSON
                    </a>
                </div>
            </div>
        </div>
    </div>

    <table class="table table-condensed">
        <tr>
            <th width="40%" class="attributes">Origin</th>
            <td colspan="2"><a href="{{url_for('entities.view', id=relation.source.id)}}">{{relation.source['name'].value}}</a></td>
        </tr>
        <tr>
            <th width="40%" class="attributes">Destination</th>
            <td colspan="2"><a href="{{url_for('entities.view', id=relation.target.id)}}">{{relation.target['name'].value}}</a></td>
        </tr>
        {% for prop in relation.active_properties if not relation.get_attribute(prop.name).hidden and prop.value != None %}            
            <tr>
                <th width="40%" class="attributes">{{relation.get_attribute(prop.name).label or prop.name}}</th>
                <td>{{prop.value | safe}}</td>
                <td class="source">{{ sources.link(prop) }}</td>
            </tr>
        {% endfor %}
    </table>
{% endblock %}

{% block js %}{% endblock %}
{'fraction_non_alphanumeric': 0.1897686665412827, 'fraction_numerical': 0.005642279480910287, 'mean_word_length': 2.3851050286441757, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2255625', 'n_tokens_mistral': 1619, 'n_tokens_neox': 1489, 'n_words': 297}