Guest User

Untitled

a guest
Mar 9th, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. </div>
  2. </form>
  3.  
  4.  
  5. <div class="tab-content">
  6. <div th:each="question : ${person.questions}">
  7.  
  8.  
  9. <table class="table table-bordered table-hover table-striped">
  10. <thead>
  11. <tr>
  12. <th><p>
  13. <b th:text="${question.title}" />
  14. </p></th>
  15. <th><a
  16. th:href="@{'/question/remove/' + ${question.getId()}}"
  17. class="btn btn-danger">Remove</a></th>
  18. <th>
  19. <button type="button" class="btn btn-primary btn-lg"
  20. data-toggle="modal" data-target="#myModal2">Add a
  21. comment!</button>
  22.  
  23. <form id="comment" class="form-horizontal blogForm"
  24. th:action="@{'/newComment/' + ${question.getId()}}"
  25. th:object="${comment}" method="post">
  26. <div class="modal fade" id="myModal2" tabindex="-1"
  27. role="dialog" aria-labelledby="myModalLabel">
  28. <div class="modal-dialog" role="document">
  29. <div class="modal-content">
  30. <div class="modal-header">
  31. <button type="button" class="close" data-dismiss="modal"
  32. aria-label="Close">
  33. <span aria-hidden="true">&times;</span>
  34. </button>
  35. <h4 class="modal-title" id="myModalLabel">Comment</h4>
  36. </div>
  37. <div class="modal-body">
  38. <input th:field="*{body}" name="body" class="form-control"
  39. type="text" value=""
  40. placeholder="Answer whatever you want!" />
  41. </div>
  42. <div class="modal-footer">
  43. <button type="button" class="btn btn-default"
  44. data-dismiss="modal">Close</button>
  45. <input type="submit" class="btn btn-default"
  46. value="Answer the question" />
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </form>
  52. </th>
  53.  
  54. </tr>
  55.  
  56. </thead>
  57. <tbody>
  58. <tr th:each="comment : ${question.comments}">
  59. <td><th:block th:text="${comment.body}"></th:block>
  60. <p>
  61. <small th:text="${comment.date} + ' ' + 'by' + ' ' + 'user' " />
  62. </p> <!-- Button trigger modal --></td>
  63. <td>xd</td>
  64.  
  65. </tr>
  66. </tbody>
  67. </table>
  68. </div>
  69. </div>
Add Comment
Please, Sign In to add comment