Files
old-tfm/app/client/state_details.js

15 lines
387 B
JavaScript
Raw Normal View History

2016-03-19 09:23:59 +01:00
Template.state_details.helpers({
pretty_valve: function(state) {
if (state === 'open') return "Otvoren";
if (state === 'opening') return "Otvara se";
if (state === 'closing') return "Zatvara se";
if (state === 'closed') return "Zatvoren";
},
last_communication_time: function() {
return moment(this.time).fromNow();
}
});
Template.state_details.events({
});