<div class="row">
    <div class="col-md-12">
        <div class="hs_heading medium">
            <h3>Pages (<?php if(!empty($all_pages)){ echo count($all_pages); }else{ echo 0; } ?>) </h3>
        </div>
        <div class="hs_datatable_wrapper">
            <table class="hs_datatable table table-bordered">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>Heading</th>
                        <th>Title</th>
                        <th>Short content</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
				<?php  
				$i =0;
				if(!empty($all_pages)){ 
                 foreach($all_pages as $pages){  ?>
				 <tr>
                        <td><?php echo ++$i; ?></td>
                        <td width="200">
                            <div class="hs_user">
                                 
                                <div class="user_name">
                                    <p><?php echo $pages->page_heading; ?></p>
                                  
                                </div>
                            </div>
                        </td>
                        <td><?php echo $pages->page_title; ?></td>
						<td>
						<?php 
							if(strlen($pages->page_shortcontent) >= 100) {
							echo substr($pages->page_shortcontent, 0, 100); ?>
							 <br><a href="javascript:;" onclick="read_more_comment('<?php echo $pages->page_shortcontent; ?>')">Read More...</a>
						<?php }else{
								echo $pages->page_shortcontent;
							 }
						?>
						</td>
						<td width="200">
                            <a href="<?php echo base_url().'admin/edit_pages/'.$pages->page_id;  ?>" class="btn" title="Edit"><i class="fa fa-pencil" aria-hidden="true"></i></a>
                        </td>
				</tr>  
				<?php } } ?>                
                </tbody>
            </table>
        </div>
    </div>
</div>

<!-- read more content popup start -->
<div class="modal_box">
<div id="readmore_comment" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title"><span>Read</span> Content</h4>
            </div>
            <div class="modal-body">
				<div class="hs_input">
                    <label>Short Content</label>
                    <textarea rows="8" cols=""class="form-control" name="rm_content" id="rm_content" disabled></textarea>
                </div>
			</div>
		</div>
    </div>
</div>
</div>
<!-- read more content popup start -->
