<div class="two-column-view">
    <div class="" ng-if="item.id"><dl class="dl-horizontal marB-0"><dt>{{ "ID" | translate }}:</dt><dd><a ng-href="#/objects/list/{{item.id}}" ng-click="(vm.okOnModal || okOnModal)()">{{item.id}}</a></dd></dl></div>
    <div class="" ng-if="item.Title"><dl class="dl-horizontal marB-0"><dt>{{ "TITLE" | translate }}:</dt><dd>{{item.Title}}</dd></dl></div>
    <div class="" ng-if="item.First_Name"><dl class="dl-horizontal marB-0"><dt>{{ "FIRSTNAME" | translate }}:</dt><dd><span compile="item.First_Name | highlight : item.highlightingData"></span></dd></dl></div>
    <div class="" ng-if="item.Last_Name"><dl class="dl-horizontal marB-0"><dt>{{ "LASTNAME" | translate }}:</dt><dd><span compile="item.Last_Name | highlight : item.highlightingData"></span></dd></dl></div>
    <div class="" ng-if="item.Full_Name"><dl class="dl-horizontal marB-0"><dt>{{ "FULLNAME" | translate }}:</dt><dd><span compile="item.Full_Name | highlight : item.highlightingData"></span></dd></dl></div>
    <div class="" ng-if="item.Alias && item.Alias.length < 500"><dl class="dl-horizontal marB-0"><dt>{{ "ALIAS" | translate }}:</dt><dd><span compile="item.Alias | invisibleSeparators | highlight : item.highlightingData"></span></dd></dl></div>
    <div class="" ng-if="item.Gender"><dl class="dl-horizontal marB-0"><dt>{{ "GENDER" | translate }}:</dt><dd>{{item.Gender}}</dd></dl></div>
    <div class="" ng-if="item.age"><dl class="dl-horizontal marB-0"><dt>{{ "AGE" | translate }}:</dt><dd>{{item.age}}</dd></dl></div>
    <div class="" ng-if="item.address"><dl class="dl-horizontal marB-0"><dt>{{ "ADDRESS" | translate }}:</dt><dd><span compile="item.address | highlight : item.highlightingData:'address'"></span></dd></dl></div>
    <!-- <div class="" ng-if="item.activity_class !== 'null'"><dl class="dl-horizontal marB-0"><dt>{{ "ACTIVITY_CLASS" | translate }}:</dt><dd>{{item.activity_class}}</dd></dl></div> -->
    <div class="" ng-if="item.no_longer_on_list"><dl class="dl-horizontal marB-0"><dt>{{ "NO_LONGER_ON_LIST" | translate }}:</dt><dd>{{item.no_longer_on_list}}</dd></dl></div>
    <div class="" ng-if="item.entity_type"><dl class="dl-horizontal marB-0"><dt>{{ "ENTITY_TYPE" | translate }}:</dt><dd>{{item.entity_type}}</dd></dl></div>
    <div class="" ng-if="item.age_date"><dl class="dl-horizontal marB-0"><dt>{{ "AGE_DATE" | translate }}:</dt><dd>{{item.age_date}}</dd></dl></div>
    <div class="" ng-if="item.position && item.position.length < 500"><dl class="dl-horizontal marB-0"><dt>{{ "Position" | translate }}:</dt><dd><span style="white-space: pre-wrap;">{{item.position.split(';').join('\n')}}</span></dd></dl></div>
    <div class="" ng-if="item.location"><dl class="dl-horizontal marB-0"><dt>{{ "Location" | translate }}:</dt><dd>{{item.location}}</dd></dl></div>
    <div class="" ng-if="item.POB"><dl class="dl-horizontal marB-0"><dt>{{ "POB" | translate }}:</dt><dd>{{item.POB}}</dd></dl></div>
    <div class="" ng-if="item.Code"><dl class="dl-horizontal marB-0"><dt>{{ "CODE" | translate }}:</dt><dd>{{item.Code}}</dd></dl></div>
    <div class="" ng-if="item.Country"><dl class="dl-horizontal marB-0"><dt>{{ "COUNTRY" | translate }}:</dt><dd><span compile="item.Country | highlight : item.highlightingData:'Country'"></span></dd></dl></div>
    <div class="" ng-if="item.Country_Of_Origin"><dl class="dl-horizontal marB-0"><dt>{{ "COUNTRY_ORG" | translate }}:</dt><dd><span compile="item.Country_Of_Origin | highlight : item.highlightingData:'Country_Of_Origin'"></span></dd></dl></div>
    <div class="" ng-if="item.Country_Of_Activity"><dl class="dl-horizontal marB-0"><dt>{{ "COUNTRY_ACT" | translate }}:</dt><dd><span compile="item.Country_Of_Activity | highlight : item.highlightingData:'Country_Of_Activity'"></span></dd></dl></div>
    <div class="" ng-if="item.List"><dl class="dl-horizontal marB-0"><dt>{{ "LIST" | translate }}:</dt><dd>{{item.List}}</dd></dl></div>
    <div class="" ng-if="item.Additional_Information && item.Additional_Information.length < 120"><dl class="dl-horizontal marB-0"><dt>{{ "ADDITIONAL_INFORMATION" | translate }}:</dt><dd><span style="white-space: pre-wrap;">{{item.Additional_Information | invisibleSeparators}}</span></dd></dl></div>
    <div class="" ng-if="item.Type"><dl class="dl-horizontal marB-0"><dt>{{ "TYPE" | translate }}:</dt><dd>{{item.Type}}</dd></dl></div>
    <div class="" ng-if="item.DOB"><dl class="dl-horizontal marB-0"><dt>{{ "DOB" | translate }}:</dt><dd><span compile="item.DOB | highlight : item.highlightingData:'DOB'"></span></dd></dl></div>
    <div class="" ng-if="item.deceased"><dl class="dl-horizontal marB-0"><dt>{{ "DECEASED" | translate }}:</dt><dd>{{item.deceased}}</dd></dl></div>
    <div class="" ng-if="item.Case"><dl class="dl-horizontal marB-0"><dt>{{ "CASE" | translate }}:</dt><dd>{{item.Case}}</dd></dl></div>
    <div class="" ng-if="item.Passport_Number"><dl class="dl-horizontal marB-0"><dt>{{ "PASSPORT_NUMBER" | translate }}:</dt><dd>{{item.Passport_Number}}</dd></dl></div>
    <div class="" ng-if="item.Authority"><dl class="dl-horizontal marB-0"><dt>{{ "AUTHORITY" | translate }}:</dt><dd>{{item.Authority}}</dd></dl></div>
    <div class="" ng-if="item.Whitelist"><dl class="dl-horizontal marB-0"><dt>{{ "WHITELIST" | translate }}:</dt><dd>{{item.Whitelist}}</dd></dl></div>
    <div class="" ng-if="item.type_of_list"><dl class="dl-horizontal marB-0"><dt>{{ "TYPE_OF_LIST" | translate }}:</dt><dd>{{item.type_of_list}}</dd></dl></div>
    <div class="" ng-if="item.Category"><dl class="dl-horizontal marB-0"><dt>{{ "CATEGORY" | translate }}:</dt><dd>{{item.Category}}</dd></dl></div>
    <div class="" ng-if="item.Date_Of_Information"><dl class="dl-horizontal marB-0"><dt>{{ "DATE_OF_INFORMATION" | translate }}:</dt><dd>{{item.Date_Of_Information}}</dd></dl></div>
    <div class="" ng-if="item.Publication_Date"><dl class="dl-horizontal marB-0"><dt>{{ "PUBLICATION_DATE" | translate }}:</dt><dd>{{item.Publication_Date}}</dd></dl></div>
    <div class="" ng-if="item.entered"><dl class="dl-horizontal marB-0"><dt>{{ "ENTERED" | translate }}:</dt><dd>{{item.entered}}</dd></dl></div>
    <div class="" ng-if="item.updated"><dl class="dl-horizontal marB-0"><dt>{{ "UPDATED" | translate }}:</dt><dd>{{item.updated}}</dd></dl></div>
    <div class="" ng-if="item.published_by && item.published_by.indexOf('<References>') === -1"><dl class="dl-horizontal marB-0"><dt>{{ "PUBLISHED_BY" | translate }}:</dt><dd>{{item.published_by}}</dd></dl></div>
    <div class="" ng-if="item.editor"><dl class="dl-horizontal marB-0"><dt>{{ "EDITOR" | translate }}:</dt><dd>{{item.editor}}</dd></dl></div>
    <div class="" ng-if="item.sub_category"><dl class="dl-horizontal marB-0"><dt>{{ "Sub-category" | translate }}:</dt><dd>{{item.sub_category}}</dd></dl></div>
    <div class="" ng-if="item.Companies && item.Companies.length < 500"><dl class="dl-horizontal marB-0"><dt>{{ "COMPANIES" | translate }}:</dt><dd><span compile = "item.Companies | parseCompanies"></span></dd></dl></div>
    <div class="" ng-if="item.Linked_to && item.Linked_to.length < 500"><dl class="dl-horizontal marB-0"><dt>{{ "LINKED_TO" | translate }}:</dt><dd><span compile = "item.Linked_to | parseCompanies"></span></dd></dl></div>
</div>

<div ng-if="item.Additional_Information && item.Additional_Information.length >= 120" class="padL-10 padB-10">
    <button class="btn btn-default btn-sm" ng-hide="!(item.Additional_Information.includes('UPDATE ADDED:') || item.Additional_Information.includes('PROFILE UPDATED:'))"
      ng-click="item.additionalinfo_trigger = !item.additionalinfo_trigger"
      ng-class="item.additionalinfo_trigger ? 'active' : ''"><b>{{ "SHOW" | translate }} {{ "ADDITIONAL_INFORMATION" | translate }}</b></button>

    <div ng-if="item.additionalinfo_trigger" style="white-space: pre-wrap;"><b>{{ "ADDITIONAL_INFORMATION" | translate }}:</b> <span ng-bind-html="item.Additional_Information | invisibleSeparators | cutAddinfo:'nojunk' | linky | toTrustedHtml"></span></div>
    <div ng-if="!item.additionalinfo_trigger" style="white-space: pre-wrap;"><b>{{ "ADDITIONAL_INFORMATION" | translate }}:</b> <span ng-bind-html="item.Additional_Information | invisibleSeparators | cutAddinfo | linky | toTrustedHtml"></span></div>
</div>

<div ng-if="item.further_information" class="padL-10 padB-10">
    <div style="white-space: pre-wrap;"><b>{{ "FURTHER_INFORMATION" | translate }}:</b><br/><span compile="item.further_information.split('[').join('\n\n[').split(']').join(']\n').trim() | highlight : item.highlightingData"></span></div>
</div>

<div ng-if="item.position && item.position.length >= 500" class="padL-10 padB-10">
    <button class="btn btn-default btn-sm"
      ng-click="item.position_trigger = !item.position_trigger"
      ng-class="item.position_trigger ? 'active marB-10' : ''"><b>{{ "SHOW" | translate }} {{ "Position" | translate }}</b></button>
      <table class="table table-striped" ng-if="item.position_trigger">
      <thead>
        <tr>
        </tr>
      </thead>
      <tbody>
        <tr ng-repeat="element in item.position.split(';') track by $index">
          <td style="white-space: pre-wrap;">{{ element }}</td>
        </tr>
      </tbody>
    </table>
</div>

<div class="row">
    <div class="col-sm-12" ng-if="item.Alias && item.Alias.length >= 500"><dl class="dl-horizontal marB-0"><dt>{{ "ALIAS" | translate }}:</dt><dd><span compile="item.Alias | invisibleSeparators | highlight : item.highlightingData"></dd></dl></div>
</div>

<div ng-if="item.Linked_to && item.Linked_to.length >= 500" class="padL-10 padB-10">
  <button class="btn btn-default btn-sm"
    ng-click="item.linkedto_trigger = !item.linkedto_trigger"
    ng-class="item.linkedto_trigger ? 'active marB-10' : ''"><b>{{ "LINKED_TO" | translate }}</b></button>
    <table class="table table-striped" ng-if="item.linkedto_trigger">
      <thead>
        <tr>
          <th>
            {{ "NAME" | translate }}
          </th>
          <th>
            {{ "Role" | translate }}
          </th>
          <th>
            {{ "ID" | translate }}
          </th>
        </tr>
      </thead>
      <tbody compile = "::item.Linked_to | parseCompanies:'table'">
      </tbody>
    </table>
</div>

<div ng-if="item.Companies && item.Companies.length >= 500" class="padL-10 padB-10">
  <button class="btn btn-default btn-sm"
    ng-click="item.companies_trigger = !item.companies_trigger"
    ng-class="item.companies_trigger ? 'active marB-10' : ''"><b>{{ "COMPANIES" | translate }}</b></button>
    <table class="table table-striped" ng-if="item.companies_trigger">
      <thead>
        <tr>
          <th>
            {{ "NAME" | translate }}
          </th>
          <th>
            {{ "Role" | translate }}
          </th>
          <th>
            {{ "ID" | translate }}
          </th>
        </tr>
      </thead>
      <tbody compile = "::item.Companies | parseCompanies:'table'">
      </tbody>
    </table>
</div>

<div ng-if="item.keywords" class="padL-10 padB-10">
  <button class="btn btn-default btn-sm"
          ng-click="item.keywords_trigger = !item.keywords_trigger"
          ng-class="item.keywords_trigger ? 'active marB-10' : ''"><b>{{ "SHOW" | translate }} {{ "Keywords" | translate }}</b></button>
  <table class="table table-striped" ng-if="item.keywords_trigger">
    <thead>
      <tr>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="list in item.keywords.split('~')">
        <td style="word-break : break-word;">{{ config.general.alertsListHumanName && config.general.alertsListHumanName[list] ? config.general.alertsListHumanName[list] : list }}</td>
      </tr>
    </tbody>
  </table>
</div>

<div ng-if="item.external_sources" class="padL-10 padB-10">
  <button class="btn btn-default btn-sm"
          ng-click="item.external_sources_trigger = !item.external_sources_trigger"
          ng-class="item.external_sources_trigger ? 'active marB-10' : ''"><b>{{ "External sources" | translate }}</b></button>
  <table class="table table-striped" ng-if="item.external_sources_trigger">
    <thead>
      <tr>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="link in item.external_sources.split(' ') track by $index" ng-if="!(item.internal_category && item.internal_category.startsWith('factiva'))">
        <td style="word-break : break-word;"><a href="{{link}}" target="_blank">{{link}}</a></td>
      </tr>
      <tr ng-repeat="pair in item.external_sources.split('&amp;amp;').join('&').split(';') track by $index" ng-if="item.internal_category && item.internal_category.startsWith('factiva')">
        <td style="word-break : break-word;" ng-if="!pair.startsWith('http')"><a href="http{{pair.split('(http')[1].split(')')[0]}}" target="_blank">{{pair.split('(http')[0]}}</a></td>
        <td style="word-break : break-word;" ng-if="pair.startsWith('http')"><a href="{{pair}}" target="_blank">{{pair}}</a></td>
      </tr>
    </tbody>
  </table>
</div>

<div ng-if="item.images" class="padL-10 padB-10">
  <button class="btn btn-default btn-sm"
          ng-click="item.images_trigger = !item.images_trigger"
          ng-class="item.images_trigger ? 'active marB-10' : ''"><b>{{ "Images" | translate }}</b></button>

  <table class="table" ng-if="item.images_trigger">
    <thead>
      <tr>
      </tr>
    </thead>
    <tbody>
      <tr  ng-repeat="link in item.images.split('&amp;amp;').join('&').split(' ').join(';').split(';') track by $index">
        <td style="word-break : break-word;"><a href="{{link}}" target="_blank"><img ng-src="{{link}}"></a></td>
      </tr>
    </tbody>
  </table>
</div>

<div ng-if="item.Function && item.Function.indexOf('<RoleDetail>') === -1">
  <h3>{{ "FUNCTIONS" | translate }}</h3>
  <table class="table table-hover">
    <thead>
      <tr>
        <th>{{ "FUNCTION" | translate }}</th>
        <th>{{ "CATEGORY" | translate }}</th>
        <th>{{ "NOT_IN_CHARGE_SINCE" | translate }}</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="row in item.Function.split('; OTHER FUNCTION: ')">
        <td>{{row.split(' CATEGORY: ')[0].split(' NOT IN CHARGE SINCE: ')[0].trim()}}</td>
        <td>{{row.split(' CATEGORY: ')[1].trim()}}</td>
        <td>{{row.split(' CATEGORY: ')[0].split(' NOT IN CHARGE SINCE: ')[1].trim()}}</td>
      </tr>
    </tbody>
  </table>
</div>

<div ng-if="item.published_by && item.published_by.indexOf('<References>') !== -1">
<h3>{{ "PUBLISHED_BY" | translate }}</h3>
<roles-table data="item.published_by" type="'publishedby'"></roles-table>
</div>

<div ng-if="item.Function && item.Function.indexOf('<RoleDetail>') !== -1">
<h3>{{ "FUNCTIONS" | translate }}</h3>
<roles-table data="item.Function" type="'functions'"></roles-table>
</div>

<div ng-if="item.ssn">
  <table class="table table-hover">
    <thead>
      <tr>
        <th>
          <button class="btn btn-default btn-sm"
            ng-click="item.ssn_trigger = !item.ssn_trigger"
            ng-class="item.ssn_trigger ? 'active' : ''"><b>{{ "SHOW" | translate }} {{ "IDENTIFICATIONS" | translate }}</b></button>
        </th>
        <th></th>
    </thead>
    <tbody ng-if="item.ssn_trigger">
      <tr ng-repeat="row in item.ssn.split(',[').join('[').split('[') track by $index" ng-if="row">
        <td>{{row.split(']')[0]}}</td>
        <td class="hiding-button-parent"><span compile="row.split(']')[1] | highlight : item.highlightingData"></span> <span style="width: 40px; display: inline-block;"><a href="https://www.google.com/search?q={{row.split(']')[0]}} {{row.split(']')[1]}}" target="_blank"><button type="button" class="btn btn-default btn-sm hiding-button-child"><i class="material-icons mini-icon padB-0">search</i></button></a></span></td>
      </tr>
    </tbody>
  </table>
</div>