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 {
|
||||
margin-top:10px;
|
||||
margin-top:14px;
|
||||
background: #fff;
|
||||
color: #737881;
|
||||
display: block;
|
||||
|
@ -1 +1,2 @@
|
||||
{% macro back_link(doc) %}&back-to=/projects?project={{ doc.name }}|{{ doc.project_name }}{% endmacro %}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class='issue'>
|
||||
<div class='row project-item'>
|
||||
<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" }}">
|
||||
{% if issue.status == "Closed" %}
|
||||
{{ issue.subject }} resolved {{ frappe.utils.pretty_date(issue.resolution_date) }}
|
||||
@ -22,11 +22,6 @@
|
||||
<span class="avatar avatar-small avatar-empty"></span>
|
||||
{% endif %}
|
||||
</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>
|
||||
|
@ -21,11 +21,6 @@
|
||||
<span class="avatar avatar-small avatar-empty"></span>
|
||||
{% endif %}
|
||||
</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>
|
||||
|
@ -43,6 +43,7 @@
|
||||
{% if doc.timelines|length > 9 %}
|
||||
<p><a class='more-timelines small underline'>{{ _("More") }}</a><p>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div class='padding'></div>
|
||||
@ -51,47 +52,48 @@
|
||||
|
||||
{% if doc.tasks %}
|
||||
<div class='project-tasks-section'>
|
||||
<div>
|
||||
<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-closed-tasks"><span class="indicator green"></span>Closed</button>
|
||||
</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'>
|
||||
{% include "erpnext/templates/includes/projects/project_tasks.html" %}
|
||||
</div>
|
||||
|
||||
{% if doc.tasks|length > 9 %}
|
||||
<p><a id= 'more-tasks' class='more-tasks small underline'>{{ _("More") }}</a><p>
|
||||
{% endif %}
|
||||
<p><a id= 'more-tasks' style='display: none;' class='more-tasks small underline'>{{ _("More") }}</a><p>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-muted">No tasks</p>
|
||||
{% endif %}
|
||||
|
||||
<p><a href='/tasks?new=1&project={{ doc.project_name }}{{ back_link(doc) }}'>Add a new task</a></p>
|
||||
|
||||
<div class='padding'></div>
|
||||
<h3>{{ _("Issues") }}</h3>
|
||||
|
||||
{% if doc.issues %}
|
||||
<div class='project-issues-section'>
|
||||
<div>
|
||||
<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-closed-issues"><span class="indicator green"></span>Closed</button>
|
||||
</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'>
|
||||
{% include "erpnext/templates/includes/projects/project_issues.html" %}
|
||||
</div>
|
||||
|
||||
{% if doc.issues|length > 9 %}
|
||||
<p><a id='more-issues' class='more-issues small underline'>{{ _("More") }}</a><p>
|
||||
{% endif %}
|
||||
<p><a id='more-issues' style='display: none;' class='more-issues small underline'>{{ _("More") }}</a><p>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-muted">No Issues</p>
|
||||
{% endif %}
|
||||
|
||||
<p> <a href='/issues?new=1&project={{ doc.project_name }}{{ back_link(doc) }}'>Add a new issue</a></p>
|
||||
|
||||
<div class='padding'></div>
|
||||
|
||||
<h3>{{ _("Time Logs") }}</h3>
|
||||
|
@ -59,8 +59,13 @@ frappe.ready(function() {
|
||||
},
|
||||
dataType: "json",
|
||||
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');
|
||||
$('.btn-'+ item_status +'-'+ item).addClass( "bold" );
|
||||
$(".more-"+ item).toggle(true);
|
||||
@ -72,7 +77,7 @@ frappe.ready(function() {
|
||||
var more_items = function(item, 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';
|
||||
}
|
||||
$.ajax({
|
||||
@ -87,6 +92,7 @@ frappe.ready(function() {
|
||||
},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
|
||||
$(data.message).appendTo('.project-'+ item);
|
||||
if(typeof data.message == 'undefined') {
|
||||
$(".more-"+ item).toggle(false);
|
||||
|
@ -70,7 +70,7 @@ def get_tasks(project, start=0, search=None, item_status=None):
|
||||
if search:
|
||||
filters["subject"] = ("like", "%{0}%".format(search))
|
||||
if item_status:
|
||||
filters = {"status": item_status}
|
||||
filters["status"] = item_status
|
||||
tasks = frappe.get_all("Task", filters=filters,
|
||||
fields=["name", "subject", "status", "exp_start_date", "exp_end_date", "priority"],
|
||||
limit_start=start, limit_page_length=10)
|
||||
@ -97,7 +97,7 @@ def get_issues(project, start=0, search=None, item_status=None):
|
||||
if search:
|
||||
filters["subject"] = ("like", "%{0}%".format(search))
|
||||
if item_status:
|
||||
filters = {"status": item_status}
|
||||
filters["status"] = item_status
|
||||
issues = frappe.get_all("Issue", filters=filters,
|
||||
fields=["name", "subject", "status", "opening_date", "resolution_date", "resolution_details"],
|
||||
order_by='modified desc',
|
||||
|
Loading…
Reference in New Issue
Block a user