bunch of functionlity
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<template name='configurationList'>
|
||||
<div class="row">
|
||||
{{#each configurations}}
|
||||
{{> configurationListItem}}
|
||||
{{else}}
|
||||
You don't have any configurations for this machine.
|
||||
{{/each}}
|
||||
</div>
|
||||
{{#unless newConfigurationRequested}}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<button class='add-new-config-btn'>Add new configuration</button>
|
||||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
{{#if newConfigurationRequested}}
|
||||
{{> newConfigurationDialog machineId=machineId}}
|
||||
{{/if}}
|
||||
</template>
|
||||
@@ -0,0 +1,12 @@
|
||||
Template.configurationList.events({
|
||||
"click .add-new-config-btn": function(event, template) {
|
||||
console.log('should add new configuration');
|
||||
Session.set('newConfigurationRequested', true);
|
||||
}
|
||||
});
|
||||
|
||||
Template.configurationList.helpers({
|
||||
newConfigurationRequested: function() {
|
||||
return Session.get('newConfigurationRequested');
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user