Blame view

client/helpers/template.js 396 Bytes
3b214be5e   Ryan Glover   Convert all Coffe...
1
2
3
4
5
6
7
8
9
10
11
12
13
  /*
  * UI Helpers
  * Define UI helpers for common template functionality.
  */
  
  /*
  * Current Route
  * Return an active class if the currentRoute session variable name
  * (set in the appropriate file in /client/routes/) is equal to the name passed
  * to the helper in the template.
  */
  
  UI.registerHelper('currentRoute', function(route){
b9ffd111b   Ryan Glover   Add explicit retu...
14
    return Session.equals('currentRoute', route) ? 'active' : '';
3b214be5e   Ryan Glover   Convert all Coffe...
15
  });