23 lines
1.4 KiB
PHTML
Executable File
23 lines
1.4 KiB
PHTML
Executable File
<? $cart = $this->cart(); ?>
|
|
<? if ($cart->isActive()): ?>
|
|
<? $cartId = $this->source . '|' . $this->id; ?>
|
|
<span class="btn-bookbag-toggle" data-cart-id="<?=$this->escapeHtmlAttr($this->id)?>" data-cart-source="<?=$this->escapeHtmlAttr($this->source)?>">
|
|
<a class="cart-add hidden<? if(!$cart->contains($cartId)): ?> correct<? endif ?>"><!--
|
|
--><span class="cart-link-label"><?=$this->transEsc('Add to Book Bag') ?><i class="cart-link-icon fa fa-plus" title="<?=$this->transEsc('Add to Book Bag') ?>"></i></span><!--
|
|
--></a>
|
|
<a class="cart-remove hidden<? if($cart->contains($cartId)): ?> correct<? endif ?>"><!--
|
|
--><span class="cart-link-label"><?=$this->transEsc('Remove from Book Bag') ?> <i class="cart-link-icon fa fa-minus-circle" title="<?=$this->transEsc('Remove from Book Bag') ?>"></i></span>
|
|
</a>
|
|
<noscript>
|
|
<form method="post" name="addForm" action="<?=$this->url('cart-processor')?>">
|
|
<input type="hidden" name="ids[]" value="<?=$this->escapeHtmlAttr($cartId)?>" />
|
|
<? if ($cart->contains($cartId)): ?>
|
|
<input class="btn btn-default" type="submit" name="delete" value="<?=$this->transEsc('Remove from Book Bag')?>"/>
|
|
<? else: ?>
|
|
<input class="btn btn-default" type="submit" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"/>
|
|
<? endif; ?>
|
|
</form>
|
|
</noscript>
|
|
</span>
|
|
<? endif; ?>
|