cms/app-client/app/templates/components/transcript-component.hbs
changeset 257 eba9edbd8f46
parent 256 18f0c3ee9aa5
child 258 12c694392e8e
equal deleted inserted replaced
256:18f0c3ee9aa5 257:eba9edbd8f46
     1 <h2>
     1 <h2>
     2 	{{player.transcript.title.original}}
     2     {{player.transcript.title.original}}
     3 {{#if player.transcript.title.translation}}
     3 {{#if player.transcript.title.translation}}
     4 	<span>{{player.transcript.title.translation}}</span>
     4     <span>{{player.transcript.title.translation}}</span>
     5 {{/if}}
     5 {{/if}}
     6 </h2>
     6 </h2>
     7 <ol class="transcript">
     7 <ol class="transcript">
     8 {{#each player.transcript.annotations as |annotation|}}
     8 {{#each player.transcript.annotations as |annotation|}}
     9 {{log 'each-annotation'}}
     9     <li class="sentence {{if (if-and (if-operator player.progress '>=' annotation.begin) (if-operator player.progress '<' annotation.end)) 'active'}}" {{action 'play' annotation.begin}}>
    10 	{{#if (if-and (if-operator player.progress '>=' annotation.start) (if-operator player.progress '<' annotation.end))}}
    10         <i class="fa fa-play" {{action 'play' annotation.begin}}>Play</i>
    11 	<li class="sentence active">
    11         {{#if annotation.title}}<span class="title">{{annotation.title}}</span>{{/if}}
    12 		<i class="fa fa-play" {{action 'play' annotation.start}}>Play</i>
    12         {{#each annotation.fragments as |fragment|}}
    13 		{{#if annotation.content}}<p class="original">{{annotation.content}}</p>{{/if}}
    13         <div class="fragment">
    14 		{{#if annotation.words}}
    14             
    15 		<div class="words">
    15             {{#if fragment.original}}
    16 		{{#each annotation.words as |word|}}
    16             <p class="original">
    17 			<div class="word">
    17                 {{#if fragment.speaker}}<span class="speaker">{{fragment.speaker}} :</span>{{/if}}
    18 				<p class="original">{{word.content}}</p>
    18                 {{fragment.original}}
    19 				<p class="translation">{{word.translation}}</p>
    19             </p>
    20 			</div>
    20             {{/if}}
    21 		{{/each}}
    21             {{#if fragment.literal}}
    22 		</div>
    22             <div class="words">
    23 		{{/if}}
    23                 {{#each fragment.literal as |word|}}
    24 		{{#if annotation.translation}}<p class="translation">{{annotation.translation}}</p>{{/if}}
    24                 <div class="word">
    25 	</li>
    25                     <p class="original">{{word.original}}</p>
    26 	{{else}}
    26                     <p class="translation">{{word.translation}}</p>
    27 	<li class="sentence" {{action 'play' annotation.start}}>
    27                 </div>
    28 		<i class="fa fa-play">Play</i>
    28                 {{/each}}
    29 		{{#if annotation.content}}<p class="original">{{annotation.content}}</p>{{/if}}
    29             </div>
    30 		{{#if annotation.words}}
    30             {{/if}}
    31 		<div class="words">
    31             {{#if fragment.translation}}
    32 		{{#each annotation.words as |word|}}
    32             <p class="translation">{{fragment.translation}}</p>
    33 			<div class="word">
    33             {{/if}}
    34 				<p class="original">{{word.content}}</p>
    34         </div>
    35 				<p class="translation">{{word.translation}}</p>
    35         {{/each}}   
    36 			</div>
    36     </li>
    37 		{{/each}}
       
    38 		</div>
       
    39 		{{/if}}
       
    40 		{{#if annotation.translation}}<p class="translation">{{annotation.translation}}</p>{{/if}}
       
    41 	</li>
       
    42 	{{/if}}
       
    43 {{/each}}
    37 {{/each}}
    44 </ol>
    38 </ol>