templates cleaner and generation for all pages
This commit is contained in:
9
erpnext/patches/may_2012/cms.py
Normal file
9
erpnext/patches/may_2012/cms.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import webnotes
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
from webnotes.model.doclist import DocList
|
||||||
|
import os
|
||||||
|
|
||||||
|
for name in webnotes.conn.sql("""select name from `tabWeb Page` where docstatus=0"""):
|
||||||
|
print name
|
||||||
|
DocList('Web Page', name[0]).save()
|
||||||
@@ -332,5 +332,10 @@ patch_list = [
|
|||||||
'patch_file': 'renamedt_in_custom_search_criteria',
|
'patch_file': 'renamedt_in_custom_search_criteria',
|
||||||
'description': 'raname dt in custom search criteria'
|
'description': 'raname dt in custom search criteria'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'patch_module': 'patches.may_2012',
|
||||||
|
'patch_file': 'cms',
|
||||||
|
'description': 'generate html pages'
|
||||||
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="web-content"
|
<div class="web-content"
|
||||||
style="text-align: {{ doc.text_align }};">
|
style="text-align: {{ doc.text_align }};">
|
||||||
|
|
||||||
{% if doc.layout.startswith('Two column') %}
|
{% if doc.layout and doc.layout.startswith('Two column') %}
|
||||||
<div class="layout-main-section">
|
<div class="layout-main-section">
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="layout-main">
|
<div class="layout-main">
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if doc.layout.startswith('Two column') %}
|
{% if doc.layout and doc.layout.startswith('Two column') %}
|
||||||
<div class="layout-side-section">
|
<div class="layout-side-section">
|
||||||
{{ doc.side_section_html }}
|
{{ doc.side_section_html }}
|
||||||
{% if doc.see_also %}
|
{% if doc.see_also %}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ class DocType:
|
|||||||
webnotes.conn.sql("""delete from tabPage where name=%s""", self.doc.page_name)
|
webnotes.conn.sql("""delete from tabPage where name=%s""", self.doc.page_name)
|
||||||
|
|
||||||
p = website.utils.add_page(self.doc.name)
|
p = website.utils.add_page(self.doc.name)
|
||||||
|
self.doc.page_name = p.name
|
||||||
|
|
||||||
self.doc.updated = global_date_format(self.doc.modified)
|
self.doc.updated = global_date_format(self.doc.modified)
|
||||||
website.utils.markdown(self.doc, ['head_section','main_section', 'side_section'])
|
website.utils.markdown(self.doc, ['head_section','main_section', 'side_section'])
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ def get_header():
|
|||||||
return Template("""<div class="navbar navbar-fixed-top">
|
return Template("""<div class="navbar navbar-fixed-top">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a class="brand">{{ brand }}</a>
|
<a class="brand" href="index.html">{{ brand }}</a>
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
{% for page in top_bar_items %}
|
{% for page in top_bar_items %}
|
||||||
{% if not page.parent_label %}
|
{% if not page.parent_label %}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
window._version_number = "c1dee2b8be9abfbe2a74619482b586b538f7253911fcb06c4c950b10";
|
window._version_number = "2a070dfb16a80c744b13c7609859086ef91dfd755d70032ee00ee4f6";
|
||||||
window.home_page = "index";
|
window.home_page = "index";
|
||||||
// footer signup widget
|
// footer signup widget
|
||||||
// automatically adds it to the .layout-main div of the page
|
// automatically adds it to the .layout-main div of the page
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ wn.show_forgot_password = function(){
|
|||||||
<header><div class="navbar navbar-fixed-top">
|
<header><div class="navbar navbar-fixed-top">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a class="brand">erpnext</a>
|
<a class="brand" href="index.html">erpnext</a>
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user