<!-- Edit this file to change the layout of the detail view print preview page -->


<div class="panel-heading"><h3 class="panel-title">
	<strong><%%DETAIL_VIEW_TITLE%%></strong>
	<div class="hidden-print pull-right">
		<div class="btn-group">
			<button type="button" id="print" onclick="window.print();" title="<%%TRANSLATION(Print)%%>" class="btn btn-primary"><i class="glyphicon glyphicon-print"></i> <%%TRANSLATION(Print)%%></button>
			<button type="submit" id="back" title="<%%TRANSLATION(Cancel Printing)%%>" class="btn btn-default"><i class="glyphicon glyphicon-remove-circle"></i> <%%TRANSLATION(Cancel Printing)%%></button>
		</div>
	</div>
	<div class="clearfix"></div>
</h3></div>

<div class="panel-body">
	<fieldset class="form-horizontal">
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">ID</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(id)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">ISBN NO</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(ISBN_NO)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Book Title</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(Book_Title)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Book Type</label>
			<div class="col-xs-9">
				<div class="form-control-static"><span id="Book_Type<%%RND1%%>"><%%COMBOTEXT(Book_Type)%%></span></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Author Name</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(Author_Name)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Quantity</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(Quantity)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Purchase Date</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%COMBOTEXT(Purchase_Date)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Edition</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(Edition)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Price</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(Price)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Pages</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(Pages)%%></div>
			</div>
		</div>
		<div class="form-group" style="border-bottom: dotted 1px #DDD;">
			<label class="col-xs-3 control-label">Publisher</label>
			<div class="col-xs-9">
				<div class="form-control-static"><%%VALUE(Publisher)%%></div>
			</div>
		</div>
	</fieldset>
</div>
<!-- child records -->
<div class="panel-body">
	<div id="books-children"></div>
</div>

<script>
	$j(function(){
		/* prevent loading child records in multiple DVP */
		if($j('[id=books-children]').length > 1) return;

		post(
			'parent-children.php', {
				ParentTable: 'books',
				SelectedID: '<%%VALUE(id)%%>',
				Operation: 'show-children-printable'
			},
			'books-children',
			'disable-element',
			'loading-element',
			apply_persisting_children
		);

		$j('form').on('click', '#children-tabs button[data-target]', function(){
			$j(this).toggleClass('active');
			persist_expanded_child($j(this).attr('id'));
		});
	})
</script>

