From f63513ed382922001e14bf7a7c1797eb309f68cb Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 21 Apr 2014 11:42:22 +0530 Subject: [PATCH] minor fixes to website --- erpnext/setup/doctype/company/company.py | 6 +- .../setup/doctype/item_group/item_group.py | 6 +- .../page/setup_wizard/sample_home_page.css | 11 +- .../setup/page/setup_wizard/setup_wizard.js | 144 ++++++++-------- erpnext/templates/generators/item.html | 1 - erpnext/templates/generators/item_group.html | 5 +- erpnext/templates/generators/item_group.py | 2 +- .../includes/product_breadcrumbs.html | 10 -- .../includes/product_search_box.html | 6 +- erpnext/translations/de.csv | 157 ++++++++++++++---- 10 files changed, 224 insertions(+), 124 deletions(-) delete mode 100644 erpnext/templates/includes/product_breadcrumbs.html diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 83a55c85333..01498774f2f 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -242,11 +242,11 @@ class Company(Document): [_('Reserves and Surplus'),_('Capital Account'),'Ledger','','Balance Sheet',self.name,''], [_('Shareholders Funds'),_('Capital Account'),'Ledger','','Balance Sheet',self.name,''], [_('Current Liabilities'),_('Source of Funds (Liabilities)'),'Group','','Balance Sheet',self.name,''], - [_('Accounts Payable'),'Current Liabilities','Group','','Balance Sheet',self.name,''], - [_('Stock Liabilities'),'Current Liabilities','Group','','Balance Sheet',self.name,''], + [_('Accounts Payable'),_('Current Liabilities'),'Group','','Balance Sheet',self.name,''], + [_('Stock Liabilities'),_('Current Liabilities'),'Group','','Balance Sheet',self.name,''], [_('Stock Received But Not Billed'), _('Stock Liabilities'), 'Ledger', 'Stock Received But Not Billed', 'Balance Sheet', self.name, ''], [_('Duties and Taxes'),_('Current Liabilities'),'Group','','Balance Sheet',self.name,''], - [_('Loans (Liabilities)'),'Current Liabilities','Group','','Balance Sheet',self.name,''], + [_('Loans (Liabilities)'),_('Current Liabilities'),'Group','','Balance Sheet',self.name,''], [_('Secured Loans'),_('Loans (Liabilities)'),'Group','','Balance Sheet',self.name,''], [_('Unsecured Loans'),_('Loans (Liabilities)'),'Group','','Balance Sheet',self.name,''], [_('Bank Overdraft Account'),_('Loans (Liabilities)'),'Group','','Balance Sheet',self.name,''], diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index fcdd4b2a01e..df42bb575b1 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -27,10 +27,12 @@ class ItemGroup(NestedSet, WebsiteGenerator): self.validate_one_root() def after_rename(self, olddn, newdn, merge=False): - super(ItemGroup, self).on_update() + NestedSet.after_rename(self) + WebsiteGenerator.after_rename(self) def on_trash(self): - super(ItemGroup, self).on_update() + NestedSet.on_trash(self) + WebsiteGenerator.on_trash(self) def validate_name_with_item(self): if frappe.db.exists("Item", self.name): diff --git a/erpnext/setup/page/setup_wizard/sample_home_page.css b/erpnext/setup/page/setup_wizard/sample_home_page.css index c1f1ee35c52..66eefcbca00 100644 --- a/erpnext/setup/page/setup_wizard/sample_home_page.css +++ b/erpnext/setup/page/setup_wizard/sample_home_page.css @@ -15,15 +15,18 @@ border-top: 1px solid #f2f2f2; } +.container { + max-width: 900px; +} + .slide h3 { margin-bottom: 70px; } .img-wrapper { - display: table-cell; - vertical-align: middle; text-align: center; - padding: 10px; + padding: 30px; + background-color: #eee; border-radius: 5px; - border: 1px solid #f9f9f9; + margin-bottom: 15px; } diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.js b/erpnext/setup/page/setup_wizard/setup_wizard.js index 968007a14c9..bd7a3bf1959 100644 --- a/erpnext/setup/page/setup_wizard/setup_wizard.js +++ b/erpnext/setup/page/setup_wizard/setup_wizard.js @@ -48,7 +48,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { __('Sit tight while your system is being setup. This may take a few moments.') + '

' }, complete_html: function() { return '

\ -

'+__('Setup Complete!')+'

\ +

'+__('Setup Complete')+'

\

' + __('Your setup is complete. Refreshing...') + '

'}, @@ -221,6 +221,16 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { "title": __("Add Taxes"), "help": __("List your tax heads (e.g. VAT, Excise) (upto 3) and their standard rates. This will create a standard template, you can edit and add more later."), "fields": [], + before_load: function(slide) { + for(var i=1; i<4; i++) { + slide.fields = slide.fields.concat([ + {fieldtype:"Data", fieldname:"tax_"+ i, label:__("Tax") + " " + i, placeholder:__("e.g. VAT")}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"tax_rate_i", label:__("Rate (%)"), placeholder:__("e.g. 5")}, + {fieldtype:"Section Break"}, + ]); + } + } }, // Customers @@ -229,6 +239,18 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { "title": __("Your Customers"), "help": __("List a few of your customers. They could be organizations or individuals."), "fields": [], + before_load: function(slide) { + for(var i=1; i<6; i++) { + slide.fields = slide.fields.concat([ + {fieldtype:"Data", fieldname:"customer_" + i, label:__("Customer") + " " + i, + placeholder:__("Customer Name")}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"customer_contact_" + i, + label:__("Contact"), placeholder:__("Contact Name")}, + {fieldtype:"Section Break"} + ]) + } + } }, // Items to Sell @@ -237,6 +259,24 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { "title": __("Your Products or Services"), "help": __("List your products or services that you sell to your customers. Make sure to check the Item Group, Unit of Measure and other properties when you start."), "fields": [], + before_load: function(slide) { + for(var i=1; i<6; i++) { + slide.fields = slide.fields.concat([ + {fieldtype:"Data", fieldname:"item_" + i, label:__("Item") + " " + i, + placeholder:__("A Product or Service")}, + {fieldtype:"Column Break"}, + {fieldtype:"Attach", fieldname:"item_img_" + i, label:__("Attach Image")}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", label:"Group", fieldname:"item_group_" + i, + options:[__("Products"), __("Services")]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_uom_" + i, label:"UOM", + options:[__("Unit"), __("Nos"), __("Box"), __("Pair"), __("Kg"), __("Set"), __("Hour"), __("Minute")]}, + {fieldtype:"Section Break"} + ]) + } + } }, // Suppliers @@ -245,6 +285,18 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { "title": __("Your Suppliers"), "help": __("List a few of your suppliers. They could be organizations or individuals."), "fields": [], + before_load: function(slide) { + for(var i=1; i<6; i++) { + slide.fields = slide.fields.concat([ + {fieldtype:"Data", fieldname:"supplier_" + i, label:__("Supplier")+" " + i, + placeholder:"Supplier Name"}, + {fieldtype:"Column Break"}, + {fieldtype:"Data", fieldname:"supplier_contact_" + i, + label:"Contact", placeholder:__("Contact Name")}, + {fieldtype:"Section Break"} + ]) + } + } }, // Items to Buy @@ -253,77 +305,28 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { "title": __("Products or Services You Buy"), "help": __("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."), "fields": [], + before_load: function(slide) { + for(var i=1; i<6; i++) { + slide.fields = slide.fields.concat([ + {fieldtype:"Data", fieldname:"item_buy_" + i, label: __("Item") + " " + i, + placeholder:__("A Product or Service")}, + {fieldtype:"Column Break"}, + {fieldtype:"Section Break"}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_group_" + i, label: __("Group"), + options:[__("Raw Material"), __("Consumable"), __("Sub Assemblies"), __("Services"), __("Products")]}, + {fieldtype:"Column Break"}, + {fieldtype:"Select", fieldname:"item_buy_uom_" + i, label: __("UOM"), + options:[__("Unit"), __("Nos"), __("Box"), __("Pair"), __("Kg"), __("Set"), __("Hour"), __("Minute")]}, + {fieldtype:"Section Break"}, + ]) + } + } }, ] } - // taxes - for(var i=1; i<4; i++) { - wizard_settings.slides[5].fields = wizard_settings.slides[5].fields.concat([ - {fieldtype:"Data", fieldname:"tax_"+ i, label:__("Tax") + " " + i, placeholder:__("e.g. VAT")}, - {fieldtype:"Column Break"}, - {fieldtype:"Data", fieldname:"tax_rate_i", label:__("Rate (%)"), placeholder:__("e.g. 5")}, - {fieldtype:"Section Break"}, - ]) - } - - // customers - for(var i=1; i<6; i++) { - wizard_settings.slides[6].fields = wizard_settings.slides[6].fields.concat([ - {fieldtype:"Data", fieldname:"customer_" + i, label:__("Customer") + " " + i, - placeholder:__("Customer Name")}, - {fieldtype:"Column Break"}, - {fieldtype:"Data", fieldname:"customer_contact_" + i, - label:__("Contact"), placeholder:__("Contact Name")}, - {fieldtype:"Section Break"} - ]) - } - - // products - for(var i=1; i<6; i++) { - wizard_settings.slides[7].fields = wizard_settings.slides[7].fields.concat([ - {fieldtype:"Data", fieldname:"item_" + i, label:__("Item") + " " + i, - placeholder:__("A Product or Service")}, - {fieldtype:"Column Break"}, - {fieldtype:"Attach", fieldname:"item_img_" + i, label:__("Attach Image")}, - {fieldtype:"Section Break"}, - {fieldtype:"Column Break"}, - {fieldtype:"Select", label:"Group", fieldname:"item_group_" + i, - options:[_("Products"), _("Services")]}, - {fieldtype:"Column Break"}, - {fieldtype:"Select", fieldname:"item_uom_" + i, label:"UOM", - options:[_("Unit"), _("Nos"), _("Box"), _("Pair"), _("Kg"), _("Set"), _("Hour"), _("Minute")]}, - {fieldtype:"Section Break"} - ]) - } - - for(var i=1; i<6; i++) { - wizard_settings.slides[8].fields = wizard_settings.slides[8].fields.concat([ - {fieldtype:"Data", fieldname:"supplier_" + i, label:__("Supplier")+" " + i, - placeholder:"Supplier Name"}, - {fieldtype:"Column Break"}, - {fieldtype:"Data", fieldname:"supplier_contact_" + i, - label:"Contact", placeholder:__("Contact Name")}, - {fieldtype:"Section Break"} - ]) - } - - for(var i=1; i<6; i++) { - wizard_settings.slides[9].fields = wizard_settings.slides[9].fields.concat([ - {fieldtype:"Data", fieldname:"item_buy_" + i, label: __("Item") + " " + i, - placeholder:__("A Product or Service")}, - {fieldtype:"Column Break"}, - {fieldtype:"Section Break"}, - {fieldtype:"Column Break"}, - {fieldtype:"Select", fieldname:"item_buy_group_" + i, label: __("Group"), - options:[_("Raw Material"), _("Consumable"), _("Sub Assemblies"), _("Services"), _("Products")]}, - {fieldtype:"Column Break"}, - {fieldtype:"Select", fieldname:"item_buy_uom_" + i, label: __("UOM"), - options:[_("Unit"), _("Nos"), _("Box"), _("Pair"), _("Kg"), _("Set"), _("Hour"), _("Minute")]}, - {fieldtype:"Section Break"}, - ]) - } erpnext.wiz = new frappe.wiz.Wizard(wizard_settings) } @@ -420,6 +423,11 @@ frappe.wiz.WizardSlide = Class.extend({ make: function() { var me = this; if(this.$body) this.$body.remove(); + + if(this.before_load) { + this.before_load(this); + } + this.$body = $(repl('
\
\
\ @@ -439,7 +447,7 @@ frappe.wiz.WizardSlide = Class.extend({
\
\