Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/home/page/attributions/attributions.css b/home/page/attributions/attributions.css
index 68ec516..1de05ee 100644
--- a/home/page/attributions/attributions.css
+++ b/home/page/attributions/attributions.css
@@ -1,6 +1,3 @@
-.layout-attributions table {
- width: 70%;
-}
.layout-attributions td:first-child {
width: 30%;
}
\ No newline at end of file
diff --git a/home/page/attributions/attributions.html b/home/page/attributions/attributions.html
index 84f25c4..7efeb1b 100644
--- a/home/page/attributions/attributions.html
+++ b/home/page/attributions/attributions.html
@@ -6,12 +6,13 @@
<table class="table table-bordered table-striped">
<tbody>
<tr>
- <td><a href="https://github.com/webnotes/wnframework">wnframework</a></td>
- <td>The full stack Python + Javascript web application framework on which ERPNext is built.</td>
+ <td><a href="https://github.com/webnotes/erpnext">ERPNext</a></td>
+ <td>Web based, Open Source ERP. <br>
+ Get top class hosting and support at <a href="https://erpnext.com">ERPNext.com</a></td>
</tr>
<tr>
- <td><a href="https://github.com/webnotes/erpnext">ERPNext</a></td>
- <td>Web based, Open Source ERP.</td>
+ <td><a href="https://github.com/webnotes/wnframework">wnframework</a></td>
+ <td>The full stack Python + Javascript web application framework on which ERPNext is built.</td>
</tr>
<tr>
<td><a href="http://en.wikipedia.org/wiki/Linux">Linux Operating System</a></td>
@@ -93,7 +94,7 @@
<hr>
<h3>ERPNext License: GNU/General Public License</h3>
- <div class="well" style="width: 65%;">
+ <div class="well">
<p><b>ERPNext - Open Source, web based ERP</b></p>
<p>Copyright © 2012, Web Notes Technologies Pvt Ltd, India</p>
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 86bb188..67daf26 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -554,4 +554,8 @@
'patch_module': 'patches.december_2012',
'patch_file': 'production_order_naming_series',
},
+ {
+ 'patch_module': 'patches.december_2012',
+ 'patch_file': 'rebuild_item_group_tree',
+ },
]
\ No newline at end of file
diff --git a/setup/doctype/item_group/item_group.py b/setup/doctype/item_group/item_group.py
index 01790eb..b2a0843 100644
--- a/setup/doctype/item_group/item_group.py
+++ b/setup/doctype/item_group/item_group.py
@@ -37,7 +37,10 @@
page_name = "products"
update_page_name(self.doc, self.doc.name)
-
+
+ from website.helpers.product import invalidate_cache_for
+ invalidate_cache_for(self.doc.name)
+
def prepare_template_args(self):
from website.helpers.product import get_product_list_for_group, \
get_parent_item_groups, get_group_item_count
@@ -51,4 +54,4 @@
self.doc.items = get_product_list_for_group(product_group = self.doc.name, limit=20)
self.parent_groups = get_parent_item_groups(self.doc.name)
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/stock/doctype/item/item.py b/stock/doctype/item/item.py
index 7f17a3b..7db903d 100644
--- a/stock/doctype/item/item.py
+++ b/stock/doctype/item/item.py
@@ -40,9 +40,8 @@
def on_update(self):
if self.doc.show_in_website:
# webpage updates
- from website.utils import update_page_name
- update_page_name(self.doc, self.doc.item_name)
-
+ self.update_website()
+
bin = sql("select stock_uom from `tabBin` where item_code = '%s' " % self.doc.item_code)
if bin and cstr(bin[0][0]) != cstr(self.doc.stock_uom):
msgprint("Please Update Stock UOM with the help of Stock UOM Replace Utility.")
@@ -76,6 +75,16 @@
child.conversion_factor = 1
child.save()
+ def update_website(self):
+ from website.utils import update_page_name
+ update_page_name(self.doc, self.doc.item_name)
+
+ from website.helpers.product import invalidate_cache_for
+ invalidate_cache_for(self.doc.item_group)
+
+ [invalidate_cache_for(d.item_group) for d in \
+ self.doclist.get({"doctype":"Website Item Group"})]
+
# On delete 1. Delete BIN (if none of the corrosponding transactions present, it gets deleted. if present, rolled back due to exception)
def on_trash(self):
sql("""delete from tabBin where item_code=%s""", self.doc.item_code)
diff --git a/website/css/website.css b/website/css/website.css
index a633be4..b392f5e 100644
--- a/website/css/website.css
+++ b/website/css/website.css
@@ -36,10 +36,6 @@
padding: 8px;
}
-footer {
-
-}
-
.web-footer-menu {
margin-bottom: 7px;
}
@@ -64,11 +60,6 @@
border-right: 0px solid #777 !important;
}
-.web-footer-powered, .web-footer-powered a {
- color: #888;
- margin-top: 20px;
-}
-
.two-column {
width: 50%;
float: left;
diff --git a/website/doctype/web_page/web_page.py b/website/doctype/web_page/web_page.py
index 8a0016b..324893d 100644
--- a/website/doctype/web_page/web_page.py
+++ b/website/doctype/web_page/web_page.py
@@ -41,5 +41,10 @@
clear_cache('index')
def prepare_template_args(self):
- self.doc.main_section_html = self.doc.main_section
- self.doc.side_section_html = self.doc.side_section
\ No newline at end of file
+ if self.doc.slideshow:
+ slideshow = webnotes.model_wrapper("Website Slideshow", self.doc.slideshow)
+ self.slides = slideshow.doclist.get({"doctype":"Website Slideshow Item"})
+ self.doc.slideshow_header = slideshow.doc.header or ""
+ for s in self.slides:
+ if s.image and not s.image.lower().startswith("http"):
+ s.image = "files/" + s.image
diff --git a/website/doctype/web_page/web_page.txt b/website/doctype/web_page/web_page.txt
index 527b24f..56c7344 100644
--- a/website/doctype/web_page/web_page.txt
+++ b/website/doctype/web_page/web_page.txt
@@ -2,9 +2,9 @@
{
"owner": "Administrator",
"docstatus": 0,
- "creation": "2012-11-30 18:14:18",
+ "creation": "2012-12-07 15:15:17",
"modified_by": "Administrator",
- "modified": "2012-12-06 15:59:02"
+ "modified": "2012-12-25 17:04:19"
},
{
"allow_attach": 1,
@@ -26,9 +26,7 @@
"name": "__common__",
"parent": "Web Page",
"read": 1,
- "submit": 0,
"doctype": "DocPerm",
- "amend": 0,
"parenttype": "DocType",
"role": "Website Manager",
"parentfield": "permissions"
@@ -38,15 +36,7 @@
"doctype": "DocType"
},
{
- "doctype": "DocField",
- "label": "Title and Style",
- "fieldname": "sb0",
- "fieldtype": "Section Break",
- "permlevel": 0
- },
- {
"description": "Title / headline of your page",
- "colour": "White:FFF",
"doctype": "DocField",
"label": "Title",
"fieldname": "title",
@@ -55,15 +45,6 @@
"permlevel": 0
},
{
- "description": "Page url name (auto-generated) ",
- "colour": "White:FFF",
- "doctype": "DocField",
- "label": "Page Name",
- "fieldname": "page_name",
- "fieldtype": "Data",
- "permlevel": 1
- },
- {
"doctype": "DocField",
"width": "50%",
"fieldname": "cb1",
@@ -78,16 +59,15 @@
"permlevel": 0
},
{
+ "description": "Page url name (auto-generated) (add \".html\")",
"doctype": "DocField",
- "label": "Layout",
- "options": "Single column\nTwo column",
- "fieldname": "layout",
- "fieldtype": "Select",
- "permlevel": 0
+ "label": "Page Name",
+ "fieldname": "page_name",
+ "fieldtype": "Data",
+ "permlevel": 1
},
{
"description": "Page content",
- "colour": "White:FFF",
"doctype": "DocField",
"label": "Content",
"fieldname": "sb1",
@@ -95,8 +75,16 @@
"permlevel": 0
},
{
+ "description": "Begin this page with a slideshow of images",
+ "doctype": "DocField",
+ "label": "Slideshow",
+ "options": "Website Slideshow",
+ "fieldname": "slideshow",
+ "fieldtype": "Link",
+ "permlevel": 0
+ },
+ {
"description": "Content in markdown format that appears on the main side of your page",
- "colour": "White:FFF",
"doctype": "DocField",
"label": "Main Section",
"fieldname": "main_section",
@@ -104,17 +92,7 @@
"permlevel": 0
},
{
- "description": "Content in markdown format that appears on the right side",
- "colour": "White:FFF",
- "doctype": "DocField",
- "label": "Side Section",
- "fieldname": "side_section",
- "fieldtype": "Text Editor",
- "permlevel": 0
- },
- {
"description": "Link to other pages in the side bar and next section",
- "colour": "White:FFF",
"doctype": "DocField",
"label": "More",
"fieldname": "sb2",
@@ -131,7 +109,6 @@
},
{
"description": "Add code as <script>",
- "colour": "White:FFF",
"doctype": "DocField",
"label": "Insert Code",
"fieldname": "insert_code",
@@ -175,14 +152,10 @@
"create": 1,
"doctype": "DocPerm",
"write": 1,
- "cancel": 1,
"permlevel": 0
},
{
- "create": 0,
"doctype": "DocPerm",
- "write": 0,
- "cancel": 0,
"permlevel": 1
}
]
\ No newline at end of file
diff --git a/website/doctype/website_settings/website_settings.txt b/website/doctype/website_settings/website_settings.txt
index b02b55e..4ef8add 100644
--- a/website/doctype/website_settings/website_settings.txt
+++ b/website/doctype/website_settings/website_settings.txt
@@ -4,7 +4,7 @@
"docstatus": 0,
"creation": "2012-07-12 23:29:36",
"modified_by": "Administrator",
- "modified": "2012-12-20 14:28:46"
+ "modified": "2012-12-25 15:41:48"
},
{
"issingle": 1,
@@ -104,10 +104,11 @@
"permlevel": 0
},
{
+ "description": "Address and other legal information you may want to put in the footer.",
"doctype": "DocField",
"label": "Address",
"fieldname": "address",
- "fieldtype": "Text",
+ "fieldtype": "Text Editor",
"permlevel": 0
},
{
diff --git a/website/doctype/website_slideshow/__init__.py b/website/doctype/website_slideshow/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/website/doctype/website_slideshow/__init__.py
diff --git a/website/doctype/website_slideshow/website_slideshow.js b/website/doctype/website_slideshow/website_slideshow.js
new file mode 100644
index 0000000..bde6d26
--- /dev/null
+++ b/website/doctype/website_slideshow/website_slideshow.js
@@ -0,0 +1,9 @@
+cur_frm.cscript.refresh = function(doc) {
+ cur_frm.set_intro("");
+ if(doc.__islocal) {
+ cur_frm.set_intro("First set the name and save the record.");
+ }
+ else {
+ cur_frm.set_intro("Attach files / urls and add in table.");
+ }
+}
\ No newline at end of file
diff --git a/website/doctype/website_slideshow/website_slideshow.py b/website/doctype/website_slideshow/website_slideshow.py
new file mode 100644
index 0000000..928aa9f
--- /dev/null
+++ b/website/doctype/website_slideshow/website_slideshow.py
@@ -0,0 +1,8 @@
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+class DocType:
+ def __init__(self, d, dl):
+ self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/website/doctype/website_slideshow/website_slideshow.txt b/website/doctype/website_slideshow/website_slideshow.txt
new file mode 100644
index 0000000..0097665
--- /dev/null
+++ b/website/doctype/website_slideshow/website_slideshow.txt
@@ -0,0 +1,85 @@
+[
+ {
+ "owner": "Administrator",
+ "docstatus": 0,
+ "creation": "2012-12-25 16:47:53",
+ "modified_by": "Administrator",
+ "modified": "2012-12-25 16:56:34"
+ },
+ {
+ "autoname": "field:slideshow_name",
+ "allow_attach": 1,
+ "name": "__common__",
+ "doctype": "DocType",
+ "module": "Website",
+ "max_attachments": 10,
+ "document_type": "Transaction",
+ "description": "Slideshow like display for the website"
+ },
+ {
+ "name": "__common__",
+ "parent": "Website Slideshow",
+ "doctype": "DocField",
+ "parenttype": "DocType",
+ "permlevel": 0,
+ "parentfield": "fields"
+ },
+ {
+ "parent": "Website Slideshow",
+ "read": 1,
+ "cancel": 1,
+ "name": "__common__",
+ "create": 1,
+ "doctype": "DocPerm",
+ "write": 1,
+ "parenttype": "DocType",
+ "role": "Website Manager",
+ "permlevel": 0,
+ "parentfield": "permissions"
+ },
+ {
+ "name": "Website Slideshow",
+ "doctype": "DocType"
+ },
+ {
+ "read_only": 0,
+ "doctype": "DocField",
+ "label": "Slideshow Name",
+ "fieldname": "slideshow_name",
+ "fieldtype": "Data",
+ "reqd": 1
+ },
+ {
+ "depends_on": "eval:!doc.__islocal",
+ "doctype": "DocField",
+ "label": "Slideshow Items",
+ "fieldname": "sb0",
+ "fieldtype": "Section Break"
+ },
+ {
+ "depends_on": "eval:!doc.__islocal",
+ "doctype": "DocField",
+ "label": "Slideshow Items",
+ "fieldname": "slideshow_items",
+ "fieldtype": "Table",
+ "options": "Website Slideshow Item"
+ },
+ {
+ "description": "This goes above the slideshow.",
+ "depends_on": "eval:!doc.__islocal",
+ "doctype": "DocField",
+ "label": "Header",
+ "fieldname": "header",
+ "fieldtype": "Text Editor"
+ },
+ {
+ "doctype": "DocField",
+ "label": "File List",
+ "fieldname": "file_list",
+ "fieldtype": "Text",
+ "hidden": 1
+ },
+ {
+ "doctype": "DocPerm"
+ }
+]
\ No newline at end of file
diff --git a/website/doctype/website_slideshow_item/__init__.py b/website/doctype/website_slideshow_item/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/website/doctype/website_slideshow_item/__init__.py
diff --git a/website/doctype/website_slideshow_item/website_slideshow_item.py b/website/doctype/website_slideshow_item/website_slideshow_item.py
new file mode 100644
index 0000000..928aa9f
--- /dev/null
+++ b/website/doctype/website_slideshow_item/website_slideshow_item.py
@@ -0,0 +1,8 @@
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+class DocType:
+ def __init__(self, d, dl):
+ self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/website/doctype/website_slideshow_item/website_slideshow_item.txt b/website/doctype/website_slideshow_item/website_slideshow_item.txt
new file mode 100644
index 0000000..d74005e
--- /dev/null
+++ b/website/doctype/website_slideshow_item/website_slideshow_item.txt
@@ -0,0 +1,59 @@
+[
+ {
+ "owner": "Administrator",
+ "docstatus": 0,
+ "creation": "2012-12-25 16:48:49",
+ "modified_by": "Administrator",
+ "modified": "2012-12-25 16:55:40"
+ },
+ {
+ "istable": 1,
+ "allow_attach": 0,
+ "doctype": "DocType",
+ "module": "Website",
+ "max_attachments": 10,
+ "name": "__common__"
+ },
+ {
+ "name": "__common__",
+ "parent": "Website Slideshow Item",
+ "doctype": "DocField",
+ "parenttype": "DocType",
+ "permlevel": 0,
+ "parentfield": "fields"
+ },
+ {
+ "name": "Website Slideshow Item",
+ "doctype": "DocType"
+ },
+ {
+ "doctype": "DocField",
+ "label": "Image",
+ "fieldname": "image",
+ "fieldtype": "Select",
+ "options": "attach_files:"
+ },
+ {
+ "doctype": "DocField",
+ "label": "Heading",
+ "width": "200px",
+ "fieldname": "heading",
+ "fieldtype": "Data"
+ },
+ {
+ "doctype": "DocField",
+ "label": "Description",
+ "width": "200px",
+ "fieldname": "description",
+ "fieldtype": "Text"
+ },
+ {
+ "print_hide": 1,
+ "no_copy": 1,
+ "doctype": "DocField",
+ "label": "File List",
+ "fieldname": "file_list",
+ "fieldtype": "Text",
+ "hidden": 1
+ }
+]
\ No newline at end of file
diff --git a/website/helpers/product.py b/website/helpers/product.py
index 6fa422d..0497124 100644
--- a/website/helpers/product.py
+++ b/website/helpers/product.py
@@ -99,4 +99,9 @@
return webnotes.conn.sql("""select name, page_name from `tabItem Group`
where lft <= %s and rgt >= %s
and ifnull(show_in_website,0)=1
- order by lft asc""", (item_group.lft, item_group.rgt), as_dict=True)
\ No newline at end of file
+ order by lft asc""", (item_group.lft, item_group.rgt), as_dict=True)
+
+def invalidate_cache_for(item_group):
+ from website.utils import delete_page_cache
+ for i in get_parent_item_groups(item_group):
+ delete_page_cache(i.page_name)
\ No newline at end of file
diff --git a/website/page/website_home/website_home.html b/website/page/website_home/website_home.html
index a8d2bb1..8c986cc 100644
--- a/website/page/website_home/website_home.html
+++ b/website/page/website_home/website_home.html
@@ -3,17 +3,20 @@
<div class="layout-main-section">
<div style="width: 48%; float: left;">
<h5><a href="#List/Web Page">Web Page</a></h5>
- <p class="help">Static (content) web page</p>
+ <p class="help">Static (content) web page.</p>
<br>
<h5><a href="#List/Blog">Blog</a></h5>
- <p class="help">Weblog (blog) entry</p>
+ <p class="help">Weblog (blog) entr.y</p>
+ <br>
+ <h5><a href="#List/Website Slideshow">Website Slideshow</a></h5>
+ <p class="help">Slideshows for adding in website pages.</p>
</div>
<div style="width: 48%; float: right;">
<h5><a href="#Form/Website Settings">Website Settings</a></h5>
- <p class="help">Setup of top navigation bar, footer and logo</p>
+ <p class="help">Setup of top navigation bar, footer and logo.</p>
<br>
<h5><a href="#Form/Style Settings">Style Settings</a></h5>
- <p class="help">Setup of fonts and background</p>
+ <p class="help">Setup of fonts and background.</p>
<br>
<h5><a href="#Form/Product Settings">Product Settings</a></h5>
<p class="help">Settings for Product Catalog on the website.</p>
diff --git a/website/templates/html/outer.html b/website/templates/html/outer.html
index fcd65f9..aef91a9 100644
--- a/website/templates/html/outer.html
+++ b/website/templates/html/outer.html
@@ -1,5 +1,5 @@
{#
- requires, brand, top_bar_items, footer_items, copyright, content
+ requires, brand_html, top_bar_items, footer_items, copyright, content, address
#}
{% extends "html/base.html" %}
@@ -13,7 +13,7 @@
style="margin-bottom: 0px;">
<div class="navbar-inner">
<div class="container">
- <a class="brand" href="index.html">{{ brand }}</a>
+ <a class="brand" href="index.html">{{ brand_html }}</a>
<ul class="nav">
{% for page in top_bar_items %}
{% if not page.parent_label %}
@@ -77,7 +77,10 @@
{% if copyright %}
<div class="web-footer-copyright">© {{ copyright }}</div>
{% endif %}
- <div class="web-footer-powered">Powered by <a href="https://erpnext.com">ERPNext.com</a></div>
+ {% if address %}
+ {{ address }}
+ {% endif %}
+ <p><a style="font-size: 90%;" href="attributions.html">ERPNext Powered</a></p>
</div>
</footer>
diff --git a/website/templates/html/web_page.html b/website/templates/html/web_page.html
index 6fa7d27..78da963 100644
--- a/website/templates/html/web_page.html
+++ b/website/templates/html/web_page.html
@@ -9,21 +9,30 @@
{% block content %}
<div class="layout-wrapper layout-wrapper-background">
<div class="web-content" style="text-align: {{ text_align }};">
-
- {% if layout and layout.startswith('Two column') %}
- <div class="layout-main-section">
- {% else %}
<div class="layout-main">
- {% endif %}
- {{ main_section_html }}
+ {% if slideshow %}
+ {{ slideshow_header }}
+ <div id="myCarousel" class="carousel slide">
+ <div class="carousel-inner">
+ {% for slide in obj.slides %}
+ <div class="{% if slide.idx==1 %}active {% endif %}item">
+ <img src="{{ slide.image }}" />
+ <div class="carousel-caption">
+ <h4>{{ slide.heading }}</h4>
+ <p>{{ slide.description }}</p>
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+ <a class="carousel-control left" href="#myCarousel"
+ data-slide="prev">‹</a>
+ <a class="carousel-control right" href="#myCarousel"
+ data-slide="next">›</a>
+ </div>
+ <script>$(".carousel").carousel();</script>
+ {% endif %}
+ {{ main_section }}
</div>
-
- {% if layout and layout.startswith('Two column') %}
- <div class="layout-side-section">
- {{ side_section_html }}
- </div>
- {% endif %}
- <div style="clear: both"></div>
</div>
</div>
{% endblock %}
\ No newline at end of file
diff --git a/website/templates/pages/attributions.html b/website/templates/pages/attributions.html
new file mode 100644
index 0000000..bc9d368
--- /dev/null
+++ b/website/templates/pages/attributions.html
@@ -0,0 +1,112 @@
+{% extends "html/outer.html" %}
+
+{% block header %}
+<style>
+.layout-attributions td:first-child {
+ width: 30%;
+}
+</style>
+{% endblock %}
+
+{% block title %}
+ ERPNext - Web Based, Open Source ERP
+{% endblock %}
+
+{% block content %}
+<div class="layout-attributions">
+ <div class="layout-main">
+ <h3>This website is made using these Awesome Open Source Projects <i class="icon-heart" style="color: red"></i></h3>
+ <hr>
+ <table class="table table-bordered table-striped">
+ <tbody>
+ <tr>
+ <td><a href="https://github.com/webnotes/erpnext">ERPNext</a></td>
+ <td>Web based, Open Source ERP. <br>
+ Get top class hosting and support at <a href="https://erpnext.com">ERPNext.com</a></td>
+ </tr>
+ <tr>
+ <td><a href="https://github.com/webnotes/wnframework">wnframework</a></td>
+ <td>The full stack Python + Javascript web application framework on which ERPNext is built.</td>
+ </tr>
+ <tr>
+ <td><a href="http://en.wikipedia.org/wiki/Linux">Linux Operating System</a></td>
+ <td>The operating system that brought a revolution in Open Source software.</td>
+ </tr>
+ <tr>
+ <td><a href="http://www.mysql.com/">MySQL Database</a></td>
+ <td>The world's most popular Open Source Database.</td>
+ </tr>
+ <tr>
+ <td><a href="http://httpd.apache.org">Apache HTTPD web server</a></td>
+ <td>The Number One HTTP Server On The Internet.</td>
+ </tr>
+ <tr>
+ <td><a href="http://python.org/">Python Programming Language</a></td>
+ <td>The "batteries included" language that lets you write elegant code, quickly.<br><br>Python Libraries:
+ <ul>
+ <li>MySQLdb
+ <li>pytz
+ <li>jinja2
+ <li>markdown2
+ <li>dateutil
+ <li>termcolor
+ <li>python-memcached
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="http://git-scm.com/">Git - Source Code Management</a></td>
+ <td>Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.<br><br>
+ Kindly hosted on the web by <a href="https://github.com">GitHub</a>: The service that makes it easier for individuals and teams to write better code, faster. </td>
+ </tr>
+ <tr>
+ <td><a href="http://jquery.com/">JQuery Javascript Libary</a></td>
+ <td>The write less, do more Javascript Library.</td>
+ </tr>
+ <tr>
+ <td><a href="http://jqueryui.com/">JQuery UI - User Interface Library</a></td>
+ <td>A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.</td>
+ </tr>
+ <tr>
+ <td><a href="http://twitter.github.com/bootstrap/index.html">Bootstrap CSS Framework</a></td>
+ <td>Sleek, intuitive, and powerful front-end framework for faster and easier web development.</td>
+ </tr>
+ <tr>
+ <td><a href="http://fortawesome.github.com/Font-Awesome/">Font Awesome - Icons</a></td>
+ <td>The iconic font designed for use with Twitter Bootstrap.</td>
+ </tr>
+ <tr>
+ <td><a href="http://www.tinymce.com/">TinyMCE Rich Text Editor</a></td>
+ <td>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB.</td>
+ </tr>
+ <tr>
+ <td><a href="https://github.com/mleibman/SlickGrid">SlickGrid</a></td>
+ <td>A lightning fast JavaScript grid/spreadsheet.</td>
+ </tr>
+ <tr>
+ <td><a href="http://www.flotcharts.org/">Flot Charting Library</a></td>
+ <td>Attractive JavaScript plotting for jQuery.</td>
+ </tr>
+ <tr>
+ <td><a href="http://ace.ajax.org/">Ace Code Editor</a></td>
+ <td>High Performance Code Editor for the web.</td>
+ </tr>
+ <tr>
+ <td><a href="http://taitems.github.com/jQuery.Gantt/">JQuery.Gantt - Gantt Charts</a></td>
+ <td>Draw Gantt charts with the famous jQuery ease of development.</td>
+ </tr>
+ <tr>
+ <td><a href="http://jscolor.com/">JSColor - Color Picker</a></td>
+ <td>HTML/Javascript Color Picker.</td>
+ </tr>
+ <tr>
+ <td><a href="https://github.com/dcneiner/Downloadify">Downloadify - Flash Download Widget</a></td>
+ <td>A tiny javascript + Flash library that enables the creation and download of text files without server interaction.</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p class="alert">Note: A link to this page must be easily accessible.</p>
+ </div>
+</div>
+{% endblock %}
\ No newline at end of file
diff --git a/website/utils.py b/website/utils.py
index ef73672..4af4981 100644
--- a/website/utils.py
+++ b/website/utils.py
@@ -73,7 +73,7 @@
html = get_html("404")
if page_name=="error":
- html = html % {"error": webnotes.getTraceback()}
+ html = html.replace("%(error)s", webnotes.getTraceback())
else:
comments = "\n\npage:"+page_name+\
"\nload status: " + (from_cache and "cache" or "fresh")
@@ -215,18 +215,24 @@
products_item = filter(lambda d: d.url and d.url.split(".")[0]=="products", top_items)[0]
products_item.child_items = products
- return {
+ ret = webnotes._dict({
'top_bar_items': top_items,
'footer_items': webnotes.conn.sql("""\
select * from `tabTop Bar Item`
where parent='Website Settings' and parentfield='footer_items'
order by idx asc""", as_dict=1),
- 'brand': webnotes.conn.get_value('Website Settings', None, 'brand_html') or 'ERPNext',
- 'copyright': webnotes.conn.get_value('Website Settings', None, 'copyright'),
- 'favicon': webnotes.conn.get_value('Website Settings', None, 'favicon'),
'int':int
- }
+ })
+
+ settings = webnotes.doc("Website Settings", "Website Settings")
+ for k in ["brand_html", "copyright", "address"]:
+ if k in settings.fields:
+ ret[k] = settings.fields[k]
+
+ if not ret.brand_html:
+ ret.brand_html = "ERPNext"
+ return ret
def get_home_page():
doc_name = webnotes.conn.get_value('Website Settings', None, 'home_page')