[css] cleanup + moved products and homepage to erpnext + [fix] get_js

This commit is contained in:
Anand Doshi 2016-04-22 18:50:49 +05:30
parent 0e0789ae00
commit 9c5e1199de
22 changed files with 151 additions and 737 deletions

View file

@ -58,11 +58,6 @@ def get_data():
"name": "Website Theme",
"description": _("List of themes for Website."),
},
{
"type": "doctype",
"name": "Homepage Settings",
"description": _("Settings for website homepage."),
},
{
"type": "doctype",
"name": "Website Script",

View file

@ -36,17 +36,24 @@ def render_include(content):
'''render {% include "app/path/filename" in js file %}'''
content = cstr(content)
if "{% include" in content:
paths = re.findall(r'''{% include\s['"](.*)['"]\s%}''', content)
if not paths:
frappe.throw('Invalid include path')
for path in paths:
app, app_path = path.split('/', 1)
with open(frappe.get_app_path(app, app_path), 'r') as f:
include = unicode(f.read(), 'utf-8')
if path.endswith('.html'):
include = html_to_js_template(path, include)
content = re.sub(r'''{{% include\s['"]{0}['"]\s%}}'''.format(path), include, content)
# try 5 levels of includes
for i in xrange(5):
if "{% include" in content:
paths = re.findall(r'''{% include\s['"](.*)['"]\s%}''', content)
if not paths:
frappe.throw('Invalid include path')
for path in paths:
app, app_path = path.split('/', 1)
with open(frappe.get_app_path(app, app_path), 'r') as f:
include = unicode(f.read(), 'utf-8')
if path.endswith('.html'):
include = html_to_js_template(path, include)
content = re.sub(r'''{{% include\s['"]{0}['"]\s%}}'''.format(path), include, content)
else:
break
return content

View file

@ -4,6 +4,16 @@
width: 50px;
height: 50px;
}
.avatar-frame {
display: inline-block;
width: 100%;
height: 0;
padding: 50% 0px;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
border-radius: 4px;
}
.avatar img {
max-width: 100%;
max-height: 100%;
@ -21,6 +31,9 @@
.avatar-small .standard-image {
font-size: 14px;
}
.avatar-small .avatar-frame {
border-radius: 3px;
}
.avatar-medium {
margin-right: 5px;
width: 36px;
@ -54,16 +67,6 @@
height: 0;
padding-bottom: 100%;
}
.avatar-frame {
display: inline-block;
width: 100%;
height: 0;
padding: 50% 0px;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
border-radius: 4px;
}
.standard-image {
width: 100%;
height: 0;

View file

@ -226,6 +226,16 @@ a.no-decoration:active {
width: 50px;
height: 50px;
}
.avatar-frame {
display: inline-block;
width: 100%;
height: 0;
padding: 50% 0px;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
border-radius: 4px;
}
.avatar img {
max-width: 100%;
max-height: 100%;
@ -243,6 +253,9 @@ a.no-decoration:active {
.avatar-small .standard-image {
font-size: 14px;
}
.avatar-small .avatar-frame {
border-radius: 3px;
}
.avatar-medium {
margin-right: 5px;
width: 36px;
@ -276,16 +289,6 @@ a.no-decoration:active {
height: 0;
padding-bottom: 100%;
}
.avatar-frame {
display: inline-block;
width: 100%;
height: 0;
padding: 50% 0px;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
border-radius: 4px;
}
.standard-image {
width: 100%;
height: 0;
@ -361,6 +364,23 @@ a.no-decoration:active {
html,
body {
font-family: "Open Sans", "Helvetica Neue", Serif;
color: #6c7680;
}
a {
color: #6c7680;
}
a:hover,
a:focus,
a:active {
color: #36414C;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 300;
}
.navbar-brand {
max-width: none;
@ -467,6 +487,10 @@ body {
.panel-body {
padding-left: 15px;
}
.page-head h1,
.page-head h2 {
margin-top: 0px;
}
.page-header-actions-block {
text-align: right;
}
@ -915,10 +939,16 @@ li .social-child-item {
padding-top: 30px;
padding-bottom: 20px;
}
#item-search {
.item-search {
border-bottom: 1px solid #d1d8dd;
}
.item-search .item-search-input {
position: relative;
outline: none;
border: none;
margin-right: 5px;
padding: 7px;
padding-left: 0px;
}
.vert-line {
overflow: hidden;

View file

@ -7,6 +7,17 @@
height: 50px;
}
.avatar-frame {
display: inline-block;
width: 100%;
height: 0;
padding: 50% 0px;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
border-radius: 4px;
}
.avatar img {
max-width: 100%;
max-height: 100%;
@ -26,6 +37,10 @@
.standard-image {
font-size: 14px;
}
.avatar-frame {
border-radius: 3px;
}
}
.avatar-medium {
@ -68,17 +83,6 @@
padding-bottom: 100%;
}
.avatar-frame {
display: inline-block;
width: 100%;
height: 0;
padding: 50% 0px;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
border-radius: 4px;
}
.standard-image {
width: 100%;
height: 0;
@ -93,4 +97,4 @@
border: 1px solid @border-color;
font-weight: normal;
margin-top: -1px;
}
}

View file

@ -3,6 +3,7 @@
@border-color: #d1d8dd;
@light-border-color: #EBEFF2;
@text-color: #36414C;
@text-light: #6c7680;
@text-muted: #8D99A6;
@btn-bg: #F0F4F7;
@panel-bg: #F7FAFC;

View file

@ -5,6 +5,21 @@
html, body {
font-family: "Open Sans", "Helvetica Neue", Serif;
color: @text-light;
}
a& {
color: @text-light;
&:hover,
&:focus,
&:active {
color: @text-color;
}
}
h1, h2, h3, h4, h5, h6 {
font-weight: 300;
}
.navbar-brand {
@ -133,6 +148,12 @@ html, body {
padding-left: 15px;
}
.page-head {
h1, h2 {
margin-top: 0px;
}
}
.page-header-actions-block {
text-align: right;
}
@ -523,13 +544,21 @@ li .social-child-item {
padding-bottom:20px;
}
#item-search {
position: relative;
outline:none;
border:none;
.item-search {
border-bottom: 1px solid @border-color;
.item-search-input {
position: relative;
outline: none;
border: none;
margin-right: 5px;
padding: 7px;
padding-left: 0px;
}
}
.vert-line {overflow:hidden;}
.vert-line>div+div{border-left:1px solid @light-border-color;}
.vert-line>div{
padding-bottom:2000px; margin-bottom:-2000px;}

View file

@ -9,7 +9,9 @@
{% include "templates/includes/list/filters.html" %}
{%- endif %} -->
{% if introduction %}<p class='lead'>{{ introduction }}{% endif %}
{% if introduction %}<p class='lead'>{{ introduction }}{% endif %}
{% if result_heading_template %}{% include result_heading_template %}{% endif %}
<div class="result">
{% for item in result %}

View file

@ -1,12 +1,13 @@
<div class="item-search text-muted pull-right">
<input type="text" id="item-search" placeholder="Quick Search" autocomplete="off">
<i class="octicon octicon-search"></i>
<input type="text" class="item-search-input"
placeholder="Search" autocomplete="off">
<i class="octicon octicon-search"></i>
</div>
<div class="clearfix pull-right" style="width:300px;">
<h4 class="item-search-results pull-left"></h4>
<p class="pull-right">
<a style="display: none; padding-left:5px;" href="javascript:history.back();" class="octicon octicon-x text-extra-muted clear" title="Clear Search" ></a>
</p>
<h4 class="item-search-results pull-left"></h4>
<p class="pull-right">
<a style="display: none; padding-left:5px;" href="javascript:history.back();" class="octicon octicon-x text-extra-muted clear" title="Clear Search" ></a>
</p>
</div>
<script>
@ -21,10 +22,10 @@ frappe.ready(function() {
window.location.href=document.URL + "?search=" + t;
}
$("#item-search").keyup(function() {
$(".item-search-input").keyup(function() {
clearTimeout(thread);
var $this = $(this); thread = setTimeout(function(){findResult($this.val())}, 1000);
});
$(".form-search").on("submit", function() { return false; });
});
</script>
</script>

View file

@ -5,9 +5,9 @@
<span class="user-image-sidebar"></span>
</div>
<div class="col-xs-10">
<div class="web-sidebar-user text-muted">{{ fullname }}</div>
<div class="web-sidebar-user">{{ fullname }}</div>
<a href="/?cmd=web_logout">
<div style="margin-top:0px;" class="text-extra-muted small">
<div style="margin-top:0px;" class="text-muted small">
{{ _("Logout") }}</div>
</a>
</div>

View file

@ -3,7 +3,7 @@
{% block title %}{{ title or (_("{0} List").format(_(doctype))) }}{% endblock %}
{% block header %}
{{ title or (_("{0} List").format(_(doctype))) }}
<h1>{{ title or (_("{0} List").format(_(doctype))) }}</h1>
{% endblock %}
{% block breadcrumbs %}

View file

@ -15,24 +15,27 @@
<div class="page-content-wrapper">
<div class="row page-head">
<div class="col-sm-8">
{% if self.breadcrumbs() %}
{% if not no_breadcrumbs and self.breadcrumbs() %}
<div class="page-breadcrumbs">
{% block breadcrumbs %}{% endblock %}
</div>
{% endif %}
<h2>{% block header %}{% endblock %}</h2>
{% block header %}{% endblock %}
</div>
<div class="col-sm-4">
{% if show_search %}
<div class="page-search-block">
{% block search %}
{% include 'templates/includes/search_box.html' %}
{% endblock %}
</div>
<div class="page-search-block">
{% block search %}
{% include 'templates/includes/search_box.html' %}
{% endblock %}
</div>
{% endif %}
{% if self.header_actions() %}
<div class="page-header-actions-block">
{% block header_actions %}{% endblock %}
</div>
{% endif %}
</div>
</div>
</div>

View file

@ -82,6 +82,7 @@ def build_context(context):
def add_sidebar_data(context):
from frappe.utils.user import get_fullname_and_avatar
import frappe.templates.pages.list
context.my_account_list = frappe.get_all('Portal Menu Item',
fields=['title', 'route', 'reference_doctype'], filters={'enabled': 1}, order_by='idx asc')
@ -90,7 +91,6 @@ def add_sidebar_data(context):
if item.reference_doctype:
item.count = len(frappe.templates.pages.list.get(item.reference_doctype).get('result'))
info = get_fullname_and_avatar(frappe.session.user)
context["fullname"] = info.fullname
context["user_image"] = info.avatar

View file

@ -1,385 +0,0 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "hash",
"creation": "2016-04-22 11:57:22.043823",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
"fields": [
{
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Item Code",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_code",
"oldfieldtype": "Link",
"options": "Item",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
"set_only_once": 0,
"unique": 0,
"width": "150px"
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "item_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Item Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_name",
"oldfieldtype": "Data",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "150",
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "150"
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"fieldname": "section_break_5",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Description",
"length": 0,
"no_copy": 0,
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "300px"
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "column_break_7",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image",
"fieldtype": "Attach",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "image_view",
"fieldtype": "Image",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
"options": "image",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "section_break_simple1",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "eval: doc.type != \"\"",
"fieldname": "rate",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "export_rate",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "100px"
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Amount",
"length": 0,
"no_copy": 0,
"oldfieldname": "export_amount",
"oldfieldtype": "Currency",
"options": "currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "100px"
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "col_break3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "",
"fieldname": "item_group",
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Item Group",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_group",
"oldfieldtype": "Link",
"options": "Item Group",
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
"set_only_once": 0,
"unique": 0
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-04-22 12:25:29.275898",
"modified_by": "Administrator",
"module": "Website",
"name": "Featured Product Items",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_seen": 0
}

View file

@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, 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 FeaturedProductItems(Document):
pass

View file

@ -1,8 +0,0 @@
// Copyright (c) 2016, Frappe Technologies and contributors
// For license information, please see license.txt
frappe.ui.form.on('Homepage Settings', {
refresh: function(frm) {
}
});

View file

@ -1,208 +0,0 @@
{
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
"autoname": "",
"creation": "2016-04-22 14:29:51.244067",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Company Tagline for website homepage",
"fieldname": "tag_line",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Tag Line",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Company Description for website homepage",
"fieldname": "description",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "products",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Products",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "Products to be shown on website homepage",
"fieldname": "item",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Item",
"length": 0,
"no_copy": 0,
"options": "Featured Product Items",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0,
"width": "40px"
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2016-04-22 14:36:51.439985",
"modified_by": "Administrator",
"module": "Website",
"name": "Homepage Settings",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 0,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 0,
"role": "Administrator",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "company",
"track_seen": 0
}

View file

@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, 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 HomepageSettings(Document):
pass

View file

@ -1,12 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('Homepage Settings')
class TestHomepageSettings(unittest.TestCase):
pass

View file

@ -58,31 +58,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"description": "If checked, the Home page will be the default Item Group for the website.",
"fieldname": "home_page_is_products",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Home Page is Products",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@ -984,7 +959,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 10,
"modified": "2016-04-12 23:17:55.682407",
"modified": "2016-04-22 09:13:08.875846",
"modified_by": "Administrator",
"module": "Website",
"name": "Website Settings",
@ -1004,8 +979,6 @@
"print": 1,
"read": 1,
"report": 0,
"restrict": 0,
"restricted": 0,
"role": "Website Manager",
"set_user_permissions": 0,
"share": 1,
@ -1026,15 +999,14 @@
"print": 0,
"read": 1,
"report": 0,
"restrict": 0,
"restricted": 0,
"role": "All",
"set_user_permissions": 0,
"share": 1,
"share": 0,
"submit": 0,
"write": 0
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"sort_order": "ASC",