This repository has been archived on 2025-12-28. You can view files and clone it, but cannot push or open issues or pull requests.
inkletblot-forum-com-v1/views/topics.html

52 lines
2.8 KiB
HTML

<article ng-controller="topicsCtrlr" ng-init="getTopic()">
<section ng-show="!error" class="item stretch border">
<h3>{{topic.topicSubject}}</h3> <em><p>by {{topic.posts[0].user.userName}}</p></em> <br />
<table>
<tr>
<th colspan="2">{{topic.topicSubject}}</th>
</tr>
<tr ng-show="first.show">
<td colspan="2">
<p>{{first.text}}</p>
</td>
</tr>
<tr ng-repeat="post in topic.posts">
<td ng-show="state.user.userNo != post.user.userNo">{{post.postContent}}</td>
<td ng-show="state.user.userNo == post.user.userNo" ng-init="showEditor = false">{{post.postContent}} <span class="link right"
ng-click="deletePost(post.postNo)">[delete]</span> <span class="link right"
ng-click="showEditor = !showEditor">[edit]</span>
<div ng-show="showEditor">
<br />
<form name="editForm" id="editForm" ng-submit="editPost(post.postNo, edit.editContent)">
<textarea name="editContent" ng-model="edit.editContent" placeholder="{{post.postContent}}" required></textarea>
<br />
<input type="submit" name="editSubmit" ng-model="edit.submit" value="Edit" />
</form>
</div>
</td>
<td>{{post.user.userName}}<br />{{post.postDate}}</td>
</tr>
<tr>
<td colspan="2" ng-show="state.user.userNo == null">{{logged.text1}} <span class="link"
ng-click="setLogin()">{{logged.link1}}</span> {{logged.text2}} <span class="link"
ng-click="setSignup()">{{logged.link2}}</span> {{logged.text3}}
<p class="status" ng-show="status.show">{{status.text}}</p>
</td>
<td colspan="2" ng-show="state.user.userNo != null">
<form name="replyForm" id="replyForm" ng-submit="makeReply(topic.topicNo)">
<label for="replyCotnent">Reply:</label> <br />
<textarea name="replyContent" ng-model="reply.postContent" required></textarea> <br />
<input type="submit" name="replySubmit" ng-model="reply.submit" value="Reply" />
</form>
<p class="status" ng-show="status.show">{{status.text}}</p>
</td>
</tr>
</table>
</section>
<section ng-show="error" class="item left border">
<p>{{message.start}} <span class="link" ng-click="setForum()">{{message.link}}</span></p>
</section>
</article>