more fixes to download view

This commit is contained in:
Andrew Bauer 2020-09-29 10:15:58 -05:00
parent 5200af8206
commit 953a6e0785
1 changed files with 5 additions and 5 deletions

View File

@ -51,24 +51,24 @@ function getDLEventHTML($eid, $eids) {
return $result; return $result;
} }
function getGeneratedHTML($generated) { function getGeneratedHTML($generated, $exportFormat) {
$result = ''; $result = '';
if ( $generated = '' ) { if ( $generated == '' ) {
$result .= '<h2 id="exportProgress" class="hidden warnText">'.PHP_EOL; $result .= '<h2 id="exportProgress" class="hidden warnText">'.PHP_EOL;
$result .= '<span id="exportProgressText">' .translate('Exporting'). '</span>'.PHP_EOL; $result .= '<span id="exportProgressText">' .translate('Exporting'). '</span>'.PHP_EOL;
$result .= '<span id="exportProgressTicker"></span>'.PHP_EOL; $result .= '<span id="exportProgressTicker"></span>'.PHP_EOL;
$result .= '</h2>'.PHP_EOL; $result .= '</h2>'.PHP_EOL;
} else { } else {
$result .= '<h2 id="exportProgress" class="' .($generated ? 'infoText' : 'errorText').'">'.PHP_EOL; $result .= '<h2 id="exportProgress" class="' .($generated ? 'infoText' : 'errorText').'">'.PHP_EOL;
$result .= '<span id="exportProgressText">' .($generated ? translate('ExportSucceeded'):translate('ExportFailed')). '</span>'.PHP_EOL; $result .= '<span id="exportProgressText">' .($generated ? translate('ExportSucceeded') : translate('ExportFailed')). '</span>'.PHP_EOL;
$result .= '<span id="exportProgressTicker"></span>'.PHP_EOL; $result .= '<span id="exportProgressTicker"></span>'.PHP_EOL;
$result .= '</h2>'.PHP_EOL; $result .= '</h2>'.PHP_EOL;
} }
if ( $generated ) { if ( $generated ) {
$result .= '<h3 id="downloadLink"><a href="?view=archive&amp;type=' .$exportFormat. '">' .translate('Download'). '</a></h3>'.PHP_EOL; $result .= '<h3 id="downloadLink"><a href="?view=archive&amp;type=' .$exportFormat. '">' .translate('Download'). '</a></h3>'.PHP_EOL;
} }
return $result; return $result;
} }
@ -149,6 +149,6 @@ xhtmlHeaders(__FILE__, translate('Download'));
</button> </button>
</form> </form>
</div> </div>
<?php echo getGeneratedHTML($generated) ?> <?php echo getGeneratedHTML($generated, $exportFormat) ?>
</div> </div>
<?php xhtmlFooter() ?> <?php xhtmlFooter() ?>