{% autoescape false %}
<header class="jumbotron subhead" id="overview">
	<h1><i class="{{ titleicon }}"></i>Address Books</h1>
	<p class="lead">Manage Address Books for<i class="{{ modelicon }}"></i><strong>{{ modellabel }}</strong>.</p>
	<p class="pull-left"><a href="{{ linkback }}" class="btn"><i class="icon-chevron-left"></i> Back to users list</a></p>
	<p class="pull-right"><a class="btn btn btn-inverse" href="{{ linknew }}"><i class="icon-white {{ addressbookicon }}"></i> + Add address book</a></p>
</header>

<table class="table table-bordered table-striped addressbooks">
	<thead>
		<tr>
			<th>Display name</th>
			<th>Contacts</th>
			<th>Description</th>
			<th class="no-border-left"></th>
		</tr>
	</thead>
	<tbody>
		{% for addressbook in addressbooks %}
		<tr>
			<td class="col-displayname"><i class="{{ addressbook.icon }}"></i> {{ addressbook.label|escape }}</td>
			<td class="col-contacts">{{ addressbook.contacts|escape }}</td>
			<td class="col-description">{{ addressbook.description|escape }}</td>
			<td class="col-actions no-border-left">
				<p class="pull-right">
					<nobr><span class="btn popover-hover" data-placement="bottom" data-toggle="popover" title="Setup info" data-content="<b>URI</b><br/><span class='copy-to-clipboard' onclick='copyToClipboard(this);'>{{ addressbook.davuri }}<i class='icon-file'></i></span><br><br><b>User name</b><br/><span class='copy-to-clipboard' onclick='copyToClipboard(this);'>{{ user.username|escape }}<i class='icon-file'></i></span><br><br><b>Password</b><br/><em>(hidden)</em>" data-html="true"><i class="icon-info-sign"></i></span></nobr>
					<nobr><a class="btn btn-primary" href="{{ addressbook.linkedit }}"><i class="icon-edit icon-white"></i> Edit</a></nobr>
					<nobr><a class="btn btn-danger" href="{{ addressbook.linkdelete }}"><i class="icon-remove icon-white"></i> Delete</a></nobr>
				</p>
			</td>
		</tr>
		{% endfor %}
	</tbody>
</table>

<a id='form'></a>
{{ messages }}
{{ form }}
{% endautoescape %}
