/admin.html

https://bitbucket.org/gorkalauzirika/nodequiz · HTML · 120 lines · 117 code · 3 blank · 0 comment · 0 complexity · dc26721e5bc5d2b4a1918fcc2544049f MD5 · raw file

  1. <!DOCTYPE html>
  2. <html class="no-js">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <title></title>
  7. <meta name="description" content="">
  8. <meta name="viewport" content="width=device-width">
  9. <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
  10. <link rel="stylesheet" href="css/admin.css">
  11. </head>
  12. <body>
  13. <header>
  14. <nav class="navbar">
  15. <div class="navbar-inner">
  16. <a class="brand">nodeQuiz</a>
  17. <ul class="nav">
  18. <li><a id="show-list-question">Lista de preguntas</a></li>
  19. <li><a id="show-add-question">Nueva pregunta</a></li>
  20. </ul>
  21. </div>
  22. </nav>
  23. </header>
  24. <article>
  25. </article>
  26. </body>
  27. <script type="text/template" id="edit-question-template">
  28. <form id="edit-question" class="form-horizontal">
  29. <div class="control-group">
  30. <label class="control-label" for="question">Pregunta</label>
  31. <div class="controls">
  32. <textarea name="question" type="text"><%- question %></textarea>
  33. </div>
  34. </div>
  35. <div class="control-group">
  36. <label class="control-label" for="choice0">Opción 1</label>
  37. <div class="controls">
  38. <input name="choice0" value="<%- choices[0] %>" type="text">
  39. </div>
  40. </div>
  41. <div class="control-group">
  42. <label class="control-label" for="choice1">Opción 2</label>
  43. <div class="controls">
  44. <input name="choice1" value="<%- choices[1] %>" type="text">
  45. </div>
  46. </div>
  47. <div class="control-group">
  48. <label class="control-label" for="choice2">Opción 3</label>
  49. <div class="controls">
  50. <input name="choice2" value="<%- choices[2] %>" type="text">
  51. </div>
  52. </div>
  53. <div class="control-group">
  54. <label class="control-label" for="choice3">Opción 4</label>
  55. <div class="controls">
  56. <input name="choice3" value="<%- choices[3] %>" type="text">
  57. </div>
  58. </div>
  59. <div class="control-group">
  60. <label class="control-label" for="correct">Correcto</label>
  61. <div class="controls">
  62. <select name="correct">
  63. <option <%= correct == "0" ? "selected" : "" %> value=0>Opción 1</option>
  64. <option <%= correct == "1" ? "selected" : "" %> value=1>Opción 2</option>
  65. <option <%= correct == "2" ? "selected" : "" %> value=2>Opción 3</option>
  66. <option <%= correct == "3" ? "selected" : "" %> value=3>Opción 4</option>
  67. </select>
  68. </div>
  69. </div>
  70. <div class="control-group">
  71. <label class="control-label" for="category">Categoria</label>
  72. <div class="controls">
  73. <select name="category">
  74. <option value="others">Otros</option>
  75. <option <%= category == "sports" ? "selected" : "" %> value="sports">Deportes</option></select>
  76. </div>
  77. </div>
  78. </div>
  79. <button type="submit" class="btn pull-right">Enviar</button>
  80. </form>
  81. </script>
  82. <script type="text/template" id="question-list-template">
  83. <table class="table table-bordered">
  84. <thead>
  85. <th>Pregunta</th>
  86. <th class="hide-phone">Opción 1</th>
  87. <th class="hide-phone">Opción 2</th>
  88. <th class="hide-phone">Opción 3</th>
  89. <th class="hide-phone">Opción 4</th>
  90. <th class="hide-phone">Categoría</th>
  91. <th></th>
  92. </thead>
  93. <tbody></tbody>
  94. </script>
  95. <script type="text/template" id="list-item-template">
  96. <td><%- question %></td>
  97. <td class="hide-phone <%= correct == "0" ? 'success' : '' %>"><%- choices[0] %></td>
  98. <td class="hide-phone <%= correct == "1" ? 'success' : '' %>"><%- choices[1] %></td>
  99. <td class="hide-phone <%= correct == "2" ? 'success' : '' %>"><%- choices[2] %></td>
  100. <td class="hide-phone <%= correct == "3" ? 'success' : '' %>"><%- choices[3] %></td>
  101. <td class="hide-phone"><%- category %></td>
  102. <td class="actions">
  103. <ul class="show-edit-buttons">
  104. <li class="edit-action" data-id="<%- _id %>"><i class="icon icon-pencil"></i></li>
  105. <li class="delete-action" data-id="<%- _id %>"><i class="icon icon-trash"></i></li>
  106. </ul>
  107. <ul class="confirm-delete-buttons" style="display:none">
  108. <li class="confirm-delete-action" data-id="<%- _id %>">Eliminar</li>
  109. <li class="cancel-delete-action" data-id="<%- _id %>">Cancelar</li>
  110. </ul>
  111. </td>
  112. </script>
  113. <script src="//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.10/socket.io.min.js"></script>
  114. <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
  115. <script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js"></script>
  116. <script src="js/admin.debug.js"></script>
  117. </html>