<!--Application detail-->
<div class="inside-wrapper">
<h2 class="invisible"><%- application.get('name') %></h2>
<%
if(application.params.length > 0) {
var form = $('<div><form action="#" id="app-parameters-form">
		<h3>Parameters</h3>
		<table id="configuration-form-parameters" class="shortrightcolumn"></table>');

	_.each(application.params.toJSON(), function (p) {
		if ( p['user_editable'] ) {
			elements = Claun.forms['render' + p.type.firstUpper()](p);
			var	tds = [$('<th></th>').html(elements.label), $('<td></td>').html(elements.input), $('<td class="help"></td>').html(elements.help)],
				params = $('#configuration-form-parameters', form),
				tr = $('<tr></tr>');

			$(tds).each(function (i, t) {
				tr.append(t);
			});
			params.append(tr);
		}
	});
	form.append('<input type="hidden" id="application-id" value="' + _.escape(application.get('id')) + '">');	%>
	<%= form.html()%>
<% } %>
	<table class="buttons">
		<tr>
			<td><button id="applist-form-discard">Discard changes</button></td>
			<td><button id="applist-form-save">Save</button></td>
			<td><button id="applist-form-launch">Save & Launch</button></td>
		</tr>
	</table>
	<div id="application-info">
		<table>
			<tr>
				<td id="application-description">
					<h3>Description</h3>
					<p><%= application.get('description') ? application.get('description') : '' %></p>
				</td>
				<td id="application-images">
					<h3>Images</h3>
					<div id="cycle-wrap">
						<div class="cycle">
							<%
				if (application.get('images') != undefined && application.get('images').length) {
					_.each(application.get('images'), function (i) { %>
							<img src="<%-Claun.sign(i)%>" height="300">
							<% })
				} else { %>
							<img src="static/imgs/placeholder.png" height="300">
							<% } %>
						</div>
					</div>
				</td>
			</tr>
		</table>
	</div>
	<a class="invisible" id="appdetail-close" href="">Close</a>
</div>
