PageRenderTime 53ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/apps/subjects/views/scripts/assign/index-webarte.php

https://github.com/ccaballero/yachay
PHP | 176 lines | 169 code | 7 blank | 0 comment | 58 complexity | 7bfd578aa72ded9b1e485c6e7007f2f2 MD5 | raw file
Possible License(s): GPL-3.0
  1. <h1>Integrantes: <?php echo $this->subject->label ?></h1>
  2. <p><span class="mark">Gestion: </span><?php echo $this->subject->getGestion()->label ?></p>
  3. <form method="post" action="" accept-charset="utf-8">
  4. <input type="hidden" name="return" value="<?php echo $this->currentPage() ?>" />
  5. <div>
  6. <?php if ($this->subject->amModerator()) { ?><input type="button" name="new" value="Agregar" onclick="location.href='<?php echo $this->url(array('subject' => $this->subject->url), 'subjects_subject_assign_new') ?>'" /><input type="submit" name="unlock" value="Habilitar" /><input type="submit" name="lock" value="Deshabilitar" /><input type="submit" name="delete" value="Retirar" /><input type="button" name="import" value="Importar" onclick="location.href='<?php echo $this->url(array('subject' => $this->subject->url), 'subjects_subject_assign_import') ?>'" /><input type="button" name="export" value="Exportar" onclick="location.href='<?php echo $this->url(array('subject' => $this->subject->url), 'subjects_subject_assign_export') ?>'" /><?php } ?>
  7. </div>
  8. <div id="block">
  9. <h2>Docentes</h2>
  10. <?php if (count($this->teachers) != 0) { ?>
  11. <?php foreach ($this->teachers as $teacher) { ?>
  12. <?php $assign = $this->subject->getAssignement($teacher); ?>
  13. <div class="member">
  14. <?php if ($this->subject->amModerator()) { ?>
  15. <input type="checkbox" name="members[]" value="<?php echo $teacher->ident ?>" />
  16. <?php } ?>
  17. <p><span class="title"><?php echo $teacher->getFullName() ?></span></p>
  18. <?php if ($this->acl('users', 'view')) { ?>
  19. <a href="<?php echo $this->url(array('user' => $teacher->url), 'users_user_view') ?>"><img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_small/' . $teacher->getAvatar() ?>" alt="<?php echo $teacher->getFullName() ?>" title="<?php echo $teacher->getFullName() ?>" /></a>
  20. <?php } else { ?>
  21. <img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_medium/' . $teacher->getAvatar() ?>" alt="<?php echo $teacher->getFullName() ?>" title="<?php echo $teacher->getFullName() ?>" />
  22. <?php } ?>
  23. <div class="body">
  24. <?php if ($this->subject->amModerator()) { ?>
  25. <?php if ($assign->status == 'active') { ?>
  26. <img src="<?php echo $this->template->htmlbase . 'images/tick.png' ?>" alt="Usuario activo" title="Usuario habilitado" />
  27. <?php } else { ?>
  28. <img src="<?php echo $this->template->htmlbase . 'images/cross.png' ?>" alt="Usuario inactivo" title="Usuario deshabilitado" />
  29. <?php } ?>
  30. <?php } ?>
  31. <?php if ($this->subject->amModerator()) { ?>
  32. <?php if ($assign->status == 'active') { ?>
  33. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $teacher->url), 'subjects_subject_assign_member_lock') ?>"><img src="<?php echo $this->template->htmlbase . 'images/lock.png' ?>" alt="Deshabilitar" title="Deshabilitar" /></a>
  34. <?php } else { ?>
  35. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $teacher->url), 'subjects_subject_assign_member_unlock') ?>"><img src="<?php echo $this->template->htmlbase . 'images/lock_open.png' ?>" alt="Habilitar" title="Habilitar" /></a>
  36. <?php } ?>
  37. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $teacher->url), 'subjects_subject_assign_member_delete') ?>"><img src="<?php echo $this->template->htmlbase . 'images/delete.png' ?>" alt="Retirar" title="Retirar" /></a>
  38. <?php } ?>
  39. <p><span class="bold">Miembro desde: </span></p>
  40. <p><?php echo $this->timestamp($assign->tsregister) ?></p>
  41. </div>
  42. </div>
  43. <?php } ?>
  44. <?php } else { ?>
  45. <p>No se han registrado docentes para esta materia.</p>
  46. <?php } ?>
  47. <div class="clear"></div>
  48. <h2>Auxiliares</h2>
  49. <?php if (count($this->auxiliars) != 0) { ?>
  50. <?php foreach ($this->auxiliars as $auxiliar) { ?>
  51. <?php $assign = $this->subject->getAssignement($auxiliar); ?>
  52. <div class="member">
  53. <?php if ($this->subject->amModerator()) { ?>
  54. <input type="checkbox" name="members[]" value="<?php echo $auxiliar->ident ?>" />
  55. <?php } ?>
  56. <p><span class="title"><?php echo $auxiliar->getFullName() ?></span></p>
  57. <?php if ($this->acl('users', 'view')) { ?>
  58. <a href="<?php echo $this->url(array('user' => $auxiliar->url), 'users_user_view') ?>"><img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_small/' . $auxiliar->getAvatar() ?>" alt="<?php echo $auxiliar->getFullName() ?>" title="<?php echo $auxiliar->getFullName() ?>" /></a>
  59. <?php } else { ?>
  60. <img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_medium/' . $auxiliar->getAvatar() ?>" alt="<?php echo $auxiliar->getFullName() ?>" title="<?php echo $auxiliar->getFullName() ?>" />
  61. <?php } ?>
  62. <div class="body">
  63. <?php if ($this->subject->amModerator()) { ?>
  64. <?php if ($assign->status == 'active') { ?>
  65. <img src="<?php echo $this->template->htmlbase . 'images/tick.png' ?>" alt="Usuario activo" title="Usuario habilitado" />
  66. <?php } else { ?>
  67. <img src="<?php echo $this->template->htmlbase . 'images/cross.png' ?>" alt="Usuario inactivo" title="Usuario deshabilitado" />
  68. <?php } ?>
  69. <?php } ?>
  70. <?php if ($this->subject->amModerator()) { ?>
  71. <?php if ($assign->status == 'active') { ?>
  72. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $auxiliar->url), 'subjects_subject_assign_member_lock') ?>"><img src="<?php echo $this->template->htmlbase . 'images/lock.png' ?>" alt="Deshabilitar" title="Deshabilitar" /></a>
  73. <?php } else { ?>
  74. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $auxiliar->url), 'subjects_subject_assign_member_unlock') ?>"><img src="<?php echo $this->template->htmlbase . 'images/lock_open.png' ?>" alt="Habilitar" title="Habilitar" /></a>
  75. <?php } ?>
  76. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $auxiliar->url), 'subjects_subject_assign_member_delete') ?>"><img src="<?php echo $this->template->htmlbase . 'images/delete.png' ?>" alt="Retirar" title="Retirar" /></a>
  77. <?php } ?>
  78. <p><span class="bold">Miembro desde: </span></p>
  79. <p><?php echo $this->timestamp($assign->tsregister) ?></p>
  80. </div>
  81. </div>
  82. <?php } ?>
  83. <?php } else { ?>
  84. <p>No se han registrado auxiliares para esta materia.</p>
  85. <?php } ?>
  86. <div class="clear"></div>
  87. <h2>Estudiantes</h2>
  88. <?php if (count($this->students) != 0) { ?>
  89. <?php foreach ($this->students as $student) { ?>
  90. <?php $assign = $this->subject->getAssignement($student); ?>
  91. <div class="member">
  92. <?php if ($this->subject->amModerator()) { ?>
  93. <input type="checkbox" name="members[]" value="<?php echo $student->ident ?>" />
  94. <?php } ?>
  95. <p><span class="title"><?php echo $student->getFullName() ?></span></p>
  96. <?php if ($this->acl('users', 'view')) { ?>
  97. <a href="<?php echo $this->url(array('user' => $student->url), 'users_user_view') ?>"><img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_small/' . $student->getAvatar() ?>" alt="<?php echo $student->getFullName() ?>" title="<?php echo $student->getFullName() ?>" /></a>
  98. <?php } else { ?>
  99. <img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_medium/' . $student->getAvatar() ?>" alt="<?php echo $student->getFullName() ?>" title="<?php echo $student->getFullName() ?>" />
  100. <?php } ?>
  101. <div class="body">
  102. <?php if ($this->subject->amModerator()) { ?>
  103. <?php if ($assign->status == 'active') { ?>
  104. <img src="<?php echo $this->template->htmlbase . 'images/tick.png' ?>" alt="Usuario activo" title="Usuario habilitado" />
  105. <?php } else { ?>
  106. <img src="<?php echo $this->template->htmlbase . 'images/cross.png' ?>" alt="Usuario inactivo" title="Usuario deshabilitado" />
  107. <?php } ?>
  108. <?php } ?>
  109. <?php if ($this->subject->amModerator()) { ?>
  110. <?php if ($assign->status == 'active') { ?>
  111. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $student->url), 'subjects_subject_assign_member_lock') ?>"><img src="<?php echo $this->template->htmlbase . 'images/lock.png' ?>" alt="Deshabilitar" title="Deshabilitar" /></a>
  112. <?php } else { ?>
  113. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $student->url), 'subjects_subject_assign_member_unlock') ?>"><img src="<?php echo $this->template->htmlbase . 'images/lock_open.png' ?>" alt="Habilitar" title="Habilitar" /></a>
  114. <?php } ?>
  115. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $student->url), 'subjects_subject_assign_member_delete') ?>"><img src="<?php echo $this->template->htmlbase . 'images/delete.png' ?>" alt="Retirar" title="Retirar" /></a>
  116. <?php } ?>
  117. <p><span class="bold">Miembro desde: </span></p>
  118. <p><?php echo $this->timestamp($assign->tsregister) ?></p>
  119. </div>
  120. </div>
  121. <?php } ?>
  122. <?php } else { ?>
  123. <p>No se han registrado estudiantes para esta materia.</p>
  124. <?php } ?>
  125. <div class="clear"></div>
  126. <h2>Invitados</h2>
  127. <?php if (count($this->guests) != 0) { ?>
  128. <?php foreach ($this->guests as $guest) { ?>
  129. <?php $assign = $this->subject->getAssignement($guest); ?>
  130. <div class="member">
  131. <?php if ($this->subject->amModerator()) { ?>
  132. <input type="checkbox" name="members[]" value="<?php echo $guest->ident ?>" />
  133. <?php } ?>
  134. <p><span class="title"><?php echo $guest->getFullName() ?></span></p>
  135. <?php if ($this->acl('users', 'view')) { ?>
  136. <a href="<?php echo $this->url(array('user' => $guest->url), 'users_user_view') ?>"><img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_small/' . $guest->getAvatar() ?>" alt="<?php echo $guest->getFullName() ?>" title="<?php echo $guest->getFullName() ?>" /></a>
  137. <?php } else { ?>
  138. <img class="photo" src="<?php echo $this->config->resources->frontController->baseUrl . '/media/users/thumbnail_medium/' . $guest->getAvatar() ?>" alt="<?php echo $guest->getFullName() ?>" title="<?php echo $guest->getFullName() ?>" />
  139. <?php } ?>
  140. <div class="body">
  141. <?php if ($this->subject->amModerator()) { ?>
  142. <?php if ($assign->status == 'active') { ?>
  143. <img src="<?php echo $this->template->htmlbase . 'images/tick.png' ?>" alt="Usuario activo" title="Usuario habilitado" />
  144. <?php } else { ?>
  145. <img src="<?php echo $this->template->htmlbase . 'images/cross.png' ?>" alt="Usuario inactivo" title="Usuario deshabilitado" />
  146. <?php } ?>
  147. <?php } ?>
  148. <?php if ($this->subject->amModerator()) { ?>
  149. <?php if ($assign->status == 'active') { ?>
  150. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $guest->url), 'subjects_subject_assign_member_lock') ?>"><img src="<?php echo $this->template->htmlbase . 'images/lock.png' ?>" alt="Deshabilitar" title="Deshabilitar" /></a>
  151. <?php } else { ?>
  152. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $guest->url), 'subjects_subject_assign_member_unlock') ?>"><img src="<?php echo $this->template->htmlbase . 'images/lock_open.png' ?>" alt="Habilitar" title="Habilitar" /></a>
  153. <?php } ?>
  154. <a href="<?php echo $this->url(array('subject' => $this->subject->url, 'user' => $guest->url), 'subjects_subject_assign_member_delete') ?>"><img src="<?php echo $this->template->htmlbase . 'images/delete.png' ?>" alt="Retirar" title="Retirar" /></a>
  155. <?php } ?>
  156. <p><span class="bold">Miembro desde: </span></p>
  157. <p><?php echo $this->timestamp($assign->tsregister) ?></p>
  158. </div>
  159. </div>
  160. <?php } ?>
  161. <?php } else { ?>
  162. <p>No se han registrado visitantes para esta materia.</p>
  163. <?php } ?>
  164. <div class="clear"></div>
  165. </div>
  166. <div>
  167. <?php if ($this->subject->amModerator()) { ?><input type="button" name="new" value="Agregar" onclick="location.href='<?php echo $this->url(array('subject' => $this->subject->url), 'subjects_subject_assign_new') ?>'" /><input type="submit" name="unlock" value="Habilitar" /><input type="submit" name="lock" value="Deshabilitar" /><input type="submit" name="delete" value="Retirar" /><input type="button" name="import" value="Importar" onclick="location.href='<?php echo $this->url(array('subject' => $this->subject->url), 'subjects_subject_assign_import') ?>'" /><input type="button" name="export" value="Exportar" onclick="location.href='<?php echo $this->url(array('subject' => $this->subject->url), 'subjects_subject_assign_export') ?>'" /><?php } ?>
  168. </div>
  169. </form>