debshots/app/views/my/_menu.slim

27 lines
1 KiB
Text

.menu-centered
ul.menu.icon-top
li class=('active' if action_name=='profile')
= link_to my_profile_path
= fa_icon 'user-o 2x', text: 'Myself'
li class=('active' if action_name=='screenshots')
= link_to my_screenshots_path
= fa_icon 'camera 2x', text: 'Screenshots'
- if can?(:approve, Screenshot)
li class=('active' if action_name=='moderate_list')
= link_to moderate_list_path
= fa_icon 'check 2x', text: 'Moderate'
- if can? :view, Log
li class=('active' if action_name=='logs')
= link_to logs_path
= fa_icon 'book 2x', text: 'Logs'
// Add link if user has uploaded screenshots
/ - if @current_users_screenshots and @current_users_screenshots.any?
/ li class=('active' if controller_name=='my' and action_name=='uploads')
/ = link_to my_uploads_path
/ = fa_icon 'image 2x', text: 'My uploads'
/ ' My uploads
li
= link_to destroy_user_session_path, method: :delete
= fa_icon 'lock 2x', text: 'Logout'