Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. <div class="all-book-tab-content">
  2. <div class="tab-content">
  3. <?php foreach ($book_list_response->data->filters as $filter) { ?>
  4. <div id="<?php echo $filter->key; ?>" class="tab-pane fade <?php echo ($book_list_response->data->active_filter == $filter->key) ? 'active in' : ''; ?>">
  5. <?php if ($book_list_response->data->active_filter == $filter->key) { ?>
  6. <?php if (count($book_list_response->data->books)) { ?>
  7. <div class="all-book-list">
  8. <ul>
  9. <?php foreach ($book_list_response->data->books as $book) { ?>
  10. <li>
  11. <a href="<?php echo get_book_url($book); ?>">
  12. <div class="all-book-list-box">
  13. <div class="abl-cover"><img src="<?php echo base_url('assets/images/book/book-cover2.jpg'); ?>" alt="<?php echo!empty($book->book_title) ? $book->book_title : ""; ?>" title="<?php echo!empty($book->book_title) ? $book->book_title : ""; ?>"></div>
  14. <div class="abl-info">
  15. <h3 class="abl-title" title="<?php echo!empty($book->book_title) ? $book->book_title : ""; ?>"><?php echo!empty($book->book_title) ? $book->book_title : ""; ?></h3>
  16. <p class="abl-name" title="<?php echo!empty($book->author_name) ? $book->author_name : ""; ?>"><?php echo!empty($book->author_name) ? $book->author_name : ""; ?></p>
  17. <div class="product-rating">
  18. <span class="rating-reg" title="<?php echo!empty($book->rating) ? $book->rating : "0 Rating"; ?>"><?php echo!empty($book->rating) ? $book->rating : 0; ?></span>
  19. <span><i class="fa fa-star" aria-hidden="true"></i></span>
  20. </div>
  21. </div>
  22. </div>
  23. </a>
  24. </li>
  25. <?php } ?>
  26. </ul>
  27. </div>
  28. <?php } else { ?>
  29. <div class="alert alert-info">
  30. <strong>info</strong></br>
  31. <?php echo $this->config->item('BOOK_NOT_FOUND'); ?>
  32. </div>
  33. <?php } ?>
  34. <?php }else{ ?>
  35. <img src="<?php echo base_url('assets/images/loader.gif');?>" class="img-responsive" alt="Loading..."/>
  36. <?php } ?>
  37. </div>
  38. <?php } ?>
  39. </div>
  40. </div>
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. <script type="text/javascript">
  49.  
  50. $(document).ready(function () {
  51. $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
  52. var target = $(e.target).attr("data-href");
  53. var content_id = $(e.target).attr("href");
  54.  
  55. $.ajax({
  56. type: "POST",
  57. url: target,
  58. data: {},
  59. dataType: "json",
  60. success: function (response) {
  61. console.log(response);
  62. if(response.status){
  63. $(content_id).html(response.html);
  64. }else{
  65. $(content_id).html(response.message);
  66. }
  67. }
  68. });
  69. });
  70. });
  71. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement