templates cleaner and generation for all pages
This commit is contained in:
parent
5ab8163140
commit
a933b632ad
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',
|
||||
'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"
|
||||
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">
|
||||
{% else %}
|
||||
<div class="layout-main">
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
{% if doc.layout.startswith('Two column') %}
|
||||
{% if doc.layout and doc.layout.startswith('Two column') %}
|
||||
<div class="layout-side-section">
|
||||
{{ doc.side_section_html }}
|
||||
{% if doc.see_also %}
|
||||
|
@ -40,7 +40,8 @@ class DocType:
|
||||
webnotes.conn.sql("""delete from tabPage where name=%s""", self.doc.page_name)
|
||||
|
||||
p = website.utils.add_page(self.doc.name)
|
||||
|
||||
self.doc.page_name = p.name
|
||||
|
||||
self.doc.updated = global_date_format(self.doc.modified)
|
||||
website.utils.markdown(self.doc, ['head_section','main_section', 'side_section'])
|
||||
|
||||
|
@ -35,7 +35,7 @@ class DocType:
|
||||
"""rewrite all web pages"""
|
||||
import webnotes
|
||||
from webnotes.model.code import get_obj
|
||||
|
||||
|
||||
for p in webnotes.conn.sql("""select name from tabPage where docstatus=0
|
||||
and web_page = 'Yes'"""):
|
||||
get_obj('Page', p[0]).write_cms_page()
|
||||
|
@ -95,7 +95,7 @@ def get_header():
|
||||
return Template("""<div class="navbar navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<a class="brand">{{ brand }}</a>
|
||||
<a class="brand" href="index.html">{{ brand }}</a>
|
||||
<ul class="nav">
|
||||
{% for page in top_bar_items %}
|
||||
{% if not page.parent_label %}
|
||||
|
@ -1,4 +1,4 @@
|
||||
window._version_number = "c1dee2b8be9abfbe2a74619482b586b538f7253911fcb06c4c950b10";
|
||||
window._version_number = "2a070dfb16a80c744b13c7609859086ef91dfd755d70032ee00ee4f6";
|
||||
window.home_page = "index";
|
||||
// footer signup widget
|
||||
// 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">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<a class="brand">erpnext</a>
|
||||
<a class="brand" href="index.html">erpnext</a>
|
||||
<ul class="nav">
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user