fixes to about us

This commit is contained in:
Rushabh Mehta
2013-03-12 14:28:29 +05:30
parent 0642083399
commit 11b1fb811f
9 changed files with 79 additions and 66 deletions

View File

@@ -1,5 +1,6 @@
erpnext.updates = [ erpnext.updates = [
["5th March", ["Refactored Upload Attendace Tool"]], ["12th March", ["Updates to website module. Added more options in Style Settings and Website Settings."]],
["5th March", ["Refactored Upload Attendance Tool"]],
["4th March", ["Lead organization added in Quotation classic/spartan/modern print format"]], ["4th March", ["Lead organization added in Quotation classic/spartan/modern print format"]],
["1st March", [ ["1st March", [
"Time Log, Time Log Batch: Created feature to batch Time Logs so that they can be tracked for billing.", "Time Log, Time Log Batch: Created feature to batch Time Logs so that they can be tracked for billing.",

View File

@@ -98,12 +98,6 @@ wn.module_page["Setup"] = [
label:wn._("Print Heading"), label:wn._("Print Heading"),
"description":wn._("Add headers for standard print formats") "description":wn._("Add headers for standard print formats")
}, },
{
"route":"Form/Style Settings/Style Settings",
doctype:wn._("Style Settings"),
label:wn._("Style Settings"),
"description":wn._("Change background fonts etc")
}
] ]
}, },
{ {

View File

@@ -8,15 +8,15 @@ class DocType:
def __init__(self, d, dl): def __init__(self, d, dl):
self.doc, self.doclist = d, dl self.doc, self.doclist = d, dl
def onload(self):
"""load employee"""
emp_list = []
for d in self.doclist.get({"doctype":"About Us Team Member"}):
emp = webnotes.doc("Employee", d.employee)
emp.image = url_for_website(emp.image)
emp_list.append(emp)
self.doclist += emp_list
def on_update(self): def on_update(self):
from website.utils import clear_cache from website.utils import clear_cache
clear_cache("about") clear_cache("about")
def get_args():
obj = webnotes.get_obj("About Us Settings")
for d in obj.doclist.get({"doctype":"About Us Team Member"}):
if not "/" in d.image_link:
d.image_link = "files/" + d.image_link
return {
"obj": obj
}

View File

@@ -1,12 +1,13 @@
[ [
{ {
"creation": "2013-01-10 16:34:32", "creation": "2013-03-07 15:53:15",
"docstatus": 0, "docstatus": 0,
"modified": "2013-01-22 14:12:16", "modified": "2013-03-12 13:51:29",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
{ {
"allow_attach": 1,
"description": "Settings for the About Us Page", "description": "Settings for the About Us Page",
"doctype": "DocType", "doctype": "DocType",
"document_type": "Master", "document_type": "Master",
@@ -31,7 +32,7 @@
"parenttype": "DocType", "parenttype": "DocType",
"permlevel": 0, "permlevel": 0,
"read": 1, "read": 1,
"report": 1, "report": 0,
"role": "Website Manager", "role": "Website Manager",
"submit": 0, "submit": 0,
"write": 1 "write": 1
@@ -101,6 +102,15 @@
"fieldtype": "Text Editor", "fieldtype": "Text Editor",
"label": "Footer" "label": "Footer"
}, },
{
"doctype": "DocField",
"fieldname": "file_list",
"fieldtype": "Text",
"hidden": 1,
"label": "File List",
"no_copy": 1,
"print_hide": 1
},
{ {
"doctype": "DocPerm" "doctype": "DocPerm"
} }

View File

@@ -1,8 +1,8 @@
[ [
{ {
"creation": "2013-02-22 01:28:07", "creation": "2013-03-07 11:55:11",
"docstatus": 0, "docstatus": 0,
"modified": "2013-03-07 07:03:18", "modified": "2013-03-12 13:51:02",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@@ -14,23 +14,38 @@
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "employee",
"fieldtype": "Link",
"label": "Employee",
"name": "__common__", "name": "__common__",
"options": "Employee",
"parent": "About Us Team Member", "parent": "About Us Team Member",
"parentfield": "fields", "parentfield": "fields",
"parenttype": "DocType", "parenttype": "DocType",
"permlevel": 0, "permlevel": 0
"print_width": "300px",
"width": "300px"
}, },
{ {
"doctype": "DocType", "doctype": "DocType",
"name": "About Us Team Member" "name": "About Us Team Member"
}, },
{ {
"doctype": "DocField" "doctype": "DocField",
"fieldname": "full_name",
"fieldtype": "Data",
"label": "Full Name",
"reqd": 1,
"width": "150px"
},
{
"doctype": "DocField",
"fieldname": "image_link",
"fieldtype": "Select",
"label": "Image Link",
"options": "attach_files:",
"width": "150px"
},
{
"doctype": "DocField",
"fieldname": "bio",
"fieldtype": "Small Text",
"label": "Bio",
"reqd": 1,
"width": "200px"
} }
] ]

View File

@@ -2,7 +2,7 @@
{ {
"creation": "2013-03-08 11:36:53", "creation": "2013-03-08 11:36:53",
"docstatus": 0, "docstatus": 0,
"modified": "2013-03-12 11:34:32", "modified": "2013-03-12 13:35:14",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@@ -65,6 +65,12 @@
"fieldtype": "Data", "fieldtype": "Data",
"label": "Page Background" "label": "Page Background"
}, },
{
"doctype": "DocField",
"fieldname": "page_border",
"fieldtype": "Check",
"label": "Page Border"
},
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "page_headings", "fieldname": "page_headings",
@@ -83,16 +89,11 @@
"fieldtype": "Data", "fieldtype": "Data",
"label": "Page Links" "label": "Page Links"
}, },
{
"doctype": "DocField",
"fieldname": "page_border",
"fieldtype": "Check",
"label": "Page Border"
},
{ {
"doctype": "DocField", "doctype": "DocField",
"fieldname": "cb0", "fieldname": "cb0",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"label": "Top Bar",
"print_width": "50%", "print_width": "50%",
"width": "50%" "width": "50%"
}, },

View File

@@ -8,6 +8,5 @@
</div> </div>
<div style="height: 100px; overflow: hidden; font-size: 80%;"> <div style="height: 100px; overflow: hidden; font-size: 80%;">
<h4 style="margin-bottom: 2px;"><a href="{{ page_name }}">{{ item_name }}</a></h4> <h4 style="margin-bottom: 2px;"><a href="{{ page_name }}">{{ item_name }}</a></h4>
<p class="help">Item Code: {{ name }}</p>
</div> </div>
</div> </div>

View File

@@ -7,34 +7,27 @@
{{ obj.doc.company_introduction or "<h2>About Us</h2><p>Some Introduction about your company that you would like your website visitor to know. More people than you think will read your About page. People always like to know who the are doing business with. Be authentic and avoid using jargon like 'value added services' etc. Be sure to update your company history and list of key team members in Website > About Us Settings</p>" }} {{ obj.doc.company_introduction or "<h2>About Us</h2><p>Some Introduction about your company that you would like your website visitor to know. More people than you think will read your About page. People always like to know who the are doing business with. Be authentic and avoid using jargon like 'value added services' etc. Be sure to update your company history and list of key team members in Website > About Us Settings</p>" }}
{% if obj.doclist.get({"doctype":"Company History"}) %} {% if obj.doclist.get({"doctype":"Company History"}) %}
<h3>{{ obj.doc.company_history_heading or "Company History" }}</h3> <h3>{{ obj.doc.company_history_heading or "Company History" }}</h3>
<table class="table table-bordered" style="width: 100%; table-layout: fixed"> {% for d in obj.doclist.get({"doctype":"Company History"}) %}
<tbody> <div class="row">
{% for d in obj.doclist.get({"doctype":"Company History"}) %} <span class="span2" style="text-align: right"><h4 style="margin:0px;">{{ d.year }}</h4></span>
<tr> <span class="span10"><p>{{ d.highlight }}</p></span>
<td style="width: 30%; text-align: right"><h4>{{ d.year }}</h4></td> </div>
<td>{{ d.highlight }}</td> {% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% endif %} {% endif %}
{% if obj.doclist.get({"doctype":"Employee"}) %} {% if obj.doclist.get({"doctype":"About Us Team Member"}) %}
<h3>{{ obj.doc.team_members_heading or "Team Members" }}</h3> <h3>{{ obj.doc.team_members_heading or "Team Members" }}</h3>
<table class="table" style="width: 100%; table-layout: fixed"> {% for d in obj.doclist.get({"doctype":"About Us Team Member"}) %}
<tbody> <div class="row" itemscope itemtype="http://schema.org/Person">
{% for d in obj.doclist.get({"doctype":"Employee"}) %} <span class="span2">
<tr itemscope itemtype="http://schema.org/Person"> <div class="avatar avatar-large">
<td style="text-align:right; width: 20%;"> <img class="avatar" src="{{ d.image }}" style="" itemprop="image">
<div class="avatar avatar-x-large"> </div>
<img class="avatar" src="{{ d.image }}" style="" itemprop="image"> </span>
</div> <span class="span10"><h4 itemprop="name">{{ d.full_name }}</h4>
</td> <div itemprop="description">{{ d.bio }}</div>
<td><h4 itemprop="name">{{ d.employee_name }}</h4> </span>
<div itemprop="description">{{ d.bio }}</div></td> </div>
</tr> {% endfor %}
{% endfor %}
</tbody>
</table>
{% endif %} {% endif %}
{{ obj.doc.footer or "" }} {{ obj.doc.footer or "" }}
</div> </div>

View File

@@ -40,7 +40,7 @@ page_map = {
} }
page_settings_map = { page_settings_map = {
"about": "About Us Settings", "about": "website.doctype.about_us_settings.about_us_settings.get_args",
"contact": "Contact Us Settings", "contact": "Contact Us Settings",
"blog": "website.helpers.blog.get_blog_template_args", "blog": "website.helpers.blog.get_blog_template_args",
"writers": "website.helpers.blog.get_writers_args" "writers": "website.helpers.blog.get_writers_args"