Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- </div>
- </form>
- <div class="tab-content">
- <div th:each="question : ${person.questions}">
- <table class="table table-bordered table-hover table-striped">
- <thead>
- <tr>
- <th><p>
- <b th:text="${question.title}" />
- </p></th>
- <th><a
- th:href="@{'/question/remove/' + ${question.getId()}}"
- class="btn btn-danger">Remove</a></th>
- <th>
- <button type="button" class="btn btn-primary btn-lg"
- data-toggle="modal" data-target="#myModal2">Add a
- comment!</button>
- <form id="comment" class="form-horizontal blogForm"
- th:action="@{'/newComment/' + ${question.getId()}}"
- th:object="${comment}" method="post">
- <div class="modal fade" id="myModal2" tabindex="-1"
- role="dialog" aria-labelledby="myModalLabel">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal"
- aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- <h4 class="modal-title" id="myModalLabel">Comment</h4>
- </div>
- <div class="modal-body">
- <input th:field="*{body}" name="body" class="form-control"
- type="text" value=""
- placeholder="Answer whatever you want!" />
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default"
- data-dismiss="modal">Close</button>
- <input type="submit" class="btn btn-default"
- value="Answer the question" />
- </div>
- </div>
- </div>
- </div>
- </form>
- </th>
- </tr>
- </thead>
- <tbody>
- <tr th:each="comment : ${question.comments}">
- <td><th:block th:text="${comment.body}"></th:block>
- <p>
- <small th:text="${comment.date} + ' ' + 'by' + ' ' + 'user' " />
- </p> <!-- Button trigger modal --></td>
- <td>xd</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
Add Comment
Please, Sign In to add comment