Revision b2e46315

b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/ember/controllers/vm.js
12 12

  
13 13
    codeName: 'vm',
14 14

  
15
    hasTags: true,
16

  
15 17
    codeNameParent: function() {
16 18
        return this.codeName+'s';
17 19
    }.property(),
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/ember/views/tags-list.js
1
App.tagsListView = Ember.View.extend({
2
    tagName: 'div',
3
    classNames: ['tags'],
4
    templateName: 'tags-list',
5
});
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/templates.js
311 311
Ember.TEMPLATES["item"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
312 312
this.compilerInfo = [4,'>= 1.0.0'];
313 313
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
314
  var buffer = '', stack1, helper, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, self=this;
314
  var buffer = '', stack1, helper, options, escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing;
315 315

  
316
function program1(depth0,data) {
317
  
318
  var buffer = '', helper, options;
319
  data.buffer.push("\n				");
320
  data.buffer.push(escapeExpression((helper = helpers['tag-a'] || (depth0 && depth0['tag-a']),options={hash:{
321
    'title': ("tag.name"),
322
    'color': ("tag.color")
323
  },hashTypes:{'title': "ID",'color': "ID"},hashContexts:{'title': depth0,'color': depth0},contexts:[],types:[],data:data},helper ? helper.call(depth0, options) : helperMissing.call(depth0, "tag-a", options))));
324
  data.buffer.push("\n			");
325
  return buffer;
326
  }
327 316

  
328 317
  data.buffer.push("<li ");
329 318
  data.buffer.push(escapeExpression(helpers['bind-attr'].call(depth0, {hash:{
......
339 328
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
340 329
  data.buffer.push("</h4>\n		<div class= \"status\">\n			<span class=\"state\">");
341 330
  data.buffer.push(escapeExpression((helper = helpers['status-to-text'] || (depth0 && depth0['status-to-text']),options={hash:{},hashTypes:{},hashContexts:{},contexts:[depth0],types:["ID"],data:data},helper ? helper.call(depth0, "status", options) : helperMissing.call(depth0, "status-to-text", "status", options))));
342
  data.buffer.push("</span>\n		</div>\n		<div class=\"tags\">\n			");
343
  stack1 = helpers.each.call(depth0, "tag", "in", "tags", {hash:{},hashTypes:{},hashContexts:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0,depth0,depth0],types:["ID","ID","ID"],data:data});
344
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
345
  data.buffer.push("\n\n		</div>\n	</div>\n</li>\n	");
331
  data.buffer.push("</span>\n		</div>\n\n		");
332
  data.buffer.push(escapeExpression(helpers.view.call(depth0, "App.tagsListView", {hash:{},hashTypes:{},hashContexts:{},contexts:[depth0],types:["ID"],data:data})));
333
  data.buffer.push("\n\n	</div>\n</li>\n	");
346 334
  return buffer;
347 335
  
348 336
});
......
521 509
  
522 510
});
523 511

  
512
Ember.TEMPLATES["tags-list"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
513
this.compilerInfo = [4,'>= 1.0.0'];
514
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
515
  var buffer = '', stack1, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, self=this;
516

  
517
function program1(depth0,data) {
518
  
519
  var buffer = '', stack1;
520
  data.buffer.push("\n    ");
521
  stack1 = helpers.each.call(depth0, "tag", "in", "tags", {hash:{},hashTypes:{},hashContexts:{},inverse:self.noop,fn:self.program(2, program2, data),contexts:[depth0,depth0,depth0],types:["ID","ID","ID"],data:data});
522
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
523
  data.buffer.push("\n");
524
  return buffer;
525
  }
526
function program2(depth0,data) {
527
  
528
  var buffer = '', helper, options;
529
  data.buffer.push("\n        ");
530
  data.buffer.push(escapeExpression((helper = helpers['tag-a'] || (depth0 && depth0['tag-a']),options={hash:{
531
    'title': ("tag.name"),
532
    'color': ("tag.color")
533
  },hashTypes:{'title': "ID",'color': "ID"},hashContexts:{'title': depth0,'color': depth0},contexts:[],types:[],data:data},helper ? helper.call(depth0, options) : helperMissing.call(depth0, "tag-a", options))));
534
  data.buffer.push("\n    ");
535
  return buffer;
536
  }
537

  
538
  stack1 = helpers['if'].call(depth0, "hasTags", {hash:{},hashTypes:{},hashContexts:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],data:data});
539
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
540
  data.buffer.push("\n\n<!--SOS, edw pairnei gia contoller, ton controller tou vm-->");
541
  return buffer;
542
  
543
});
544

  
524 545
Ember.TEMPLATES["toggle-lt-bar"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
525 546
this.compilerInfo = [4,'>= 1.0.0'];
526 547
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/templates/item.hbs
13 13
		<div class= "status">
14 14
			<span class="state">{{status-to-text this.status}}</span>
15 15
		</div>
16
		<div class="tags">
17
			{{#each tag in this.tags}}
18
				{{tag-a title=tag.name color=tag.color}}
19
			{{/each}}
20 16

  
21
		</div>
17
		{{view App.tagsListView}}
18

  
22 19
	</div>
23 20
</li>
24 21
	
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/templates/items-list.hbs
8 8
    </div>
9 9
</li>
10 10
{{#each}}
11
    {{ render 'item' this }}
11
    {{ render 'item' this}}
12 12
{{/each}}
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/templates/tags-list.hbs
1
{{#if hasTags}}
2
    {{#each tag in this.tags}}
3
        {{tag-a title=tag.name color=tag.color}}
4
    {{/each}}
5
{{/if}}
6
{{!-- {{icon}} --}}
7
<!--SOS, edw pairnei gia contoller, ton controller tou vm-->

Also available in: Unified diff