<template name="privateHistory">
	<section class="page-container page-list content-background-color">
		<header class="fixed-title content-background-color border-component-color">
			{{> burger}}
			<h2>
				<span class="room-title">{{_ "History"}}</span>
			</h2>
		</header>
		<div class="content">
			<form class="search-form" role="form">
				<div class="input-line search">
					<input type="text" id="history-filter" placeholder="{{_ "Search"}}" dir="auto">
					<i class="icon-search secondary-font-color"></i>
				</div>
			</form>
			<div class="results">
				{{{_ "Showing_results" history.length}}}
			</div>
			<div class="list">
				{{#each history.items}}
					<a href="{{path}}">
						<div class="info">
							<h3><i class="{{type}}"></i><span class="enter-room">{{name}}</span></h3>
							<ul>
								{{#with roomOf rid}}
									<li>{{_ "n_messages" msgs}}</li>
									<li>{{_ "since_creation" creation}}</li>
								{{/with}}
							</ul>
						</div>
						<div class="title">
							{{#with roomOf rid}}
								<strong>{{lastMessage}}</strong>
							{{/with}}
						</div>
					</a>
				{{/each}}
			</div>
			<div class="results">
				{{{_ "Showing_archived_results" archivedHistory.length}}}
			</div>
			<div class="list">
				{{#each archivedHistory.items}}
					<a href="{{path}}">
						<div class="info">
							<h3><i class="{{type}}"></i><span class="enter-room">{{name}}</span></h3>
							<ul>
								{{#with roomOf rid}}
									<li>{{_ "n_messages" msgs}}</li>
									<li>{{_ "since_creation" creation}}</li>
								{{/with}}
							</ul>
						</div>
						<div class="title">
							{{#with roomOf rid}}
								<strong>{{lastMessage}}</strong>
							{{/with}}
						</div>
					</a>
				{{/each}}
			</div>
		</div>
	</section>
</template>
