Minor fixes
This commit is contained in:
parent
cd66c5c972
commit
53ce94f9bd
@ -85,7 +85,7 @@ float: right;*/
|
|||||||
|
|
||||||
|
|
||||||
.timeline-centered .timeline-entry .timeline-entry-inner .timeline-icon {
|
.timeline-centered .timeline-entry .timeline-entry-inner .timeline-icon {
|
||||||
margin-top:10px;
|
margin-top:14px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
color: #737881;
|
color: #737881;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -1 +1,2 @@
|
|||||||
{% macro back_link(doc) %}&back-to=/projects?project={{ doc.name }}|{{ doc.project_name }}{% endmacro %}
|
{% macro back_link(doc) %}&back-to=/projects?project={{ doc.name }}|{{ doc.project_name }}{% endmacro %}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class='issue'>
|
<div class='issue'>
|
||||||
<div class='row project-item'>
|
<div class='row project-item'>
|
||||||
<div class='col-xs-9'>
|
<div class='col-xs-9'>
|
||||||
<a class="no-decoration" href="/issues?name={{ issue.name}}{{ back_link(doc) }}">
|
<a class="no-decoration" href="/issues-view?name={{ issue.name}}{{ back_link(doc) }}">
|
||||||
<span class="indicator {{ "red" if issue.status=="Open" else "green" }}">
|
<span class="indicator {{ "red" if issue.status=="Open" else "green" }}">
|
||||||
{% if issue.status == "Closed" %}
|
{% if issue.status == "Closed" %}
|
||||||
{{ issue.subject }} resolved {{ frappe.utils.pretty_date(issue.resolution_date) }}
|
{{ issue.subject }} resolved {{ frappe.utils.pretty_date(issue.resolution_date) }}
|
||||||
@ -22,11 +22,6 @@
|
|||||||
<span class="avatar avatar-small avatar-empty"></span>
|
<span class="avatar avatar-small avatar-empty"></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class='pull-right' style='padding-right:10px;'>
|
|
||||||
{% if issue.status != "Closed" %}
|
|
||||||
<span class="text-extra-muted "> <i class="octicon octicon-x issue-x" title="Close" id = "{{issue.name}}"></i> </span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,11 +21,6 @@
|
|||||||
<span class="avatar avatar-small avatar-empty"></span>
|
<span class="avatar avatar-small avatar-empty"></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class='pull-right' style='padding-right:10px;'>
|
|
||||||
{% if task.status != "Closed" %}
|
|
||||||
<span class="text-extra-muted "> <i class="octicon octicon-x task-x" title="Close" id = "{{task.name}}"></i> </span>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
{% if doc.timelines|length > 9 %}
|
{% if doc.timelines|length > 9 %}
|
||||||
<p><a class='more-timelines small underline'>{{ _("More") }}</a><p>
|
<p><a class='more-timelines small underline'>{{ _("More") }}</a><p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class='padding'></div>
|
<div class='padding'></div>
|
||||||
@ -51,47 +52,48 @@
|
|||||||
|
|
||||||
{% if doc.tasks %}
|
{% if doc.tasks %}
|
||||||
<div class='project-tasks-section'>
|
<div class='project-tasks-section'>
|
||||||
|
<div>
|
||||||
<div class="btn-group btn-toggle">
|
<div class="btn-group btn-toggle">
|
||||||
<button class="btn btn-link btn-open-tasks"><span class="indicator orange"></span>Open</button>
|
<button class="btn btn-link btn-open-tasks"><span class="indicator orange"></span>Open</button>
|
||||||
<button class="btn btn-link btn-closed-tasks"><span class="indicator green"></span>Closed</button>
|
<button class="btn btn-link btn-closed-tasks"><span class="indicator green"></span>Closed</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="pull-right">
|
||||||
|
<a class='small underline' href='/tasks?new=1&project={{ doc.project_name }}{{ back_link(doc) }}'>New task</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class='project-tasks'>
|
<div class='project-tasks'>
|
||||||
{% include "erpnext/templates/includes/projects/project_tasks.html" %}
|
{% include "erpnext/templates/includes/projects/project_tasks.html" %}
|
||||||
</div>
|
</div>
|
||||||
|
<p><a id= 'more-tasks' style='display: none;' class='more-tasks small underline'>{{ _("More") }}</a><p>
|
||||||
{% if doc.tasks|length > 9 %}
|
|
||||||
<p><a id= 'more-tasks' class='more-tasks small underline'>{{ _("More") }}</a><p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="text-muted">No tasks</p>
|
<p class="text-muted">No tasks</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<p><a href='/tasks?new=1&project={{ doc.project_name }}{{ back_link(doc) }}'>Add a new task</a></p>
|
|
||||||
|
|
||||||
<div class='padding'></div>
|
<div class='padding'></div>
|
||||||
<h3>{{ _("Issues") }}</h3>
|
<h3>{{ _("Issues") }}</h3>
|
||||||
|
|
||||||
{% if doc.issues %}
|
{% if doc.issues %}
|
||||||
<div class='project-issues-section'>
|
<div class='project-issues-section'>
|
||||||
|
<div>
|
||||||
<div class="btn-group btn-toggle">
|
<div class="btn-group btn-toggle">
|
||||||
<button class="btn btn-link btn-open-issues"><span class="indicator red"></span>Open</button>
|
<button class="btn btn-link btn-open-issues"><span class="indicator red"></span>Open</button>
|
||||||
<button class="btn btn-link btn-closed-issues"><span class="indicator green"></span>Closed</button>
|
<button class="btn btn-link btn-closed-issues"><span class="indicator green"></span>Closed</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="pull-right">
|
||||||
|
<a class='small underline' href='/issues?new=1&project={{ doc.project_name }}{{ back_link(doc) }}'>New issue</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class='project-issues'>
|
<div class='project-issues'>
|
||||||
{% include "erpnext/templates/includes/projects/project_issues.html" %}
|
{% include "erpnext/templates/includes/projects/project_issues.html" %}
|
||||||
</div>
|
</div>
|
||||||
|
<p><a id='more-issues' style='display: none;' class='more-issues small underline'>{{ _("More") }}</a><p>
|
||||||
{% if doc.issues|length > 9 %}
|
|
||||||
<p><a id='more-issues' class='more-issues small underline'>{{ _("More") }}</a><p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="text-muted">No Issues</p>
|
<p class="text-muted">No Issues</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<p> <a href='/issues?new=1&project={{ doc.project_name }}{{ back_link(doc) }}'>Add a new issue</a></p>
|
|
||||||
|
|
||||||
<div class='padding'></div>
|
<div class='padding'></div>
|
||||||
|
|
||||||
<h3>{{ _("Time Logs") }}</h3>
|
<h3>{{ _("Time Logs") }}</h3>
|
||||||
|
@ -59,8 +59,13 @@ frappe.ready(function() {
|
|||||||
},
|
},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$('.project-'+ item).html(data.message);
|
|
||||||
|
|
||||||
|
console.log(data.message);
|
||||||
|
if(typeof data.message == 'undefined') {
|
||||||
|
$('.project-'+ item).html("No "+ item_status +" "+ item);
|
||||||
|
$(".more-"+ item).toggle(false);
|
||||||
|
}
|
||||||
|
$('.project-'+ item).html(data.message);
|
||||||
$('.project-'+ item +'-section .btn-group .bold').removeClass('bold');
|
$('.project-'+ item +'-section .btn-group .bold').removeClass('bold');
|
||||||
$('.btn-'+ item_status +'-'+ item).addClass( "bold" );
|
$('.btn-'+ item_status +'-'+ item).addClass( "bold" );
|
||||||
$(".more-"+ item).toggle(true);
|
$(".more-"+ item).toggle(true);
|
||||||
@ -72,7 +77,7 @@ frappe.ready(function() {
|
|||||||
var more_items = function(item, item_status){
|
var more_items = function(item, item_status){
|
||||||
if(item_status)
|
if(item_status)
|
||||||
{
|
{
|
||||||
var item_status = $('.project-'+ item +'-section .btn-group .btn-primary').hasClass('btn-closed-'+ item)
|
var item_status = $('.project-'+ item +'-section .btn-group .bold').hasClass('btn-closed-'+ item)
|
||||||
? 'closed' : 'open';
|
? 'closed' : 'open';
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -87,6 +92,7 @@ frappe.ready(function() {
|
|||||||
},
|
},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
|
||||||
$(data.message).appendTo('.project-'+ item);
|
$(data.message).appendTo('.project-'+ item);
|
||||||
if(typeof data.message == 'undefined') {
|
if(typeof data.message == 'undefined') {
|
||||||
$(".more-"+ item).toggle(false);
|
$(".more-"+ item).toggle(false);
|
||||||
|
@ -70,7 +70,7 @@ def get_tasks(project, start=0, search=None, item_status=None):
|
|||||||
if search:
|
if search:
|
||||||
filters["subject"] = ("like", "%{0}%".format(search))
|
filters["subject"] = ("like", "%{0}%".format(search))
|
||||||
if item_status:
|
if item_status:
|
||||||
filters = {"status": item_status}
|
filters["status"] = item_status
|
||||||
tasks = frappe.get_all("Task", filters=filters,
|
tasks = frappe.get_all("Task", filters=filters,
|
||||||
fields=["name", "subject", "status", "exp_start_date", "exp_end_date", "priority"],
|
fields=["name", "subject", "status", "exp_start_date", "exp_end_date", "priority"],
|
||||||
limit_start=start, limit_page_length=10)
|
limit_start=start, limit_page_length=10)
|
||||||
@ -97,7 +97,7 @@ def get_issues(project, start=0, search=None, item_status=None):
|
|||||||
if search:
|
if search:
|
||||||
filters["subject"] = ("like", "%{0}%".format(search))
|
filters["subject"] = ("like", "%{0}%".format(search))
|
||||||
if item_status:
|
if item_status:
|
||||||
filters = {"status": item_status}
|
filters["status"] = item_status
|
||||||
issues = frappe.get_all("Issue", filters=filters,
|
issues = frappe.get_all("Issue", filters=filters,
|
||||||
fields=["name", "subject", "status", "opening_date", "resolution_date", "resolution_details"],
|
fields=["name", "subject", "status", "opening_date", "resolution_date", "resolution_details"],
|
||||||
order_by='modified desc',
|
order_by='modified desc',
|
||||||
|
Loading…
Reference in New Issue
Block a user