mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-17 18:45:20 +00:00
[ui] listviews
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
{
|
||||
"fieldname": "activity_type",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Activity Type",
|
||||
"permlevel": 0,
|
||||
"reqd": 1
|
||||
@@ -18,7 +18,7 @@
|
||||
"icon": "icon-flag",
|
||||
"idx": 1,
|
||||
"in_dialog": 0,
|
||||
"modified": "2014-05-27 03:49:07.219341",
|
||||
"modified": "2015-01-07 15:12:20.500625",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Activity Type",
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
{
|
||||
"fieldname": "priority",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 0,
|
||||
"label": "Priority",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "priority",
|
||||
@@ -163,7 +164,7 @@
|
||||
{
|
||||
"fieldname": "percent_complete",
|
||||
"fieldtype": "Percent",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "% Tasks Completed",
|
||||
"permlevel": 0,
|
||||
"read_only": 1
|
||||
@@ -272,7 +273,7 @@
|
||||
"icon": "icon-puzzle-piece",
|
||||
"idx": 1,
|
||||
"max_attachments": 4,
|
||||
"modified": "2014-12-24 16:36:50.539666",
|
||||
"modified": "2015-01-07 15:03:59.981848",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Project",
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-10">
|
||||
<div class="text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
<span class="label label-{%= frappe.utils.guess_style(doc.status) %} filterable"
|
||||
data-filter="status,=,{%= doc.status %}">
|
||||
{%= doc.status %}
|
||||
</span>
|
||||
<span class="label label-{%= frappe.utils.guess_style(doc.priority) %} filterable"
|
||||
data-filter="priority,=,{%= doc.priority %}">
|
||||
{%= doc.priority %}
|
||||
</span>
|
||||
{% if(doc.status==="Open" && doc.completion_date
|
||||
&& frappe.datetime.get_diff(doc.completion_date) <= 0) { %}
|
||||
<span class="label label-danger filterable"
|
||||
data-filter="completion_date,>=,Today"
|
||||
title="{%= doc.get_formatted("completion_date") %}">
|
||||
{%= __("Overdue") %}
|
||||
</span>
|
||||
{% } else if(doc.completion_date) { %}
|
||||
<span class="label label-default filterable"
|
||||
data-filter="completion_date,=,{%= doc.completion_date %}"
|
||||
title="{%= __("Due Date") %}">
|
||||
{%= doc.get_formatted("completion_date") %}
|
||||
</span>
|
||||
{% } %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-1 text-right">
|
||||
{% var completed = doc.percent_complete, title = __("% Tasks Completed") %}
|
||||
{% include "templates/form_grid/includes/progress.html" %}
|
||||
</div>
|
||||
<div class="col-xs-1 text-right">
|
||||
{% var completed = doc.percent_milestones_completed,
|
||||
title = __("% Milestones Achieved") %}
|
||||
{% include "templates/form_grid/includes/progress.html" %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,5 +1,12 @@
|
||||
frappe.listview_settings['Project'] = {
|
||||
add_fields: ["status", "priority", "is_active", "percent_complete",
|
||||
"percent_milestones_completed", "completion_date"],
|
||||
filters:[["status","=", "Open"]]
|
||||
filters:[["status","=", "Open"]],
|
||||
get_indicator: function(doc) {
|
||||
if(doc.status=="Open" && doc.percent_complete) {
|
||||
return [__("{0}% Complete", [doc.percent_complete]), "orange", "percent_complete,>,0|status,=,Open"];
|
||||
} else {
|
||||
return [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"allow_import": 1,
|
||||
"allow_import": 1,
|
||||
"autoname": "TASK.#####",
|
||||
"creation": "2013-01-29 19:25:50",
|
||||
"docstatus": 0,
|
||||
@@ -20,7 +20,7 @@
|
||||
"fieldname": "subject",
|
||||
"fieldtype": "Data",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Subject",
|
||||
"oldfieldname": "subject",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -55,16 +55,6 @@
|
||||
"print_width": "50%",
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"label": "Project",
|
||||
"oldfieldname": "project",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Project",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
@@ -76,6 +66,16 @@
|
||||
"options": "Open\nWorking\nPending Review\nClosed\nCancelled",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"label": "Project",
|
||||
"oldfieldname": "project",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Project",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "priority",
|
||||
"fieldtype": "Select",
|
||||
@@ -217,7 +217,7 @@
|
||||
"icon": "icon-check",
|
||||
"idx": 1,
|
||||
"max_attachments": 5,
|
||||
"modified": "2014-05-27 03:49:20.708319",
|
||||
"modified": "2015-01-07 14:57:22.370410",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Task",
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-12">
|
||||
<div class="text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
{% if(doc.project) { %}
|
||||
<span class="filterable" style="margin-right: 8px;"
|
||||
data-filter="project,=,{%= doc.project %}">
|
||||
{%= doc.project %}</span>
|
||||
{% } %}
|
||||
<span class="label label-{%= frappe.utils.guess_style(doc.status) %} filterable"
|
||||
data-filter="status,=,{%= doc.status %}">
|
||||
{%= doc.status %}
|
||||
</span>
|
||||
<span class="label label-{%= frappe.utils.guess_style(doc.priority) %} filterable"
|
||||
data-filter="priority,=,{%= doc.priority %}">
|
||||
{%= doc.priority %}
|
||||
</span>
|
||||
{% if(doc.status==="Open" && doc.exp_end_date
|
||||
&& frappe.datetime.get_diff(doc.exp_end_date) <= 0) { %}
|
||||
<span class="label label-danger filterable"
|
||||
data-filter="exp_end_date,>=,Today"
|
||||
title="{%= doc.get_formatted("exp_end_date") %}">
|
||||
{%= __("Overdue") %}
|
||||
</span>
|
||||
{% } else if(doc.exp_end_date) { %}
|
||||
<span class="label label-default filterable"
|
||||
data-filter="exp_end_date,=,{%= doc.exp_end_date %}"
|
||||
title="{%= __("Due Date") %}">
|
||||
{%= doc.get_formatted("exp_end_date") %}
|
||||
</span>
|
||||
{% } %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,7 +28,7 @@
|
||||
{
|
||||
"fieldname": "from_time",
|
||||
"fieldtype": "Datetime",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "From Time",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
@@ -37,7 +37,7 @@
|
||||
{
|
||||
"fieldname": "to_time",
|
||||
"fieldtype": "Datetime",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "To Time",
|
||||
"permlevel": 0,
|
||||
"read_only": 0,
|
||||
@@ -60,7 +60,7 @@
|
||||
{
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Status",
|
||||
"options": "Draft\nSubmitted\nBatched for Billing\nBilled\nCancelled",
|
||||
"permlevel": 0,
|
||||
@@ -71,7 +71,7 @@
|
||||
"depends_on": "eval:doc.time_log_for != 'Manufacturing'",
|
||||
"fieldname": "activity_type",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Activity Type",
|
||||
"options": "Activity Type",
|
||||
"permlevel": 0,
|
||||
@@ -126,7 +126,7 @@
|
||||
{
|
||||
"fieldname": "billable",
|
||||
"fieldtype": "Check",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Billable",
|
||||
"permlevel": 0,
|
||||
"read_only": 0
|
||||
@@ -199,7 +199,7 @@
|
||||
"icon": "icon-time",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2014-12-22 15:22:00.664972",
|
||||
"modified": "2015-01-07 15:11:45.194002",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Time Log",
|
||||
@@ -233,5 +233,6 @@
|
||||
"submit": 1,
|
||||
"write": 1
|
||||
}
|
||||
]
|
||||
],
|
||||
"title_field": "activity_type"
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-12">
|
||||
<div class="text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
{% if(doc.billable) { %}
|
||||
<span style="margin-right: 8px;"
|
||||
title="{%= __("Billable") %}" class="filterable"
|
||||
data-filter="billable,=,Yes">
|
||||
<i class="icon-money text-muted"></i>
|
||||
</span>
|
||||
{% } %}
|
||||
|
||||
{% if(doc.time_log_for == 'Manufacturing') { %}
|
||||
<span style="margin-right: 8px;"
|
||||
title="{%= __("Manufacturing") %}" class="filterable"
|
||||
data-filter="time_log_for,=,Manufacturing">
|
||||
<i class="icon-cogs text-muted"></i>
|
||||
</span>
|
||||
{% } %}
|
||||
|
||||
{% if(doc.activity_type) { %}
|
||||
<span class="label label-info filterable" style="margin-right: 8px;"
|
||||
data-filter="activity_type,=,{%= doc.activity_type %}">
|
||||
{%= doc.activity_type %}</span>
|
||||
{% } %}
|
||||
|
||||
{% if(doc.project) { %}
|
||||
<span class="filterable" style="margin-right: 8px;"
|
||||
data-filter="project,=,{%= doc.project %}">
|
||||
{%= doc.project %}</span>
|
||||
{% } %}
|
||||
|
||||
<span style="margin-right: 8px;" class="text-muted">
|
||||
({%= doc.hours + " " + __("hours") %})
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user