<commit_before>{{template "header.html" .}}
		<div class="row">
			<div class="col-md-10">
				<h1>{{.topic.Title}} <small>{{.topic.Description}}</small></h1>
			</div>
		</div>

		{{if .user}}
		<div class="row">
			<div class="col-md-10">
				<a href="/topic/{{.topic.Id}}/add">Add Post</a>
			</div>
		</div>
		{{end}}

		{{if .user}}
		<!-- inspired by http://stackoverflow.com/questions/8982295/confirm-delete-modal-dialog-with-twitter-bootstrap -->
		<div class="modal modal-lg fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="confirmDeleteModal" aria-hidden="true">
				<div class="modal-dialog">
						<div class="modal-content">
								<div class="modal-header">
										<h4>Delete post?</h4>
								</div>
								<div class="modal-body">
										<p>Are you sure you want to delete this post?</p>
								</div>
								<div class="modal-footer">
										<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
										<button id="delete" class="btn btn-danger danger"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
Delete</button>
								</div>
						</div>
				</div>
		</div>
		{{end}}

		{{range $p := .posts}}
		<div class="row">
			<div class="col-md-2">
				<div class="row">
					<div class="col-md-12">
						{{$p.User.Username}}
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<small>{{$p.Published.Format "1/2/06 03:04 pm" }}</small>
					</div>
				</div>
				{{if $.user}}
				{{if eq $.user.Id $p.User.Id}}
				<div class="row">
					<div class="col-md-12">
						<form action ="/topic/{{$.topic.Id}}/delete" method="POST">
							<input type="hidden" name="TopicId" value="{{$.topic.Id}}" />
							<input type="hidden" name="PostId" value="{{$p.Id}}" />
							<button class='btn btn-danger btn-xs' type="submit" name="removePost" value="delete"><span class="fa fa-times"></span> delete</button>
						</form>
					</div>
				</div>
				{{end}}
				{{end}}
			</div>
			<div class="col-md-10">
				<p class="post">{{$p.Text | markDown}}</p>
			</div>
		</div>
		{{end}}

		<div class="row">
			<div class="col-md-8">
				{{if .user}}
				<a href="/topic/{{.topic.Id}}/add">Add Post</a>
				{{end}}
			</div>
			<div class="col-md-4">
			<nav class="pageCount">
				<ul class="pagination">
					{{range .pageIndicies}}
					{{if eq $.currentPage .}}
					<li class="active"><a href="/topic/{{$.topic.Id}}/page/{{.}}">{{.}}</a></li>
					{{else}}
					<li><a href="/topic/{{$.topic.Id}}/page/{{.}}">{{.}}</a></li>
					{{end}}
					{{end}}
				</ul>
			</nav>
		</div>
	</div>
{{template "footer.html" .}}<commit_msg>remove page link if on current page<commit_after>{{template "header.html" .}}
		<div class="row">
			<div class="col-md-10">
				<h1>{{.topic.Title}} <small>{{.topic.Description}}</small></h1>
			</div>
		</div>

		{{if .user}}
		<div class="row">
			<div class="col-md-10">
				<a href="/topic/{{.topic.Id}}/add">Add Post</a>
			</div>
		</div>
		{{end}}

		{{if .user}}
		<!-- inspired by http://stackoverflow.com/questions/8982295/confirm-delete-modal-dialog-with-twitter-bootstrap -->
		<div class="modal modal-lg fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="confirmDeleteModal" aria-hidden="true">
				<div class="modal-dialog">
						<div class="modal-content">
								<div class="modal-header">
										<h4>Delete post?</h4>
								</div>
								<div class="modal-body">
										<p>Are you sure you want to delete this post?</p>
								</div>
								<div class="modal-footer">
										<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
										<button id="delete" class="btn btn-danger danger"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
Delete</button>
								</div>
						</div>
				</div>
		</div>
		{{end}}

		{{range $p := .posts}}
		<div class="row">
			<div class="col-md-2">
				<div class="row">
					<div class="col-md-12">
						{{$p.User.Username}}
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<small>{{$p.Published.Format "1/2/06 03:04 pm" }}</small>
					</div>
				</div>
				{{if $.user}}
				{{if eq $.user.Id $p.User.Id}}
				<div class="row">
					<div class="col-md-12">
						<form action ="/topic/{{$.topic.Id}}/delete" method="POST">
							<input type="hidden" name="TopicId" value="{{$.topic.Id}}" />
							<input type="hidden" name="PostId" value="{{$p.Id}}" />
							<button class='btn btn-danger btn-xs' type="submit" name="removePost" value="delete"><span class="fa fa-times"></span> delete</button>
						</form>
					</div>
				</div>
				{{end}}
				{{end}}
			</div>
			<div class="col-md-10">
				<p class="post">{{$p.Text | markDown}}</p>
			</div>
		</div>
		{{end}}

		<div class="row">
			<div class="col-md-8">
				{{if .user}}
				<a href="/topic/{{.topic.Id}}/add">Add Post</a>
				{{end}}
			</div>
			<div class="col-md-4">
			<nav class="pageCount">
				<ul class="pagination">
					{{range .pageIndicies}}
					{{if eq $.currentPage .}}
					<li class="active">{{.}}</li>
					{{else}}
					<li><a href="/topic/{{$.topic.Id}}/page/{{.}}">{{.}}</a></li>
					{{end}}
					{{end}}
				</ul>
			</nav>
		</div>
	</div>
{{template "footer.html" .}}
{'fraction_non_alphanumeric': 0.24768036356750617, 'fraction_numerical': 0.013255065328536262, 'mean_word_length': 2.683403068340307, 'pattern_counts': {'":': 0, '<': 175, '<?xml version=': 0, '>': 175, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5750313', 'n_tokens_mistral': 2547, 'n_tokens_neox': 1907, 'n_words': 375}