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.
 
 
 
 
 
 

18 lines
654 B

  1. wn.provide('wn.views');
  2. wn.views.breadcrumbs = function(parent, module, doctype, name) {
  3. $(parent).empty();
  4. var $bspan = $(repl('<span class="breadcrumbs">\
  5. <a href="#%(home_page)s">Home</a></span>', {home_page: wn.boot.home_page}));
  6. if(module) {
  7. $bspan.append(repl(' / <a href="#!%(module_small)s-home">%(module)s Home</a>',
  8. {module: module, module_small: module.toLowerCase() }))
  9. }
  10. if(doctype && (locals.DocType[doctype] && !locals.DocType[doctype].issingle)) {
  11. $bspan.append(repl(' / <a href="#!List/%(doctype)s">%(doctype)s</a>',
  12. {doctype: doctype}))
  13. }
  14. if(name) {
  15. $bspan.append(' / ' + name.bold())
  16. }
  17. $bspan.appendTo(parent);
  18. }