1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <xsl:stylesheet version="1.0"
|
---|
3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
4 | xmlns:java="http://xml.apache.org/xslt/java"
|
---|
5 | xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
|
---|
6 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
7 | xmlns:gslib="http://www.greenstone.org/skinning"
|
---|
8 | extension-element-prefixes="java util"
|
---|
9 | exclude-result-prefixes="java util">
|
---|
10 |
|
---|
11 | <!-- use the 'main' layout -->
|
---|
12 | <xsl:import href="layouts/main.xsl"/>
|
---|
13 |
|
---|
14 | <xsl:variable name="groupPath"><xsl:value-of select="/page/pageRequest/paramList/param[@name='group']/@value"/></xsl:variable>
|
---|
15 | <!-- set page title -->
|
---|
16 | <xsl:template name="pageTitle"><gslib:collectionName/></xsl:template>
|
---|
17 |
|
---|
18 | <!-- set page breadcrumbs -->
|
---|
19 | <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/>
|
---|
20 | <xsl:if test="$groupPath != ''">
|
---|
21 | <xsl:for-each select="/page/pageResponse/pathList/group">
|
---|
22 | <xsl:sort data-type="number" select="@position"/>
|
---|
23 | <a>
|
---|
24 | <xsl:attribute name="href"><gslib:groupHref path="{@path}"/></xsl:attribute>
|
---|
25 | <xsl:attribute name="title"><gslib:groupName path="{@path}"/></xsl:attribute>
|
---|
26 | <gslib:groupName path="{@path}"/>
|
---|
27 | </a>
|
---|
28 | <gslib:rightArrow/>
|
---|
29 | </xsl:for-each>
|
---|
30 | </xsl:if>
|
---|
31 | </xsl:template>
|
---|
32 |
|
---|
33 | <!-- the page content -->
|
---|
34 | <xsl:template match="/page">
|
---|
35 | <xsl:call-template name="audio-upload"/>
|
---|
36 | </xsl:template>
|
---|
37 |
|
---|
38 | <!-- Template for processing audio file uploads -->
|
---|
39 | <xsl:template name="audio-upload">
|
---|
40 | <link href="interfaces/{$interface_name}/style/asr.css" rel="stylesheet" type="text/css" />
|
---|
41 | <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
---|
42 |
|
---|
43 | <div class="paper">
|
---|
44 | <div>
|
---|
45 | <form onSubmit="doAudioUpload(); return false;" enctype="multipart/form-data">
|
---|
46 | <input id="fileUpload" type="file" accept="audio/wav" multiple="multiple" />
|
---|
47 | <button id="btnFileUpload" type="submit" disabled="disabled">Transcribe</button>
|
---|
48 | </form>
|
---|
49 | </div>
|
---|
50 |
|
---|
51 | <div class="audio-slider__container">
|
---|
52 | <button type="button" class="btn-fab btn-fab-small">
|
---|
53 | <span class="material-icons"></span> <!-- play_arrow -->
|
---|
54 | </button>
|
---|
55 | <input type="range" min="0" value="0" class="audio-slider__range" />
|
---|
56 | <span class="audio-slider__value">1:23</span>
|
---|
57 | </div>
|
---|
58 |
|
---|
59 | <div id="prgFileUploadContainer" class="asr-hidden">
|
---|
60 | <label for="prgFileUpload">Processing:</label>
|
---|
61 | <progress id="prgFileUpload" />
|
---|
62 | </div>
|
---|
63 |
|
---|
64 | <div id="transcriptionsDisplayContainer">
|
---|
65 | <audio id="transcriptionAudio">
|
---|
66 | <source id="transcriptionAudioSource" />
|
---|
67 | </audio>
|
---|
68 |
|
---|
69 | <ul id="transcriptionsList" class="transcription__list"></ul>
|
---|
70 |
|
---|
71 | <template id="transcriptionTemplate">
|
---|
72 | <li class="transcription__container">
|
---|
73 | <div class="transcription__header">
|
---|
74 | <button class="btn-fab transcription__play-button" type="button">
|
---|
75 | <span class="material-icons"></span> <!-- play_arrow -->
|
---|
76 | </button>
|
---|
77 | <button class="btn-fab transcription__remove-button" type="button">
|
---|
78 | <span class="material-icons"></span> <!-- delete -->
|
---|
79 | </button>
|
---|
80 | <p class="transcription__file-name"></p>
|
---|
81 | </div>
|
---|
82 | <details>
|
---|
83 | <summary>Character Information</summary>
|
---|
84 | <div class="metadata-list-container">
|
---|
85 | <ul class="metadata-list"></ul>
|
---|
86 | </div>
|
---|
87 | <div class="audio-slider-container">
|
---|
88 | <input type="range" min="0" value="0" class="audio-slider" />
|
---|
89 | </div>
|
---|
90 | </details>
|
---|
91 | <hr class="divider" />
|
---|
92 | </li>
|
---|
93 | </template>
|
---|
94 |
|
---|
95 | <template id="errorTemplate">
|
---|
96 | <li class="error-list-item">
|
---|
97 | <div>
|
---|
98 | <div class="spaced-block">
|
---|
99 | <b>Transcription Failed: </b><span></span>
|
---|
100 | </div>
|
---|
101 | <div class="spaced-block">
|
---|
102 | <b>File: </b><span></span>
|
---|
103 | </div>
|
---|
104 | </div>
|
---|
105 | </li>
|
---|
106 | </template>
|
---|
107 |
|
---|
108 | <template id="metadataTemplate">
|
---|
109 | <!-- <li class="metadata-list-item tooltip-parent tooltip">
|
---|
110 | <div class="spaced-block">
|
---|
111 | <p></p>
|
---|
112 | </div>
|
---|
113 | <div class="spaced-block">
|
---|
114 | <button type="button"><img src="interfaces/{$interface_name}/assets/play_arrow_black_18dp.svg" /></button>
|
---|
115 | </div>
|
---|
116 | <div class="tooltip-wrapper">
|
---|
117 | <span class="tooltip">0.02</span>
|
---|
118 | </div>
|
---|
119 | </li> -->
|
---|
120 | <li class="metadata-list-item">
|
---|
121 | <div class="spaced-block">
|
---|
122 | <p></p>
|
---|
123 | </div>
|
---|
124 | <div class="spaced-block">
|
---|
125 | <button type="button"><img src="interfaces/{$interface_name}/assets/play_arrow_black_18dp.svg" /></button>
|
---|
126 | </div>
|
---|
127 | </li>
|
---|
128 | </template>
|
---|
129 | </div>
|
---|
130 | </div>
|
---|
131 |
|
---|
132 | <gsf:script src="interfaces/{$interface_name}/js/asr/asr-controller.js"></gsf:script>
|
---|
133 | </xsl:template>
|
---|
134 |
|
---|
135 | </xsl:stylesheet>
|
---|