Blame view

client/helpers/helpers-ui.coffee 384 Bytes
d1f4dbea8   Ryan Glover   Additional README...
1
  ###
5f6f6fbb0   Ryan Glover   Clean up spacing....
2
3
    UI Helpers
    Define UI helpers for common template functionality.
d1f4dbea8   Ryan Glover   Additional README...
4
  ###
45fadbd0b   Ryan Glover   Add UI helper to ...
5
6
7
8
9
10
11
  # 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', (route) ->
    if Session.equals 'currentRoute', route then 'active' else ''
d1f4dbea8   Ryan Glover   Additional README...
12
  )