<commit_before>define([
	"dojo/_base/declare", "./ActionBar",
	"dojo/dom-construct"
], function(declare, ActionBar,
			domConstruct){
	return declare([ActionBar], {
		path: null,
		"class": "WSContainerActionBar",
		tooltipPosition: ["above", "below"],
		_setPathAttr: function(p){
			this.path = p;
			if(this._started){
				this.pathContainer.innerHTML = this.generatePathLinks(p);
			}
		},

		postCreate: function(){
			this.inherited(arguments);
			this.pathContainer = domConstruct.create("div", {"class": "wsBreadCrumbContainer"}, this.domNode);
			this.containerNode = domConstruct.create("span", {
				"class": "ActionButtonContainer wsActionContainer"
			}, this.domNode);
		},

		generatePathLinks: function(path){
			// strip out /public/ of parts array
			var parts = path.replace(/\/+/g, '/').split("/");
			if(parts[1] == 'public'){
				parts.splice(1, 1);
			}

			if(parts[0] == ""){
				parts.shift();
			}
			var len = parts.length;
			var out = ["<span class='wsBreadCrumb'>"];
			var bp = ["workspace"];

			var isPublic = path.replace(/\/+/g, '/').split('/')[1] == 'public';

			// if viewing all public workspaces, just create header
			if (path == '/public/') {
				out.push('<i class="icon-globe"></i> <b class="perspective">Public Workspaces</b>')

			// if viewing a specific public workspace, create bread crumbs
			}else if(isPublic){
				out.push('<i class="icon-globe"></i> '+
					'<a class="navigationLink perspective" href="/'+bp.join("/")+'/public">Public Workspaces</a>'+
					' <i class="icon-caret-right"></i> ')
			}


			parts.forEach(function(part, idx){
				if(idx == (parts.length - 1)){
					out.push('<b class="perspective">' + part.replace("@patricbrc.org", "") + '</b>');
					return;
				}

				// don't create links for top level path of public path<commit_msg>fix public ws breadcrumbs; PATRIC3/patric3_website#1539<commit_after>define([
	"dojo/_base/declare", "./ActionBar",
	"dojo/dom-construct"
], function(declare, ActionBar,
			domConstruct){
	return declare([ActionBar], {
		path: null,
		"class": "WSContainerActionBar",
		tooltipPosition: ["above", "below"],
		_setPathAttr: function(p){
			this.path = p;
			if(this._started){
				this.pathContainer.innerHTML = this.generatePathLinks(p);
			}
		},

		postCreate: function(){
			this.inherited(arguments);
			this.pathContainer = domConstruct.create("div", {"class": "wsBreadCrumbContainer"}, this.domNode);
			this.containerNode = domConstruct.create("span", {
				"class": "ActionButtonContainer wsActionContainer"
			}, this.domNode);
		},

		generatePathLinks: function(path){
			// strip out /public/ of parts array
			var parts = path.replace(/\/+/g, '/').split("/");
			if(parts[1] == 'public'){
				parts.splice(1, 1);
			}

			if(parts[0] == ""){
				parts.shift();
			}
			var len = parts.length;
			var out = ["<span class='wsBreadCrumb'>"];
			var bp = ["workspace"];

			var isPublic = path.replace(/\/+/g, '/').split('/')[1] == 'public';

			// if viewing all public workspaces, just create header
			if (path == '/public/') {
				out.push('<i class="icon-globe"></i> <b class="perspective">Public Workspaces</b>');

			// if viewing a specific public workspace, create bread crumbs with additional url params
			}else if(isPublic){
				out.push('<i class="icon-globe"></i> '+
					'<a class="navigationLink perspective" href="/'+bp.join("/")+'/public">Public Workspaces</a>'+
					' <i class="icon-caret-right"></i> ');
				bp.push('public', parts[0]);
			}

			parts.forEach(function(part, idx){
				if(idx == (parts.length - 1)){
					out.push('<b class="perspective">' + part.replace("@patricbrc.org", "") + '</b>');
					return;
				}

				// don't create links for top level path of public path
{'fraction_non_alphanumeric': 0.19769003491807682, 'fraction_numerical': 0.0051034112275047, 'mean_word_length': 3.678391959798995, 'pattern_counts': {'":': 6, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4542677', 'n_tokens_mistral': 1476, 'n_tokens_neox': 1220, 'n_words': 261}