
<? $vis_ticket_id=(isset($ticket_details['ticket_id']) && $ticket_details['ticket_id']!="")?$ticket_details['ticket_id'] : $operation['vis_ticket_id'];
if($note_details != -1) 
 	for($i=0; $i<count($note_details); $i++){ ?>
		<section class="panel panel-default pos-rlt clearfix m-b-none<? if($i>0 || ($operation['vis_operation']=='get_details' && $operation['vis_action']=='details')) echo ' m-t-sm';?>" id="ticket_note_<?= $note_details[$i]['remark_id']?>">
			<button type="button" title="Delete" class="close pull-right m-r-sm m-t-xs" data-toggle="ajaxModal" data-modal-arguments="vis_module=ticket&vis_operation=confirm_delete_note&vis_remark_id=<? echo $note_details[$i]['remark_id']; ?>&vis_ticket_id=<?=$vis_ticket_id;?>&vis_static_area=vis_client_delete_form<? if(!isset($ticket_details['ticket_id']) && $ticket_details['ticket_id']=='') echo '&vis_client_id='.$client_details['client_id']; ?>"><i class="vh vh-cross text-sm"></i></button>
			<div class="panel-heading b-b b-light"<? if($note_details[$i]['remark_header_bg_color']!="") echo ' style="background-color:'.$note_details[$i]['remark_header_bg_color'].'"'?>>
				<div class="clear">
					<div class="row">
						<div class="m-l pull-left">
							<label class="pull-left"><? echo $vis_language['TXTNOTEPOSTEDBY']; ?></label>
							<a class="link m-l-xs" href="#/home/profile_view/Profile/<? echo $note_details[$i]['staff_id'];?>"><i class="vh vh-user m-r-xs"></i><? echo $note_details[$i]['staff_name'];?></a>
						</div>
						<div class="pull-right m-r-lg">
							<label class="pull-left"><? echo $vis_language['TXTPOSTON']; ?></label>
							<div class="text-muted m-l-xs pull-left"><i class="m-r-xs"></i><? echo format_datetime($note_details[$i]['remark_date']); ?></div>
						</div>
					</div>
				</div>
			</div>
			<div class="panel-collapse wrapper">
				<div><? echo $note_details[$i]['content'];  ?></div>
				<? if($note_details[$i]['attachment'] != -1){ ?>				
				<div class="b b-t m-sm b-dashed m-l-none m-r-none"></div>
				<?	for($j=0; $j<count($note_details[$i]['attachment']); $j++){ ?>
				<div class="btn-group wrapper-xxs p-l-none">
					<a href="?vis_module=export&vis_operation=get_attachment&vis_attachment=<?= $note_details[$i]['attachment'][$j]['attachment_id'].'&'.VIS_STAFF_COOKIE.'='.$_COOKIE[VIS_STAFF_COOKIE]; ?>" class="btn btn-xs alert-success no-border"><? echo $note_details[$i]['attachment'][$j]['file_name']; ?></a>
				</div>
				<? } }?>
			</div>			
		</section>
<? } ?>
