{% extends "admin/base_site.html" %}{% load cwr_filters %}
{% block title %}{{ title }}{% endblock %}
{% block extrastyle %}
    {{ block.super }}
    <style>
      .cwr {overflow-x:scroll; font-family: monospace; background-color: white}
      .cwr pre {padding: 1px 0; margin: 0; color: #999; overflow-x: visible}

      .cwr div.HDR span.record_type,
      .cwr div.TRL span.record_type {color: #609;}
      .cwr div.GRH span.record_type,
      .cwr div.GRT span.record_type {color: #606;}
      .cwr div.ACK span.record_type,
      .cwr div.WRK span.record_type,
      .cwr div.ISR span.record_type,
      .cwr div.ISA span.record_type,
      .cwr div.ISW span.record_type,
      .cwr div.NWR span.record_type,
      .cwr div.REV span.record_type,
      .cwr div.XRF span.record_type {color: #B00;}
      .cwr div.ALT span.record_type,
      .cwr div.VER span.record_type {color: #B00;}
      .cwr div.SPU span.record_type,
      .cwr div.OPU span.record_type {color: #060;}
      .cwr div.WRI span.record_type,
      .cwr div.SWR span.record_type,
      .cwr div.OWR span.record_type {color: #00A;}
      .cwr div.SPT span.record_type,
      .cwr div.OPT span.record_type {color: #060;}
      .cwr div.SWT span.record_type,
      .cwr div.MAN span.record_type,
      .cwr div.PWR span.record_type,
      .cwr div.OWT span.record_type {color: #00A;}
      .cwr div.PER span.record_type,
      .cwr div.REC span.record_type {color: #069;}
      .cwr div.ORN span.record_type {color: #930;}
      .cwr div.OWK span.record_type {color: #060;}
      .cwr div.MSG span.record_type {color: #000;}
      .cwr div span.record_type {color: #666;}
      .cwr div span.counters {color: #aaa !important;}
      .cwr div span.prshare {color: #069;}
      .cwr div span.mrshare {color: #609;}
      .cwr div span.srshare {color: #906;}
      .cwr span.title,
      .cwr span.iswc,
      .cwr span.saan,
      .cwr span.flag {color: #B00}
      .cwr div.HDR span.ipnumber,
      .cwr span.workid {color: #609;}
      .cwr div.WRI span.ipnumber,
      .cwr div.SWR span.ipnumber,
      .cwr div.SWT span.ipnumber,
      .cwr div.MAN span.ipnumber,
      .cwr div.OWR span.ipnumber,
      .cwr div.OWT span.ipnumber,
      .cwr div.PWR span.ipnumber:last-of-type,
      .cwr div span.writer {color: #00A;}
      .cwr div.ACK span.type,
      .cwr div.SPU span.ipnumber,
      .cwr div.SPT span.ipnumber,
      .cwr div.OPU span.ipnumber,
      .cwr div.OPT span.ipnumber,
      .cwr div.PWR span.ipnumber,
      .cwr div span.publisher {color: #060;}
      .cwr div.ORN span {color: #930;}
      .cwr div span.chain,
      .cwr div span.message,
      .cwr div span.status {color: #B00;}
      .cwr div span.artist,
      .cwr div span.duration {color: #069;}
      .cwr div span.capacity {color: #B00;}
      .cwr div.ACK,
      .cwr div.ISR,
      .cwr div.ISA,
      .cwr div.ISW,
      .cwr div.WRK,
      .cwr div.NWR,
      .cwr div.REV,
      .cwr div.GRT {margin-top:0.5em}
      .ACK + div.ISR,
      .ACK + div.WRK,
      .ACK + div.NWR,
      .ACK + div.REV {margin-top:0.1em}
      .MSG + div.ISR,
      .MSG + div.WRK,
      .MSG + div.NWR,
      .MSG + div.REV {margin-top:0}
      .cwr div.ACK.CO,
      .cwr div.ACK.DU,
      .cwr div.ACK.RJ,
      .cwr div.ACK.NP,
      .cwr div.ACK.RC,
      .cwr div.ACK.NA,
      .cwr div.ACK.WA {background-color: #fcc}
      .cwr div.MSG {background-color: #fcc}
    </style>

{% endblock %}
{% block content %}
<div class="module">
    <div class="readonly cwr">
        {% for line in lines %}{% with line|slice:'0:3' as rt %}
            {% if version == '30' or version == '31' %}
                {% if rt == 'HDR' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span>{{ line|slice:'3:5' }}<span class="ipnumber" title="Sender code">{{ line|slice:'5:9' }}</span><span class="publisher" title="Sender">{{ line|slice:'9:54' }}</span>{{ line|slice:'54:' }}</pre></div>
                {% elif rt == 'GRH' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="title" title="Group type">{{ line|slice:'3:6' }}</span><span class="counters">{{ line|slice:'6:' }}</span></pre></div>
                {% elif rt == 'TRL' or rt == 'GRT' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:' }}</span></pre></div>
                {% elif rt == 'WRK' or rt == 'ISR' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="title" title="Work title">{{ line|slice:'19:79' }}</span><span class="workid" title="Work ID">{{ line|slice:'79:93' }}</span>{{ line|slice:'93:95' }}<span class="iswc" title="ISWC">{{ line|slice:'95:106' }}</span>{{ line|slice:'106:129' }}<span class="duration" title="Duration: {% if line|slice:'129:135' == '000000' %}Unknown{% else %}{{ line|slice:'129:131' }}h{{ line|slice:'131:133' }}m{{ line|slice:'133:135' }}s{% endif %}">{{ line|slice:'129:135' }}</span><span class="flag" title="Recorded indicator: {{ line|slice:'135:136'|flag }}">{{ line|slice:'135:136' }}</span>{{ line|slice:'136:142' }}<span class="flag" title="Version type: {{ line|slice:'142:145'|orimod }}">{{ line|slice:'142:145' }}</span>{{ line|slice:'145:' }}</pre></div>
                {% elif rt == 'SPU' or rt == 'OPU' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="chain" title="Publisher sequence">{{ line|slice:'19:21' }}</span><span class="ipnumber" title="Publisher IP number">{{ line|slice:'21:30' }}</span><span class="publisher" title="Publisher">{{ line|slice:'30:75' }}</span>{{ line|slice:'75:76' }}<span class="capacity" title="Capacity: Original publisher">{{ line|slice:'76:78' }}</span><span class="publisher" title="IPI Name #">{{ line|slice:'78:89' }}</span>{{ line|slice:'89:' }}</pre></div>
                {% elif rt == 'SWR' or rt == 'OWR' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="ipnumber" title="Writer IP number">{{ line|slice:'19:28' }}</span><span class="writer" title="Writer">{{ line|slice:'28:103' }}</span>{{ line|slice:'103:104' }}<span class="capacity" title="Capacity: {{ line|slice:'104:106'|capacity }}">{{ line|slice:'104:106' }}</span><span class="writer" title="IPI Name #">{{ line|slice:'106:117' }}</span>{{ line|slice:'117:' }}</pre></div>
                {% elif rt == 'WRI' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="ipnumber" title="Writer IP number">{{ line|slice:'19:28' }}</span>{{ line|slice:'28:39' }}<span class="writer" title="Writer">{{ line|slice:'39:114' }}</span><span class="capacity" title="Capacity: {{ line|slice:'114:116'|capacity }}">{{ line|slice:'114:116' }}</span>{{ line|slice:'116:' }}</pre></div>
                {% elif rt == 'SPT' or rt == 'OPT' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:22' }}</span><span class="ipnumber" title="Publisher IP number">{{ line|slice:'22:31' }}</span><span class="prshare" title="Performance share: {{ line|slice:'31:36'|perc  }}">{{ line|slice:'31:36' }}</span><span class="mrshare" title="Mechanical share: {{ line|slice:'36:41'|perc }}">{{ line|slice:'36:41' }}</span><span class="srshare" title="Sync share: {{ line|slice:'41:46'|perc }}">{{ line|slice:'41:46' }}</span><span class="publisher" title="Territory: {{ line|slice:'47:51'|terr }}">{{ line|slice:'46:51' }}</span><span class="prshare" title="Perf. affiliation: {{ line|slice:'51:55'|soc_name  }}">{{ line|slice:'51:55' }}</span><span class="mrshare" title="Mech. affiliation: {{ line|slice:'55:59'|soc_name  }}">{{ line|slice:'55:59' }}</span><span class="srshare" title="Sync affiliation: {{ line|slice:'59:63'|soc_name  }}">{{ line|slice:'59:63' }}</span>{{ line|slice:'63:' }}</pre></div>
                {% elif rt == 'SWT' or rt == 'OWT'%}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:22' }}</span><span class="ipnumber" title="Writer IP number">{{ line|slice:'22:31' }}</span><span class="prshare" title="Performance share: {{ line|slice:'31:36'|perc  }}">{{ line|slice:'31:36' }}</span><span class="mrshare" title="Mechanical share: {{ line|slice:'36:41'|perc }}">{{ line|slice:'36:41' }}</span><span class="srshare" title="Sync share: {{ line|slice:'41:46'|perc }}">{{ line|slice:'41:46' }}</span><span class="publisher" title="Territory: {{ line|slice:'47:51'|terr }}">{{ line|slice:'46:51' }}</span><span class="prshare" title="Perf. affiliation: {{ line|slice:'51:55'|soc_name  }}">{{ line|slice:'51:55' }}</span><span class="mrshare" title="Mech. affiliation: {{ line|slice:'55:59'|soc_name  }}">{{ line|slice:'55:59' }}</span><span class="srshare" title="Sync affiliation: {{ line|slice:'59:63'|soc_name  }}">{{ line|slice:'59:63' }}</span>{{ line|slice:'63:' }}</pre></div>
                {% elif rt == 'MAN' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="ipnumber" title="Writer IP number">{{ line|slice:'19:28' }}</span><span class="prshare" title="Performance share: {{ line|slice:'28:33'|perc  }}">{{ line|slice:'28:33' }}</span><span class="mrshare" title="Mechanical share: {{ line|slice:'33:38'|perc }}">{{ line|slice:'33:38' }}</span><span class="srshare" title="Sync share: {{ line|slice:'38:43'|perc }}">{{ line|slice:'38:43' }}</span>{{ line|slice:'43:' }}</pre></div>
                {% elif rt == 'PWR' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="chain" title="Publisher sequence">{{ line|slice:'19:21' }}</span><span class="ipnumber" title="Publisher IP number">{{ line|slice:'21:30' }}</span><span class="ipnumber" title="Writer IP number">{{ line|slice:'30:39' }}</span>{{ line|slice:'39:71' }}<span class="chain" title="Agreement Type: {{ line|slice:'71:73'|agreement_type }}">{{ line|slice:'71:73' }}</span>{{ line|slice:'73:' }}</pre></div>
                {% elif rt == 'ALT' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="title" title="Alternative title">{{ line|slice:'19:79' }}</span>{{ line|slice:'79:' }}</pre></div>
                {% elif rt == 'OWK' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="title" title="Original work title">{{ line|slice:'19:79' }}</span>{{ line|slice:'79:' }}</pre></div>
                {% elif rt == 'PER' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="artist" title="Performing artist">{{ line|slice:'19:79' }}</span>{{ line|slice:'79:' }}</pre></div>
                {% elif rt == 'REC' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span>{{ line|slice:'19:45' }}<span class="title" title="Recording title">{{ line|slice:'45:105' }}</span><span class="title" title="Version title">{{ line|slice:'105:165' }}</span><span class="artist" title="Recording artist">{{ line|slice:'165:225' }}</span>{{ line|slice:'225:' }}</pre></div>
                {% elif rt == 'XRF' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="prshare" title="Society: {{ line|slice:'19:23'|soc_name  }}">{{ line|slice:'19:23' }}</span><span class="iswc" title="Code">{{ line|slice:'23:37' }}</span>{{ line|slice:'36:' }}</pre></div>
                {% else %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span>{{ line|slice:'19:' }}</pre></div>
                {% endif %}
            {% elif version == '21' or version == '22' %}
                {% if rt == 'HDR' %}
                    {% if line|slice:'3:5' == 'PB' %}
                        <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span>{{ line|slice:'3:5' }}<span class="ipnumber" title="Sender IP number">{{ line|slice:'5:14' }}</span><span class="publisher" title="Sender">{{ line|slice:'14:59' }}</span>{{ line|slice:'59:' }}</pre></div>
                    {% else %}
                        <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="ipnumber" title="Sender IP number">{{ line|slice:'3:14' }}</span><span class="publisher" title="Sender">{{ line|slice:'14:59' }}</span>{{ line|slice:'59:' }}</pre></div>
                    {% endif %}
                {% elif rt == 'GRH' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="title" title="Group type">{{ line|slice:'3:6' }}</span><span class="counters">{{ line|slice:'6:' }}</span></pre></div>
                {% elif rt == 'TRL' or rt == 'GRT' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:' }}</span></pre></div>
                {% elif rt == 'ACK' %}
                    {% with line|slice:'157:159' as status_code %}
                        <div class="{{ rt }} {{ status_code }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span>{{ line|slice:'19:46' }}<span class="type" title="Original transaction type">{{ line|slice:'46:49' }}</span><span class="title" title="Work title">{{ line|slice:'49:109' }}</span><span class="workid" title="Work ID">{{ line|slice:'109:123' }}</span>{{ line|slice:'123:157' }}<span class="status" title="Transaction Status: {{ status_code|status }}">{{ line|slice:'157:159' }}</span>{{ line|slice:'159:' }}</pre></div>
                    {% endwith %}
                {% elif rt == 'MSG' %}
                    <div class="{{ rt }} {{ status_code }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span>{{ line|slice:'19:35' }}<span class="message" title="Message Text">{{ line|slice:'35:' }}</span></pre></div>
                {% elif rt == 'NWR' or rt == 'REV' or rt == 'ISW' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="title" title="Work title">{{ line|slice:'19:79' }}</span>{{ line|slice:'79:81' }}<span class="workid" title="Work ID">{{ line|slice:'81:95' }}</span><span class="iswc" title="ISWC">{{ line|slice:'95:106' }}</span>{{ line|slice:'106:129' }}{{ line|slice:'129:135' }}<span class="flag" title="Recorded indicator: {{ line|slice:'135:136'|flag }}">{{ line|slice:'135:136' }}</span>{{ line|slice:'136:142' }}<span class="flag" title="Version type: {{ line|slice:'142:145'|orimod }}">{{ line|slice:'142:145' }}</span>{{ line|slice:'145:' }}</pre></div>
                {% elif rt == 'SPU'%}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="chain" title="Publisher chain sequence">{{ line|slice:'19:21' }}</span><span class="ipnumber" title="Publisher IP number">{{ line|slice:'21:30' }}</span><span class="publisher" title="Publisher">{{ line|slice:'30:75' }}</span>{{ line|slice:'75:76' }}<span class="flag" title="Role: {{ line|slice:'76:78'|role|upper }}">{{ line|slice:'76:78' }}</span>{{ line|slice:'78:87' }}<span class="publisher" title="IPI Name #">{{ line|slice:'87:98' }}</span>{{ line|slice:'98:112' }}<span class="prshare" title="Perf. affiliation: {{ line|slice:'112:115'|soc_name  }}">{{ line|slice:'112:115' }}</span>{{ line|slice:'115:120' }}<span class="mrshare" title="Mech. affiliation: {{ line|slice:'120:123'|soc_name  }}">{{ line|slice:'120:123' }}</span>{{ line|slice:'123:128' }}<span class="srshare" title="Sync. affiliation: {{ line|slice:'128:131'|soc_name  }}">{{ line|slice:'128:131' }}</span>{{ line|slice:'131:139' }}<span class="publisher" title="IPI Base #">{{ line|slice:'139:152' }}</span>{{ line|slice:'152:166' }}<span class="saan" title="Society-assigned agreement number">{{ line|slice:'166:180' }}</span>{{ line|slice:'180:' }}</pre></div>
                {% elif rt == 'OPU' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="chain" title="Publisher chain sequence">{{ line|slice:'19:21' }}</span>{{ line|slice:'21:75' }}<span class="publisher" title="Publisher unknown indicator">{{ line|slice:'75:76' }}</span><span class="flag" title="Role: {{ line|slice:'76:78'|role|upper }}">{{ line|slice:'76:78' }}</span>{{ line|slice:'78:87' }}{% if line|slice:'87:98' == '00000000000' %}<span title="IPI Name #">{{ line|slice:'87:98' }}</span>{% else %}<span class="publisher" title="IPI Name #">{{ line|slice:'87:98' }}</span>{% endif %}{{ line|slice:'98:112' }}<span class="prshare" title="Perf. affiliation: {{ line|slice:'112:115'|soc_name  }}">{{ line|slice:'112:115' }}</span>{{ line|slice:'115:120' }}<span class="mrshare" title="Mech. affiliation: {{ line|slice:'120:123'|soc_name  }}">{{ line|slice:'120:123' }}</span>{{ line|slice:'123:128' }}<span class="srshare" title="Sync. affiliation: {{ line|slice:'128:131'|soc_name  }}">{{ line|slice:'128:131' }}</span>{{ line|slice:'131:139' }}<span class="publisher" title="IPI Base #">{{ line|slice:'139:152' }}</span>{{ line|slice:'152:' }}</pre></div>
                {% elif rt == 'SWR' or rt == 'OWR' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="ipnumber" title="Writer IP number">{{ line|slice:'19:28' }}</span><span class="writer" title="Writer">{{ line|slice:'28:103' }}</span><span class="publisher" title="Writer unknown indicator">{{ line|slice:'103:104' }}</span><span class="flag" title="Role: {{ line|slice:'104:106'|capacity }}">{{ line|slice:'104:106' }}</span>{{ line|slice:'106:115' }}{% if line|slice:'115:126' == '00000000000' %}<span title="IPI Name #">{{ line|slice:'115:126' }}</span>{% else %}<span class="writer" title="IPI Name #">{{ line|slice:'115:126' }}</span>{% endif %}<span class="prshare" title="Perf. affiliation: {{ line|slice:'126:129'|soc_name  }}">{{ line|slice:'126:129' }}</span>{{ line|slice:'129:134' }}<span class="mrshare" title="Mech. affiliation: {{ line|slice:'134:137'|soc_name  }}">{{ line|slice:'134:137' }}</span>{{ line|slice:'137:142' }}<span class="srshare" title="Sync. affiliation: {{ line|slice:'142:145'|soc_name  }}">{{ line|slice:'142:145' }}</span>{{ line|slice:'145:154' }}<span class="writer" title="IPI Base #">{{ line|slice:'154:167' }}</span>{{ line|slice:'167:' }}</pre></div>
                {% elif rt == 'SPT' or rt == 'OPT' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="ipnumber" title="Publisher IP number">{{ line|slice:'19:29' }}</span>{{ line|slice:'29:34' }}<span class="prshare" title="Performance share: {{ line|slice:'34:39'|perc  }}">{{ line|slice:'34:39' }}</span><span class="mrshare" title="Mechanical share: {{ line|slice:'39:44'|perc  }}">{{ line|slice:'39:44' }}</span><span class="srshare" title="Sync share: {{ line|slice:'44:49'|perc  }}">{{ line|slice:'44:49' }}</span><span class="publisher" title="Territory: {{ line|slice:'49:50'|ie }}{{ line|slice:'50:54'|terr }}">{{ line|slice:'49:54' }}</span><span class="counters">{{ line|slice:'54:' }}</span></pre></div>
                {% elif rt == 'SWT' or rt == 'OWT' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="ipnumber" title="Writer IP number">{{ line|slice:'19:28' }}</span><span class="prshare" title="Performance share: {{ line|slice:'28:33'|perc  }}">{{ line|slice:'28:33' }}</span><span class="mrshare" title="Mechanical share: {{ line|slice:'33:38'|perc  }}">{{ line|slice:'33:38' }}</span><span class="srshare" title="Sync share: {{ line|slice:'38:43'|perc }}">{{ line|slice:'38:43' }}</span><span class="publisher" title="Territory: {{ line|slice:'44:48'|terr }}">{{ line|slice:'43:48' }}</span><span class="counters">{{ line|slice:'48:52' }}</span>{{ line|slice:'52:' }}</pre></div>
                {% elif rt == 'PWR'%}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="ipnumber" title="Publisher IP number">{{ line|slice:'19:28' }}</span><span class="publisher" title="Publisher">{{ line|slice:'28:73' }}</span>{{ line|slice:'73:87' }}<span class="saan" title="Society-assigned agreement number">{{ line|slice:'87:101' }}</span><span class="writer" title="Writer IP number">{{ line|slice:'101:110' }}</span><span class="chain" title="Publisher chain sequence">{{ line|slice:'110:112' }}</span>{{ line|slice:'112:' }}</pre></div>
                {% elif rt == 'ALT' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="title" title="Alternative title">{{ line|slice:'19:79' }}</span>{{ line|slice:'79:' }}</pre></div>
                {% elif rt == 'VER' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="title" title="Original work title">{{ line|slice:'19:79' }}</span>{{ line|slice:'79:' }}</pre></div>
                {% elif rt == 'PER' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="artist" title="Performing artist">{{ line|slice:'19:79' }}</span>{{ line|slice:'79:' }}</pre></div>
                {% elif rt == 'REC' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="duration" title="Release date: {% if line|slice:'19:27' == '00000000' %}Unknown{% else %}{{ line|slice:'25:27' }}.{{ line|slice:'23:25' }}.{{ line|slice:'19:23' }}{% endif %}">{{ line|slice:'19:27' }}</span>{{ line|slice:'27:87' }}<span class="duration" title="Duration: {% if line|slice:'87:93' == '000000' %}Unknown{% else %}{{ line|slice:'87:89' }}h{{ line|slice:'89:91' }}m{{ line|slice:'91:93' }}s{% endif %}">{{ line|slice:'87:93' }}</span>{{ line|slice:'93:249' }}<span class="iswc" title="ISRC">{{ line|slice:'249:261' }}</span>{{ line|slice:'261:' }}</pre></div>
                {% elif rt == 'ORN' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span title="Type: LIBRARY">{{ line|slice:'19:22' }}</span>{{ line|slice:'22:82' }}<span title="CD identifier">{{ line|slice:'82:97' }}</span>{{ line|slice:'97:101' }}<span title="Library name">{{ line|slice:'101:161' }}</span>{{ line|slice:'161:' }}</pre></div>
                {% elif rt == 'XRF' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span><span class="prshare" title="Society: {{ line|slice:'19:22'|soc_name  }}">{{ line|slice:'19:22' }}</span><span class="iswc" title="Code">{{ line|slice:'22:36' }}</span>{{ line|slice:'36:' }}</pre></div>
                {% else %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span>{{ line|slice:'19:' }}</pre></div>
                {% endif %}
            {% else %}
                {% if rt == 'HDR' or rt == 'TRL' or rt == 'GRH' or rt == 'GRT' %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span>{{ line|slice:'3:' }}</pre></div>
                {% else %}
                    <div class="{{ rt }}"><pre><span class="record_type">{{ rt }}</span><span class="counters">{{ line|slice:'3:19' }}</span>{{ line|slice:'19:' }}</pre></div>
                {% endif %}
            {% endif %}
        {% endwith %}{% endfor %}
    </div>
</div>
{% endblock %}

