{% extends "templates/web.html" %}
{% block title %} {{ doc.name|e }} {% endblock %}
{% block breadcrumbs %}
<div class="page-breadcrumbs container" data-html-block="breadcrumbs">
	<ul class="breadcrumb">
		<li>
			<span class="fa fa-angle-left"></span>
			<a href="/projects?project={{ doc.project|e }}">{{ doc.project|e }}</a>
		</li>
	</ul>
</div>
{% endblock %}
{% block page_content %}
<div class="row">
	<div class=" col-sm-8 ">
		<h1> {{ doc.subject|e }} </h1>
    </div>
</div>

<div class="page-content-block">
	<form role="form" data-web-form="tasks">

		<input type="hidden" name="web_form" value="tasks">
		<input type="hidden" name="doctype" value="Task">
		<input type="hidden" name="name" value="{{ doc.name|e }}">

		<div class="row">
			<div class="col-sm-12" style="max-width: 500px;">
				<div class="form-group">
					<label for="project" class="control-label text-muted small">{{ _("Project") }}</label>
						<input type="text" class="form-control" name="project" readonly value= "{{ doc.project or ""|e }}">
				</div>

				<div class="form-group">
					<label for="subject" class="control-label text-muted small">{{ _("Subject") }}</label>
					<input type="text" class="form-control" name="subject" readonly value="{{ doc.subject or ""|e }}">
				</div>

				<div class="form-group">
					<label for="description" class="control-label text-muted small">{{ _("Details") }}</label>
					<textarea class="form-control" style="height: 200px;" name="description" readonly>{{ doc.description or ""|e }}</textarea>
				</div>

				<div class="form-group">
					<label for="priority" class="control-label text-muted small">{{ _("Priority") }}</label>
					<input type="text" class="form-control" name="priority" readonly value="{{ doc.priority or ""|e }}">
				</div>

				<div class="form-group">
					<label for="exp_start_date" class="control-label text-muted small">{{ _("Expected Start Date") }}</label>
					<input type="text" class="form-control hasDatepicker" name="exp_start_date" readonly value="{{ doc.exp_start_date or ""|e }}">
				</div>

				<div class="form-group">
					<label for="exp_end_date" class="control-label text-muted small">{{ _("Expected End Date") }}</label>
					<input type="text" class="form-control hasDatepicker" name="exp_end_date" readonly value="{{ doc.exp_end_date or ""|e }}">
				</div>

				<div class="form-group">
					<label for="status" class="control-label text-muted small">{{ _("Status") }}</label>
					<select class="form-control" name="status" id="status" data-label="Status" data-fieldtype="Select" disabled>
						<option value="{{ doc.status|e }}" selected="selected">{{ doc.status|e }}</option>
					</select>
				</div>
			</div>
		</div>
	</form>
</div>

<div class="comments">
	<h3>{{ _("Comments") }}</h3>
	<div class="no-comment">
		{% for comment in comments %}
			<p class="text-muted">{{comment.comment_email}}:
				{{comment.content|e}} {{ _("on") }} {{comment.creation.strftime('%Y-%m-%d')}}</p>
		{% endfor %}
	</div>
</div>

{% endblock %}
