Sha256: 458a716fb43e301b508f868bb92a8cb582b81412143338ec15ad490960006877
Contents?: true
Size: 1.91 KB
Versions: 10
Compression:
Stored size: 1.91 KB
Contents
- events_error_free = true - is_month = params[:v] != 'a' - current_shift_factor = params[:s] || 0 - date_today = Date.today - update_interval = config[:general][:cache_update_interval_in_s] ||= 2.hours - if is_month - model = Rails.cache.fetch("#month/#{current_shift_factor}/#{date_today}", expires_in: update_interval) do - Candl::MonthModel.new(config, current_shift_factor, date_today) - else - model = Rails.cache.fetch("#agenda/#{current_shift_factor}/#{date_today}", expires_in: update_interval) do - Candl::AgendaModel.new(config, current_shift_factor, date_today) - if model.initialization_successful .popover_backdrop.init_display_none div .button_holder .btn-group = link_to "Monat", model.path("", v: :m, s: model.current_shift_for_month(current_shift_factor)), class: "btn btn-default button_item #{'active' if is_month}" = link_to "Agenda", model.path("", v: :a, s: model.current_shift_for_agenda(current_shift_factor)), class: "btn btn-default button_item #{'active' unless is_month}" .btn-group = link_to "Heute", model.path(""), class: "btn btn-default button_item" .btn-group = link_to model.previous_path("", current_shift_factor), class: "btn btn-default button_item debounce_this", data: { debounce_param: "s", direction_forward: false } .button_icon i.material-icons navigate_before = link_to model.upcoming_path("", current_shift_factor), class: "btn btn-default button_item debounce_this", data: { debounce_param: "s", direction_forward: true } .button_icon i.material-icons navigate_next .calendar - if is_month = render partial: "candl/calendar/month", locals: { calendar_month: model } - else = render partial: "candl/calendar/agenda", locals: { calendar_agenda: model } - else .error_message 'error.no_events_loaded'
Version data entries
10 entries across 10 versions & 1 rubygems