mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
[ui] listviews
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
"fieldname": "customer_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer Name",
|
||||
"permlevel": 0,
|
||||
"read_only": 1
|
||||
@@ -279,7 +279,7 @@
|
||||
"icon": "icon-file-text",
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"modified": "2015-01-01 14:30:02.998219",
|
||||
"modified": "2015-01-08 14:02:17.403671",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Support",
|
||||
"name": "Maintenance Visit",
|
||||
@@ -303,5 +303,6 @@
|
||||
],
|
||||
"search_fields": "status,maintenance_type,customer,customer_name,mntc_date,company,fiscal_year",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC"
|
||||
"sort_order": "DESC",
|
||||
"title_field": "customer_name"
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-12">
|
||||
<div class="text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
|
||||
<!-- sample text -->
|
||||
<span style="margin-right: 8px;" class="filterable"
|
||||
data-filter="customer,=,{%= doc.customer %}">
|
||||
{%= doc.customer_name %}</span>
|
||||
|
||||
<!-- sample label -->
|
||||
{% var style = {
|
||||
"Scheduled": "default",
|
||||
"Unscheduled": "default",
|
||||
"Breakdown": "danger"
|
||||
}[doc.maintenance_type] %}
|
||||
<span class="label
|
||||
label-{%= style %} filterable"
|
||||
data-filter="maintenance_type,=,{%= doc.maintenance_type %}">
|
||||
{%= doc.maintenance_type %}
|
||||
</span>
|
||||
{% var style = doc.completion_status==="Partially Completed" ? "warning" : "success" %}
|
||||
<span class="label
|
||||
label-{%= style %} filterable"
|
||||
data-filter="completion_status,=,{%= doc.completion_status %}">
|
||||
{%= doc.completion_status %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- sample graph -->
|
||||
<div class="col-xs-1 text-right">
|
||||
{% var completed = doc.completed, title = __("Completed") %}
|
||||
{% include "templates/form_grid/includes/progress.html" %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,3 +1,11 @@
|
||||
frappe.listview_settings['Maintenance Visit'] = {
|
||||
add_fields: ["customer", "customer_name", "completion_status", "maintenance_type"],
|
||||
get_indicator: function(doc) {
|
||||
var s = doc.completion_status || "Pending";
|
||||
return [__(s), {
|
||||
"Pending": "blue",
|
||||
"Partially Completed": "orange",
|
||||
"Fully Completed": "green"
|
||||
}[s], "completion_status,=," + doc.completion_status];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
{
|
||||
"fieldname": "subject",
|
||||
"fieldtype": "Small Text",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Subject",
|
||||
"permlevel": 0,
|
||||
"reqd": 1
|
||||
@@ -123,7 +123,7 @@
|
||||
{
|
||||
"fieldname": "email_sent",
|
||||
"fieldtype": "Check",
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Email Sent?",
|
||||
"no_copy": 1,
|
||||
"permlevel": 0,
|
||||
@@ -132,7 +132,7 @@
|
||||
],
|
||||
"icon": "icon-envelope",
|
||||
"idx": 1,
|
||||
"modified": "2014-08-04 07:22:06.445634",
|
||||
"modified": "2015-01-08 10:45:54.106948",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Support",
|
||||
"name": "Newsletter",
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<div class="row" style="max-height: 30px;">
|
||||
<div class="col-xs-12 col-sm-9">
|
||||
<div class="text-ellipsis">
|
||||
{%= list.get_avatar_and_id(doc) %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 hidden-xs">
|
||||
{% if (!doc.email_sent) { %}
|
||||
<span class="indicator orange filterable"
|
||||
data-filter="email_sent,=,No">
|
||||
{%= __("Not Sent") %}
|
||||
</span>
|
||||
{% } %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,3 +1,10 @@
|
||||
frappe.listview_settings['Newsletter'] = {
|
||||
add_fields: ["subject", "send_to_type", "email_sent"]
|
||||
add_fields: ["subject", "send_to_type", "email_sent"],
|
||||
get_indicator: function(doc) {
|
||||
if(doc.email_sent) {
|
||||
return [__("Sent"), "green", "email_sent,=,Yes"];
|
||||
} else {
|
||||
return [__("Not Sent"), "orange", "email_sent,=,No"];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user