Skip to content

Instantly share code, notes, and snippets.

@regedarek
Created February 20, 2014 15:28
Show Gist options
  • Save regedarek/9116291 to your computer and use it in GitHub Desktop.
Save regedarek/9116291 to your computer and use it in GitHub Desktop.
.right
= image 'nav_divider', class: 'r'
= link_to '#' do
= icon 'nav_settings', 54
-# %span= truncate current_user.name, length: 10
= image 'nav_divider', class: 'r'
= link_to cardiologist_conversations_path do
= icon 'nav_conversations', 54
- unless current_user.mailbox.inbox(unread: true).empty?
.bubble= current_user.mailbox.inbox(unread: true).count
= image 'nav_divider', class: 'r'
= link_to cardiologist_notifications_path do
= icon 'nav_notifications', 54
- unless current_user.mailbox.notifications(unread: true).empty?
.bubble= current_user.mailbox.notifications(unread: true).count
= image 'nav_divider', class: 'l'
.more
=icon('nav_shift_active', 40)
- if (previous_shift_entry.present? && previous_shift_entry.running?)
/ actions on my last shift, still running
= link_to(finish_cardiologist_shift_path(previous_shift), method: :put, title: l(previous_shift.starts_at, format: :date_minimal), class: 'fn-with-overlay') do
%span= "Dienst beenden"
- elsif current_shift_entry.present?
/ actions on my current shift
- if current_shift_entry.scheduled?
= link_to(start_cardiologist_shift_path(current_shift), method: :put, title: l(current_shift.starts_at, format: :date_minimal), class: 'fn-with-overlay') do
%span= "Dienst antreten"
- elsif current_shift_entry.running?
= link_to(finish_cardiologist_shift_path(current_shift), method: :put, title: l(current_shift.starts_at, format: :date_minimal), class: 'fn-with-overlay') do
%span= "Dienst beenden"
- elsif next_shift_entry.present?
/ actions on my next shift
- if next_shift_entry.scheduled?
= link_to(start_cardiologist_shift_path(next_shift), method: :put, title: l(next_shift.starts_at, format: :date_minimal), class: 'fn-with-overlay') do
%span= "Dienst antreten"
- elsif next_shift_entry.running?
- if Rails.env.development?
= link_to(finish_cardiologist_shift_path(next_shift), method: :put, title: l(next_shift.starts_at, format: :date_minimal)) do
%em >STOP
%span= "Dienst vorgemerkt"
- else
%span= "kein Dienst"
%ul
%li= link_to t('nav.bar.user_data'), edit_cardiologist_user_path(current_user)
%li= link_to t('nav.bar.log_out'), destroy_user_session_path, method: :delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment