ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
metadata-converter.php
Go to the documentation of this file.
1<?php
2$this->data['header'] = $this->t('metaconv_title');
3$this->includeAtTemplateBase('includes/header.php');
4?>
5 <h2><?php echo $this->t('metaconv_title'); ?></h2>
6 <form action="?" method="post" enctype="multipart/form-data">
7 <p><?php echo($this->t('{admin:metaconv_xmlmetadata}')); ?></p>
8 <p>
9 <textarea rows="20" style="width: 100%"
10 name="xmldata"><?php echo htmlspecialchars($this->data['xmldata']); ?></textarea>
11 </p>
12 <p>
13 <?php echo $this->t('metaconv_selectfile'); ?>
14 <input type="file" name="xmlfile" /></p>
15 <p>
16 <button type="submit" class="btn"><?php echo $this->t('metaconv_parse'); ?></button>
17 </p>
18 </form>
19<?php
20$output = $this->data['output'];
21
22if (!empty($output)) {
23?>
24 <h2><?php echo $this->t('metaconv_converted'); ?></h2>
25<?php
26 $i = 1;
27 foreach ($output as $type => $text) {
28 if ($text === '') {
29 continue;
30 }
31?>
32 <h3><?php echo htmlspecialchars($type); ?></h3>
33 <div class="metadatabox">
34 <button data-clipboard-target="#metadata<?php echo $i; ?>" id="btn<?php echo $i; ?>"
35 class="btn topright" style="margin-right: 0.5em;">
36 <img src="/<?php echo $this->data['baseurlpath'].'resources/icons/clipboard.svg'; ?>"
37 alt="Copy to clipboard" />
38 </button>
39 <pre id="metadata<?php echo $i; ?>"><?php
40 echo htmlspecialchars($text);
41 ?></pre>
42 </div>
43<?php
44 $i++;
45 }
46?>
47 <script type="text/javascript">
48<?php
49 for ($j = 1; $j <= $i; $j++) {
50?>
51 var clipboard<?php echo $j; ?> = new Clipboard('#btn<?php echo $j; ?>');
52<?php
53 }
54 ?>
55 </script>
56<?php
57}
58$this->includeAtTemplateBase('includes/footer.php');
An exception for terminatinating execution or to throw for unit testing.
$i
Definition: disco.tpl.php:19
$type
$this data['header']
$text
Definition: errorreport.php:18