osem-fcy/app/views/layouts/_user_menu.html.haml

84 lines
3.1 KiB
Text
Raw Normal View History

2018-06-08 18:18:04 -07:00
- if can? :index, Comment
%li.dropdown-header
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-comment
2018-06-08 18:18:04 -07:00
Notifications (#{unread_notifications(current_user).length})
- if unread_notifications(current_user).length > 0
%li.dropdown-header Last 5 Comments for:
- unread_notifications(current_user).limit(5).group_by{ |comment| comment.commentable}.each do |event, comments|
%li= link_to("#{event.title}(#{comments.count})", admin_conference_program_event_path(event.program.conference.short_title, event.id))
%li.divider
%li= link_to "See all unread Comments (#{unread_notifications(current_user).length})", admin_comments_path
%li= link_to 'See all Comments', admin_comments_path(anchor: 'all_comments')
%li.divider
2022-05-06 14:27:15 +02:00
- unless ENV.fetch('OSEM_ICHAIN_ENABLED', nil) == 'true'
2014-11-04 17:42:47 +01:00
%li
= link_to(edit_user_registration_path) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-wrench
2014-11-04 17:42:47 +01:00
Edit Account
2013-06-27 23:05:07 +02:00
%li
2014-11-04 17:42:47 +01:00
= link_to(edit_user_path(current_user.id)) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-user
2014-11-09 14:30:22 +02:00
Edit Profile
2018-03-27 16:40:24 -07:00
- if @conference && ((current_user && @conference.user_registered?(current_user)) || @conference.registration_open?)
%li
= link_to(conference_conference_registration_path(@conference)) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-id-badge
= @conference.short_title
registration
-if @conference && @conference.program
2013-06-27 23:05:07 +02:00
%li
= link_to(conference_program_proposals_path(@conference.short_title)) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-comment
2013-06-27 23:05:07 +02:00
My Submissions
%li
= link_to(conference_program_tracks_path(@conference.short_title)) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-road
My Tracks
-if @conference && (@conference.call_for_booths.try(:open?) || current_user.booths.where(conference_id: @conference.id).count > 0)
2017-08-15 15:46:33 +03:00
%li
= link_to (conference_booths_path(@conference.short_title)) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-bag-shopping
My #{(t'booth').capitalize } Requests
2013-06-27 23:05:07 +02:00
%li
2022-05-06 14:27:15 +02:00
- if ENV.fetch('OSEM_ICHAIN_ENABLED', nil) == 'true'
= link_to(destroy_user_ichain_session_path, method: 'delete') do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-minus
2014-11-04 17:42:47 +01:00
Sign out
- else
= link_to(destroy_user_session_path, method: 'delete') do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-minus
2014-11-04 17:42:47 +01:00
Sign out
- if can? :access, Admin
2013-06-27 23:05:07 +02:00
%li.divider
%li
- if Conference.any?
= link_to(admin_conferences_path()) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-house
Administration
2017-07-11 03:59:52 +05:30
- if can? :new, Conference.new
=link_to(new_admin_conference_path) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-plus
2017-07-11 03:59:52 +05:30
New Conference
-if @conference && @conference.id && can?(:show, @conference)
2014-05-23 14:30:59 +02:00
%li
= link_to(admin_conference_path(@conference.short_title)) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-gear
2014-05-23 14:30:59 +02:00
Manage
%span.notranslate
= @conference.short_title
- if can? :manage, User.new
2014-10-31 23:00:42 +02:00
%li
= link_to(admin_users_path) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-user
2014-10-31 23:00:42 +02:00
Users
- if can? :index, PaperTrail::Version
%li
= link_to(admin_revision_history_path) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-clock-rotate-left
Revision History
2022-05-06 14:27:15 +02:00
- if ENV.fetch('OSEM_ICHAIN_ENABLED', nil) == 'true'
2017-06-05 11:56:47 +05:30
%li
= link_to(admin_organizations_path) do
2022-05-18 06:31:12 +02:00
%span.fa-solid.fa-user-group
2017-06-05 11:56:47 +05:30
Organizations