You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
681 B

  1. wn.provide('wn.views');
  2. wn.views.breadcrumbs = function(appframe, module, doctype, name) {
  3. appframe.clear_breadcrumbs();
  4. if(name) {
  5. appframe.add_breadcrumb(name);
  6. } else if(doctype) {
  7. appframe.add_breadcrumb(doctype + ' List');
  8. } else if(module) {
  9. appframe.add_breadcrumb(module);
  10. }
  11. if(name && doctype && (!locals['DocType'][doctype].issingle)) {
  12. appframe.add_breadcrumb(repl(' in <a href="#!List/%(doctype)s">%(doctype)s List</a>',
  13. {doctype: doctype}))
  14. };
  15. if(doctype && module && wn.modules && wn.modules[module]) {
  16. appframe.add_breadcrumb(repl(' in <a href="#!%(module_page)s">%(module)s</a>',
  17. {module: module, module_page: wn.modules[module] }))
  18. }
  19. }