fix(cleanup): remove weblist
This commit is contained in:
parent
ac6391f429
commit
1f896705d3
14 changed files with 0 additions and 325 deletions
|
|
@ -1,6 +0,0 @@
|
|||
{% extends "templates/web.html" %}
|
||||
|
||||
{% block page_content %}
|
||||
{% include "frappe/website/doctype/web_list/templates/web_list_component.html" %}
|
||||
{% endblock %}
|
||||
<!-- this is a sample default web page template -->
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{% if list_style=="Blog" %}
|
||||
{% for row in data %}
|
||||
<div class='list-item'>
|
||||
<h3>{{ row[0] }}</h3>
|
||||
{% if row|len > 1 %}
|
||||
<p>{{ row[1] }}</p>
|
||||
{% endif %}
|
||||
{% if row|len > 2 %}
|
||||
<p>
|
||||
{% for i in range(2, row|len) %}
|
||||
<span class="badge">{{ row[i] }}</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
<div>
|
||||
<a href="{{ doc.route }}">{{ doc.title or doc.name }}</a>
|
||||
</div>
|
||||
<!-- this is a sample default list template -->
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies and Contributors
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
class TestWebList(unittest.TestCase):
|
||||
pass
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
// Copyright (c) 2020, Frappe Technologies and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Web List', {
|
||||
refresh: function(frm) {
|
||||
return frm.trigger('reference_doctype');
|
||||
},
|
||||
reference_doctype: function(frm) {
|
||||
// update Select fields in the child tables
|
||||
if (frm.doc.reference_doctype) {
|
||||
// fetch fields
|
||||
return frappe.model.with_doctype(frm.doc.reference_doctype, function() {
|
||||
// map fields with value
|
||||
var fields = $.map(frappe.get_doc("DocType", frm.doc.reference_doctype).fields, function(d) {
|
||||
if (frappe.model.no_value_type.indexOf(d.fieldtype) === -1) {
|
||||
return { label: d.label + ' (' + d.fieldtype + ')', value: d.fieldname };
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
fields.unshift({label: __("Name"), value: "name"});
|
||||
|
||||
// update the `options` property with the fields
|
||||
frappe.meta.get_docfield("Web List Filter", "fieldname", frm.doc.name).options = [""].concat(fields);
|
||||
frappe.meta.get_docfield("Web List Column", "fieldname", frm.doc.name).options = [""].concat(fields);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -1,138 +0,0 @@
|
|||
{
|
||||
"actions": [],
|
||||
"creation": "2020-03-28 14:30:02.523080",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"title",
|
||||
"reference_doctype",
|
||||
"list_style",
|
||||
"css_class",
|
||||
"column_break_3",
|
||||
"route",
|
||||
"is_published",
|
||||
"section_break_6",
|
||||
"filters",
|
||||
"section_break_8",
|
||||
"columns",
|
||||
"template_section",
|
||||
"template"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "title",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Title",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "reference_doctype",
|
||||
"fieldtype": "Link",
|
||||
"label": "Reference DocType",
|
||||
"options": "DocType",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_3",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "route",
|
||||
"fieldtype": "Data",
|
||||
"label": "Route"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "is_published",
|
||||
"fieldtype": "Check",
|
||||
"label": "Is Published"
|
||||
},
|
||||
{
|
||||
"fieldname": "section_break_6",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Filters"
|
||||
},
|
||||
{
|
||||
"fieldname": "filters",
|
||||
"fieldtype": "Table",
|
||||
"label": "Filters",
|
||||
"options": "Web List Filter"
|
||||
},
|
||||
{
|
||||
"description": "For Blog and Card style, first column is the title, second is the content, the rest are badges.",
|
||||
"fieldname": "section_break_8",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Columns"
|
||||
},
|
||||
{
|
||||
"fieldname": "columns",
|
||||
"fieldtype": "Table",
|
||||
"label": "Columns",
|
||||
"options": "Web List Column",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.list_style===\"Template\"",
|
||||
"fieldname": "template_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Template"
|
||||
},
|
||||
{
|
||||
"fieldname": "template",
|
||||
"fieldtype": "Code",
|
||||
"label": "Template"
|
||||
},
|
||||
{
|
||||
"fieldname": "list_style",
|
||||
"fieldtype": "Select",
|
||||
"label": "List Style",
|
||||
"options": "Table\nBlog\nCard\nTemplate",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "css_class",
|
||||
"fieldtype": "Link",
|
||||
"label": "CSS Class",
|
||||
"options": "CSS Class"
|
||||
}
|
||||
],
|
||||
"has_web_view": 1,
|
||||
"links": [],
|
||||
"modified": "2020-03-29 12:20:57.747810",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Website",
|
||||
"name": "Web List",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Website Manager",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.website.website_generator import WebsiteGenerator
|
||||
|
||||
class WebList(WebsiteGenerator):
|
||||
def get_context(self, context):
|
||||
context.data = self.get_data()
|
||||
|
||||
def get_data(self):
|
||||
return frappe.get_all(self.reference_doctype,
|
||||
fields = [d.fieldname for d in self.columns], as_list = True, limit=20)
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
"actions": [],
|
||||
"creation": "2020-03-28 14:33:25.174696",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"fieldname",
|
||||
"column_label",
|
||||
"columns"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "fieldname",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Fieldname",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "columns",
|
||||
"fieldtype": "Int",
|
||||
"in_list_view": 1,
|
||||
"label": "Columns"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_label",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Column Label",
|
||||
"reqd": 1
|
||||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-03-29 11:58:49.428037",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Website",
|
||||
"name": "Web List Column",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
# import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class WebListColumn(Document):
|
||||
pass
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
"actions": [],
|
||||
"creation": "2020-03-28 14:31:42.409639",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"fieldname",
|
||||
"mandatory"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "fieldname",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Fieldname",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "mandatory",
|
||||
"fieldtype": "Check",
|
||||
"in_list_view": 1,
|
||||
"label": "Mandatory"
|
||||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-03-28 14:37:07.249436",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Website",
|
||||
"name": "Web List Filter",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2020, Frappe Technologies and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
# import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class WebListFilter(Document):
|
||||
pass
|
||||
Loading…
Add table
Reference in a new issue