-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathadmin_nav.coffee
More file actions
30 lines (26 loc) · 1.02 KB
/
admin_nav.coffee
File metadata and controls
30 lines (26 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Top Nav
Template._houston_navbar.events
'click #houston-logout': (e) ->
e.preventDefault()
Meteor.logout()
'click #download-db': ->
download_db_link = """curl -sSL https://raw.githubusercontent.com/AlexeyMK/meteor-download/master/download.sh | bash -s #{window.location.host}"""
alert "Run the following in your terminal: \n\n#{download_db_link}"
Template._houston_navbar.helpers
'bugreport_url': ->
message = encodeURIComponent """
To make sure we can help you quickly, please include the version of Houston
you are using, steps to replicate the issue, a description of what you were
expecting and a screenshot if relevant.
Thanks!
"""
"https://github.com/gterrono/houston/issues/new?body=#{message}"
'menu_items': ->
return Houston.menu._get_menu_items()
'isActive' : -> 'active' if Router.current()?.path == @path
# Side Nav
Template._houston_sidenav.helpers
collections: ->
Houston._collections.collections.find().fetch()
is_active: (name) ->
name is Houston._session('collection_name')