2016-03-16 12:31:22 +00:00
|
|
|
{% extends "templates/web.html" %}
|
|
|
|
{% block title %} {{ doc.name }} {% endblock %}
|
|
|
|
{% block breadcrumbs %}
|
2016-06-23 12:55:50 +00:00
|
|
|
<div class="page-breadcrumbs" data-html-block="breadcrumbs">
|
2016-03-16 12:31:22 +00:00
|
|
|
<ul class="breadcrumb">
|
|
|
|
<li>
|
2016-12-05 09:32:24 +00:00
|
|
|
<span class="fa fa-angle-left"></span>
|
2016-03-16 12:31:22 +00:00
|
|
|
<a href="/projects?project={{ doc.project }}">{{ doc.project }}</a>
|
2016-06-23 12:55:50 +00:00
|
|
|
</li>
|
2016-03-16 12:31:22 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block page_content %}
|
2016-06-23 12:55:50 +00:00
|
|
|
<div class="row">
|
2016-03-16 12:31:22 +00:00
|
|
|
<div class=" col-sm-8 ">
|
|
|
|
<h1> {{ doc.subject }} </h1>
|
|
|
|
</div>
|
2016-06-23 12:55:50 +00:00
|
|
|
|
2016-03-16 12:31:22 +00:00
|
|
|
<div class="col-sm-4">
|
2016-06-23 12:55:50 +00:00
|
|
|
<div class="page-header-actions-block" data-html-block="header-actions">
|
2016-03-16 12:31:22 +00:00
|
|
|
<button type="submit" class="btn btn-primary btn-sm btn-form-submit">
|
2017-05-17 14:12:04 +00:00
|
|
|
{{ __("Update") }}</button>
|
2019-03-19 06:18:32 +00:00
|
|
|
<a href="tasks" class="btn btn-light btn-sm">
|
2017-05-17 14:12:04 +00:00
|
|
|
{{ __("Cancel") }}</a>
|
2016-03-16 12:31:22 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="page-content-block">
|
|
|
|
<form role="form" data-web-form="tasks">
|
2016-06-23 12:55:50 +00:00
|
|
|
|
2016-03-16 12:31:22 +00:00
|
|
|
<input type="hidden" name="web_form" value="tasks">
|
|
|
|
<input type="hidden" name="doctype" value="Task">
|
|
|
|
<input type="hidden" name="name" value="TASK00056">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12" style="max-width: 500px;">
|
2016-06-23 12:55:50 +00:00
|
|
|
<div class="form-group">
|
2017-05-17 14:12:04 +00:00
|
|
|
<label for="project" class="control-label text-muted small">{{ __("Project") }}</label>
|
2016-06-23 12:55:50 +00:00
|
|
|
<input type="text" class="form-control" name="project" readonly value= "{{ doc.project }}">
|
2016-03-16 12:31:22 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-05-17 14:12:04 +00:00
|
|
|
<label for="subject" class="control-label text-muted small">{{ __("Subject") }}</label>
|
2016-03-16 12:31:22 +00:00
|
|
|
<input type="text" class="form-control" name="subject" readonly value="{{ doc.subject }}">
|
|
|
|
</div>
|
2016-06-23 12:55:50 +00:00
|
|
|
|
2016-03-16 12:31:22 +00:00
|
|
|
<div class="form-group">
|
2017-05-17 14:12:04 +00:00
|
|
|
<label for="description" class="control-label text-muted small">{{ __("Details") }}</label>
|
2016-03-16 12:31:22 +00:00
|
|
|
<textarea class="form-control" style="height: 200px;" name="description">{{ doc.description }}</textarea>
|
2016-06-23 12:55:50 +00:00
|
|
|
</div>
|
|
|
|
|
2016-03-16 12:31:22 +00:00
|
|
|
<div class="form-group">
|
2017-05-17 14:12:04 +00:00
|
|
|
<label for="priority" class="control-label text-muted small">{{ __("Priority") }}</label>
|
2016-03-16 12:31:22 +00:00
|
|
|
<input type="text" class="form-control" name="priority" readonly value="{{ doc.priority }}">
|
|
|
|
</div>
|
2016-06-23 12:55:50 +00:00
|
|
|
|
2016-03-16 12:31:22 +00:00
|
|
|
<div class="form-group">
|
2017-05-17 14:12:04 +00:00
|
|
|
<label for="exp_start_date" class="control-label text-muted small">{{ __("Expected Start Date") }}</label>
|
2016-03-16 12:31:22 +00:00
|
|
|
<input type="text" class="form-control hasDatepicker" name="exp_start_date" readonly value="{{ doc.exp_start_date }}">
|
|
|
|
</div>
|
2016-06-23 12:55:50 +00:00
|
|
|
|
2016-03-16 12:31:22 +00:00
|
|
|
<div class="form-group">
|
2017-05-17 14:12:04 +00:00
|
|
|
<label for="exp_end_date" class="control-label text-muted small">{{ __("Expected End Date") }}</label>
|
2016-03-16 12:31:22 +00:00
|
|
|
<input type="text" class="form-control hasDatepicker" name="exp_end_date" readonly value="{{ doc.exp_end_date }}">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
2017-05-17 14:12:04 +00:00
|
|
|
<label for="status" class="control-label text-muted small">{{ __("Status") }}</label>
|
2016-03-16 12:31:22 +00:00
|
|
|
<select class="form-control" name="status" id="status" data-label="Status" data-fieldtype="Select">
|
|
|
|
<option value="Open" selected="selected">
|
2017-05-17 14:12:04 +00:00
|
|
|
{{ __("Open") }}</option><option value="Working">
|
|
|
|
{{ __("Working") }}</option><option value="Pending Review">
|
|
|
|
{{ __("Pending Review") }}</option><option value="Overdue">
|
|
|
|
{{ __("Overdue") }}</option><option value="Closed">
|
|
|
|
{{ __("Closed") }}</option><option value="Cancelled">
|
|
|
|
{{ __("Cancelled") }}</option>
|
2016-03-16 12:31:22 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-06-23 12:55:50 +00:00
|
|
|
</div>
|
2016-03-16 12:31:22 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="comments">
|
2017-05-17 14:12:04 +00:00
|
|
|
<h3>{{ __("Comments") }}</h3>
|
2016-03-16 12:31:22 +00:00
|
|
|
<div class="no-comment">
|
|
|
|
{% for comment in comments %}
|
2017-01-21 11:27:24 +00:00
|
|
|
<p class="text-muted">{{comment.sender_full_name}}:
|
2017-05-17 14:12:04 +00:00
|
|
|
{{comment.subject}} {{ __("on") }} {{comment.creation.strftime('%Y-%m-%d')}}</p>
|
2016-03-16 12:31:22 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
<div class="comment-form-wrapper">
|
2019-03-19 06:18:32 +00:00
|
|
|
<a class="add-comment btn btn-light btn-sm">{{ __("Add Comment") }}</a>
|
2016-03-16 12:31:22 +00:00
|
|
|
<div style="display: none;" id="comment-form">
|
2017-05-17 14:12:04 +00:00
|
|
|
<p>{{ __("Add Comment") }}</p>
|
2016-06-23 12:55:50 +00:00
|
|
|
<form>
|
2016-03-16 12:31:22 +00:00
|
|
|
<fieldset>
|
|
|
|
<textarea class="form-control" name="comment" rows="5" placeholder="Comment"></textarea>
|
|
|
|
<p>
|
2017-05-17 14:12:04 +00:00
|
|
|
<button class="btn btn-primary btn-sm" id="submit-comment">{{ __("Submit") }}</button>
|
2016-03-16 12:31:22 +00:00
|
|
|
</p>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
frappe.ready(function() {
|
|
|
|
var n_comments = $(".comment-row").length;
|
|
|
|
$(".add-comment").click(function() {
|
|
|
|
$(this).toggle(false);
|
|
|
|
$("#comment-form").toggle();
|
|
|
|
$("#comment-form textarea").val("");
|
|
|
|
})
|
|
|
|
$("#submit-comment").click(function() {
|
|
|
|
var args = {
|
|
|
|
comment_by_fullname: "test",
|
|
|
|
comment_by: "admin@localhost.com",
|
|
|
|
comment: $("[name='comment']").val(),
|
|
|
|
reference_doctype: "Task",
|
|
|
|
reference_name: "TASK00069",
|
|
|
|
comment_type: "Comment",
|
2016-06-23 12:55:50 +00:00
|
|
|
route: "tasks",
|
2016-03-16 12:31:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
frappe.call({
|
|
|
|
btn: this,
|
|
|
|
type: "POST",
|
|
|
|
method: "frappe.templates.includes.comments.comments.add_comment",
|
|
|
|
args: args,
|
|
|
|
callback: function(r) {
|
|
|
|
if(r.exc) {
|
|
|
|
if(r._server_messages)
|
|
|
|
frappe.msgprint(r._server_messages);
|
|
|
|
} else {
|
|
|
|
$(r.message).appendTo("#comment-list");
|
|
|
|
$(".no-comment, .add-comment").toggle(false);
|
|
|
|
$("#comment-form")
|
|
|
|
.replaceWith('<div class="text-muted">Thank you for your comment!</div>')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
return false;
|
|
|
|
})
|
|
|
|
});
|
|
|
|
</script>
|
2016-06-23 12:55:50 +00:00
|
|
|
|
2016-03-16 12:31:22 +00:00
|
|
|
{% endblock %}
|