cms/app-client/app/templates/components/notice-component.hbs
author ymh <ymh.work@gmail.com>
Fri, 17 Nov 2017 16:05:03 +0100
changeset 563 41e4eb4d8b82
parent 536 b64c8c35c67d
permissions -rw-r--r--
Correct Handle creation and correct permalink

<h2>{{ item.title }}</h2>
{{#if item.alternativeTitle }}
<h3>{{ item.alternativeTitle }}</h3>
{{/if}}
<div class="notice-links">
  <h5>{{#if item.id }}<a href={{concat "https://hdl.handle.net/" item.id}} class="notice-permalink" target="_blank">permalien</a>{{/if}}</h5>
  <h5>{{#if item.cocoonId }}<a href={{noticeCocoonPurlUrl}} class="notice-permalink" target="_blank">notice sur Cocoon</a>{{/if}}</h5>
</div>
<table>
  <tr>
    <td class="title">Editeur{{#if (if-operator item.publishers.length '>' 1)}}s{{/if}}</td>
    <td>
      <ul>
        {{#each item.publishers as |publisher|}}
        <li>{{ publisher }}</li>
        {{/each}}
      </ul>
    </td>
  </tr>
  <tr>
    <td class="title">Langue</td>
    <td>{{#each item.languages as |lang index|}}{{if index ", "}}{{ component (get-link-type lang) url=lang class="language" onClick=(action 'addLanguageFilter' lang) displayUrlLink=true}}{{/each}}</td>
  </tr>
  <tr>
    <td class="title">Sujet{{#if (if-operator item.subjects.length '>' 1)}}s{{/if}}</td>
    <td>
      <ul>
        {{#each item.subjects as |subject|}}
        <li>
          {{component (get-link-type subject) url=subject onClick=(action "addThemeFilter" subject) displayUrlLink=true}}
        </li>
        {{/each}}
      </ul>
    </td>
  </tr>
  <tr>
    <td class="title">Type{{#if (if-operator item.types.length '>' 1)}}s{{/if}}</td>
    <td>
      <ul>
        {{#each item.types as |type|}}
        <li>
          {{component (get-link-type type) url=type onClick=(action "addTypeFilter" type) displayUrlLink=true}}
        </li>
        {{/each}}
      </ul>
    </td>
  </tr>
  <tr>
    <td class="title">Description</td>
    <td>
      {{#each item.descriptions as |description|}}
      <p>{{ doc-literal url=description }}</p>
      {{/each}}
    </td>
  </tr>
  <tr>
    <td class="title">Enregistré en</td>
    <td>{{#if item.created }}{{ doc-created value=item.created action=(action "addCreatedFilter" item.created) class="notice-created"}}{{/if}}</td>
  </tr>
  <tr>
    <td class="title">Participant{{#if (if-operator participants.length '>' 1)}}s{{/if}}</td>
    <td>
      <ul>
        {{#each participants as |participant|}}
        <li>{{component (get-link-type participant.identifier) url=participant.identifier displayUrlLink=true}} ({{#each participant.role as |r index| }}{{if index ", "}}{{r}}{{/each}})</li>
        {{/each}}
      </ul>
    </td>
  </tr>
  <tr>
    <td class="title">Lieu</td>
    <td>{{ notice-location-component geoInfo=item.geoInfo countryCode=item.countryCode }}</td>
  </tr>
  <tr>
    <td class="title">Durée</td>
    <td>{{to-minutes item.duration}}</td>
  </tr>
  <tr>
    <td class="title">Droits</td>
    <td>{{ doc-rights url=item.rights object="Cette resource est mise à disposition"}}</td>
  </tr>
  {{#if item.transcript }}
  <tr>
    <td class="title">Droits Transcript</td>
    <td>{{ doc-rights url=item.transcript.rights object="Le transcript est mis à disposition"}}</td>
  </tr>
  {{/if}}

</table>