<h3><?php __e('License Activations') ?></h3>
<div class="am-grid-container">
<table class="am-grid">
<tr>
    <th><?php __e('Time') ?></th>
    <th><?php __e('Bindings') ?></th>
    <th><?php __e('Status') ?></th>
</tr>
<?php foreach ($this->activations as $activation): ?>
<tr class="am-grid-row">
    <td><?php echo amDateTime($activation->dattm)?></td>
    <td><?php echo $activation->renderRequest() ?></td>
    <td><?php if ($activation->is_disabled): ?>
        <?php __e('Disabled') ?> <?php echo amDatetime($activation->disabled_dattm)?>
        <?php else: ?>
        <?php __e('Active') ?> (<a href="<?php echo $this->url('softsale/admin-license/disable-activation',
            array('license_id'=>$activation->license_id, 'license_activation_id'=>$activation->pk())) ?>" 
                  class="local activation-disable"><?php __e('disable') ?></a>)
        <?php endif ?>
    </td>
</tr>
<?php endforeach; ?>
<tr class="am-grid-row">
    <td colspan="3">
    <label><?php __e('New Activation') ?></label>
    <?php foreach ($license->getScheme()->getBindTo() as $bind) : ?>
        <input type="text" name="request[<?php p($bind) ?>]"
                 size="15" placeholder="<?php p($bind)?>"/>
    <?php endforeach; ?>
        <input type="hidden" name="license_id" value="<?php echo $license->pk(); ?>" />
        <input type="submit" value="Activate" class="add-activation-button" />
    </td>
</tr>
</table>
</div>
<div class="div-flash-message" style="display:none" id="activation-message"></div>
<script type="text/javascript">
    jQuery('#softsalelicense-<?php p($license->pk()) ?>-cnt').html('<?php p(count($this->activations)) ?>');
</script>
