Merge branch 'webshop' of github.com:webnotes/erpnext into responsive
Conflicts:
selling/doctype/quotation/quotation.js
diff --git a/accounts/README.md b/accounts/README.md
new file mode 100644
index 0000000..10a99e5
--- /dev/null
+++ b/accounts/README.md
@@ -0,0 +1,13 @@
+Accounts module contains masters and transactions to manage a traditional
+double entry accounting system.
+
+Accounting heads are called "Accounts" and they can be groups in a tree like
+"Chart of Accounts"
+
+Entries are:
+
+- Journal Vouchers
+- Sales Invoice (Itemised)
+- Purchase Invoice (Itemised)
+
+All accounting entries are stored in the `General Ledger`
\ No newline at end of file
diff --git a/accounts/doctype/account/README.md b/accounts/doctype/account/README.md
new file mode 100644
index 0000000..44cdf50
--- /dev/null
+++ b/accounts/doctype/account/README.md
@@ -0,0 +1,11 @@
+Account DocType represents an Accounting Ledger or Group.
+
+Follows a composite model. `parent_account` represents the parent of an Account except
+a root account.
+There can be only 4 root accounts: Income, Expense, Assets and Liabilities in a company.
+
+Other features:
+
+- It can be of type Debit or Credit.
+- A Group is a collection of groups or ledgers
+
diff --git a/accounts/page/accounts_browser/accounts_browser.html b/accounts/page/accounts_browser/accounts_browser.html
deleted file mode 100644
index 91a1e26..0000000
--- a/accounts/page/accounts_browser/accounts_browser.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
- <div class="appframe-area"></div>
- <div class="layout-main">
- <div class="tree-area"></div>
- <hr>
- <div class="well">
- <h4>Quick Help</h4>
- <ol>
- <li>To add child nodes, explore tree and click on the node under which you want to add more nodes.
- <li>Accounting Entries can be made against leaf nodes, called <b>Ledgers</b>. Entries against <b>Groups</b> are not allowed.
- <li>Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.
- <li><b>To create a Bank Account:</b> Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts) and create a new Account Ledger (by clicking on Add Child) of type "Bank or Cash"
- <li><b>To create a Tax Account:</b> Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties) and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.
- </ol>
- <p>Please setup your chart of accounts before you start Accounting Entries</p>
- </div>
- </div>
-</div>
\ No newline at end of file
diff --git a/accounts/page/accounts_browser/accounts_browser.js b/accounts/page/accounts_browser/accounts_browser.js
index 2e8cc82..534201a 100644
--- a/accounts/page/accounts_browser/accounts_browser.js
+++ b/accounts/page/accounts_browser/accounts_browser.js
@@ -21,9 +21,37 @@
// see ledger
pscript['onload_Accounts Browser'] = function(wrapper){
- wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
- wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Accounts")
+ wn.ui.make_app_page({
+ parent: wrapper,
+ single_column: true
+ })
+
+ wrapper.appframe.add_module_icon("Accounts");
+
+ var main = $(wrapper).find(".layout-main"),
+ chart_area = $("<div>")
+ .css({"margin-bottom": "15px"})
+ .appendTo(main),
+ help_area = $('<div class="well">\
+ <h4>Quick Help</h4>\
+ <ol>\
+ <li>To add child nodes, explore tree and click on the node under which you \
+ want to add more nodes.\
+ <li>Accounting Entries can be made against leaf nodes, called <b>Ledgers</b>.\
+ Entries against <b>Groups</b> are not allowed.\
+ <li>Please do NOT create Account (Ledgers) for Customers and Suppliers. \
+ They are created directly from the Customer / Supplier masters.\
+ <li><b>To create a Bank Account:</b> Go to the appropriate group \
+ (usually Application of Funds > Current Assets > Bank Accounts)\
+ and create a new Account Ledger (by clicking on Add Child) of \
+ type "Bank or Cash"\
+ <li><b>To create a Tax Account:</b> Go to the appropriate group \
+ (usually Source of Funds > Current Liabilities > Taxes and Duties) \
+ and create a new Account Ledger (by clicking on Add Child) of type\
+ "Tax" and do mention the Tax rate.\
+ </ol>\
+ <p>Please setup your chart of accounts before you start Accounting Entries</p>\
+ </div>').appendTo(main);
if (wn.boot.profile.can_create.indexOf("Company") !== -1) {
wrapper.appframe.add_button('New Company', function() { newdoc('Company'); },
@@ -35,13 +63,13 @@
}, 'icon-refresh');
// company-select
- wrapper.$company_select = $('<select class="accbrowser-company-select"></select>')
+ wrapper.$company_select = wrapper.appframe.add_select("Company", [])
.change(function() {
var ctype = wn.get_route()[1] || 'Account';
- erpnext.account_chart = new erpnext.AccountsChart(ctype, $(this).val(), wrapper);
+ erpnext.account_chart = new erpnext.AccountsChart(ctype, $(this).val(),
+ chart_area.get(0));
pscript.set_title(wrapper, ctype, $(this).val());
})
- .appendTo(wrapper.appframe.$w.find('.appframe-toolbar'));
// load up companies
wn.call({
@@ -77,7 +105,7 @@
erpnext.AccountsChart = Class.extend({
init: function(ctype, company, wrapper) {
- $(wrapper).find('.tree-area').empty();
+ $(wrapper).empty();
var me = this;
me.ctype = ctype;
me.can_create = wn.model.can_create(this.ctype);
@@ -87,7 +115,7 @@
me.company = company;
this.tree = new wn.ui.Tree({
- parent: $(wrapper).find('.tree-area'),
+ parent: $(wrapper),
label: company,
args: {ctype: ctype, comp: company},
method: 'accounts.page.accounts_browser.accounts_browser.get_children',
diff --git a/accounts/page/financial_analytics/financial_analytics.js b/accounts/page/financial_analytics/financial_analytics.js
index f714549..aac7076 100644
--- a/accounts/page/financial_analytics/financial_analytics.js
+++ b/accounts/page/financial_analytics/financial_analytics.js
@@ -25,7 +25,7 @@
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Accounts")
+ wrapper.appframe.add_module_icon("Accounts")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/accounts/page/financial_statements/financial_statements.html b/accounts/page/financial_statements/financial_statements.html
index e6735fa..bc2fce0 100644
--- a/accounts/page/financial_statements/financial_statements.html
+++ b/accounts/page/financial_statements/financial_statements.html
@@ -1,28 +1,5 @@
-<div class="layout_wrapper">
+<div class="appframe col col-lg-12">
<div id="fs_header"></div>
-<!-- table.statement td { vertical-align: middle; } table.statement td select { width: 100px; } table.stmt_table { table-layout: fixed; border-collapse: collapse; } table.stmt_table td { vertical-align: middle; padding: 2px; } td.stmt_level0 { font-weight: bold; font-size: 14px; border-bottom: 1px solid #AAA; } td.stmt_level1 { font-weight: bold; font-size: 12px; } td.stmt_level2 { font-size: 11px; } td.stmt_level3 { font-size: 11px; } td.stmt_level4 { font-size: 12px; font-weight: bold; border-bottom: 1px solid #000; } td.stmt_level5 { color: BLUE; font-size: 11px; } --> <!--
-<div style="border: 1px solid #cccccc; padding: 4px; margin-top: 8px; background-color: #eeeeee; width: 98%;">
-<table class="statement" border="0" cellspacing="2px">
-<tbody>
-<tr>
-<td>Statement:</td>
-<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_type"></select></td>
-<td>Company:</td>
-<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_company"></select></td>
-<td>Period Type:</td>
-<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_period"></select></td>
-<td>Fiscal Year:</td>
-<td style="padding-right: 8px;" mce_style="padding-right: 8px;"><select id="stmt_fiscal_year"></select></td>
-<td style="padding-right: 8px;" mce_style="padding-right: 8px;">
-<div id="stmt_new"></div>
-</td>
-</tr>
-</tbody>
-</table>
-</div>
---> <!--
-<div style="margin:10px 0px 10px 0px" mce_style="margin:10px 0px 10px 0px"><button class="button" onclick="pscript.print_statement();">Print</button></div>
--->
<div id="print_html">
<div id="stmt_title1" style="margin:16px 0px 4px 0px; font-size: 16px; font-weight: bold; color: #888;"></div>
<div id="stmt_title2" style="margin:0px 0px 8px 0px; font-size: 16px; font-weight: bold;"></div>
diff --git a/accounts/page/general_ledger/general_ledger.js b/accounts/page/general_ledger/general_ledger.js
index a462b70..6a7d604 100644
--- a/accounts/page/general_ledger/general_ledger.js
+++ b/accounts/page/general_ledger/general_ledger.js
@@ -24,7 +24,7 @@
erpnext.general_ledger = new erpnext.GeneralLedger(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Accounts")
+ wrapper.appframe.add_module_icon("Accounts")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/accounts/page/trial_balance/trial_balance.js b/accounts/page/trial_balance/trial_balance.js
index c64075f..9c4c50a 100644
--- a/accounts/page/trial_balance/trial_balance.js
+++ b/accounts/page/trial_balance/trial_balance.js
@@ -59,6 +59,6 @@
erpnext.trial_balance = new TrialBalance(wrapper, 'Trial Balance');
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Accounts")
+ wrapper.appframe.add_module_icon("Accounts")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
\ No newline at end of file
diff --git a/buying/page/buying_home/buying_home.js b/buying/page/buying_home/buying_home.js
index 2070fd4..e45e73d 100644
--- a/buying/page/buying_home/buying_home.js
+++ b/buying/page/buying_home/buying_home.js
@@ -13,7 +13,7 @@
},
{
label: wn._("Supplier Quotation"),
- description: wn._("Track Quotations received from Suppliers."),
+ description: wn._("Quotations received from Suppliers."),
doctype:"Supplier Quotation"
},
{
diff --git a/buying/page/purchase_analytics/purchase_analytics.js b/buying/page/purchase_analytics/purchase_analytics.js
index fc082ea..857a335 100644
--- a/buying/page/purchase_analytics/purchase_analytics.js
+++ b/buying/page/purchase_analytics/purchase_analytics.js
@@ -24,7 +24,7 @@
new erpnext.PurchaseAnalytics(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Buying")
+ wrapper.appframe.add_module_icon("Buying")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/config.json b/config.json
index cb1a831..40b526c 100644
--- a/config.json
+++ b/config.json
@@ -68,11 +68,12 @@
"icon": "icon-play",
"label": "Activity"
},
- "Knowledge Base": {
- "type": "page",
- "link": "questions",
+ "Notes": {
+ "type": "list",
+ "doctype": "Note",
+ "link": "List/Note",
"color": "#01372b",
- "label": "Knowledge Base",
+ "label": "Notes",
"icon": "icon-question-sign"
}
},
diff --git a/docs/docs.dev.md b/docs/docs.dev.md
new file mode 100644
index 0000000..6c46abf
--- /dev/null
+++ b/docs/docs.dev.md
@@ -0,0 +1,15 @@
+---
+{
+ "_label": "Developer API",
+ "_toc": [
+ "docs.dev.quickstart",
+ "docs.dev.framework",
+ "docs.dev.modules"
+ ]
+}
+---
+### Is this for me?
+
+To starting hacking into ERPNext, you must have some understanding of how a dynamic web application works. There are hundreds of architectures and frameworks to make web development easier, but at the core there are a few elements that are important to understand.
+
+ERPNext is built on `wnframework` which is primarily developed for ERPNext but can be extended to make similar database driven applications. wnframework uses Python on the server-side and has a javascript based client for entering data, managing workflow and making reports.
\ No newline at end of file
diff --git a/docs/docs.dev.modules.md b/docs/docs.dev.modules.md
new file mode 100644
index 0000000..34fea9a
--- /dev/null
+++ b/docs/docs.dev.modules.md
@@ -0,0 +1,6 @@
+---
+{
+ "_label": "Modules"
+}
+---
+The models used in both `wnframework` (**Core** module) and ERPNext are listed here. The basic element of the model is a `DocType`, which is most often also a database table. The model properties are called `DocFields`, which describe the view and the database columns.
\ No newline at end of file
diff --git a/docs/docs.md b/docs/docs.md
new file mode 100644
index 0000000..7cf47a9
--- /dev/null
+++ b/docs/docs.md
@@ -0,0 +1,24 @@
+---
+{
+ "_label": "ERPNext",
+ "_no_title": 1,
+ "_toc": [
+ "docs.user",
+ "docs.dev",
+ "docs.download",
+ "docs.community",
+ "docs.blog",
+ "docs.about"
+ ]
+}
+---
+<div class="jumbotron">
+ <h1>ERPNext</h1>
+ <p>Open Source Organization Management Platform</p>
+</div>
+
+### Is this for me?
+
+To starting hacking into ERPNext, you must have some understanding of how a dynamic web application works. There are hundreds of architectures and frameworks to make web development easier, but at the core there are a few elements that are important to understand.
+
+ERPNext is built on `wnframework` which is primarily developed for ERPNext but can be extended to make similar database driven applications. wnframework uses Python on the server-side and has a javascript based client for entering data, managing workflow and making reports.
\ No newline at end of file
diff --git a/docs/docs.user.intro.md b/docs/docs.user.intro.md
new file mode 100644
index 0000000..4aada62
--- /dev/null
+++ b/docs/docs.user.intro.md
@@ -0,0 +1,54 @@
+---
+{
+ "_label": "Introduction",
+ "_title_image": "img/why-erpnext.png"
+}
+---
+## What is an ERP and why should I care?
+
+Small business are not so different from large ones. They contain most of the complexities of a large business but with many more constraints. Small businesses have to communicate with customers, do accounts, pay taxes, do payroll, manage timelines, deliver quality, answer questions and keep everyone happy just like large businesses.
+
+And to it *efficiently*.
+
+Large businesses have the advantage of using advanced data systems to manage their process efficiently. Small businesses typically struggle to keep things organized. They are often using a mix of apps like spreadsheets, accounting software, web CRM etc to manage but not everyone is on the same page. An ERP changes that.
+
+---
+
+## What is ERPNext?
+
+ERPNext helps you to manage all your business information in one application and use it to manage operations and take decisions based on data.
+
+Among other things, ERPNext will help you to:
+
+- Track all Invoices and Payments.
+- Know what quantity of what product is available in stock.
+- Identify open customer queries.
+- Manage payroll.
+- Assign tasks and follow up on them.
+- Maintain a database of all your customers, suppliers and their contacts.
+- Prepare quotes.
+- Get reminders on maintenance schedules.
+- Publish you website.
+
+And a lot lot lot more.
+
+---
+
+## Why Should I Use ERPNext?
+
+ERPNext is a modern accounting plus everything system and has many benefits over both traditional accounting as well as ERP applications.
+
+### Benefits over traditional accounting software:
+
+- Do a lot more than just accounting! Manage inventory, billing, quotes, leads, payroll and much much more.
+- All data safe and in one place. Don’t keep hunting for data when you need it across spreadsheets and different computers.
+- Everyone on the same page. All users get the same update data.
+- Stop repetitive work. Don’t enter the same information from your word processor to your accounting tool. Its all integrated.
+- Keep track. Get the entire history of a customer or a deal in one place.
+
+### Benefits over big ERPs
+
+- $$$ - Save money.
+- Easier to configure. Big ERPs are notoriously hard to setup and will ask you a zillion questions before you can do something meaningful.
+- Easier to use. Modern web like user interface will keep your users happy and in familiar territory.
+- Open Source. This software is always free and you can host it anywhere you like.
\ No newline at end of file
diff --git a/docs/docs.user.md b/docs/docs.user.md
new file mode 100644
index 0000000..bb32882
--- /dev/null
+++ b/docs/docs.user.md
@@ -0,0 +1,10 @@
+---
+{
+ "_label": "User Guide",
+ "_toc": [
+ "docs.user.intro",
+ "docs.user.setup"
+ ]
+}
+---
+This manual covers all the major processes in setting up and using ERPNext. The manual is written in a way that the user can manage a self-implementation of the ERP. We recommend that the manual be read first before starting implementation.
diff --git a/docs/docs.user.setup.accounting.md b/docs/docs.user.setup.accounting.md
new file mode 100644
index 0000000..b10cf5b
--- /dev/null
+++ b/docs/docs.user.setup.accounting.md
@@ -0,0 +1,129 @@
+---
+{
+ "_label": "Accounting Setup",
+ "_title_image": "img/setup-accounting.png"
+}
+---
+## Chart of Accounts
+
+The Chart of Accounts forms the blueprint of your organization. The overall structure of your Chart of Accounts is based on a system of double entry accounting that has become a standard all over the world to quantify how a company is doing financially.
+
+The Chart of Accounts helps you answer:
+
+- What is your organization worth?
+- How much debt have you taken?
+- How much profit you are making (and hence paying tax)?
+- How much is are you selling?
+- How are your expenses broken up?
+
+As you can see, it is very valuable to you as a business manager to see how well your business is doing.
+
+> Tip: If you can’t read a Balance Sheet (I confess it took me a long time to figure this out) its a good opportunity to start learning about this. It will be worth the effort. You can also take the help of your accountant to setup your Chart of Accounts.
+
+To edit your Chart of Accounts in ERPNext go to:
+
+> Accounts > Chart of Accounts
+
+Chart of Accounts is a tree view of the names of the Accounts (Ledgers and Groups) that a Company requires to manage its books of accounts. ERPNext sets up a simple chart of accounts for each Company you create, but you have to modify it according to your needs and legal requirements.
+
+For each company, Chart of Accounts signifies the way to classify the accounting entries, mostly based on statutory (tax, compliance to government regulations) requirements.
+
+Let us understand the main groups of the Chart of Accounts.
+
+### Balance Sheet Accounts
+
+The Balance Sheet has Application of Funds (Assets) and Sources of Funds (Liabilities) that signify the net-worth of your company at any given time. When you begin or end a financial period, all the Assets are equal to the Liabilities.
+
+> Accounting: If you are new to accounting, you might be wondering, how can Assets be equal to Liabilities? That would mean the company has nothing of its own. Thats right. All the “investment” made in the company to buy assets (like land, furniture, machines) is made by the owners and is a liability to the company. If the company would to shut down, it would need to sell all the assets and pay back all the liabilities (including profits) to the owners, leaving itself with nothing.
+
+All the accounts under this represent an asset owned by company like "Bank Account", "Land and Property", "Furniture" or a liability (funds that the company owes to others) like "Owners funds", "Debt" etc.
+
+Two special accounts to note here are Accounts Receivable (money you have to collect from your customers) and Accounts Payable (money you have to pay to your suppliers) under Assets and Liabilities respectively.
+
+### Profit and Loss Accounts
+
+Profit and Loss is the group of Income and Expense accounts that represent your accounting transactions over a period.
+
+Unlike Balance sheet accounts, Profit and Loss accounts (or PL accounts) do not represent net worth (assets), but rather the amount of money spent and collected in servicing customers during the period. Hence at the beginning and end of your Fiscal Year, they become zero.
+
+(On the first day of the year you have not made any profit or loss, but you still have assets, hence balance sheet accounts never become zero at the beginning or end of a period)
+
+### Groups and Ledgers
+
+There are two main kinds of Accounts in ERPNext - Group and Ledger. Groups can have sub-groups and ledgers within them, whereas ledgers are the leaf nodes of your chart and cannot be further classified.
+
+Accounting Transactions can only be made against Ledger Accounts (not Groups)
+
+> Info: The term "Ledger" means a page in an accounting book where entries are made. There is usually one ledger for each account (like a Customer or a Supplier).
+
+> Note: An Account “Ledger” is also sometimes called as Account “Head”.
+
+### Other Account Types
+
+In ERPNext, you can also specify more information when you create a new Account, this is there to help you select that particular account in a scenario like Bank Account or a Tax Account and has no affect on the Chart itself.
+
+You can also tag if an account represents a Customer, Supplier or Employee in "Master Type".
+
+### Creating / Editing Accounts
+
+To create new Accounts, explore your Chart of Accounts and click on an Account group under which you want to create the new Account. On the right side, you will see a options to “Edit” or “Add” a new Account.
+
+Option to create will only appear if you click on a Group (folder) type Account.
+
+ERPNext creates a standard structure for you when the Company is created but it is up to you to modify or add or remove accounts.
+
+Typically, you might want to create Accounts for
+
+- Types of Expenses (travel, salaries, telephone etc) under Expenses.
+- Taxes (VAT, Sales Tax etc based on your country) under Current Liabilities.
+- Types of Sales (for example, Product Sales, Service Sales etc.) under Income.
+- Types of Assets (building, machinery, furniture etc.) under Fixed Assets.
+
+---
+
+## Chart of Cost Centers
+
+Your Chart of Accounts is mainly for reporting your information for governmental purposes and less for how you business actually performs. Though you can tweak it a bit to resemble your business.
+
+Most businesses have multiple activities like different product lines, market segments, areas of business that share some common overheads but should ideally have their own structure to report whether they are profitable or not. For this purpose, there is an alternate structure, called the Chart of Cost Centers.
+
+You can create a tree of Cost Centers to represent your business better. Each Income / Expense entry is also tagged against a Cost Center.
+
+For example, if you have two types of sales:
+
+- Walk-in Sales
+- Online Sales
+
+You may not have shipping expenses for your walk-in customers, and no shop-rent for your online customers. If you want to get the profitability of each of these separately, you create the two as Cost Centers and you can mark all sales as either "Walk-in" or "Online" and also all your purchases in the same way.
+
+So when you do your analysis you can get a better idea which side of your business is doing better. Since ERPNext has option to add multiple Companies, you can create Cost Centers for each Company and manage it separately.
+
+To setup your Chart of Cost Centers go to:
+
+> Accounts > Chart of Cost Centers
+
+Cost centers help you in one more activity, budgeting.
+
+### Budgeting
+
+ERPNext will help you set and manage budgets on your Cost Centers. This is useful when, for example, you are doing online sales and you have a budget for search ads and you want ERPNext to stop or warn you from over spending based on that budget.
+
+Budgets are also great for planning purposes. When you are making your plans for the next financial year, you would typically target a revenue and based on that you would set your expenses. Setting a budget will ensure that your expenses do not get out of hand at any point based on your plans.
+
+You can define it in the Cost Center. If you have seasonal sales you can also define a budget distribution that the budget will follow.
+
+#### Budget Actions
+
+ERPNext allows you to either:
+
+- Stop.
+- Warn or,
+- Ignore
+
+if you exceed budgets.
+
+These can be defined from the Company record.
+
+Even if you choose to “ignore” budget overruns, you will get a wealth of information from the “Budget vs Actual” variance report.
+
+> Note: When you set a budget, it has to be set per Account under the Cost Center. For example if you have a Cost Center “Online Sales”, you can restrict “Advertising Budget” by creating a row with that Account and defining the amount.
\ No newline at end of file
diff --git a/docs/docs.user.setup.before.md b/docs/docs.user.setup.before.md
new file mode 100644
index 0000000..158890f
--- /dev/null
+++ b/docs/docs.user.setup.before.md
@@ -0,0 +1,35 @@
+---
+{
+ "_label": "Before We Start",
+ "_title_image": "img/before-we-start.png"
+}
+---
+## Before We Start
+
+We have seem dozens of ERP implementations over the past few years and we realize that successful implementations are a lot about intangibles and attitude.
+
+> The Benefits come Later
+
+ERPs are not required.
+
+Like exercise.
+
+Human body does not require to be exercised today or maybe tomorrow, but in the long run, if you wish to maintain your body and its health, you should get on the treadmill.
+
+In the same way, ERPs improve the health of your organization over a long run by keep it fit and efficient. The more you delay putting things in order, the more time you lose and the closer you get to a major disaster.
+
+So when you start implementing an ERP, keep your sight on the long term benefits. Like exercise, its painful in the short run, but will do wonders if you stay on course.
+
+---
+
+## The Champion
+
+ERP means organization wide change and it does not happen without effort. Every change requires a champion and its the duty of the champion to organize and energize the entire team towards implementation. The champion is all the fall guy (or fall gal) incase something goes wrong and hence needs to be resilient. Who becomes a champion without putting effort anyways?
+
+In many organizations we have seen, the champion is most often the owner or a senior manager. Occasionally, the champion is an outsider who is hired for the purpose.
+
+In either case, you must identify your champion first.
+
+Most likely its **you!**
+
+Lets Begin!
diff --git a/docs/docs.user.setup.codification.md b/docs/docs.user.setup.codification.md
new file mode 100644
index 0000000..650e173
--- /dev/null
+++ b/docs/docs.user.setup.codification.md
@@ -0,0 +1,64 @@
+---
+{
+ "_label": "Item Codification"
+}
+---
+
+> To Codify or Not To Codify, is the question.
+
+If you already have a running business with a number of physical items, you would have probably coded your items. If you have not, you have a choice. We recommend you should codify, but its your call.
+
+Item codification is always a sensitive topic and wars have been fought on this (not joking). In our experience, when you have items that cross a certain size, life without codification is a nightmare.
+
+### Benefits
+
+- Standard way of naming things.
+- Less likely to have duplicates.
+- Explicit definition.
+- Help you quickly find if a similar item exists.
+- Item names get longer and longer as more types get introduced. Codes are shorter.
+
+### Pain
+
+- You have to remember the codes!
+- Harder for new team members to pick up.
+- You have to create new codes all the time.
+
+### Example
+
+You should have a simple manual / cheat-sheet to codify your items instead of just numbering them sequentially. Each letter should mean something. Here is an example:
+
+If your business involves wooden furniture, then you may codify as follows:
+
+Item Codification Summary Sheet
+(SAMPLE)
+
+ First letter: "Material" Third letter: "Size"
+
+ - W - Wood - 0 - less than 1mm
+ - H - Hardware - 1 - 1mm - 5mm
+ - G - Glass - 2 - 5mm - 10mm
+ - U - Upholstery - 3 - 10mm - 10cm
+ - P - Plastic
+
+ Second Letter: "Type"
+
+ For Wood: For Hardware:
+
+ - S - Sheet - S - Screw
+ - B - Bar - N - Nut
+ - L - L-section - W - Washer
+ - M - Molded - B - Bracket
+ - R - Round
+
+The last few letters could be sequential. So by looking at code **WM304** - you know its a wooden molding less than 10cm in size
+
+### Standardization
+
+If you have more than one person naming items, the style of naming items will change for everyone. Sometimes, even for one person, he or she may forget how did they name the item and may create a duplicate name _"Wooden Sheet 3mm" or "3mm Sheet of Wood"?_
+
+### Rationalizing
+
+It is a good practice to have minimum varieties of items so that you keep minimum stock, housekeeping is simpler etc. When you are planning a new product and you want to know if you are already purchasing a part in some other product, the item codes will help you quickly determine if you are using a similar raw material in another product.
+
+We believe if you do this small investment, it will help you rationalize things as your business grows, though its okay not to codify if you have less items.
\ No newline at end of file
diff --git a/docs/docs.user.setup.customer.md b/docs/docs.user.setup.customer.md
new file mode 100644
index 0000000..829f943
--- /dev/null
+++ b/docs/docs.user.setup.customer.md
@@ -0,0 +1,65 @@
+---
+{
+ "_label": "Foundation: Customer",
+ "_title_image": "img/customers.png"
+}
+---
+You can either directly create your Customers via
+
+> Selling > Customer
+
+or upload it via the Data Import Tool.
+
+In your normal operations, you can also create Customers from Leads.
+
+> Note: Customers are separate from Contacts and Addresses. A Customer can have multiple Contacts and Addresses.
+
+### Contacts and Addresses
+
+Contacts and Addresses in ERPNext are stored separately so that you can attach multiple Contacts or Addresses to Customers and Suppliers.
+
+To add a Contact or Address directly from the Customer record, click on “New Contact” or “New Address”.
+
+> Tip: When you select a Customer in any transaction, one Contact and Address gets pre-selected. This is the “Default Contact or Address”. So make sure you set your defaults correctly!
+
+To Import multiple Contacts and Addresses from a spreadsheet, use the Data Import Tool.
+
+### Integration with Accounts
+
+In ERPNext, there is a separate Account record for each Customer, for each Company.
+
+When you create a new Customer, ERPNext will automatically create an Account Ledger for the Customer under “Accounts Receivable” in the Company set in the Customer record.
+
+> Advanced Tip: If you want to change the Account Group under which the Customer Account is created, you can set it in the Company master.
+
+If you want to create an Account in another Company, just change the Company value and “Save” the Customer again.
+
+### Customer Settings
+
+You can link a Price List to a Customer (select “Default Price List”), so that when you select that Customer, the Price List will be automatically selected.
+
+You can set “Credit Days” so that it is automatically set in the Sales Invoices made against this Customer.
+
+You can set how much credit you want to allow for a Customer by adding the “Credit Limit”. You can also set a global “Credit Limit” in the Company master.Classifying Customers
+
+ERPNext allows you to group your Customers and also divide them into Territories. Grouping will help you get better analysis of your data and identify what Customers are profitable and which are not and Territories will help you set sales targets for the territories.
+
+### Customer Group
+
+You can group your Customers so that you can get trend analysis for each group. Typically Customers are grouped by market segment (that is usually based on your domain).
+
+> Tip: If you think all this is too much effort, you can leave it at “Default Customer Group”. But all this effort, will pay off when you start getting reports.
+
+### Territory
+
+If your business operates in multiple Territories (could be countries, states or cities) it is usually a great idea to build your structure in the system. Once you group your Customers by Territories, you can set annual targets for each Item Group and get reports that will show your actual performance in the territory v/s what you had planned.
+
+### Sales Person
+
+Sales Persons behave exactly like Territories. You can great an organization chart of Sales Persons where each Sales Person’s target can be set individually. Again as in Territory, the target has to be set against Item Group.
+
+### Sales Partner
+
+A Sales Partner is a third party distributor / dealer / commission agent / affiliate / reseller who sells the companies products, for a commission. This is useful if you make the end sale to the Customer, involving your Sales Partner.
+
+If you sell to your Sales Partner who in-turn sells it to the Customer, then you must make a Customer instead.
diff --git a/docs/docs.user.setup.first.md b/docs/docs.user.setup.first.md
new file mode 100644
index 0000000..759c14c
--- /dev/null
+++ b/docs/docs.user.setup.first.md
@@ -0,0 +1,14 @@
+---
+{
+ "_label": "Initial Setup"
+}
+---
+After a successful sign-up / installation of ERPNext, on your first sign-in, you will be shown a form to fill.
+
+This form will create your first **Company** and **Fiscal Year** (accounting or financial year) record. You can create other Companies later.
+
+This will also set the default **Currency** and time zone for your account. Once your complete this, your first **Company** and **Chart of Accounts** will be created.
+
+Congrats! You are already on your way.
+
+The next step is to configure your Chart of Accounts or start adding users and setting their permissions.
diff --git a/docs/docs.user.setup.item.md b/docs/docs.user.setup.item.md
new file mode 100644
index 0000000..e85876b
--- /dev/null
+++ b/docs/docs.user.setup.item.md
@@ -0,0 +1,106 @@
+---
+{
+ "_label": "Foundation: Item",
+ "_title_image": "img/items.png"
+}
+---
+Items, Customers and Suppliers form the foundation of any ERP system.
+
+It is very likely you will have your masters ready in another system or a spread sheet and you would just need to import them. Before importing, it might be a good idea to understand how ERPNext treats them a bit first.
+
+---
+
+## Items
+
+An Item is simply a product or service you sell or buy from your Customers or Suppliers. ERPNext is optimized for itemized management of your sales and purchase though you can skip creating Items. If you are in services, you can create an Item for each service that your offer.
+
+> Items are mandatory if you want to track inventory.
+
+There are two main categories of Items in ERPNext
+
+- Stock Items
+- Non Stock Items
+
+As you may have guessed, inventory balances are tracked for stock items and not for
+non-stock items. Non-stock items could be services or consumables that are not tracked.
+
+### Naming Items
+
+This is a complex topic [coming up next]. In ERPNext you can use item codes or names. If you do not want to codify, you can keep the item name and item code as the same.
+
+### Item Groups
+
+ERPNext allows you to classify items into groups. This will help you in getting reports about various classes of items and also help in cataloging your items for the website.
+
+### Warehouses
+
+In ERPNext you can create Warehouses to identify where your Items reside.
+
+There are two main Warehouse Types that are significant in ERPNext.
+
+Stores: These are where your incoming Items are kept before they are consumed or sold. You can have as many “Stores” type Warehouses as you wish. Stores type warehouses are significant because if you set an Item for automatic re-order, ERPNext will check its quantities in all “Stores” type Warehouses when deciding whether to re-order or not.
+
+Asset: Items marked as type “Fixed Asset” are maintained in Asset Type Warehouses. This helps you separate them for the Items that are consumed as a part of your regular operations or “Cost of Goods Sold”.
+
+### Item Taxes
+
+These settings are only required if this particular Item has a different tax rate than what is the rate defined in the standard tax Account.
+
+For example, you have a tax Account, “VAT 10%” and this particular item is exempted from this tax, then you select “VAT 10%” in the first column, and set “0” as the tax rate in the second column.
+
+### Inspection
+
+Inspection Required: If an incoming inspection (at the time of delivery from the Supplier) is mandatory for this Item, mention “Inspection Required” as “Yes”. The system will ensure that a Quality Inspection will be prepared and approved before a Purchase Receipt is submitted.
+
+Inspection Criterial: If a Quality Inspection is prepared for this Item, then this template of criteria can will automatically be updated in the Quality Inspection table of the Quality Inspection.
Examples of Criteria are: Weight, Length, Finish etc.
+
+### Item Pricing and Price Lists
+
+ERPNext lets you maintain multiple selling prices for an Item using Price Lists. A Price List is a name you can give to a set of Item prices.
+
+Why would you want Price Lists? You have different prices for different zones (based on the shipping costs), for different currencies, regions etc.
+
+### Item Valuation
+
+How are Items Valued?
+
+One of the major features of any inventory system is that you can find out the value of any item based on its historic or average price. You can also find the value of all your items for your balance sheet. Why is valuation important?
+
+- The buying price fluctuates.
+- The value changes because of some process (value add).
+- The value changes because of decay, loss etc.
+
+You may encounter these terms, so lets clarify:
+
+- Rate: Rate at which the transaction takes place.
+- Valuation Rate: Rate at which the items value is set for your valuation.
+
+There are two major ways in which ERPNext values your items.
+
+- **FIFO (First In First Out):** In this system, ERPNext assumes that you will consume / sell those Items first that you bought first. For example, if you buy an Item at price X and then after a few days at price Y. So when sell your Item, ERPNext will reduce the quantity of the Item priced at X first and then Y.
+
+
+
+- **Moving Average:** In this method, ERPNext assumes that the value of the item at any point is the average price of the units of that Item in stock. For example, if the value of an Item is X in a Warehouse with quantity Y and another quantity Y1 is added to the Warehouse at cost X1, the new value X2 would be:
+
+> New Value X2 = (X * Y + X1 * Y1) / (Y + Y1)
+
+#### Negative Stock
+
+FIFO is the more accurate system of the two but has a disadvantage. You cannot have negative stock in FIFO. This means that you cannot make forward transactions that would make your stock negative. Why is this? Because sequences are so important to FIFO, you cannot track the value of the stock if it does not exist!
+
+In Moving Average, since each item has an “average” value, the value of the negative stock is also based on this “average”.
+
+### Serial Numbers and Batches
+
+In scenarios where you may have to track individual units or batches of Items you sell, ERPNext allows you to manage Serial Numbers and Batches.
+
+Why is this useful?
+
+- To track warranty and returns.
+- To trace individual Items incase they are recalled by the Supplier.
+- To manage expiry.
+
+In ERPNext, Serial Number and Batch are separate entities and all stock transactions for Items that serialized or batches must be tagged with either the Batch or Serial Number.
+
+> Important: Once you mark an item as serialized or batched or neither, you cannot change it after you have make any stock entry.
diff --git a/docs/docs.user.setup.md b/docs/docs.user.setup.md
new file mode 100644
index 0000000..4bc4aee
--- /dev/null
+++ b/docs/docs.user.setup.md
@@ -0,0 +1,19 @@
+---
+{
+ "_label": "Setting Up",
+ "_toc": [
+ "docs.user.setup.before",
+ "docs.user.setup.strategy",
+ "docs.user.setup.first",
+ "docs.user.setup.accounting",
+ "docs.user.setup.item",
+ "docs.user.setup.customer",
+ "docs.user.setup.supplier"
+ ]
+}
+---
+Setting up an ERP system is like starting your business all over again, but in the virtual
+world. Thankfully its not as hard as the real thing and you get to do a trial too.
+
+The important thing to note is that if you really want to take benefit out of this project, then you must take a step back and make sometime to do this right. This is usually not couple-of-hours after work kind of a project.
+
diff --git a/docs/docs.user.setup.strategy.md b/docs/docs.user.setup.strategy.md
new file mode 100644
index 0000000..6675536
--- /dev/null
+++ b/docs/docs.user.setup.strategy.md
@@ -0,0 +1,30 @@
+---
+{
+ "_label": "Implementation Strategy"
+}
+---
+Before you start managing your Operations in EPRNext, you must first become familiar with the system and the terms used. For this we recommend implementation should happen in two phases.
+
+- A Test Phase, where you enter dummy records representing your day to day transactions and a - Live Phase, where we start entering live data.
+
+### Test Phase
+
+- Read the Manual
+- Create your first Customer, Supplier and Item. Add a few more so you get familiar.
+- Create Customer Groups, Item Groups, Warehouses, Supplier Groups so that you can classify your Items.
+- Complete a standard sales cycle - Lead > Opportunity > Quotation > Sales Order > Delivery Note > Sales Invoice > Payment (Journal Voucher)
+- Complete a standard purchase cycle - Purchase Request > Purchase Order > Purchase Receipt > Payment (Journal Voucher).
+- Complete a manufacturing cycle (if applicable) - BOM > Production Planning Tool > Production Order > Stock Entry (issue) > Stock Entry (back-flush)
+
+> Tip: Use the 30-day free trial at [erpnext.com](https://erpnext.com) to do your test drive.
+
+### Live Phase
+
+Once you have made yourself familiar with ERPNext, start entering your live data!
+
+- Clean up the account of test data or better, start a fresh install.
+- Setup all the modules with Customer Groups, Item Groups, Warehouses, BOMs etc.
+- Import Customers, Suppliers, Items, Contacts and Addresses using Data Import Tool.
+- Import opening stock using Stock Reconciliation Tool.
+- Create opening accounting entries via Journal Voucher and create outstanding Sales Invoices and Purchase Invoices.
+
diff --git a/home/page/activity/activity.css b/home/page/activity/activity.css
index f3988b2..34562cb 100644
--- a/home/page/activity/activity.css
+++ b/home/page/activity/activity.css
@@ -1,20 +1,20 @@
-#activity-list .label {
+#page-activity .label {
display: inline-block;
width: 100px;
margin-right: 7px;
}
-#activity-list .label-info {
+#page-activity .label-info {
cursor: pointer;
}
-#activity-list .user-info {
+#page-activity .user-info {
float: right;
color: #777;
font-size: 10px;
}
-#activity-list .date-sep {
+#page-activity .date-sep {
margin-bottom: 11px;
padding: 5px 0px;
border-bottom: 1px solid #aaa;
diff --git a/home/page/activity/activity.html b/home/page/activity/activity.html
deleted file mode 100644
index 9fb910c..0000000
--- a/home/page/activity/activity.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<div class="layout-wrapper layout-wrapper-appframe">
- <div class="layout-appframe"></div>
- <div class="layout-main">
- <div id="activity-list">
- </div>
- </div>
-</div>
\ No newline at end of file
diff --git a/home/page/activity/activity.js b/home/page/activity/activity.js
index 3443cc2..cf7a06f 100644
--- a/home/page/activity/activity.js
+++ b/home/page/activity/activity.js
@@ -1,13 +1,15 @@
wn.pages['activity'].onload = function(wrapper) {
- wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
- wrapper.appframe.add_home_breadcrumb();
- wrapper.appframe.add_breadcrumb(wn.modules["Activity"].icon);
- wrapper.appframe.title('Activity');
+ wn.ui.make_app_page({
+ parent: wrapper,
+ title: "Activity",
+ single_column: true
+ })
+ wrapper.appframe.add_module_icon("Activity");
var list = new wn.ui.Listing({
appframe: wrapper.appframe,
method: 'home.page.activity.activity.get_feed',
- parent: $('#activity-list'),
+ parent: $(wrapper).find(".layout-main"),
render_row: function(row, data) {
new erpnext.ActivityFeed(row, data);
}
diff --git a/home/page/attributions/attributions.html b/home/page/attributions/attributions.html
index 99deea4..00f6342 100644
--- a/home/page/attributions/attributions.html
+++ b/home/page/attributions/attributions.html
@@ -1,4 +1,4 @@
-<div class="layout-wrapper layout-wrapper-appframe layout-attributions">
+<div class="appframe col col-lg-12 layout-attributions">
<div class="layout-appframe"></div>
<div class="layout-main">
<h3>ERPNext is made using these Awesome Open Source Projects <i class="icon-heart" style="color: red"></i></h3>
@@ -95,6 +95,10 @@
<td>Draw Gantt charts with the famous jQuery ease of development.</td>
</tr>
<tr>
+ <td><a href="http://aehlke.github.io/tag-it/">JQuery Tag-it</a></td>
+ <td>Simple and configurable tag editing widget with autocomplete support.</td>
+ </tr>
+ <tr>
<td><a href="http://jscolor.com/">JSColor - Color Picker</a></td>
<td>HTML/Javascript Color Picker.</td>
</tr>
diff --git a/hr/doctype/job_applicant/job_applicant.js b/hr/doctype/job_applicant/job_applicant.js
index c301250..220ff18 100644
--- a/hr/doctype/job_applicant/job_applicant.js
+++ b/hr/doctype/job_applicant/job_applicant.js
@@ -3,7 +3,7 @@
cur_frm.cscript = {
onload: function(doc, dt, dn) {
if(in_list(user_roles,'System Manager')) {
- cur_frm.page_layout.footer.help_area.innerHTML = '<hr>\
+ cur_frm.footer.help_area.innerHTML = '<hr>\
<p><a href="#Form/Jobs Email Settings">Jobs Email Settings</a><br>\
<span class="help">Automatically extract Job Applicants from a mail box e.g. "jobs@example.com"</span></p>';
}
diff --git a/hr/page/hr_home/hr_home.js b/hr/page/hr_home/hr_home.js
index e35a808..060d60a 100644
--- a/hr/page/hr_home/hr_home.js
+++ b/hr/page/hr_home/hr_home.js
@@ -13,7 +13,7 @@
},
{
label: wn._("Expense Claim"),
- description: wn._("Claims for expenses made on behalf of the organization."),
+ description: wn._("Claims for company expense."),
doctype:"Expense Claim"
},
{
@@ -33,7 +33,7 @@
},
{
label: wn._("Job Applicant"),
- description: wn._("Applicant for a Job (extracted from jobs email)."),
+ description: wn._("Applicant for a Job."),
doctype:"Job Applicant"
},
]
diff --git a/patches/may_2013/p06_make_notes.py b/patches/may_2013/p06_make_notes.py
new file mode 100644
index 0000000..02c3d4b
--- /dev/null
+++ b/patches/may_2013/p06_make_notes.py
@@ -0,0 +1,27 @@
+import webnotes
+
+def execute():
+ webnotes.reload_doc("utilities", "doctype", "note")
+ webnotes.reload_doc("utilities", "doctype", "note_user")
+
+ for question in webnotes.conn.sql("""select * from tabQuestion""", as_dict=True):
+ name = question.question[:180]
+ if webnotes.conn.exists("Note", name):
+ webnotes.delete_doc("Note", name)
+ note = webnotes.bean({
+ "doctype":"Note",
+ "title": name,
+ "content": "<hr>".join(webnotes.conn.sql_list("""select answer from tabAnswer
+ where question=%s""", question.name)),
+ "owner": question.owner,
+ "creation": question.creation,
+ "public": 1
+ }).insert()
+
+ webnotes.delete_doc("DocType", "Question")
+ webnotes.delete_doc("DocType", "Answer")
+ webnotes.bean("Style Settings").save()
+
+ # update comment delete
+ webnotes.conn.sql("""update tabDocPerm \
+ set cancel=1 where parent='Comment' and role='System Manager'""")
diff --git a/patches/patch_list.py b/patches/patch_list.py
index b3ed12c..300a8af 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -253,4 +253,5 @@
"patches.may_2013.p03_update_support_ticket",
"patches.may_2013.p04_reorder_level",
"patches.may_2013.p05_update_cancelled_gl_entries",
+ "patches.may_2013.p06_make_notes",
]
\ No newline at end of file
diff --git a/projects/doctype/task/task.js b/projects/doctype/task/task.js
index 8493920..131b5fd 100644
--- a/projects/doctype/task/task.js
+++ b/projects/doctype/task/task.js
@@ -34,7 +34,7 @@
}
},
- after_save: function() {
+ validate: function() {
this.frm.doc.project && wn.model.remove_from_locals("Project",
this.frm.doc.project);
},
diff --git a/public/js/conf.js b/public/js/conf.js
index 522de0a..b2f6dc9 100644
--- a/public/js/conf.js
+++ b/public/js/conf.js
@@ -15,8 +15,7 @@
// add toolbar icon
$(document).bind('toolbar_setup', function() {
- $('.brand').html((wn.boot.website_settings.brand_html || 'erpnext') +
- ' <i class="icon-home icon-white navbar-icon-home" ></i>')
+ $('.navbar-brand').html('<i class="icon-home icon-white navbar-icon-home" ></i>')
.css('max-width', '200px').css('overflow', 'hidden')
.hover(function() {
$(this).find('.icon-home').addClass('navbar-icon-home-hover');
diff --git a/public/js/kb_common.js b/public/js/kb_common.js
deleted file mode 100644
index 6dca3f8..0000000
--- a/public/js/kb_common.js
+++ /dev/null
@@ -1,158 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-// question toolbar
-// contains - voting widget / tag list and user info / timestamp
-// By XXXXXX on YYYYY
-
-KBItemToolbar = function(args, kb) {
- $.extend(this, args);
- var me = this;
- this.make = function() {
- this.wrapper = $a(this.parent, 'div', '', {});
- this.line1 = $a(this.wrapper, 'div', '', {color: '#888', fontSize:'11px', margin:'7px 0px'});
- this.make_timestamp();
- this.make_answers();
- if(this.with_tags)
- this.make_tags();
- this.setup_del();
- }
-
- this.make_timestamp = function() {
- this.line1.innerHTML = repl('By %(name)s | %(when)s', {
- name: wn.user_info(this.det.owner).fullname,
- when: wn.datetime.comment_when(this.det.modified)
- });
-
- // allow system manager to delete questions / answers
- if(has_common(user_roles, ['Administrator', 'System Manager'])) {
- this.line1.innerHTML += ' | <a style="cursor:pointer;"\
- class="del-link">delete</a>';
- }
- }
-
- this.make_answers = function() {
- if(this.doctype=='Question') {
- if(this.det.answers==0) {
- this.line1.innerHTML += ' | no answers';
- } else if(this.det.answers==1) {
- this.line1.innerHTML += ' | 1 answer';
- } else {
- this.line1.innerHTML += ' | '+this.det.answers+' answers';
- }
- }
- }
-
- this.make_tags = function() {
- this.line1.innerHTML += ' | '
- this.tags_area = $a(this.line1, 'span', 'kb-tags')
- this.tags = new TagList(this.tags_area,
- this.det._user_tags && (this.det._user_tags.split(',')),
- this.doctype, this.det.name, 0, kb.set_tag_filter)
- }
-
- this.setup_del = function() {
- $(this.line1).find('.del-link').click(function() {
- this.innerHTML = 'deleting...';
- this.disabled = 1;
- $c_page('utilities', 'questions', 'delete', {
- dt: me.doctype, dn: me.det.name}, function(r,rt) {
- // reload the list
- kb.list.run()
- });
- });
- }
-
- this.make();
-}
-
-
-// displays an editable text,
-// needs parent, text, disp_class, inp_class
-// dt, dn
-
-EditableText = function(args) {
- $.extend(this, args);
- var me = this;
-
- me.$w = $(repl('<div class="ed-text">\
- <div class="ed-text-display %(disp_class)s"></div>\
- <a class="ed-text-edit" style="cursor: pointer; float: right; margin-top: -16px;">[edit]</a>\
- <textarea class="ed-text-input %(inp_class)s hide"></textarea>\
- <div class="help hide"><br>Formatted as <a href="#markdown-reference"\
- target="_blank">markdown</a></div>\
- <button class="btn btn-info hide ed-text-save">Save</button>\
- <a class="ed-text-cancel hide" style="cursor: pointer;">Cancel</a>\
- </div>', args)).appendTo(me.parent);
-
- this.set_display = function(txt) {
- var display_wrapper = me.$w.find('.ed-text-display');
- display_wrapper.html(wn.markdown(txt));
- display_wrapper.find("a").attr("target", "blank");
- me.text = txt;
- }
-
- this.set_display(me.text);
-
- if(me.height) me.$w.find('.ed-text-input').css('height', me.height);
- if(me.width) me.$w.find('.ed-text-input').css('width', me.width);
-
- // edit
- me.$w.find('.ed-text-edit').click(function() {
- me.$w.find('.ed-text-input').val(me.text);
- me.show_as_input();
- })
-
- // save button - save the new text
- me.$w.find('.ed-text-save').click(
- function() {
- var v = me.$w.find('.ed-text-input').val();
- // check if text is written
- if(!v) {
- msgprint('Please write something!');
- return;
- }
- var btn = this;
- $(btn).set_working();
- $c_page('utilities', 'question_view', 'update_item', {
- dt: me.dt, dn: me.dn, fn: me.fieldname, text: v
- },
- function(r) {
- $(btn).done_working();
- if(r.exc) {msgprint(r.exc); return; }
- me.set_display(v);
- me.show_as_text();
- });
- }
- )
-
-
- // cancel button
- me.$w.find('.ed-text-cancel').click(function() {
- me.show_as_text();
- })
-
- this.show_as_text = function() {
- me.$w.find('.ed-text-display, .ed-text-edit').toggle(true);
- me.$w.find('.ed-text-input, .ed-text-save, .ed-text-cancel, .help').toggle(false);
- }
-
- this.show_as_input = function() {
- me.$w.find('.ed-text-display, .ed-text-edit').toggle(false);
- me.$w.find('.ed-text-input, .ed-text-save, .ed-text-cancel, .help').toggle(true);
- }
-
-}
diff --git a/public/js/startup.css b/public/js/startup.css
index 88ebedd..bfcbe84 100644
--- a/public/js/startup.css
+++ b/public/js/startup.css
@@ -4,7 +4,6 @@
body {
font-family: Arial, Helvetica, sans-serif;
- font-size: 13px;
}
span, div, td, input, textarea, button, select {
diff --git a/public/js/toolbar.js b/public/js/toolbar.js
index 03d7d0a..1d3d1e7 100644
--- a/public/js/toolbar.js
+++ b/public/js/toolbar.js
@@ -18,75 +18,26 @@
wn.provide('erpnext.toolbar');
erpnext.toolbar.setup = function() {
- // modules
- erpnext.toolbar.add_modules();
-
// profile
- $('#toolbar-user').append('<li><a href="#Form/Profile/'+user+'">'
+ var $user = $('#toolbar-user');
+ $user.append('<li><a href="#Form/Profile/'+user+'">'
+wn._("My Settings")+'...</a></li>');
+ $user.append('<li class="divider"></li>');
+ $user.append('<li><a href="https://erpnext.com/manual" target="_blank">'
+ +wn._('Documentation')+'</a></li>')
+ $user.append('<li><a href="http://groups.google.com/group/erpnext-user-forum" target="_blank">'
+ +wn._('Forum')+'</a></li>')
+ $user.append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
+ '+wn._('Live Chat')+'</a></li>')
+
$('.navbar .pull-right').append('\
<li><a href="#!messages" title="'+wn._('Unread Messages')
+'"><span class="navbar-new-comments"></span></a></li>');
- // help
- $('.navbar .pull-right').prepend('<li class="dropdown">\
- <a class="dropdown-toggle" data-toggle="dropdown" href="#" \
- onclick="return false;">'+wn._('Help')+'<b class="caret"></b></a>\
- <ul class="dropdown-menu" id="toolbar-help">\
- </ul></li>')
-
- $('#toolbar-help').append('<li><a href="https://erpnext.com/manual" target="_blank">'
- +wn._('Documentation')+'</a></li>')
-
- $('#toolbar-help').append('<li><a href="http://groups.google.com/group/erpnext-user-forum" target="_blank">'
- +wn._('Forum')+'</a></li>')
-
- $('#toolbar-help').append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
- '+wn._('Live Chat')+'</a></li>')
-
erpnext.toolbar.set_new_comments();
}
-erpnext.toolbar.add_modules = function() {
- $('<li class="dropdown">\
- <a class="dropdown-toggle" data-toggle="dropdown" href="#"\
- title="'+wn._("Modules")+'"\
- onclick="return false;"><i class="icon-th"></i></a>\
- <ul class="dropdown-menu modules">\
- </ul>\
- </li>').prependTo('.navbar .nav:first');
-
- var modules_list = wn.user.get_desktop_items().sort();
-
- var _get_list_item = function(m) {
- args = {
- module: m,
- module_page: wn.modules[m].link,
- module_label: wn._(wn.modules[m].label || m),
- icon: wn.modules[m].icon
- }
-
- return repl('<li><a href="#!%(module_page)s" \
- data-module="%(module)s"><i class="%(icon)s" style="display: inline-block; \
- width: 21px; margin-top: -2px; margin-left: -7px;"></i>\
- %(module_label)s</a></li>', args);
- }
-
- // add to dropdown
- $.each(modules_list,function(i, m) {
- if(m!='Setup') {
- $('.navbar .modules').append(_get_list_item(m));
- }
- })
-
- // setup for system manager
- if(user_roles.indexOf("System Manager")!=-1) {
- $('.navbar .modules').append('<li class="divider">' + _get_list_item("Setup"));
- }
-
-}
-
erpnext.toolbar.set_new_comments = function(new_comments) {
var navbar_nc = $('.navbar-new-comments');
if(cint(new_comments)) {
diff --git a/selling/doctype/lead/lead.js b/selling/doctype/lead/lead.js
index 118b4c7..c94aafa 100644
--- a/selling/doctype/lead/lead.js
+++ b/selling/doctype/lead/lead.js
@@ -50,7 +50,7 @@
}
if(in_list(user_roles,'System Manager')) {
- cur_frm.page_layout.footer.help_area.innerHTML = '<hr>\
+ cur_frm.footer.help_area.innerHTML = '<hr>\
<p><a href="#Form/Sales Email Settings">Sales Email Settings</a><br>\
<span class="help">Automatically extract Leads from a mail box e.g. "sales@example.com"</span></p>';
}
diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js
index 9de9b16..4276193 100644
--- a/selling/doctype/quotation/quotation.js
+++ b/selling/doctype/quotation/quotation.js
@@ -79,8 +79,6 @@
cur_frm.fields_dict.lead.get_query = erpnext.utils.lead_query;
cur_frm.cscript.lead = function(doc, cdt, cdn) {
- cur_frm.toggle_display("contact_section", doc.customer || doc.lead);
-
if(doc.lead) {
get_server_fields('get_lead_details', doc.lead,'', doc, cdt, cdn, 1);
unhide_field('territory');
diff --git a/selling/page/sales_analytics/sales_analytics.js b/selling/page/sales_analytics/sales_analytics.js
index 0b35af5..7fdc3ac 100644
--- a/selling/page/sales_analytics/sales_analytics.js
+++ b/selling/page/sales_analytics/sales_analytics.js
@@ -23,7 +23,7 @@
new erpnext.SalesAnalytics(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Selling")
+ wrapper.appframe.add_module_icon("Selling")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/selling/page/sales_browser/sales_browser.html b/selling/page/sales_browser/sales_browser.html
deleted file mode 100644
index 4683a07..0000000
--- a/selling/page/sales_browser/sales_browser.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
- <div class="appframe-area"></div>
- <div class="layout-main-section">
- <div class="tree-area"></div>
- </div>
- <div class="layout-side-section">
- <div class="help">To add child nodes, explore tree and click on the node under which you want to add more nodes.
- </div>
- </div>
- <div class="clear"></div>
-</div>
\ No newline at end of file
diff --git a/selling/page/sales_browser/sales_browser.js b/selling/page/sales_browser/sales_browser.js
index 4622f24..ed13f9d 100644
--- a/selling/page/sales_browser/sales_browser.js
+++ b/selling/page/sales_browser/sales_browser.js
@@ -15,14 +15,22 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pscript['onload_Sales Browser'] = function(wrapper){
- wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
- wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Selling")
+ wn.ui.make_app_page({
+ parent: wrapper,
+ })
+
+ wrapper.appframe.add_module_icon("Selling")
wrapper.appframe.add_button('Refresh', function() {
wrapper.make_tree();
}, 'icon-refresh');
+
+ $(wrapper)
+ .find(".layout-side-section")
+ .html('<div class="text-muted">Click on a link to get options to expand \
+ get options Add / Edit / Delete.</div>')
+
wrapper.make_tree = function() {
var ctype = wn.get_route()[1] || 'Territory';
wn.call({
@@ -30,7 +38,13 @@
args: {ctype: ctype},
callback: function(r) {
var root = r.message[0]["value"];
- erpnext.sales_chart = new erpnext.SalesChart(ctype, root, wrapper);
+ erpnext.sales_chart = new erpnext.SalesChart(ctype, root,
+ $(wrapper)
+ .find(".layout-main-section")
+ .css({
+ "min-height": "300px",
+ "padding-bottom": "25px"
+ }));
}
});
}
@@ -50,12 +64,12 @@
};
erpnext.SalesChart = Class.extend({
- init: function(ctype, root, wrapper) {
- $(wrapper).find('.tree-area').empty();
+ init: function(ctype, root, parent) {
+ $(parent).empty();
var me = this;
me.ctype = ctype;
this.tree = new wn.ui.Tree({
- parent: $(wrapper).find('.tree-area'),
+ parent: $(parent),
label: root,
args: {ctype: ctype},
method: 'selling.page.sales_browser.sales_browser.get_children',
diff --git a/stock/doctype/material_request/material_request.txt b/stock/doctype/material_request/material_request.txt
index eb788e4..545d40f 100644
--- a/stock/doctype/material_request/material_request.txt
+++ b/stock/doctype/material_request/material_request.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 14:48:38",
"docstatus": 0,
- "modified": "2013-02-25 15:38:02",
+ "modified": "2013-04-24 10:47:50",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -72,7 +72,7 @@
"oldfieldtype": "Section Break"
},
{
- "allow_on_submit": 1,
+ "allow_on_submit": 0,
"doctype": "DocField",
"fieldname": "indent_details",
"fieldtype": "Table",
diff --git a/stock/page/stock_ageing/stock_ageing.js b/stock/page/stock_ageing/stock_ageing.js
index 456f5f1..b9b4c80 100644
--- a/stock/page/stock_ageing/stock_ageing.js
+++ b/stock/page/stock_ageing/stock_ageing.js
@@ -25,7 +25,7 @@
new erpnext.StockAgeing(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/stock/page/stock_analytics/stock_analytics.js b/stock/page/stock_analytics/stock_analytics.js
index a003963..a52cb7d 100644
--- a/stock/page/stock_analytics/stock_analytics.js
+++ b/stock/page/stock_analytics/stock_analytics.js
@@ -25,7 +25,7 @@
new erpnext.StockAnalytics(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/stock/page/stock_balance/stock_balance.js b/stock/page/stock_balance/stock_balance.js
index 163b74f..4467b98 100644
--- a/stock/page/stock_balance/stock_balance.js
+++ b/stock/page/stock_balance/stock_balance.js
@@ -26,7 +26,7 @@
new erpnext.StockBalance(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/stock/page/stock_home/stock_home.js b/stock/page/stock_home/stock_home.js
index 75e4ee1..5babf15 100644
--- a/stock/page/stock_home/stock_home.js
+++ b/stock/page/stock_home/stock_home.js
@@ -8,17 +8,17 @@
items: [
{
label: wn._("Material Request"),
- description: wn._("Request Material for Transfer or Purchase."),
+ description: wn._("Requests for items."),
doctype:"Material Request"
},
{
label: wn._("Stock Entry"),
- description: wn._("Transfer stock from one warehouse to another."),
+ description: wn._("Record item movement."),
doctype:"Stock Entry"
},
{
label: wn._("Delivery Note"),
- description: wn._("Delivery (shipment) to customers."),
+ description: wn._("Shipments to customers."),
doctype:"Delivery Note"
},
{
diff --git a/stock/page/stock_ledger/stock_ledger.js b/stock/page/stock_ledger/stock_ledger.js
index a37ea1c..438f132 100644
--- a/stock/page/stock_ledger/stock_ledger.js
+++ b/stock/page/stock_ledger/stock_ledger.js
@@ -24,7 +24,7 @@
new erpnext.StockLedger(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/stock/page/stock_level/stock_level.js b/stock/page/stock_level/stock_level.js
index 75819a5..5f129c3 100644
--- a/stock/page/stock_level/stock_level.js
+++ b/stock/page/stock_level/stock_level.js
@@ -24,7 +24,7 @@
new erpnext.StockLevel(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Stock")
+ wrapper.appframe.add_module_icon("Stock")
wrapper.appframe.add_breadcrumb("icon-bar-chart");
}
diff --git a/support/doctype/support_ticket/support_ticket.js b/support/doctype/support_ticket/support_ticket.js
index 4ee4c1d..4226b47 100644
--- a/support/doctype/support_ticket/support_ticket.js
+++ b/support/doctype/support_ticket/support_ticket.js
@@ -19,8 +19,7 @@
$.extend(cur_frm.cscript, {
onload: function(doc, dt, dn) {
if(in_list(user_roles,'System Manager')) {
- cur_frm.page_layout.footer.help_area.innerHTML = '<hr>\
- <p><a href="#Form/Email Settings/Email Settings">Email Settings</a><br>\
+ cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Email Settings/Email Settings">Email Settings</a><br>\
<span class="help">Integrate incoming support emails to Support Ticket</span></p>';
}
},
diff --git a/support/page/support_analytics/support_analytics.js b/support/page/support_analytics/support_analytics.js
index 60384bb..9b46e6d 100644
--- a/support/page/support_analytics/support_analytics.js
+++ b/support/page/support_analytics/support_analytics.js
@@ -8,7 +8,7 @@
new erpnext.SupportAnalytics(wrapper);
wrapper.appframe.add_home_breadcrumb()
- wrapper.appframe.add_module_breadcrumb("Support")
+ wrapper.appframe.add_module_icon("Support")
wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/support/page/support_home/support_home.js b/support/page/support_home/support_home.js
index bde5e5c..65ea4b8 100644
--- a/support/page/support_home/support_home.js
+++ b/support/page/support_home/support_home.js
@@ -8,17 +8,17 @@
items: [
{
label: wn._("Support Ticket"),
- description: wn._("Support queries from customers via email or website."),
+ description: wn._("Support queries from customers."),
doctype:"Support Ticket"
},
{
label: wn._("Customer Issue"),
- description: wn._("Customer Issue against a Serial No (warranty)."),
+ description: wn._("Customer Issue against Serial No."),
doctype:"Customer Issue"
},
{
label: wn._("Maintenance Schedule"),
- description: wn._("Plan for scheduled maintenance contracts."),
+ description: wn._("Plan for maintenance visits."),
doctype:"Maintenance Schedule"
},
{
@@ -28,7 +28,7 @@
},
{
label: wn._("Newsletter"),
- description: wn._("Send Newsletters to your contacts, leads."),
+ description: wn._("Newsletters to contacts, leads."),
doctype:"Newsletter"
},
{
diff --git a/utilities/doctype/answer/__init__.py b/utilities/doctype/answer/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/doctype/answer/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/doctype/answer/answer.py b/utilities/doctype/answer/answer.py
deleted file mode 100644
index 7f48feb..0000000
--- a/utilities/doctype/answer/answer.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-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/utilities/doctype/answer/answer.txt b/utilities/doctype/answer/answer.txt
deleted file mode 100644
index 58f0ba3..0000000
--- a/utilities/doctype/answer/answer.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-[
- {
- "creation": "2012-03-27 14:36:01",
- "docstatus": 0,
- "modified": "2012-03-27 14:36:01",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "allow_attach": 0,
- "allow_trash": 1,
- "autoname": "_ANS.#######",
- "doctype": "DocType",
- "in_create": 1,
- "module": "Utilities",
- "name": "__common__",
- "read_only": 1,
- "section_style": "Simple",
- "show_in_menu": 0,
- "version": 3
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Answer",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "cancel": 1,
- "create": 1,
- "doctype": "DocPerm",
- "name": "__common__",
- "parent": "Answer",
- "parentfield": "permissions",
- "parenttype": "DocType",
- "permlevel": 0,
- "read": 1,
- "report": 1,
- "role": "All",
- "write": 1
- },
- {
- "doctype": "DocType",
- "name": "Answer"
- },
- {
- "doctype": "DocPerm"
- },
- {
- "doctype": "DocField",
- "fieldname": "question",
- "fieldtype": "Link",
- "label": "Question",
- "options": "Question"
- },
- {
- "doctype": "DocField",
- "fieldname": "answer",
- "fieldtype": "Text",
- "label": "Answer",
- "oldfieldname": "question",
- "oldfieldtype": "Text"
- },
- {
- "doctype": "DocField",
- "fieldname": "points",
- "fieldtype": "Int",
- "label": "Points"
- },
- {
- "doctype": "DocField",
- "fieldname": "_users_voted",
- "fieldtype": "Text",
- "hidden": 1,
- "label": "Users Voted",
- "print_hide": 1
- }
-]
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/_messages_doc.json b/utilities/doctype/answer/locale/_messages_doc.json
deleted file mode 100644
index 252553e4..0000000
--- a/utilities/doctype/answer/locale/_messages_doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-[
- "Question",
- "Utilities",
- "Answer",
- "Points",
- "Users Voted"
-]
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/ar-doc.json b/utilities/doctype/answer/locale/ar-doc.json
deleted file mode 100644
index 4950916..0000000
--- a/utilities/doctype/answer/locale/ar-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "\u0625\u062c\u0627\u0628\u0629",
- "Points": "\u0646\u0642\u0627\u0637",
- "Question": "\u0633\u0624\u0627\u0644",
- "Users Voted": "\u0635\u0648\u062a \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u064a\u0646",
- "Utilities": "\u062e\u062f\u0645\u0627\u062a"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/de-doc.json b/utilities/doctype/answer/locale/de-doc.json
deleted file mode 100644
index 13b8911..0000000
--- a/utilities/doctype/answer/locale/de-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Beantworten",
- "Points": "Punkte",
- "Question": "Frage",
- "Users Voted": "Nutzer",
- "Utilities": "Dienstprogramme"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/es-doc.json b/utilities/doctype/answer/locale/es-doc.json
deleted file mode 100644
index ac4cb59..0000000
--- a/utilities/doctype/answer/locale/es-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Responder",
- "Points": "Puntos",
- "Question": "Cuesti\u00f3n",
- "Users Voted": "Los usuarios Votado",
- "Utilities": "Utilidades"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/fr-doc.json b/utilities/doctype/answer/locale/fr-doc.json
deleted file mode 100644
index e3c0b30..0000000
--- a/utilities/doctype/answer/locale/fr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "R\u00e9pondre",
- "Points": "Points",
- "Question": "Question",
- "Users Voted": "Des internautes Yahoo!",
- "Utilities": "Utilitaires"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/hi-doc.json b/utilities/doctype/answer/locale/hi-doc.json
deleted file mode 100644
index 1c44b86..0000000
--- a/utilities/doctype/answer/locale/hi-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "\u091c\u0935\u093e\u092c",
- "Points": "\u00bb",
- "Question": "\u0938\u0935\u093e\u0932",
- "Users Voted": "\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e \u0935\u094b\u091f \u0926\u093f\u092f\u093e",
- "Utilities": "\u0909\u092a\u092f\u094b\u0917\u093f\u0924\u093e\u090f\u0901"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/hr-doc.json b/utilities/doctype/answer/locale/hr-doc.json
deleted file mode 100644
index b712783..0000000
--- a/utilities/doctype/answer/locale/hr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Odgovoriti",
- "Points": "Bodovi",
- "Question": "Pitanje",
- "Users Voted": "Korisnici Glasao",
- "Utilities": "Komunalne usluge"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/nl-doc.json b/utilities/doctype/answer/locale/nl-doc.json
deleted file mode 100644
index dc7d232..0000000
--- a/utilities/doctype/answer/locale/nl-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Beantwoorden",
- "Points": "Punten",
- "Question": "Vraag",
- "Users Voted": "Gebruikers Verkozen",
- "Utilities": "Utilities"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/pt-BR-doc.json b/utilities/doctype/answer/locale/pt-BR-doc.json
deleted file mode 100644
index b8b74d7..0000000
--- a/utilities/doctype/answer/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Resposta",
- "Points": "Pontos",
- "Question": "Pergunta",
- "Users Voted": "Votos de usu\u00e1rios",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/pt-doc.json b/utilities/doctype/answer/locale/pt-doc.json
deleted file mode 100644
index 987cbf2..0000000
--- a/utilities/doctype/answer/locale/pt-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "Responder",
- "Points": "Pontos",
- "Question": "Pergunta",
- "Users Voted": "Votado usu\u00e1rios",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/sr-doc.json b/utilities/doctype/answer/locale/sr-doc.json
deleted file mode 100644
index 711187f..0000000
--- a/utilities/doctype/answer/locale/sr-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "\u041e\u0434\u0433\u043e\u0432\u043e\u0440",
- "Points": "\u0422\u0430\u0447\u043a\u0435",
- "Question": "\u041f\u0438\u0442\u0430\u045a\u0435",
- "Users Voted": "\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0446\u0438 \u0413\u043b\u0430\u0441\u0430\u043e",
- "Utilities": "\u041a\u043e\u043c\u0443\u043d\u0430\u043b\u043d\u0435 \u0443\u0441\u043b\u0443\u0433\u0435"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/ta-doc.json b/utilities/doctype/answer/locale/ta-doc.json
deleted file mode 100644
index 2fa783a..0000000
--- a/utilities/doctype/answer/locale/ta-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "\u0baa\u0ba4\u0bbf\u0bb2\u0bcd",
- "Points": "\u0baa\u0bc1\u0bb3\u0bcd\u0bb3\u0bbf\u0b95\u0bb3\u0bcd",
- "Question": "\u0bb5\u0bbf\u0ba9\u0bbe",
- "Users Voted": "\u0baa\u0baf\u0ba9\u0bb0\u0bcd \u0ba4\u0bb3\u0bae\u0bcd",
- "Utilities": "\u0baa\u0baf\u0ba9\u0bcd\u0baa\u0bbe\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"
-}
\ No newline at end of file
diff --git a/utilities/doctype/answer/locale/th-doc.json b/utilities/doctype/answer/locale/th-doc.json
deleted file mode 100644
index eb8c623..0000000
--- a/utilities/doctype/answer/locale/th-doc.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "Answer": "\u0e15\u0e2d\u0e1a",
- "Points": "\u0e08\u0e38\u0e14",
- "Question": "\u0e04\u0e33\u0e16\u0e32\u0e21",
- "Users Voted": "\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e42\u0e2b\u0e27\u0e15",
- "Utilities": "\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49"
-}
\ No newline at end of file
diff --git a/utilities/doctype/note/__init__.py b/utilities/doctype/note/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/utilities/doctype/note/__init__.py
diff --git a/utilities/doctype/note/note.py b/utilities/doctype/note/note.py
new file mode 100644
index 0000000..02862de
--- /dev/null
+++ b/utilities/doctype/note/note.py
@@ -0,0 +1,25 @@
+# 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
+
+ def autoname(self):
+ # replace forbidden characters
+ import re
+ self.doc.name = re.sub("[%'\"#*?`]", "", self.doc.title.strip())
+
+ def onload(self):
+ if not self.doc.public and webnotes.session.user != self.doc.owner:
+ if webnotes.session.user not in [d.user for d in self.doclist if d.doctype=="Note User"]:
+ webnotes.msgprint("You are not authorized to read this record.", raise_exception=True)
+
+ def validate(self):
+ if not self.doc.fields.get("__islocal"):
+ if webnotes.session.user != self.doc.owner:
+ if webnotes.session.user not in webnotes.conn.sql_list("""select user from `tabNote User`
+ where parent=%s and permission='Edit'""", self.doc.name):
+ webnotes.msgprint("You are not authorized to edit this record.", raise_exception=True)
diff --git a/utilities/doctype/note/note.txt b/utilities/doctype/note/note.txt
new file mode 100644
index 0000000..a6cdf2b
--- /dev/null
+++ b/utilities/doctype/note/note.txt
@@ -0,0 +1,84 @@
+[
+ {
+ "creation": "2013-05-24 13:41:00",
+ "docstatus": 0,
+ "modified": "2013-05-27 12:16:46",
+ "modified_by": "Administrator",
+ "owner": "Administrator"
+ },
+ {
+ "allow_print": 0,
+ "allow_rename": 1,
+ "description": "Note is a free page where users can share documents / notes",
+ "doctype": "DocType",
+ "document_type": "Transaction",
+ "module": "Utilities",
+ "name": "__common__",
+ "read_only_onload": 1
+ },
+ {
+ "doctype": "DocField",
+ "name": "__common__",
+ "parent": "Note",
+ "parentfield": "fields",
+ "parenttype": "DocType",
+ "permlevel": 0
+ },
+ {
+ "cancel": 1,
+ "create": 1,
+ "doctype": "DocPerm",
+ "name": "__common__",
+ "parent": "Note",
+ "parentfield": "permissions",
+ "parenttype": "DocType",
+ "permlevel": 0,
+ "read": 1,
+ "role": "All",
+ "write": 1
+ },
+ {
+ "doctype": "DocType",
+ "name": "Note"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "title",
+ "fieldtype": "Data",
+ "label": "Title",
+ "print_hide": 1
+ },
+ {
+ "description": "Help: To link to another record in the system, use \"#Form/Note/[Note Name]\" as the Link URL. (don't use \"http://\")",
+ "doctype": "DocField",
+ "fieldname": "content",
+ "fieldtype": "Text Editor",
+ "in_list_view": 0,
+ "label": "Content"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "share",
+ "fieldtype": "Section Break",
+ "label": "Share"
+ },
+ {
+ "description": "Everyone can read",
+ "doctype": "DocField",
+ "fieldname": "public",
+ "fieldtype": "Check",
+ "label": "Public",
+ "print_hide": 1
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "share_with",
+ "fieldtype": "Table",
+ "label": "Share With",
+ "options": "Note User",
+ "print_hide": 1
+ },
+ {
+ "doctype": "DocPerm"
+ }
+]
\ No newline at end of file
diff --git a/utilities/doctype/note_user/__init__.py b/utilities/doctype/note_user/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/utilities/doctype/note_user/__init__.py
diff --git a/utilities/doctype/note_user/note_user.py b/utilities/doctype/note_user/note_user.py
new file mode 100644
index 0000000..928aa9f
--- /dev/null
+++ b/utilities/doctype/note_user/note_user.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/utilities/doctype/note_user/note_user.txt b/utilities/doctype/note_user/note_user.txt
new file mode 100644
index 0000000..2d82bb0
--- /dev/null
+++ b/utilities/doctype/note_user/note_user.txt
@@ -0,0 +1,45 @@
+[
+ {
+ "creation": "2013-05-24 14:24:48",
+ "docstatus": 0,
+ "modified": "2013-05-24 14:24:48",
+ "modified_by": "Administrator",
+ "owner": "Administrator"
+ },
+ {
+ "description": "List of users who can edit a particular Note",
+ "doctype": "DocType",
+ "document_type": "Other",
+ "istable": 1,
+ "module": "Utilities",
+ "name": "__common__"
+ },
+ {
+ "doctype": "DocField",
+ "name": "__common__",
+ "parent": "Note User",
+ "parentfield": "fields",
+ "parenttype": "DocType",
+ "permlevel": 0
+ },
+ {
+ "doctype": "DocType",
+ "name": "Note User"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "user",
+ "fieldtype": "Link",
+ "label": "User",
+ "options": "Profile",
+ "reqd": 1
+ },
+ {
+ "default": "Edit",
+ "doctype": "DocField",
+ "fieldname": "permission",
+ "fieldtype": "Select",
+ "label": "Permission",
+ "options": "Edit\nRead"
+ }
+]
\ No newline at end of file
diff --git a/utilities/doctype/question/__init__.py b/utilities/doctype/question/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/doctype/question/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/doctype/question/locale/_messages_doc.json b/utilities/doctype/question/locale/_messages_doc.json
deleted file mode 100644
index 4d4aa11..0000000
--- a/utilities/doctype/question/locale/_messages_doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-[
- "User Tags",
- "Question",
- "Utilities",
- "Answer",
- "Points",
- "File List",
- "Users Voted"
-]
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/ar-doc.json b/utilities/doctype/question/locale/ar-doc.json
deleted file mode 100644
index bafb808..0000000
--- a/utilities/doctype/question/locale/ar-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "\u0625\u062c\u0627\u0628\u0629",
- "File List": "\u0645\u0644\u0641 \u0642\u0627\u0626\u0645\u0629",
- "Points": "\u0646\u0642\u0627\u0637",
- "Question": "\u0633\u0624\u0627\u0644",
- "User Tags": "\u0627\u0644\u0643\u0644\u0645\u0627\u062a \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645",
- "Users Voted": "\u0635\u0648\u062a \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u064a\u0646",
- "Utilities": "\u062e\u062f\u0645\u0627\u062a"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/de-doc.json b/utilities/doctype/question/locale/de-doc.json
deleted file mode 100644
index cf7569c..0000000
--- a/utilities/doctype/question/locale/de-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Beantworten",
- "File List": "Dateiliste",
- "Points": "Punkte",
- "Question": "Frage",
- "User Tags": "Nutzertags",
- "Users Voted": "Nutzer",
- "Utilities": "Dienstprogramme"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/es-doc.json b/utilities/doctype/question/locale/es-doc.json
deleted file mode 100644
index 683fc0c..0000000
--- a/utilities/doctype/question/locale/es-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Responder",
- "File List": "Lista de archivos",
- "Points": "Puntos",
- "Question": "Cuesti\u00f3n",
- "User Tags": "Nube de etiquetas",
- "Users Voted": "Los usuarios Votado",
- "Utilities": "Utilidades"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/fr-doc.json b/utilities/doctype/question/locale/fr-doc.json
deleted file mode 100644
index 8722801..0000000
--- a/utilities/doctype/question/locale/fr-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "R\u00e9pondre",
- "File List": "Liste des fichiers",
- "Points": "Points",
- "Question": "Question",
- "User Tags": "Nuage de Tags",
- "Users Voted": "Des internautes Yahoo!",
- "Utilities": "Utilitaires"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/hi-doc.json b/utilities/doctype/question/locale/hi-doc.json
deleted file mode 100644
index c7b9ebc..0000000
--- a/utilities/doctype/question/locale/hi-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "\u091c\u0935\u093e\u092c",
- "File List": "\u092b\u093c\u093e\u0907\u0932 \u0938\u0942\u091a\u0940",
- "Points": "\u00bb",
- "Question": "\u0938\u0935\u093e\u0932",
- "User Tags": "\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e \u0915\u0947 \u091f\u0948\u0917",
- "Users Voted": "\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e \u0935\u094b\u091f \u0926\u093f\u092f\u093e",
- "Utilities": "\u0909\u092a\u092f\u094b\u0917\u093f\u0924\u093e\u090f\u0901"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/hr-doc.json b/utilities/doctype/question/locale/hr-doc.json
deleted file mode 100644
index 94127c2..0000000
--- a/utilities/doctype/question/locale/hr-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Odgovoriti",
- "File List": "Popis datoteka",
- "Points": "Bodovi",
- "Question": "Pitanje",
- "User Tags": "Upute Tags",
- "Users Voted": "Korisnici Glasao",
- "Utilities": "Komunalne usluge"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/nl-doc.json b/utilities/doctype/question/locale/nl-doc.json
deleted file mode 100644
index b9f30e2..0000000
--- a/utilities/doctype/question/locale/nl-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Beantwoorden",
- "File List": "File List",
- "Points": "Punten",
- "Question": "Vraag",
- "User Tags": "Gebruiker-tags",
- "Users Voted": "Gebruikers Verkozen",
- "Utilities": "Utilities"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/pt-BR-doc.json b/utilities/doctype/question/locale/pt-BR-doc.json
deleted file mode 100644
index 36a2804..0000000
--- a/utilities/doctype/question/locale/pt-BR-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Resposta",
- "File List": "Lista de Arquivos",
- "Points": "Pontos",
- "Question": "Pergunta",
- "User Tags": "Etiquetas de Usu\u00e1rios",
- "Users Voted": "Votos de usu\u00e1rios",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/pt-doc.json b/utilities/doctype/question/locale/pt-doc.json
deleted file mode 100644
index 415ce2b..0000000
--- a/utilities/doctype/question/locale/pt-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "Responder",
- "File List": "Lista de Arquivos",
- "Points": "Pontos",
- "Question": "Pergunta",
- "User Tags": "Etiquetas de usu\u00e1rios",
- "Users Voted": "Votado usu\u00e1rios",
- "Utilities": "Utilit\u00e1rios"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/sr-doc.json b/utilities/doctype/question/locale/sr-doc.json
deleted file mode 100644
index 07f56ce..0000000
--- a/utilities/doctype/question/locale/sr-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "\u041e\u0434\u0433\u043e\u0432\u043e\u0440",
- "File List": "\u0424\u0438\u043b\u0435 \u041b\u0438\u0441\u0442",
- "Points": "\u0422\u0430\u0447\u043a\u0435",
- "Question": "\u041f\u0438\u0442\u0430\u045a\u0435",
- "User Tags": "\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u043a \u0422\u0430\u0433\u0441:",
- "Users Voted": "\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0446\u0438 \u0413\u043b\u0430\u0441\u0430\u043e",
- "Utilities": "\u041a\u043e\u043c\u0443\u043d\u0430\u043b\u043d\u0435 \u0443\u0441\u043b\u0443\u0433\u0435"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/ta-doc.json b/utilities/doctype/question/locale/ta-doc.json
deleted file mode 100644
index 8efcefc..0000000
--- a/utilities/doctype/question/locale/ta-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "\u0baa\u0ba4\u0bbf\u0bb2\u0bcd",
- "File List": "\u0b95\u0bc7\u0bbe\u0baa\u0bcd\u0baa\u0bc1 \u0baa\u0b9f\u0bcd\u0b9f\u0bbf\u0baf\u0bb2\u0bcd",
- "Points": "\u0baa\u0bc1\u0bb3\u0bcd\u0bb3\u0bbf\u0b95\u0bb3\u0bcd",
- "Question": "\u0bb5\u0bbf\u0ba9\u0bbe",
- "User Tags": "\u0baa\u0baf\u0ba9\u0bb0\u0bcd \u0b95\u0bc1\u0bb1\u0bbf\u0b9a\u0bcd\u0b9a\u0bc6\u0bbe\u0bb1\u0bcd\u0b95\u0bb3\u0bcd",
- "Users Voted": "\u0baa\u0baf\u0ba9\u0bb0\u0bcd \u0ba4\u0bb3\u0bae\u0bcd",
- "Utilities": "\u0baa\u0baf\u0ba9\u0bcd\u0baa\u0bbe\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/locale/th-doc.json b/utilities/doctype/question/locale/th-doc.json
deleted file mode 100644
index cafd736..0000000
--- a/utilities/doctype/question/locale/th-doc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Answer": "\u0e15\u0e2d\u0e1a",
- "File List": "\u0e23\u0e32\u0e22\u0e0a\u0e37\u0e48\u0e2d\u0e44\u0e1f\u0e25\u0e4c",
- "Points": "\u0e08\u0e38\u0e14",
- "Question": "\u0e04\u0e33\u0e16\u0e32\u0e21",
- "User Tags": "\u0e41\u0e17\u0e47\u0e01\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49",
- "Users Voted": "\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e42\u0e2b\u0e27\u0e15",
- "Utilities": "\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49"
-}
\ No newline at end of file
diff --git a/utilities/doctype/question/question.py b/utilities/doctype/question/question.py
deleted file mode 100644
index 6a6fd5b..0000000
--- a/utilities/doctype/question/question.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
-
- def on_trash(self):
- import webnotes
- webnotes.conn.sql("delete from tabAnswer where question=%s", self.doc.name)
-
\ No newline at end of file
diff --git a/utilities/doctype/question/question.txt b/utilities/doctype/question/question.txt
deleted file mode 100644
index fbd7b75..0000000
--- a/utilities/doctype/question/question.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-[
- {
- "creation": "2013-01-02 17:08:46",
- "docstatus": 0,
- "modified": "2013-01-01 18:58:55",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "allow_attach": 0,
- "autoname": "QUES.#######",
- "doctype": "DocType",
- "in_create": 1,
- "module": "Utilities",
- "name": "__common__",
- "read_only": 1
- },
- {
- "doctype": "DocField",
- "name": "__common__",
- "parent": "Question",
- "parentfield": "fields",
- "parenttype": "DocType",
- "permlevel": 0
- },
- {
- "cancel": 1,
- "create": 1,
- "doctype": "DocPerm",
- "name": "__common__",
- "parent": "Question",
- "parentfield": "permissions",
- "parenttype": "DocType",
- "permlevel": 0,
- "read": 1,
- "report": 1,
- "role": "All",
- "submit": 0,
- "write": 1
- },
- {
- "doctype": "DocType",
- "name": "Question"
- },
- {
- "doctype": "DocField",
- "fieldname": "question",
- "fieldtype": "Text",
- "label": "Question",
- "oldfieldname": "question",
- "oldfieldtype": "Text"
- },
- {
- "doctype": "DocField",
- "fieldname": "points",
- "fieldtype": "Int",
- "hidden": 1,
- "label": "Points"
- },
- {
- "doctype": "DocField",
- "fieldname": "answer",
- "fieldtype": "Text Editor",
- "label": "Answer",
- "oldfieldname": "answer",
- "oldfieldtype": "Text Editor"
- },
- {
- "doctype": "DocField",
- "fieldname": "_user_tags",
- "fieldtype": "Data",
- "hidden": 1,
- "label": "User Tags"
- },
- {
- "doctype": "DocField",
- "fieldname": "_users_voted",
- "fieldtype": "Text",
- "label": "Users Voted"
- },
- {
- "doctype": "DocPerm"
- }
-]
\ No newline at end of file
diff --git a/utilities/page/markdown_reference/markdown_reference.html b/utilities/page/markdown_reference/markdown_reference.html
index cdf646c..767ac36 100644
--- a/utilities/page/markdown_reference/markdown_reference.html
+++ b/utilities/page/markdown_reference/markdown_reference.html
@@ -1,4 +1,4 @@
-<div class="layout-wrapper layout-wrapper-background">
+<div class="appframe col col-lg-12">
<div class="layout-appframe">
<div class="appframe-titlebar">
<span class="appframe-title">Markdown Reference</span>
diff --git a/utilities/page/question_view/__init__.py b/utilities/page/question_view/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/page/question_view/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/page/question_view/question_view.css b/utilities/page/question_view/question_view.css
deleted file mode 100644
index 4472da7..0000000
--- a/utilities/page/question_view/question_view.css
+++ /dev/null
@@ -1,44 +0,0 @@
-.qv-body {
- padding: 13px;
-}
-
-
-.qv-input {
- font-size: 14px;
- height: 2.5em;
- width: 100%;
-}
-
-.qv-text {
- font-size: 20px;
- font-weight: bold;
-}
-
-.qv-ans-input {
- height: 5em;
-}
-
-.qv-ans-text {
- color: #444;
- line-height: 1.7em;
-}
-
-.qv-question-wrapper {
-}
-
-.qv-add-answer {
- width: 50%;
- margin: 7px 0px;
- padding: 7px;
- background-color: #E2E2EE;
- display: none;
-}
-
-.qv-add-answer textarea {
- height: 17em;
- font-size: 12px;
-}
-
-.qv-answer {
-
-}
\ No newline at end of file
diff --git a/utilities/page/question_view/question_view.html b/utilities/page/question_view/question_view.html
deleted file mode 100644
index b091d95..0000000
--- a/utilities/page/question_view/question_view.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<div class="layout-wrapper layout-wrapper-appframe">
- <div class="layout-appframe"></div>
- <div class="layout-main" style="min-height: 400px">
- <div class="qv-question-wrapper">
- </div>
- <hr>
- <div class="qv-answer-wrapper">
- </div>
- <div class="add-answer-area"></div>
- </div>
-</div>
\ No newline at end of file
diff --git a/utilities/page/question_view/question_view.js b/utilities/page/question_view/question_view.js
deleted file mode 100644
index e479e13..0000000
--- a/utilities/page/question_view/question_view.js
+++ /dev/null
@@ -1,193 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-pscript['onload_question-view'] = function(wrapper) {
- wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
- wrapper.appframe.title('Question');
- wrapper.appframe.add_home_breadcrumb();
- wrapper.appframe.add_module_breadcrumb("Knowledge Base");
- wrapper.appframe.add_breadcrumb("icon-file");
-
- wrapper.add_answer_area = $('.add-answer-area').get(0);
-}
-
-pscript['refresh_question-view'] = function(wrapper) {
- // href
- var qid = window.location.hash.split('/')[1];
- if(qid) {
- pscript.question_view(qid);
- }
-}
-
-pscript.question_view = function(qid, qtext) {
- var w = wn.pages['question-view'];
- new KBQuestionView(w, qid, qtext);
-}
-
-KBQuestionView = function(w, qid, qtext) {
- var me = this;
-
- this.make_question = function() {
- $(w).find('.qv-question-wrapper').empty();
- $(w.add_answer_area).empty();
- new EditableText({
- parent: $(w).find('.qv-question-wrapper').get(0),
- dt: 'Question',
- dn: qid,
- fieldname: 'question',
- text: qtext,
- inp_class: 'qv-input',
- disp_class: 'qv-text'
- });
-
- // show tags
- }
-
- // answer list
- this.make_answer_list = function() {
- $(w).find('.qv-answer-wrapper').empty();
- this.ans_list = new KBAnswerList({
- parent: $(w).find('.qv-answer-wrapper').get(0),
- qid: qid
- })
- }
-
- // check if users has answered
- // (if no) then add a box to add a new answer
- this.make_add_answer = function() {
- $c_page('utilities', 'question_view', 'has_answered', qid, function(r, rt) {
- if(r.message=='No') {
- me.make_answer_box_link();
- }
- });
- }
-
- // add a link to open add answer
- this.make_answer_box_link = function() {
- wn.pages['question-view'].appframe.add_button('Add your answer', function() {
- $(this).toggle(false);
- me.make_answer_box();
- }, 'icon-plus');
- }
-
- // answer box
- // text area + add button
- this.make_answer_box = function() {
- $ds(w.add_answer_area);
- $(w.add_answer_area, '<h3>Add your Answer</h3>\
- <div class="help">In markdown format</div>');
- this.input = $a(w.add_answer_area, 'textarea');
- $(this.input).css({width: "90%", height: "200px"});
- //wn.tinymce.add_simple(this.input);
-
- this.btn = $btn($a(w.add_answer_area, 'div'), 'Post', function() {
- var v = $(me.input).val();
- if(!v) { msgprint('Write something!'); return; }
- me.btn.set_working();
- $c_page('utilities', 'question_view', 'add_answer',
- JSON.stringify({qid: qid, "answer":v}),
- function(r, rt) {
- me.btn.done_working();
- me.ans_list.list.run();
- $dh(w.add_answer_area);
- }
- );
- });
- }
-
- this.setup = function() {
- if(qtext) {
- this.make();
- }
- else {
- $c_page('utilities', 'question_view', 'get_question', qid, function(r, rt) {
- qtext = r.message;
- me.make();
- });
- }
- }
-
- this.make = function() {
- set_title(qtext);
- this.make_question();
- this.make_answer_list();
- this.make_add_answer();
- }
-
- this.setup();
-}
-
-
-// kb answer list
-KBAnswerList = function(args) {
- var me = this;
- $.extend(this, args);
-
- this.make_list = function() {
- wn.pages['question-view'].appframe.clear_buttons();
- this.list = new wn.ui.Listing({
- parent: me.parent,
- appframe: wn.pages['question-view'].appframe,
- as_dict: 1,
- no_result_message: 'No answers yet, be the first one to answer!',
- render_row: function(body, data) {
- new KBAnswer(body, data, me)
- },
- get_query: function() {
- return repl("SELECT t1.name, t1.owner, t1.answer, t1._users_voted, t2.first_name, "
- +"t2.last_name, t1.modified from tabAnswer t1, tabProfile t2 "
- +"where question='%(qid)s' and t1.owner = t2.name "
- +"order by t1.modified desc", {qid: me.qid})
- }
- });
-
- this.list.run();
-
- }
-
- this.make_list();
-
-}
-
-// kb answer
-// answer
-// by xxx | on xxx
-KBAnswer = function(body, data, ans_list) {
- body.className = 'qv-answer';
- var edtxt = new EditableText({
- parent: body,
- dt: 'Answer',
- dn: data.name,
- fieldname: 'answer',
- text: data.answer,
- inp_class: 'qv-ans-input',
- disp_class: 'qv-ans-text',
- height: '300px',
- width: '90%'
- });
-
- $(edtxt.wrapper).addClass('well');
-
- var div = $a(body, 'div', '', {})
- new KBItemToolbar({
- parent: div,
- det: data,
- with_tags: 0,
- doctype: 'Answer'
- }, ans_list)
-}
-
-wn.require('app/js/kb_common.js');
\ No newline at end of file
diff --git a/utilities/page/question_view/question_view.py b/utilities/page/question_view/question_view.py
deleted file mode 100644
index 175a8ed..0000000
--- a/utilities/page/question_view/question_view.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-from webnotes.utils import load_json, cstr, now
-
-@webnotes.whitelist()
-def update_item(arg):
- args = load_json(arg)
-
- webnotes.conn.sql("update `tab%s` set `%s`=%s, modified=%s where name=%s" \
- % (args['dt'], args['fn'], '%s', '%s', '%s'), (args['text'], now(), args['dn']))
-
-@webnotes.whitelist()
-def has_answered(arg):
- return webnotes.conn.sql("select name from tabAnswer where owner=%s and question=%s", (webnotes.user.name, arg)) and 'Yes' or 'No'
-
-@webnotes.whitelist()
-def get_question(arg):
- return cstr(webnotes.conn.sql("select question from tabQuestion where name=%s", arg)[0][0])
-
-@webnotes.whitelist()
-def add_answer(arg):
- arg = load_json(arg)
-
- from webnotes.model.doc import Document
- a = Document('Answer')
- a.answer = arg['answer']
- a.question = arg['qid']
- a.points = 1
- a.save(1)
-
- webnotes.conn.set_value('Question', arg['qid'], 'modified', now())
\ No newline at end of file
diff --git a/utilities/page/question_view/question_view.txt b/utilities/page/question_view/question_view.txt
deleted file mode 100644
index 87fd053..0000000
--- a/utilities/page/question_view/question_view.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "creation": "2013-04-09 11:45:31",
- "docstatus": 0,
- "modified": "2013-04-09 11:47:24",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "Page",
- "module": "Utilities",
- "name": "__common__",
- "page_name": "Question View",
- "standard": "Yes"
- },
- {
- "doctype": "Page Role",
- "name": "__common__",
- "parent": "question-view",
- "parentfield": "roles",
- "parenttype": "Page",
- "role": "All"
- },
- {
- "doctype": "Page",
- "name": "question-view"
- },
- {
- "doctype": "Page Role"
- }
-]
\ No newline at end of file
diff --git a/utilities/page/questions/__init__.py b/utilities/page/questions/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/page/questions/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/page/questions/questions.css b/utilities/page/questions/questions.css
deleted file mode 100644
index 779da55..0000000
--- a/utilities/page/questions/questions.css
+++ /dev/null
@@ -1,31 +0,0 @@
-div.kb-search-wrapper textarea {
- height: 2.2em;
- width: 80%;
- font-size: 14px;
- padding: 3px;
- margin-bottom: 7px;
-}
-
-.kb-question-wrapper {
- padding-bottom: 3px;
- margin-bottom: 3px;
-}
-
-.kb-questions {
-}
-
-.un-answered {
- color: #f33;
-}
-
-.kb-question-details {
- margin: 11px 0px 11px 29px;
-}
-
-.kb-tag-filter-area {
- padding: 7px;
- background-color: #F2F2E8;
- color: #222;
- margin: 7px 0px;
- display: none;
-}
\ No newline at end of file
diff --git a/utilities/page/questions/questions.html b/utilities/page/questions/questions.html
deleted file mode 100644
index bec483e..0000000
--- a/utilities/page/questions/questions.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<div class="layout-wrapper layout-wrapper-background">
- <div class="layout-appframe"></div>
- <div class="layout-main-section">
- <div class="kb-search-wrapper">
- <textarea></textarea>
- <div>
- <button class="btn btn-small search" onclick="">
- <i class="icon-search"></i> Search</button>
- <button class="btn btn-small ask">
- <i class="icon-question-sign"></i> Ask</button>
- </div>
- </div>
- </div>
- <div class="layout-side-section">
- <div class="questions-tags"></div>
- <p class="help">A wiki or Q&A for your organization</p>
- </div>
- <div style="clear: both;"></div>
-</div>
\ No newline at end of file
diff --git a/utilities/page/questions/questions.js b/utilities/page/questions/questions.js
deleted file mode 100644
index e7e99b5..0000000
--- a/utilities/page/questions/questions.js
+++ /dev/null
@@ -1,221 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-pscript.onload_questions = function(wrapper) {
- body = $(wrapper).find('.layout-main-section').get(0);
-
- wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.layout-appframe'));
- wrapper.appframe.add_home_breadcrumb();
- wrapper.appframe.add_breadcrumb(wn.modules["Knowledge Base"].icon);
- wrapper.appframe.title('Knowledge Base');
-
- // kb
- var kb = new KnowledgeBase(body);
-
- wn.model.with_doctype("Question", function() {
- this.sidebar_stats = new wn.views.SidebarStats({
- doctype: "Question",
- stats: ["_user_tags"],
- parent: $(wrapper).find('.questions-tags'),
- set_filter: function(fieldname, label) {
- kb.set_filter(fieldname, label);
- //me.set_filter(fieldname, label);
- }
- });
- })
-}
-
-// knowledge base object
-// has a box for search or ask a question
-// and list of top rated search results
-//
-function KnowledgeBase(w) {
- var me = this;
- this.sort_by = 'modified';
- this.tag_filter_dict = {};
-
- this.make_search_bar = function() {
- this.search = $(w).find('.kb-search-wrapper textarea').get(0);
-
- $(w).find('.btn.search').click(function() {
- me.run();
- })
- $(w).find('.btn.ask').click(function() {
- me.ask();
- })
- }
-
- // ask a new question
- this.ask = function() {
- if(this.search.value==$(this.search).attr('default_text')) {
- msgprint('Please enter some text'); return;
- }
- this.add_question([]);
- }
-
- // suggest a few users who can answer
- this.suggest = function() {
- this.dialog = new wn.ui.Dialog({
- title: 'Suggest a users',
- width: 400,
- fields: [
- {fieldtype:'HTML', options:'Optional: Suggest a few users who can help you answer this question<br>'},
- {fieldtype:'Link', fieldname:'profile1', label:'1st User',options:'Profile'},
- {fieldtype:'Link', fieldname:'profile2', label:'2nd User',options:'Profile'},
- {fieldtype:'Link', fieldname:'profile3', label:'3rd User',options:'Profile'},
- {fieldtype:'Button', fieldname:'ask', label:'Add the Question'}
- ]
- });
- this.dialog.fields_dict.ask.input.onclick = function() {
- me.dialog.hide();
- me.add_question(values(me.dialog.get_values()));
- }
- this.dialog.show();
- }
-
- // add a new question to the database
- this.add_question = function(suggest_list) {
- $c_page('utilities', 'questions', 'add_question', {
- question: this.search.value,
- suggest: suggest_list
- }, function(r,rt) {
- $(me.search).val('').blur();
- me.run();
- })
- }
-
- // where tags that filter will be displayed
- this.make_tag_filter_area = function() {
- this.tag_filters = $a(w, 'div', 'kb-tag-filter-area');
- $a(this.tag_filters,'span','',{marginRight:'4px',color:'#442'}, '<i>Showing for:</i>');
- this.tag_area = $a(this.tag_filters, 'span');
- }
-
- // make a list of questions
- this.make_list = function() {
- this.make_tag_filter_area();
- this.list_area = $a(w, 'div', '', {marginRight:'13px'})
- this.no_result = $a(w, 'div','help_box',{display:'none'},'No questions asked yet! Be the first one to ask')
-
- this.list = new wn.ui.Listing({
- parent: this.list_area,
- no_results_message: 'No questions found. Ask a new question!',
- appframe: wn.pages.questions.appframe,
- as_dict: 1,
- method: 'utilities.page.questions.questions.get_questions',
- get_args: function() {
- var args = {};
- if(me.search.value) {
- args.search_text = me.search.value;
- }
- if(me.tag_filter_dict) {
- args.tag_filters = keys(me.tag_filter_dict);
- }
- return args
- },
- render_row: function(parent, data, listing) {
- new KBQuestion(parent, data, me);
- }
- });
-
- this.list.run();
-
- }
-
- this.set_filter = function(fieldname, label) {
- this.set_tag_filter({label:label});
- }
- // add a tag filter to the search in the
- // main page
- this.set_tag_filter = function(tag) {
-
- // check if exists
- if(in_list(keys(me.tag_filter_dict), tag.label)) return;
-
- // create a tag in filters
- var filter_tag = new SingleTag({
- parent: me.tag_area,
- label: tag.label,
- dt: 'Question',
- color: tag.color
- });
-
- // remove tag from filters
- filter_tag.remove = function(tag_remove) {
- $(tag_remove.body).fadeOut();
- delete me.tag_filter_dict[tag_remove.label];
-
- // hide everything?
- if(!keys(me.tag_filter_dict).length) {
- $(me.tag_filters).slideUp(); // hide
- }
-
- // run
- me.run();
- }
-
- // add to dict
- me.tag_filter_dict[tag.label] = filter_tag;
- $ds(me.tag_filters);
-
- // run
- me.run();
- }
- this.run = function() {
- this.list.run();
- }
-
- this.make_search_bar();
- this.make_list();
-
-}
-
-// single kb question
-// "question
-// points | tag list"
-
-KBQuestion = function(parent, det, kb) {
-
- this.make = function() {
- this.wrapper = $a(parent, 'div', 'kb-question-wrapper');
- this.q_area = $a($a(this.wrapper, 'div'), 'h3',
- 'kb-questions link_type', {display:'inline', textDecoration:'none'}, det.question);
- if(det.answers==0) {
- $(this.q_area).addClass('un-answered')
- }
-
- this.q_area.onclick = function() {
- var q = this;
- window.location.href = '#!question-view/' + q.id;
- //loadpage('question-view', function() { pscript.question_view(q.id, q.txt) })
- }
-
- this.q_area.id = det.name; this.q_area.txt = det.question;
-
- new KBItemToolbar({
- parent: this.wrapper,
- det: det,
- with_tags: 1,
- doctype: 'Question'
- }, kb)
-
- }
-
-
- this.make()
-}
-
-wn.require('app/js/kb_common.js');
diff --git a/utilities/page/questions/questions.py b/utilities/page/questions/questions.py
deleted file mode 100644
index 442fb01..0000000
--- a/utilities/page/questions/questions.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-from webnotes.utils import load_json
-import json
-
-@webnotes.whitelist()
-def get_questions():
- """get list of questions"""
- import json
- conds = ''
-
- if 'search_text' in webnotes.form_dict:
- conds = ' and t1.question like "%'+ webnotes.form_dict['search_text'] + '%"'
-
- if 'tag_filters' in webnotes.form_dict:
- tag_filters = json.loads(webnotes.form_dict['tag_filters'])
- for t in tag_filters:
- conds += ' and t1._user_tags like "%'+ t +'%"'
-
- return webnotes.conn.sql("""select t1.name, t1.owner, t1.question, t1.modified, t1._user_tags,
- (select count(*) from tabAnswer where
- tabAnswer.question = t1.name) as answers
- from tabQuestion t1, tabProfile t2
- where t1.docstatus!=2
- and t1.owner = t2.name
- %(conds)s
- order by t1.modified desc""" % {"conds":conds}, as_dict=1)
-
-# add a new question
-@webnotes.whitelist()
-def add_question(arg):
- args = load_json(arg)
-
- from webnotes.model.doc import Document
- d = Document('Question')
- d.question = args['question']
- d.points = 1
- d.save(1)
-
- if args['suggest']:
- from core.page.messages import messages
- for s in args['suggest']:
- if s:
- messages.post(json.dumps({
- 'contact': s,
- 'txt': 'Please help me and answer the question "%s" in the Knowledge Base' % d.question,
- 'notify': 1
- }))
-
-@webnotes.whitelist()
-def delete(arg):
- """
- delete a question or answer (called from kb toolbar)
- """
- args = load_json(arg)
- from webnotes.model import delete_doc
- delete_doc(args['dt'], args['dn'])
diff --git a/utilities/page/questions/questions.txt b/utilities/page/questions/questions.txt
deleted file mode 100644
index e327ebf..0000000
--- a/utilities/page/questions/questions.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "creation": "2013-04-09 11:50:08",
- "docstatus": 0,
- "modified": "2013-04-09 11:52:08",
- "modified_by": "Administrator",
- "owner": "Administrator"
- },
- {
- "doctype": "Page",
- "module": "Utilities",
- "name": "__common__",
- "page_name": "Questions",
- "standard": "Yes"
- },
- {
- "doctype": "Page Role",
- "name": "__common__",
- "parent": "questions",
- "parentfield": "roles",
- "parenttype": "Page",
- "role": "All"
- },
- {
- "doctype": "Page",
- "name": "questions"
- },
- {
- "doctype": "Page Role"
- }
-]
\ No newline at end of file
diff --git a/utilities/page/trash/__init__.py b/utilities/page/trash/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/page/trash/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/page/trash/trash.html b/utilities/page/trash/trash.html
deleted file mode 100644
index b17e475..0000000
--- a/utilities/page/trash/trash.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<div class="layout_wrapper">
-<div id="trash_header"></div>
-<div id="trash_div" style="margin: 0px;"></div>
-</div>
\ No newline at end of file
diff --git a/utilities/page/trash/trash.js b/utilities/page/trash/trash.js
deleted file mode 100644
index b30626d..0000000
--- a/utilities/page/trash/trash.js
+++ /dev/null
@@ -1,144 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-pscript['onload_Trash'] = function() {
-
- // header and toolbar
- var h = new PageHeader('trash_header','Trash Bin','Restore the documents that you have trashed')
-
- if(!pscript.trash_bin) pscript.trash_bin = new pscript.Trash();
-}
-
-pscript.Trash = function() {
- // create UI elements
- this.wrapper = $i('trash_div');
-
- this.head = $a(this.wrapper, 'div');
- this.body = $a(this.wrapper, 'div');
- $y(this.body, {margin:'8px'})
-
- this.make_head();
- this.load_masters();
-}
-
-// Make Button
-// ------------
-pscript.Trash.prototype.make_button = function(label, area){
- var me = this;
- var w = $a(area, 'div', '', {margin:'8px'});
- var t = make_table(w,1,1,'400px',['50%','50%']);
- var s = $a($td(t,0,0),'button');
- s.innerHTML = label;
- s.wrapper = w;
- return s;
-}
-
-
-// Make Head
-// -------------
-pscript.Trash.prototype.make_head = function() {
- var me = this;
-
- var make_select = function(label) {
- var w = $a(me.head, 'div', '', {margin:'8px'});
- var t = make_table(w,1,2,'400px',['50%','50%']);
- $td(t,0,0).innerHTML = label;
- var s = $a($td(t,0,1),'select','',{width:'140px'});
- s.wrapper = w;
- return s;
- }
-
- // Select Master Name
- this.master_select = make_select('Select Master');
-
- var me = this;
- // Get Records
- this.get_records_button = me.make_button('Get Records', me.head);
- this.get_records_button.onclick = function() {
- me.get_records();
- }
-}
-
-
-// Load Masters
-// -------------
-pscript.Trash.prototype.load_masters = function(){
- var me = this;
- var callback = function(r, rt){
- // Masters
- empty_select(me.master_select);
- add_sel_options(me.master_select,add_lists(['All'], r.message), 'All');
- }
- $c_obj('Trash Control','get_masters','',callback);
-}
-
-
-// Get Records
-// -----------
-pscript.Trash.prototype.get_records = function(){
- var me = this;
- me.body.innerHTML = '';
- var callback = function(r, rt){
- if(r.message) me.generate_trash_records(r.message);
- else msgprint("No Records Found");
- }
- $c_obj('Trash Control','get_trash_records',sel_val(me.master_select),callback);
-}
-
-
-// Generate Trash Records
-// -----------------------
-pscript.Trash.prototype.generate_trash_records = function(rec_dict){
- var me = this;
- pscript.all_checkboxes = [];
- mnames = keys(rec_dict).sort();
- for(var i = 0; i < mnames.length; i ++){
- var head = $a(me.body, 'h3'); head.innerHTML = mnames[i];
- var rec_table = make_table(me.body,rec_dict[mnames[i]].length,2,'375px',['350px','25px'],{border:'1px solid #AAA',padding:'2px'});
- for(var j = 0; j < rec_dict[mnames[i]].length; j++){
- $a_input($td(rec_table,j,0), 'data');
- $td(rec_table,j,0).innerHTML = rec_dict[mnames[i]][j];
- var chk = $a_input($td(rec_table,j,1), 'checkbox');
- chk.master = mnames[i];
- chk.record = rec_dict[mnames[i]][j];
- pscript.all_checkboxes.push(chk);
- }
- }
- this.restore_button = me.make_button('Restore Selected', me.body);
- this.restore_button.onclick = function() {
- me.restore_records(0);
- }
- this.restore_all_button = me.make_button('Restore All', me.body);
- this.restore_all_button.onclick = function() {
- me.restore_records(1);
- }
-}
-
-
-// Restore Records
-// ---------------
-pscript.Trash.prototype.restore_records = function(restore_all){
- var me = this;
- var out = {};
- for(i in pscript.all_checkboxes) {
- c = pscript.all_checkboxes[i];
- if (restore_all || (!restore_all && c.checked)) {
- if(!out[c.master]) out[c.master] = [c.record];
- else {out[c.master].push(c.record);}
- }
- }
- $c_obj('Trash Control','restore_records',JSON.stringify(out),function(r, rt){me.get_records();})
-}
\ No newline at end of file
diff --git a/utilities/page/trash/trash.txt b/utilities/page/trash/trash.txt
deleted file mode 100644
index a13e1b6..0000000
--- a/utilities/page/trash/trash.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2010-10-12 15:19:32",
- "modified_by": "Administrator",
- "modified": "2010-12-30 11:44:36"
- },
- {
- "name": "__common__",
- "module": "Utilities",
- "page_name": "Trash",
- "doctype": "Page",
- "standard": "Yes"
- },
- {
- "name": "__common__",
- "parent": "Trash",
- "doctype": "Page Role",
- "parenttype": "Page",
- "parentfield": "roles"
- },
- {
- "name": "Trash",
- "doctype": "Page"
- },
- {
- "role": "Administrator",
- "doctype": "Page Role"
- },
- {
- "role": "Sales Master Manager",
- "doctype": "Page Role"
- },
- {
- "role": "Material Master Manager",
- "doctype": "Page Role"
- },
- {
- "role": "Purchase Master Manager",
- "doctype": "Page Role"
- },
- {
- "role": "Accounts Manager",
- "doctype": "Page Role"
- }
-]
\ No newline at end of file
diff --git a/website/css/website.css b/website/css/website.css
index 25e2c91..36e306d 100644
--- a/website/css/website.css
+++ b/website/css/website.css
@@ -1,47 +1,15 @@
-div.outer {
- padding: 30px;
- margin: 30px -30px 10px -30px;
- min-height: 400px;
+h1, h2, h3, h4, h5 {
+ font-weight: bold;
}
-.outer .navbar {
- margin: -30px -30px 20px -30px;
-}
-
-footer {
- text-align: left;
- margin: auto;
- margin-bottom: 20px;
-}
-
-.navbar-inner {
- border: 0px;
- border-bottom: 1px solid #ddd;
- border-radius: 0px;
- padding-right: 30px;
- padding-left: 30px;
-}
-
-p, li {
- line-height: 1.5em;
-}
-
-.layout-wrapper {
- box-shadow: none;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- border-radius: 0px 0px 5px 5px;
-}
-
-.layout-main {
- min-height: 400px;
- padding: 30px;
+.content {
+ padding-bottom: 30px;
}
.missing-image {
background-color: #eee;
padding: 40px;
- width: 32px;
+ width: 112px;
font-size: 32px;
color: #888;
}
@@ -129,3 +97,15 @@
.avatar-x-large img {
width: 100px;
}
+
+.carousel-control .icon {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ z-index: 5;
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ margin-top: -10px;
+ margin-left: -10px;
+}
diff --git a/website/doctype/style_settings/custom_template.css b/website/doctype/style_settings/custom_template.css
index f055b78..996774e 100644
--- a/website/doctype/style_settings/custom_template.css
+++ b/website/doctype/style_settings/custom_template.css
@@ -66,8 +66,9 @@
}
/* Bootstrap Navbar */
-.navbar-inverse .navbar-inner {
+.navbar-inverse {
box-shadow: none;
+ border-radius: 0px;
background-color: #{{ doc.top_bar_background or "444444"}};
background-repeat: repeat-x;
background-image: none;
@@ -78,9 +79,9 @@
{%- endif %}
}
-.navbar-inverse .brand,
-.navbar-inverse .brand:hover,
-.navbar-inverse .brand:focus,
+.navbar-inverse .navbar-brand,
+.navbar-inverse .navbar-brand:hover,
+.navbar-inverse .navbar-brand:focus,
.navbar-inverse .nav > li > a {
color: #{{ doc.top_bar_foreground or "fffffff"}};
text-shadow: none;
@@ -117,8 +118,8 @@
color: #{{ doc.top_bar_foreground or "fffffff"}};
}
-.navbar-fixed-top .navbar-inner,
-.navbar-static-top .navbar-inner {
+.navbar-fixed-top,
+.navbar-static-top {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
@@ -190,14 +191,6 @@
text-shadow: none;
}
-.breadcrumb > li > .divider {
- color: #{{ doc.page_text }};
-}
-
-.breadcrumb > .active {
- color: #{{ doc.page_text }};
-}
-
.table-striped tbody > tr:nth-child(odd) > td,
.table-striped tbody > tr:nth-child(odd) > th {
diff --git a/website/doctype/website_slideshow/website_slideshow.txt b/website/doctype/website_slideshow/website_slideshow.txt
index 2887d4b..e67e1f8 100644
--- a/website/doctype/website_slideshow/website_slideshow.txt
+++ b/website/doctype/website_slideshow/website_slideshow.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-03-07 14:48:40",
+ "creation": "2013-03-07 15:53:15",
"docstatus": 0,
- "modified": "2012-12-25 16:56:34",
+ "modified": "2013-05-28 16:57:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -53,6 +53,7 @@
},
{
"depends_on": "eval:!doc.__islocal",
+ "description": "Note: For best results, images must be of the same size and width must be greater than height.",
"doctype": "DocField",
"fieldname": "sb0",
"fieldtype": "Section Break",
diff --git a/website/helpers/blog.py b/website/helpers/blog.py
index 386c4b7..9da2062 100644
--- a/website/helpers/blog.py
+++ b/website/helpers/blog.py
@@ -63,15 +63,20 @@
"""
import webnotes
import webnotes.utils, markdown2
- import webnotes.widgets.form.comments
if not args: args = webnotes.form_dict
args['comment'] = unicode(markdown2.markdown(args.get('comment') or ''))
+ args['doctype'] = "Comment"
- comment = webnotes.widgets.form.comments.add_comment(args)
+ page_name = args.get("page_name")
+ if "page_name" in args:
+ del args["page_name"]
+
+ comment = webnotes.bean(args)
+ comment.insert()
# since comments are embedded in the page, clear the web cache
- webnotes.webutils.clear_cache(args.get('page_name'))
+ webnotes.webutils.clear_cache(page_name)
comment['comment_date'] = webnotes.utils.global_date_format(comment['creation'])
template_args = { 'comment_list': [comment], 'template': 'app/website/templates/html/comment.html' }
diff --git a/website/templates/css/blog_page.css b/website/templates/css/blog_page.css
index 8f56cd2..ffa45b4 100644
--- a/website/templates/css/blog_page.css
+++ b/website/templates/css/blog_page.css
@@ -1,4 +1,8 @@
<style>
+ [itemprop="articleBody"] {
+ font-size: 120%;
+ }
+
.comment-title {
color:#777;
}
diff --git a/website/templates/html/blog_footer.html b/website/templates/html/blog_footer.html
index e439d14..8a84572 100644
--- a/website/templates/html/blog_footer.html
+++ b/website/templates/html/blog_footer.html
@@ -1,12 +1,12 @@
-<div class="span12">
+<div class="col col-lg-12">
<hr />
{% if categories %}
<h5>Explore posts by categories</h5>
<ul class="breadcrumb" style="background-color: transparent; padding-left: 0px;">
{% for category in categories %}
<li><a href="blog?category={{ category }}">{{ category }}</a>
- {% if not loop.last %}<span class="divider">/</span>{% endif %}</li>
{% endfor %}
+ </ul>
<br><br>
{% endif %}
<p>Show posts by <a href="blog">everyone</a>. Meet the <a href="writers">writers</a> of this blog</p>
diff --git a/website/templates/html/blog_page.html b/website/templates/html/blog_page.html
index cf1f00e..ddb61d0 100644
--- a/website/templates/html/blog_page.html
+++ b/website/templates/html/blog_page.html
@@ -9,7 +9,7 @@
{% endblock %}
{% block content %}
-<div class="span12" itemscope itemtype="http://schema.org/BlogPost">
+<div class="col col-lg-12" itemscope itemtype="http://schema.org/BlogPost">
<h2 itemprop="name headline">{{ title }}</h2>
<!-- begin blog content -->
@@ -37,7 +37,7 @@
{% include 'app/website/templates/html/comment.html' %}
</div>
- <div><button class="btn add-comment">{{ texts.add_comment }}</button></div>
+ <div><button class="btn btn-default add-comment">{{ texts.add_comment }}</button></div>
<div style="display: none; margin-top: 10px;"
id="comment-form">
<div class="alert" style="display:none;"></div>
diff --git a/website/templates/html/blogger.html b/website/templates/html/blogger.html
index e18f86a..738fd1a 100644
--- a/website/templates/html/blogger.html
+++ b/website/templates/html/blogger.html
@@ -1,10 +1,10 @@
<div class="row">
- <div class="span2">
+ <div class="col col-lg-2">
<div class="avatar avatar-large">
<img itemprop="thumbnailUrl" src="{{ blogger_info.avatar }}" />
</div>
</div>
- <div class="span10">
+ <div class="col col-lg-10">
<h4>{{ blogger_info.full_name }}</h4>
<p style="color: #999">{{ blogger_info.bio }}</p>
<p><a href="blog?by={{ blogger_info.name }}&by_name={{ blogger_info.full_name }}">
diff --git a/website/templates/html/footer.html b/website/templates/html/footer.html
index 2f1c7fe..3161987 100644
--- a/website/templates/html/footer.html
+++ b/website/templates/html/footer.html
@@ -1,71 +1,79 @@
-<footer class="container"><div class="web-footer">
- {% if facebook_share or google_plus_one or twitter_share or linked_in_share %}
- <div class="social-icons" style="">
- <span style="font-size: 11px;">{{ share_text or "Share this page on: "}}</span>
- {% if google_plus_one %}
- <a href="https://plus.google.com/share?url={{ url }}"
- target="_blank"><i class="icon-google-plus"></i></a>
+<footer class="container">
+ <div class="web-footer row">
+ <div class="col col-lg-12">
+ {% if facebook_share or google_plus_one or twitter_share or linked_in_share %}
+ <div class="social-icons" style="">
+ <span style="font-size: 11px;">{{ share_text or "Share this page on: "}}</span>
+ {% if google_plus_one %}
+ <a href="https://plus.google.com/share?url={{ url }}"
+ target="_blank"><i class="icon-google-plus"></i></a>
+ {% endif %}
+ {% if twitter_share %}
+ <a href="https://twitter.com/intent/tweet?url={{ url }}&text={{ encoded_title }}"
+ target="_blank" ><i class="icon-twitter"></i></a>
+ {% endif %}
+ {% if facebook_share %}
+ <a href="https://www.facebook.com/sharer.php?u={{ url }}&t={{ encoded_title }}&via={{ twitter_share_via }}"
+ target="_blank"><i class="icon-facebook"></i></a>
+ {% endif %}
+ {% if linked_in_share %}
+ <a href="http://www.linkedin.com/shareArticle?mini=true&url={{ url }}&title={{ encoded_title }}"
+ target="_blank"><i class="icon-linkedin"></i></a>
+ {% endif %}
+ </div>
{% endif %}
- {% if twitter_share %}
- <a href="https://twitter.com/intent/tweet?url={{ url }}&text={{ encoded_title }}"
- target="_blank" ><i class="icon-twitter"></i></a>
+ <p style="float: right; clear: right;">
+ <a style="font-size: 90%; color: #888;" href="attributions">ERPNext Powered</a>
+ </p>
+ <div class="web-footer-menu">
+ <ul>
+ {% for item in footer_items %}
+ <li><a href="{{ item.url }}" {{ item.target }}
+ data-label="{{ item.label }}">{{ item.label }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% if copyright %}
+ <div class="web-footer-copyright">© {{ copyright }}</div>
{% endif %}
- {% if facebook_share %}
- <a href="https://www.facebook.com/sharer.php?u={{ url }}&t={{ encoded_title }}&via={{ twitter_share_via }}"
- target="_blank"><i class="icon-facebook"></i></a>
+ {% if address %}
+ {{ address }}
{% endif %}
- {% if linked_in_share %}
- <a href="http://www.linkedin.com/shareArticle?mini=true&url={{ url }}&title={{ encoded_title }}"
- target="_blank"><i class="icon-linkedin"></i></a>
- {% endif %}
- </div>
- {% endif %}
- <p style="float: right; clear: right;">
- <a style="font-size: 90%; color: #888;" href="attributions">ERPNext Powered</a>
- </p>
- <div class="web-footer-menu">
- <ul>
- {% for item in footer_items %}
- <li><a href="{{ item.url }}" {{ item.target }}
- data-label="{{ item.label }}">{{ item.label }}</a></li>
- {% endfor %}
- </ul>
- </div>
- {% if copyright %}
- <div class="web-footer-copyright">© {{ copyright }}</div>
- {% endif %}
- {% if address %}
- {{ address }}
- {% endif %}
- <p><div class="input-append" style="text-align: center; margin:30px 0px;">
- <input class="span3" id="footer-subscribe-email" type="text" placeholder="Your email address...">
- <button class="btn" type="button" id="footer-subscribe-button">Stay Updated</button>
- </div></p>
- <script>
- $("#footer-subscribe-button").click(function() {
+ <br>
+ <div class="input-group col col-lg-6 col-offset-3">
+ <input type="text" id="footer-subscribe-email" placeholder="Your email address...">
+ <span class="input-group-btn">
+ <button class="btn btn-default" type="button" id="footer-subscribe-button">Stay Updated</button>
+ </span>
+ </div>
+ <br>
+ <script>
+ $("#footer-subscribe-button").click(function() {
- $("#footer-subscribe-email").attr('disabled', true);
- $("#footer-subscribe-button").html("Sending...")
- .attr("disabled", true);
+ $("#footer-subscribe-email").attr('disabled', true);
+ $("#footer-subscribe-button").html("Sending...")
+ .attr("disabled", true);
- if($("#footer-subscribe-email").val()) {
- erpnext.send_message({
- subject:"Subscribe me",
- sender: $("#footer-subscribe-email").val(),
- message: "Subscribe to newsletter (via website footer).",
- callback: function(r) {
- if(!r.exc) {
- $("#footer-subscribe-button").html("Thank You :)")
- .addClass("btn-success").attr("disabled", true);
- } else {
- $("#footer-subscribe-button").html("Error :( Not a valid id?")
- .addClass("btn-danger").attr("disabled", false);
- $("#footer-subscribe-email").val("").attr('disabled', false);
+ if($("#footer-subscribe-email").val()) {
+ erpnext.send_message({
+ subject:"Subscribe me",
+ sender: $("#footer-subscribe-email").val(),
+ message: "Subscribe to newsletter (via website footer).",
+ callback: function(r) {
+ if(!r.exc) {
+ $("#footer-subscribe-button").html("Thank You :)")
+ .addClass("btn-success").attr("disabled", true);
+ } else {
+ $("#footer-subscribe-button").html("Error :( Not a valid id?")
+ .addClass("btn-danger").attr("disabled", false);
+ $("#footer-subscribe-email").val("").attr('disabled', false);
+ }
}
- }
- });
- }
- });
- </script>
+ });
+ }
+ });
+ </script>
+ </div>
+ </div>
</div>
</footer>
diff --git a/website/templates/html/navbar.html b/website/templates/html/navbar.html
index 55e8094..635cf34 100644
--- a/website/templates/html/navbar.html
+++ b/website/templates/html/navbar.html
@@ -1,37 +1,36 @@
<div class="navbar navbar-inverse" style="">
- <div class="navbar-inner">
- {%- if brand_html %}<a class="brand" href="index">{{ brand_html }}</a>{% endif -%}
- <div class="container">
- <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <div class="nav-collapse collapse">
- <ul class="nav">
- {%- for page in top_bar_items -%}
- {% if not page.parent_label -%}
- <li data-label="{{ page.label }}" {% if page.child_items %} class="dropdown"{% endif %}>
- <a href="{{ page.url or '#' }}" {% if page.child_items %} class="dropdown-toggle" onclick="return false;" data-toggle="dropdown"{% endif %} {{ page.target or ''}}>
- {{ page.label }}
- {%- if page.child_items -%}
- <b class="caret"></b>
- </a>
- <ul class="dropdown-menu">
- {%- for child in page.child_items -%}
- <li data-label="{{ child.label }}">
- <a {% if child.indent %} style="padding-left: {{(int(child.indent)+1)*15 }}px"{% endif %} href="{{ child.url }}" {{ child.target or '' }}>{{ child.label }}</a>
- </li>
- {%- endfor -%}
- </ul>
- {%- else -%}
- </a>
- {%- endif -%}
- </li>
+ {%- if brand_html %}<a class="navbar-brand" href="index">{{ brand_html }}</a>{% endif -%}
+ <div class="container">
+ <button type="button" class="navbar-toggle" data-toggle="collapse"
+ data-target=".navbar-responsive-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <div class="nav-collapse collapse navbar-responsive-collapse">
+ <ul class="nav navbar-nav">
+ {%- for page in top_bar_items -%}
+ {% if not page.parent_label -%}
+ <li data-label="{{ page.label }}" {% if page.child_items %} class="dropdown"{% endif %}>
+ <a href="{{ page.url or '#' }}" {% if page.child_items %} class="dropdown-toggle" onclick="return false;" data-toggle="dropdown"{% endif %} {{ page.target or ''}}>
+ {{ page.label }}
+ {%- if page.child_items -%}
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ {%- for child in page.child_items -%}
+ <li data-label="{{ child.label }}">
+ <a {% if child.indent %} style="padding-left: {{(int(child.indent)+1)*15 }}px"{% endif %} href="{{ child.url }}" {{ child.target or '' }}>{{ child.label }}</a>
+ </li>
+ {%- endfor -%}
+ </ul>
+ {%- else -%}
+ </a>
{%- endif -%}
- {%- endfor %}
- </ul>
- </div>
+ </li>
+ {%- endif -%}
+ {%- endfor %}
+ </ul>
</div>
</div>
</div>
diff --git a/website/templates/html/outer.html b/website/templates/html/outer.html
index 570c769..ec71476 100644
--- a/website/templates/html/outer.html
+++ b/website/templates/html/outer.html
@@ -7,7 +7,7 @@
</div>
<div class="clearfix"></div>
{% if banner_html %}<div class="row" style="margin-top: 30px;">
- <div class="span12">{{ banner_html }}</div>
+ <div class="col col-lg-12">{{ banner_html }}</div>
</div>{% endif %}
<div class="outer">
{% include "app/website/templates/html/navbar.html" %}
diff --git a/website/templates/html/product_breadcrumbs.html b/website/templates/html/product_breadcrumbs.html
index 0b026e7..3cd501e 100644
--- a/website/templates/html/product_breadcrumbs.html
+++ b/website/templates/html/product_breadcrumbs.html
@@ -1,9 +1,9 @@
{% if obj.parent_groups and len(obj.parent_groups) > 1 %}
-<div class="span12">
+<div class="col col-lg-12">
<div class="clearfix">
<ul class="breadcrumb">
{% for ig in obj.parent_groups[:-1] %}
- <li><a href="{{ ig.page_name }}.html">{{ ig.name }}</a> <span class="divider">/</span></li>
+ <li><a href="{{ ig.page_name }}.html">{{ ig.name }}</a></li>
{% endfor %}
<li class="active">{{ obj.parent_groups[-1].name }}</li>
</ul>
diff --git a/website/templates/html/product_group.html b/website/templates/html/product_group.html
index 0ad4048..54a55af 100644
--- a/website/templates/html/product_group.html
+++ b/website/templates/html/product_group.html
@@ -1,7 +1,9 @@
{% extends "app/website/templates/html/page.html" %}
{% block content %}
-<div class="span12">
+{% include 'app/website/templates/html/product_search_box.html' %}
+{% include 'app/website/templates/html/product_breadcrumbs.html' %}
+<div class="col col-lg-12">
{% if slideshow %}<!-- slideshow -->
{% include "app/website/templates/html/slideshow.html" %}
{% endif %}
@@ -11,14 +13,12 @@
<h3>{{ name }}</h3>
{% endif %}
</div>
-{% include 'app/website/templates/html/product_search_box.html' %}
-{% include 'app/website/templates/html/product_breadcrumbs.html' %}
-<div class="span12">
+<div class="col col-lg-12">
{% if sub_groups %}
<hr />
<div class="row">
{% for d in sub_groups %}
- <div class="span4">
+ <div class="col col-lg-4">
<a href="{{ d.page_name }}">{{ d.name }} ({{ d.count }})</a>
</div>
{% endfor %}
diff --git a/website/templates/html/product_in_list.html b/website/templates/html/product_in_list.html
index 5cd9eac..e9752b3 100644
--- a/website/templates/html/product_in_list.html
+++ b/website/templates/html/product_in_list.html
@@ -1,4 +1,4 @@
-<div class="span3">
+<div class="col col-lg-3">
<div style="height: 120px; overflow: hidden;">
<a href="{{ page_name }}">
{%- if website_image -%}
diff --git a/website/templates/html/product_page.html b/website/templates/html/product_page.html
index 3fda8cd..263159f 100644
--- a/website/templates/html/product_page.html
+++ b/website/templates/html/product_page.html
@@ -11,9 +11,9 @@
{% block content %}
{% include 'app/website/templates/html/product_search_box.html' %}
{% include 'app/website/templates/html/product_breadcrumbs.html' %}
- <div class="span12 product-page-content" itemscope itemtype="http://schema.org/Product">
+ <div class="col col-lg-12 product-page-content" itemscope itemtype="http://schema.org/Product">
<div class="row">
- <div class="span6">
+ <div class="col col-lg-6">
{% if slideshow %}
{% include "app/website/templates/html/slideshow.html" %}
{% else %}
@@ -27,7 +27,7 @@
{% endif %}
{% endif %}
</div>
- <div class="span6">
+ <div class="col col-lg-6">
<h3 itemprop="name" style="margin-top: 0px;">{{ item_name }}</h3>
<p class="help">Item Code: {{ name }}</p>
<h4>Product Description</h4>
@@ -41,7 +41,7 @@
</div>
{% if obj.doclist.get({"doctype":"Item Website Specification"}) -%}
<div class="row" style="margin-top: 20px">
- <div class="span12">
+ <div class="col col-lg-12">
<h4>Specifications</h4>
<table class="table table-bordered" style="width: 100%">
{% for d in obj.doclist.get(
diff --git a/website/templates/html/product_search_box.html b/website/templates/html/product_search_box.html
index 3b3a95a..29564f3 100644
--- a/website/templates/html/product_search_box.html
+++ b/website/templates/html/product_search_box.html
@@ -1,11 +1,12 @@
-<div class="span12 clearfix">
- <div class="pull-right" style="margin-top: 15px;">
+<div class="col col-lg-12 clearfix">
+ <div class="pull-right" style="margin-top: 15px; margin-bottom: 15px;">
<form class="form-search">
- <div class="input-append">
- <input type="text" class="span2 search-query"
- id="product-search" placeholder="Product Search..." />
- <button class="btn" id="btn-product-search">
- <i class="icon-search"></i></button>
+ <div class="input-group col col-lg-4 col-offset-8">
+ <input type="text" id="product-search" placeholder="Product Search...">
+ <span class="input-group-btn">
+ <button class="btn btn-default" type="button" id="btn-product-search">
+ <i class="icon-search"></i></button>
+ </span>
</div>
</form>
</div>
diff --git a/website/templates/html/slideshow.html b/website/templates/html/slideshow.html
index b26338c..b148cb1 100644
--- a/website/templates/html/slideshow.html
+++ b/website/templates/html/slideshow.html
@@ -1,6 +1,17 @@
{% if slideshow %}
{{ slideshow_header }}
-<div id="myCarousel" class="carousel slide">
+
+
+<div id="the-carousel" class="carousel slide">
+ <!-- Indicators -->
+ <ol class="carousel-indicators">
+ {% for slide in obj.slides %}
+ <li data-target="#the-carousel" data-slide-to="0"
+ {%- if loop.index==0 %}class="active"{% endif %}></li>
+ {% endfor %}
+ </ol>
+
+ <!-- Wrapper for slides -->
<div class="carousel-inner">
{% for slide in obj.slides %}
<div class="{% if slide.idx==1 %}active {% endif %}item">
@@ -14,10 +25,15 @@
</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>
+
+ <!-- Controls -->
+ <a class="left carousel-control" href="#the-carousel" data-slide="prev">
+ <span class="icon icon-chevron-left"></span>
+ </a>
+ <a class="right carousel-control" href="#the-carousel" data-slide="next">
+ <span class="icon icon-chevron-right"></span>
+ </a>
+</div>
+
+<script>$(".carousel").carousel();</script>
{% endif %}
diff --git a/website/templates/html/web_page.html b/website/templates/html/web_page.html
index 6b8c914..4711e58 100644
--- a/website/templates/html/web_page.html
+++ b/website/templates/html/web_page.html
@@ -7,7 +7,7 @@
{% endblock %}
{% block content %}
-<div class="span12" style="margin-top: 15px;">
+<div class="col col-lg-12" style="margin-top: 15px;">
{% include "app/website/templates/html/slideshow.html" %}
{{ main_section }}
</div>
diff --git a/website/templates/js/blog.js b/website/templates/js/blog.js
index fd5a156..2154d47 100644
--- a/website/templates/js/blog.js
+++ b/website/templates/js/blog.js
@@ -69,12 +69,12 @@
b.page_name = encodeURIComponent(b.page_name);
$(repl('<div class="row">\
- <div class="span1">\
+ <div class="col col-lg-1">\
<div class="avatar avatar-medium" style="margin-top: 6px;">\
<img src="%(avatar)s" />\
</div>\
</div>\
- <div class="span11">\
+ <div class="col col-lg-11">\
<h4><a href="%(page_name)s">%(title)s</a></h4>\
<p>%(content)s</p>\
<p style="color: #aaa; font-size: 90%">\
@@ -87,7 +87,7 @@
if(!data.length || data.length < 20) {
if(blog.start) {
$("#next-page").toggle(false)
- .parent().append("<div class='alert alert-info'>Nothing more to show.</div>");
+ .parent().append("<div class='text-muted'>Nothing more to show.</div>");
} else {
$("#next-page").toggle(false)
.parent().append("<div class='alert'>No blogs written yet.</div>");
diff --git a/website/templates/js/product_list.js b/website/templates/js/product_list.js
index f8f21b3..6873973 100644
--- a/website/templates/js/product_list.js
+++ b/website/templates/js/product_list.js
@@ -40,7 +40,7 @@
.replaceWith("<div class='alert'>No products found.</div>");
} else {
$(".more-btn")
- .replaceWith("<div class='alert'>Nothing more to show.</div>");
+ .replaceWith("<div class='text-muted'>Nothing more to show.</div>");
}
} else {
$(".more-btn").toggle(true)
diff --git a/website/templates/pages/about.html b/website/templates/pages/about.html
index 0cbd562..2f4f6e4 100644
--- a/website/templates/pages/about.html
+++ b/website/templates/pages/about.html
@@ -3,14 +3,14 @@
{% set title="About Us" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
{{ 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"}) %}
<h3>{{ obj.doc.company_history_heading or "Company History" }}</h3>
{% for d in obj.doclist.get({"doctype":"Company History"}) %}
<div class="row">
- <span class="span2"><h4 style="margin:0px;">{{ d.year }}</h4></span>
- <span class="span10"><p>{{ d.highlight }}</p></span>
+ <span class="col col-lg-2"><h4 style="margin:0px;">{{ d.year }}</h4></span>
+ <span class="col col-lg-10"><p>{{ d.highlight }}</p></span>
</div>
{% endfor %}
{% endif %}
@@ -18,12 +18,12 @@
<h3>{{ obj.doc.team_members_heading or "Team Members" }}</h3>
{% for d in obj.doclist.get({"doctype":"About Us Team Member"}) %}
<div class="row" itemscope itemtype="http://schema.org/Person">
- <span class="span2">
+ <span class="col col-lg-2">
<div class="avatar avatar-large">
<img class="avatar" src="{{ d.image_link }}" style="" itemprop="image">
</div>
</span>
- <span class="span10"><h4 itemprop="name">{{ d.full_name }}</h4>
+ <span class="col col-lg-10"><h4 itemprop="name">{{ d.full_name }}</h4>
<p itemprop="description">{{ d.bio }}</p>
</span>
</div>
diff --git a/website/templates/pages/account.html b/website/templates/pages/account.html
index fe2b858..f6992e1 100644
--- a/website/templates/pages/account.html
+++ b/website/templates/pages/account.html
@@ -3,7 +3,7 @@
{% set title="My Account" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li class="active">My Account</li>
diff --git a/website/templates/pages/attributions.html b/website/templates/pages/attributions.html
index 05e8e88..0f534a4 100644
--- a/website/templates/pages/attributions.html
+++ b/website/templates/pages/attributions.html
@@ -11,7 +11,7 @@
{% set title="ERPNext - Web Based, Open Source ERP" %}
{% block content %}
-<div class="layout-attributions span12">
+<div class="layout-attributions col col-lg-12">
<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">
diff --git a/website/templates/pages/blog.html b/website/templates/pages/blog.html
index 7483c7c..fcb542b 100644
--- a/website/templates/pages/blog.html
+++ b/website/templates/pages/blog.html
@@ -11,7 +11,7 @@
{% set title="Blog" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<h2 id="blog-title">{{ blog_title }}</h2>
{% if blog_introduction %}
<p>{{ blog_introduction }}</p>
@@ -25,7 +25,7 @@
<!-- blog list will be generated dynamically -->
</div>
<div style="text-align: center;">
- <button id="next-page" class="btn"
+ <button id="next-page" class="btn btn-default"
style="display:none;">More...</button>
</div>
</div>
diff --git a/website/templates/pages/contact.html b/website/templates/pages/contact.html
index b9b3cd7..113b627 100644
--- a/website/templates/pages/contact.html
+++ b/website/templates/pages/contact.html
@@ -7,28 +7,32 @@
{% set title="Contact Us" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<h3>{{ obj.doc.heading or "Contact Us"}}</h3>
<div class="row">
- <div class="web-form span8">
- <div class="row">
- <div class="span6">
- <p id="contact-alert" class="alert"
- style="display: none;"> </p>
- </div>
- </div>
- <div class="clearfix"></div>
- <p><select class="span6" name="subject">
+ <div class="web-form col col-lg-8">
+ <p id="contact-alert" class="alert"
+ style="display: none;"> </p>
+ <p>
+ <select name="subject">
{% for option in obj.query_options %}
<option value="{{ option }}">{{ option }}</option>
{% endfor %}
- </select></p>
- <p><input class="span6" name="email" type="text" placeholder="Your Email Address" /></p>
- <p><textarea class="span6" rows="10" name="message"></textarea></p>
- <p><button class="btn btn-primary btn-send">Send</button></p>
+ </select>
+ </p>
+ <p>
+ <input name="email" type="text"
+ placeholder="Your Email Address" />
+ </p>
+ <p>
+ <textarea rows="10" name="message"></textarea>
+ </p>
+ <p>
+ <button class="btn btn-primary btn-send">Send</button>
+ </p>
</div>
{% if obj.doc.address %}
- <div class="span3 alert" style="margin-top: 20px;" itemscope itemtype="http://schema.org/PostalAddress">
+ <div class="col col-lg-3 col-offset-1 alert" style="margin-top: 20px;" itemscope itemtype="http://schema.org/PostalAddress">
<h4><i class="icon-map-marker"></i> {{ obj.address.address_title }}</h4>
{% if obj.address.address_line1 %}
<span itemprop="streetAddress">{{ obj.address.address_line1 }}</span><br>
diff --git a/website/templates/pages/order.html b/website/templates/pages/order.html
index 8e7bfe7..2588d39 100644
--- a/website/templates/pages/order.html
+++ b/website/templates/pages/order.html
@@ -3,7 +3,7 @@
{% set title=doc.name %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li>
@@ -15,16 +15,16 @@
{%- if doc.status -%}
<div style="font-size: 13px;">
<div class="row">
- <div class="span2">
+ <div class="col col-lg-2">
<div class="label">{{ doc.status }}</div>
</div>
- <div class="span4">
+ <div class="col col-lg-4">
{{ utils.formatdate(doc.transaction_date) }}
</div>
</div>
<br>
<div class="row">
- <div class="span12">
+ <div class="col col-lg-12">
<table class="table table-bordered">
<tbody>
<tr>
@@ -52,8 +52,8 @@
</div>
</div>
<div class="row">
- <div class="span6"></div>
- <div class="span6">
+ <div class="col col-lg-6"></div>
+ <div class="col col-lg-6">
<table cellspacing=0 width=100%>
<tbody>
<tr>
diff --git a/website/templates/pages/orders.html b/website/templates/pages/orders.html
index 0c93a68..b5b0dd9 100644
--- a/website/templates/pages/orders.html
+++ b/website/templates/pages/orders.html
@@ -8,7 +8,7 @@
currency = "{{ currency }}";
wn.currency_symbols = {{ currency_symbols }};
</script>
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li>
@@ -44,8 +44,8 @@
// parent
var $order = $(repl('<div class="row">\
- <div class="span3"><a href="order?name=%(name)s">%(name)s</a></div>\
- <div class="span9"></div>\
+ <div class="col col-lg-3"><a href="order?name=%(name)s">%(name)s</a></div>\
+ <div class="col col-lg-9"></div>\
</div>', order)).appendTo($list);
// items
@@ -53,12 +53,12 @@
item.export_rate = format_currency(item.export_rate, order.currency);
item.export_amount = format_currency(item.export_amount, order.currency);
var $item = $(repl('<div class="row">\
- <div class="span3">%(item_name)s</div>\
- <div class="span2" style="text-align: right;">%(export_rate)s</div>\
- <div class="span2" style="text-align: right;">%(qty)s %(stock_uom)s</div>\
- <div class="span2" style="text-align: right;">%(export_amount)s</div>\
+ <div class="col col-lg-3">%(item_name)s</div>\
+ <div class="col col-lg-2" style="text-align: right;">%(export_rate)s</div>\
+ <div class="col col-lg-2" style="text-align: right;">%(qty)s %(stock_uom)s</div>\
+ <div class="col col-lg-2" style="text-align: right;">%(export_amount)s</div>\
</div>\
- </div>', item)).appendTo($order.find(".span9"));
+ </div>', item)).appendTo($order.find(".col col-lg-9"));
});
$("<hr>").appendTo($list);
diff --git a/website/templates/pages/product_search.html b/website/templates/pages/product_search.html
index 2dab6ff..4711408 100644
--- a/website/templates/pages/product_search.html
+++ b/website/templates/pages/product_search.html
@@ -18,7 +18,7 @@
</script>
{% include 'app/website/templates/html/product_search_box.html' %}
-<div class="span12">
+<div class="col col-lg-12">
<h3 class="search-results">Search Results</h3>
<div id="search-list" class="row">
diff --git a/website/templates/pages/profile.html b/website/templates/pages/profile.html
index d689cfb..40d6a19 100644
--- a/website/templates/pages/profile.html
+++ b/website/templates/pages/profile.html
@@ -3,7 +3,7 @@
{% set title="My Profile" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li>
diff --git a/website/templates/pages/ticket.html b/website/templates/pages/ticket.html
index 858dd3b..5835246 100644
--- a/website/templates/pages/ticket.html
+++ b/website/templates/pages/ticket.html
@@ -3,7 +3,7 @@
{% set title=doc.name %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li>
@@ -14,13 +14,13 @@
<hr>
{%- if doc.status -%}
<div class="row">
- <div class="span2">
+ <div class="col col-lg-2">
<div class="label">{{ doc.status }}</div>
</div>
- <div class="span7">
+ <div class="col col-lg-7">
{{ doc.subject }}
</div>
- <div class="span3">
+ <div class="col col-lg-3">
{{ utils.formatdate(doc.transaction_date) }}
</div>
</div>
diff --git a/website/templates/pages/tickets.html b/website/templates/pages/tickets.html
index 843d10e..27881ef 100644
--- a/website/templates/pages/tickets.html
+++ b/website/templates/pages/tickets.html
@@ -3,7 +3,7 @@
{% set title="My Tickets" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<ul class="breadcrumb">
<li><a href="index">Home</a> <span class="divider">/</span></li>
<li><a href="account">My Account</a> <span class="divider">/</span></li>
@@ -39,9 +39,9 @@
// parent
var $ticket = $(repl('<div class="row">\
- <div class="span2"><span class="label">%(status)s</span></div>\
- <div class="span3"><a href="ticket?name=%(name)s">%(name)s</a></div>\
- <div class="span7">%(subject)s</div>\
+ <div class="col col-lg-2"><span class="label">%(status)s</span></div>\
+ <div class="col col-lg-3"><a href="ticket?name=%(name)s">%(name)s</a></div>\
+ <div class="col col-lg-7">%(subject)s</div>\
</div>', ticket)).appendTo($list);
$("<hr>").appendTo($list);
diff --git a/website/templates/pages/writers.html b/website/templates/pages/writers.html
index 67c0b7e..9d660b8 100644
--- a/website/templates/pages/writers.html
+++ b/website/templates/pages/writers.html
@@ -3,7 +3,7 @@
{% set title="Blog Writers" %}
{% block content %}
-<div class="span12">
+<div class="col col-lg-12">
<h2 id="blog-title">Blog Writers</h2>
{% if writers_introduction %}
<p>{{ writers_introduction }}</p>