[ui] listviews

This commit is contained in:
Rushabh Mehta
2015-01-12 16:10:42 +05:30
parent e8500ad4e6
commit 135fe3405f
17 changed files with 67 additions and 157 deletions

View File

@@ -30,7 +30,7 @@
"default": "Draft",
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"in_list_view": 0,
"label": "Status",
"options": "Draft\nSubmitted\nBilled\nCancelled",
"permlevel": 0,
@@ -40,7 +40,7 @@
"description": "Will be updated after Sales Invoice is Submitted.",
"fieldname": "sales_invoice",
"fieldtype": "Link",
"in_list_view": 1,
"in_list_view": 0,
"label": "Sales Invoice",
"options": "Sales Invoice",
"permlevel": 0,
@@ -83,7 +83,7 @@
"icon": "icon-time",
"idx": 1,
"is_submittable": 1,
"modified": "2014-12-24 16:48:03.419707",
"modified": "2015-01-08 12:06:19.123049",
"modified_by": "Administrator",
"module": "Projects",
"name": "Time Log Batch",

View File

@@ -1,15 +0,0 @@
<div class="row" style="max-height: 30px;">
<div class="col-xs-12">
<div class="text-ellipsis">
{%= list.get_avatar_and_id(doc) %}
<span class="label label-{%= doc.status=="Billed" ? "success" :
frappe.utils.guess_style(doc.status) %} filterable"
style="margin-right: 8px;"
data-filter="status,=,{%= doc.status %}">
{%= doc.status %}</span>
<span style="margin-right: 8px;" class="text-muted">
({%= doc.total_hours + " " + __("hours") %})
</span>
</div>
</div>
</div>

View File

@@ -1,3 +1,6 @@
frappe.listview_settings['Time Log Batch'] = {
add_fields: ["status", "total_hours", "rate"]
add_fields: ["status", "total_hours", "rate"],
get_indicator: function(doc) {
return [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status];
}
};