<?php
// Copyright 1999-2014. Parallels IP Holdings GmbH. All Rights Reserved.
?>
<table cellspacing="0" width="100%" class="line-chart-data-table">
    <tr>
        <th><?php echo $this->escape($this->limit['title']); ?></th>
        <th class="t-r"><?php echo $this->escape($this->limit['limitString']); ?></th>
    </tr>

    <?php if (-1 == $this->limit['limitValue']): ?>
        <tr>
            <td><?php echo $this->escape($this->limit['usedString']); ?></td>
            <td class="t-r">&nbsp;</td>
        </tr>
    <?php else: ?>
        <tr>
            <td colspan="2">
                <div class="line-chart">
                    <div
                        class="chart-data <?php echo (100 <= $this->limit['percent']) ? 'chart-data-over' : ''; ?>"
                        style="width: <?php echo $this->escape(min($this->limit['percent'], 100)); ?>%"></div>
                </div>
            </td>
        </tr>

        <tr>
            <td><?php echo $this->escape($this->limit['usedString']) . ($this->showPercent ? " ({$this->limit['percent']}%)" : '');; ?></td>
            <td class="t-r"><?php echo $this->escape($this->limit['availableString']); ?></td>
        </tr>
    <?php endif; ?>
</table>
