diff --git a/config.json b/config.json
index b798ee1275..e030f61d52 100644
--- a/config.json
+++ b/config.json
@@ -1,5 +1,12 @@
{
"modules": {
+ "Finder": {
+ "type": "page",
+ "link": "finder",
+ "color": "#bdc3c7",
+ "label": "Finder",
+ "icon": "icon-folder-open"
+ },
"To Do": {
"type": "page",
"link": "todo",
diff --git a/core/page/desktop/desktop.js b/core/page/desktop/desktop.js
index 500a9568a8..522e90fe52 100644
--- a/core/page/desktop/desktop.js
+++ b/core/page/desktop/desktop.js
@@ -18,6 +18,8 @@ wn.core.pages.desktop.render = function() {
document.title = "Desktop";
var add_icon = function(m) {
var module = wn.modules[m];
+ if(!module)
+ return;
if(!module.label)
module.label = m;
module.name = m;
diff --git a/core/page/finder/__init__.py b/core/page/finder/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/core/page/finder/finder.js b/core/page/finder/finder.js
new file mode 100644
index 0000000000..3af6df5394
--- /dev/null
+++ b/core/page/finder/finder.js
@@ -0,0 +1,84 @@
+wn.pages['finder'].onload = function(wrapper) {
+ wn.ui.make_app_page({
+ parent: wrapper,
+ title: 'Finder',
+ single_column: true
+ });
+
+ var $body = $(wrapper).find(".layout-main").addClass("row");
+ var start = 0;
+
+ var $modules = $('
').appendTo($body).find("tbody");
+
+ var $doctypes = $('').appendTo($body).find("tbody");
+
+ var $list = $('').appendTo($body).find("tbody");
+
+ // modules
+ $.each(keys(wn.boot.notification_info.module_doctypes).sort(), function(i, module) {
+ $($r('%(module)s |
',
+ {module: module})).appendTo($modules);
+ });
+
+ $modules.on("click", ".module-link", function() {
+ // doctypes
+ var module = $(this).attr("data-module");
+ $doctypes.empty();
+ $.each(wn.boot.notification_info.module_doctypes[module].sort(), function(i, doctype) {
+ $($r('%(doctype)s |
',
+ {doctype: doctype})).appendTo($doctypes)
+ });
+ });
+
+
+ $doctypes.on("click", ".doctype-link", function() {
+ $list.empty();
+ var doctype = $(this).attr("data-doctype");
+ wn.call({
+ method: "webnotes.widgets.reportview.get",
+ args: {
+ doctype: doctype,
+ fields: ["name", "modified", "owner"],
+ limit_start: start || 0,
+ },
+ callback: function(r) {
+ console.log(r);
+ if(r.message.values) {
+ $.each(r.message.values, function(i, v) {
+ $($r('\
+ %(name)s\
+ %(owner)s\
+ %(modified)s\
+ |
', {
+ doctype: doctype,
+ name: v[1],
+ owner: v[0],
+ modified: comment_when(v[2])
+ })).appendTo($list)
+ })
+ }
+ }
+ })
+ })
+}
\ No newline at end of file
diff --git a/core/page/finder/finder.py b/core/page/finder/finder.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/core/page/finder/finder.txt b/core/page/finder/finder.txt
new file mode 100644
index 0000000000..70c6497a42
--- /dev/null
+++ b/core/page/finder/finder.txt
@@ -0,0 +1,37 @@
+[
+ {
+ "creation": "2013-09-06 11:53:22",
+ "docstatus": 0,
+ "modified": "2013-09-06 11:53:23",
+ "modified_by": "Administrator",
+ "owner": "Administrator"
+ },
+ {
+ "doctype": "Page",
+ "icon": "icon-folder-open",
+ "module": "Core",
+ "name": "__common__",
+ "page_name": "Finder",
+ "standard": "Yes",
+ "title": "Finder"
+ },
+ {
+ "doctype": "Page Role",
+ "name": "__common__",
+ "parent": "finder",
+ "parentfield": "roles",
+ "parenttype": "Page"
+ },
+ {
+ "doctype": "Page",
+ "name": "finder"
+ },
+ {
+ "doctype": "Page Role",
+ "role": "System Manager"
+ },
+ {
+ "doctype": "Page Role",
+ "role": "Administrator"
+ }
+]
\ No newline at end of file
diff --git a/public/css/common.css b/public/css/common.css
index 9278654283..b51fdcb35a 100644
--- a/public/css/common.css
+++ b/public/css/common.css
@@ -22,6 +22,10 @@ a {
padding-bottom: 10px;
}
+.text-small {
+ font-size: 80%;
+}
+
/* freeze */
div#freeze {
diff --git a/public/js/legacy/datatype.js b/public/js/legacy/datatype.js
index 688015fffb..d9de432dbe 100644
--- a/public/js/legacy/datatype.js
+++ b/public/js/legacy/datatype.js
@@ -104,6 +104,8 @@ function repl(s, dict) {
return s;
}
+var $r = repl;
+
function replace_all(s, t1, t2) {
return s.split(t1).join(t2);
}
diff --git a/public/js/wn/ui/toolbar/toolbar.js b/public/js/wn/ui/toolbar/toolbar.js
index 04dbf7c50c..cc14b17632 100644
--- a/public/js/wn/ui/toolbar/toolbar.js
+++ b/public/js/wn/ui/toolbar/toolbar.js
@@ -34,7 +34,7 @@ wn.ui.toolbar.Toolbar = Class.extend({
\
\
\
- \
+ \
\
\
\
diff --git a/templates/pages/login.html b/templates/pages/login.html
index f0c6b20579..23d5fdea30 100644
--- a/templates/pages/login.html
+++ b/templates/pages/login.html
@@ -14,7 +14,7 @@
{% set title="Login" %}
{% block body %}
-
+
diff --git a/webnotes/widgets/notification.py b/webnotes/widgets/notification.py
index 6e4428d49f..9a32185d1c 100644
--- a/webnotes/widgets/notification.py
+++ b/webnotes/widgets/notification.py
@@ -35,21 +35,22 @@ def get():
def get_notification_info_for_boot():
out = get()
-
- try:
- from startup.open_count import for_doctype
- except ImportError:
- return out
-
+
can_read = webnotes.user.get_can_read()
conditions = {}
module_doctypes = {}
doctype_info = dict(webnotes.conn.sql("""select name, module from tabDocType"""))
+
+ try:
+ from startup.open_count import for_doctype
+ except ImportError:
+ for_doctype = {}
- for d in for_doctype:
- if d in can_read:
+ for d in can_read:
+ if d in for_doctype:
conditions[d] = for_doctype[d]
- module_doctypes.setdefault(doctype_info[d], []).append(d)
+
+ module_doctypes.setdefault(doctype_info[d], []).append(d)
out.update({
"conditions": conditions,
diff --git a/webnotes/widgets/page.py b/webnotes/widgets/page.py
index c05bb00ecc..c9303a1e87 100644
--- a/webnotes/widgets/page.py
+++ b/webnotes/widgets/page.py
@@ -13,9 +13,8 @@ def get(name):
"""
Return the :term:`doclist` of the `Page` specified by `name`
"""
- from webnotes.model.code import get_obj
- page = get_obj('Page', name, with_children=1)
- page.get_from_files()
+ page = webnotes.bean("Page", name)
+ page.run_method("get_from_files")
return page.doclist
@webnotes.whitelist(allow_guest=True)