<?php

class Cms_Admin_View extends View {

	public function render_email() {
		$html = <<<'BLOCK'
<div class="indented">
<h3 class="templateheader">{{page_title}}</h3>
<p>Please select from one of the current email templates</p>
<ul class="email-list list-provider">{{#each emails}}
<li><a href="{{link}}">{{value}}</a></li>
{{/each}}</ul>
<p style="color:#aaa;font-style:italic">Unlike normal CMS page templates, these email templates accept valid Handlebars commands.</p>
</div>

BLOCK;
		$this('admin_email')->html($html)->title('Email Templates');
	}

	public function admin_cmspages() {
		$html = <<<'BLOCK'
<div class="indented">
	<h3 class="templateheader">{{page_title}}</h3>
	<table class="display data-class">
	<thead>
	<tr><th>URI</th><th>Title</th><th>Template</th><th>Modified</th></tr>
	</thead>
	</table>
</div>

BLOCK;
		$this('admin_cmspages')->html($html)->title('CMS Contents');

	}

}