<?php

/*------------------------------------------------------------------------
# com_invoices - Invoice Manager for Joomla
# ------------------------------------------------------------------------
# author				Germinal Camps
# copyright 			Copyright (C) 2012 - 2016 JoomlaThat.com. All Rights Reserved.
# @license				http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: 			http://www.joomlathat.com
# Technical Support:	Forum - http://www.joomlathat.com/support
-------------------------------------------------------------------------*/

//no direct access
defined('_JEXEC') or die('Restricted access.'); 

$params = JComponentHelper::getParams( 'com_invoices' );
$document	= JFactory::getDocument();

$tab = $this->input->getString('tab', 'recipient');

?>

<ul class="nav nav-tabs invoice-tabs">
  <li class="<?php if($tab == "recipient"){ ?>active<?php } ?>"><a href="#recipient" data-toggle="tab" onclick="set_tab('recipient')"><i class="icon-user"></i> <?php echo JText::_( 'RECIPIENT' ); ?></a></li>
  <li class="<?php if($tab == "invoicer"){ ?>active<?php } ?>"><a href="#invoicer" data-toggle="tab" onclick="set_tab('invoicer')"><i class="icon-home"></i> <?php echo JText::_( 'INVOICER' ); ?></a></li>
  <li class="<?php if($tab == "details"){ ?>active<?php } ?>"><a href="#details" data-toggle="tab" onclick="set_tab('details')"><i class="icon-cog"></i> <?php echo JText::_( 'QUOTE_DETAILS' ); ?></a></li>
  <li class="<?php if($tab == "publish"){ ?>active<?php } ?>"><a href="#publish" data-toggle="tab" onclick="set_tab('publish')"><i class="icon-eye-open"></i> <?php echo JText::_( 'PUBLISH' ); ?></a></li>
  <li class="<?php if($tab == "items"){ ?>active<?php } ?>"><a href="#items" data-toggle="tab" onclick="set_tab('items')"><i class="icon-list"></i> <?php echo JText::_( 'ITEMS' ); ?> <span class='badge'><?php echo count($this->items); ?></span></a></li>
  <li class="<?php if($tab == "notes"){ ?>active<?php } ?>"><a href="#notes" data-toggle="tab" onclick="set_tab('notes')"><i class="icon-edit"></i> <?php echo JText::_( 'NOTES' ); ?></a></li>
  <li class="<?php if($tab == "history"){ ?>active<?php } ?>"><a href="#history" data-toggle="tab" onclick="set_tab('history')"><span class="glyphicon glyphicon-list-alt"></span> <?php echo JText::_( 'HISTORY' ); ?></a></li>
</ul>
<div class="tab-content">
  <div class="tab-pane <?php if($tab == "recipient"){ ?>active<?php } ?>" id="recipient"> <?php echo $this->loadTemplate('recipient'); ?> </div>
  <div class="tab-pane <?php if($tab == "invoicer"){ ?>active<?php } ?>" id="invoicer"> <?php echo $this->loadTemplate('invoicer'); ?> </div>
  <div class="tab-pane <?php if($tab == "details"){ ?>active<?php } ?>" id="details"> <?php echo $this->loadTemplate('details'); ?> </div>
  <div class="tab-pane <?php if($tab == "publish"){ ?>active<?php } ?>" id="publish"> <?php echo $this->loadTemplate('publish'); ?> </div>
  <div class="tab-pane <?php if($tab == "items"){ ?>active<?php } ?>" id="items"> <?php echo $this->loadTemplate('items'); ?> </div>
  <div class="tab-pane <?php if($tab == "notes"){ ?>active<?php } ?>" id="notes"> <?php echo $this->loadTemplate('notes'); ?> </div>
  <div class="tab-pane <?php if($tab == "history"){ ?>active<?php } ?>" id="history"> <?php echo $this->loadTemplate('history'); ?> </div>
</div>

<input type="hidden" name="type" value="2" />