|
1 | | -<?php |
| 1 | +<main class="h-full overflow-y-auto"> |
| 2 | + <div class="container px-6 mx-auto grid"> |
| 3 | + <h2 |
| 4 | + class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200" |
| 5 | + > |
| 6 | + Courses List |
| 7 | + |
| 8 | + </h2> |
| 9 | + <div class="mb-5"> |
| 10 | + <?= $alert ?> |
| 11 | + </div> |
| 12 | + <div class="align-right"> |
| 13 | + <button class="bg-blue-500 float-left hover:bg-blue-700 text-white font-bold py-2 px-4 rounded" |
| 14 | + onclick="location.href = '<?=base_url('admin/courses/addcourses')?>';"> |
| 15 | + Add Course |
| 16 | + </button> |
| 17 | + </div> |
| 18 | + <!-- CTA --> |
| 19 | + |
| 20 | + <!-- Cards --> |
| 21 | + <!-- New Table --> |
| 22 | + <div class="w-full overflow-hidden rounded-lg shadow-xs"> |
| 23 | + <div class="w-full overflow-x-auto"> |
| 24 | + <table class="w-full whitespace-wrap"> |
| 25 | + <thead> |
| 26 | + <tr |
| 27 | + class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
| 28 | + > |
| 29 | + <th class="px-4 py-3">#</th> |
| 30 | + <th class="px-4 py-3">Course Name</th> |
| 31 | + |
| 32 | + </tr> |
| 33 | + </thead> |
| 34 | + <tbody |
| 35 | + class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800" |
| 36 | + > |
| 37 | + <?php if($courses): $index=1; |
| 38 | + foreach ($courses as $course): |
| 39 | + |
| 40 | + ?> |
| 41 | + <tr class="text-gray-700 dark:text-gray-400"> |
| 42 | + <td class="px-4 py-3 text-sm"> |
| 43 | + <p class="font-semibold"><?=$index?></p> |
| 44 | + </td> |
| 45 | + <td class="px-4 py-3 text-sm"> |
| 46 | + <p class="font-semibold"><?=$course->cname?></p> |
| 47 | + </td> |
| 48 | + </tr> |
| 49 | + <?php $index++; endforeach; endif;?> |
| 50 | + </tbody> |
| 51 | + </table> |
| 52 | + </div> |
| 53 | + <?php if(FALSE):?> |
| 54 | + <div |
| 55 | + class="grid px-4 py-3 text-xs font-semibold tracking-wide text-gray-500 uppercase border-t dark:border-gray-700 bg-gray-50 sm:grid-cols-9 dark:text-gray-400 dark:bg-gray-800" |
| 56 | + > |
| 57 | + <span class="flex items-center col-span-3"> |
| 58 | + Showing 21-30 of 100 |
| 59 | + </span> |
| 60 | + <span class="col-span-2"></span> |
| 61 | + <!-- Pagination --> |
| 62 | + <span class="flex col-span-4 mt-2 sm:mt-auto sm:justify-end"> |
| 63 | + <nav aria-label="Table navigation"> |
| 64 | + <ul class="inline-flex items-center"> |
| 65 | + <li> |
| 66 | + <button |
| 67 | + class="px-3 py-1 rounded-md rounded-l-lg focus:outline-none focus:shadow-outline-purple" |
| 68 | + aria-label="Previous" |
| 69 | + > |
| 70 | + <svg |
| 71 | + aria-hidden="true" |
| 72 | + class="w-4 h-4 fill-current" |
| 73 | + viewBox="0 0 20 20" |
| 74 | + > |
| 75 | + <path |
| 76 | + d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" |
| 77 | + clip-rule="evenodd" |
| 78 | + fill-rule="evenodd" |
| 79 | + ></path> |
| 80 | + </svg> |
| 81 | + </button> |
| 82 | + </li> |
| 83 | + <li> |
| 84 | + <button |
| 85 | + class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
| 86 | + > |
| 87 | + 1 |
| 88 | + </button> |
| 89 | + </li> |
| 90 | + <li> |
| 91 | + <button |
| 92 | + class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
| 93 | + > |
| 94 | + 2 |
| 95 | + </button> |
| 96 | + </li> |
| 97 | + <li> |
| 98 | + <button |
| 99 | + class="px-3 py-1 text-white transition-colors duration-150 bg-purple-600 border border-r-0 border-purple-600 rounded-md focus:outline-none focus:shadow-outline-purple" |
| 100 | + > |
| 101 | + 3 |
| 102 | + </button> |
| 103 | + </li> |
| 104 | + <li> |
| 105 | + <button |
| 106 | + class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
| 107 | + > |
| 108 | + 4 |
| 109 | + </button> |
| 110 | + </li> |
| 111 | + <li> |
| 112 | + <span class="px-3 py-1">...</span> |
| 113 | + </li> |
| 114 | + <li> |
| 115 | + <button |
| 116 | + class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
| 117 | + > |
| 118 | + 8 |
| 119 | + </button> |
| 120 | + </li> |
| 121 | + <li> |
| 122 | + <button |
| 123 | + class="px-3 py-1 rounded-md focus:outline-none focus:shadow-outline-purple" |
| 124 | + > |
| 125 | + 9 |
| 126 | + </button> |
| 127 | + </li> |
| 128 | + <li> |
| 129 | + <button |
| 130 | + class="px-3 py-1 rounded-md rounded-r-lg focus:outline-none focus:shadow-outline-purple" |
| 131 | + aria-label="Next" |
| 132 | + > |
| 133 | + <svg |
| 134 | + class="w-4 h-4 fill-current" |
| 135 | + aria-hidden="true" |
| 136 | + viewBox="0 0 20 20" |
| 137 | + > |
| 138 | + <path |
| 139 | + d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" |
| 140 | + clip-rule="evenodd" |
| 141 | + fill-rule="evenodd" |
| 142 | + ></path> |
| 143 | + </svg> |
| 144 | + </button> |
| 145 | + </li> |
| 146 | + </ul> |
| 147 | + </nav> |
| 148 | + </span> |
| 149 | + </div> |
| 150 | + <?php endif;?> |
| 151 | + </div> |
| 152 | + </div> |
| 153 | +</main> |
| 154 | +</div> |
| 155 | +</div> |
| 156 | + |
0 commit comments