catalog.tpl 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <link rel="stylesheet" type="text/css" href="../resources/css/style.css"/>
  2. <div id="buy-courses-tabs">
  3. {% if sessions_are_included %}
  4. <ul class="nav nav-tabs buy-courses-tabs" role="tablist">
  5. <li id="buy-courses-tab" class="{{ showing_courses ? 'active' : '' }}" role="presentation">
  6. <a href="course_catalog.php" aria-controls="buy-courses" role="tab">{{ 'Courses'|get_lang }}</a>
  7. </li>
  8. <li id="buy-sessions-tab" class="{{ showing_sessions ? 'active' : '' }}" role="presentation">
  9. <a href="session_catalog.php" aria-controls="buy-sessions" role="tab">{{ 'Sessions'|get_lang }}</a>
  10. </li>
  11. </ul>
  12. {% endif %}
  13. <div class="tab-content">
  14. <div class="tab-pane active" aria-labelledby="buy-sessions-tab" role="tabpanel">
  15. <div class="row">
  16. <div class="col-md-3">
  17. {{ search_filter_form }}
  18. </div>
  19. <div class="col-md-9">
  20. <div class="row">
  21. {% if showing_courses %}
  22. {% for course in courses %}
  23. <div class="col-md-4 col-sm-6">
  24. <article class="thumbnail">
  25. <img alt="{{ course.title }}" class="img-responsive" src="{{ course.course_img ? course.course_img : 'session_default.png'|icon() }}">
  26. <div class="caption">
  27. {% set course_description_url = _p.web_ajax ~ 'course_home.ajax.php?' ~ {'code': course.code, 'a': 'show_course_information'}|url_encode() %}
  28. <h3>
  29. <a class="ajax" href="{{ course_description_url }}" data-title="{{ course.title }}">{{ course.title }}</a>
  30. </h3>
  31. <ul class="list-unstyled">
  32. {% for teacher in course.teachers %}
  33. <li><em class="fa fa-user"></em> {{ teacher }}</li>
  34. {% endfor %}
  35. </ul>
  36. <p class="lead text-right">{{ course.currency }} {{ course.price }}</p>
  37. {% if course.enrolled == "YES" %}
  38. <div class="alert alert-success">
  39. <em class="fa fa-check-square-o fa-fw"></em> {{ 'TheUserIsAlreadyRegisteredInTheCourse'|get_plugin_lang('BuyCoursesPlugin') }}
  40. </div>
  41. {% elseif course.enrolled == "NO" %}
  42. <div class="text-center">
  43. <a class="ajax btn btn-primary btn-sm" title="" href="{{ course_description_url }}" data-title="{{ course.title }}">
  44. <em class="fa fa-file-text"></em> {{ 'SeeDescription'|get_plugin_lang('BuyCoursesPlugin') }}
  45. </a>
  46. <a class="btn btn-success btn-sm" title="" href="{{ _p.web_plugin ~ 'buycourses/src/process.php?' ~ {'i': course.id, 't': 1}|url_encode() }}">
  47. <em class="fa fa-shopping-cart"></em> {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
  48. </a>
  49. </div>
  50. {% elseif course.enrolled == "TMP" %}
  51. <div class="alert alert-info">{{ 'WaitingToReceiveThePayment'|get_plugin_lang('BuyCoursesPlugin') }}</div>
  52. {% endif %}
  53. </div>
  54. </article>
  55. </div>
  56. {% endfor %}
  57. {% endif %}
  58. {% if showing_sessions %}
  59. {% for session in sessions %}
  60. <div class="col-md-4 col-sm-6">
  61. <article class="thumbnail">
  62. <img alt="{{ session.name }}" class="img-responsive" src="{{ session.image ? session.image : 'session_default.png'|icon() }}">
  63. <div class="caption">
  64. <h3>
  65. <a href="{{ _p.web ~ 'session/' ~ session.id ~ '/about/' }}">{{ session.name }}</a>
  66. </h3>
  67. {% if 'show_session_coach'|get_setting == 'true' %}
  68. <p><em class="fa fa-user fa-fw"></em> {{ session.coach }}</p>
  69. {% endif %}
  70. <p><em class="fa fa-calendar fa-fw"></em> {{ session.dates.display }}</p>
  71. <p class="lead text-right">{{ session.currency }} {{ session.price }}</p>
  72. <ul class="list-unstyled">
  73. {% for course in session.courses %}
  74. <li>
  75. <em class="fa fa-book fa-fw"></em> {{ course.title }}
  76. {% if course.coaches|length %}
  77. <ul>
  78. {% for coach in course.coaches %}
  79. <li>{{ coach }}</li>
  80. {% endfor %}
  81. </ul>
  82. {% endif %}
  83. </li>
  84. {% endfor %}
  85. </ul>
  86. {% if session.enrolled == "YES" %}
  87. <div class="alert alert-success">
  88. <em class="fa fa-check-square-o fa-fw"></em> {{ 'TheUserIsAlreadyRegisteredInTheSession'|get_plugin_lang('BuyCoursesPlugin') }}
  89. </div>
  90. {% elseif session.enrolled == "NO" %}
  91. <div class="text-center">
  92. <a class="btn btn-success btn-sm" href="{{ _p.web_plugin ~ 'buycourses/src/process.php?' ~ {'i': session.id, 't': 2}|url_encode() }}">
  93. <em class="fa fa-shopping-cart"></em> {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
  94. </a>
  95. </div>
  96. {% elseif session.enrolled == "TMP" %}
  97. <div class="alert alert-info">{{ 'WaitingToReceiveThePayment'|get_plugin_lang('BuyCoursesPlugin') }}</div>
  98. {% endif %}
  99. </div>
  100. </article>
  101. </div>
  102. {% endfor %}
  103. {% endif %}
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>