- content_for :header_tags do
  = context_menu if Hourglass.redmine_has_advanced_queries?
  = javascript_include_tag 'application', plugin: Hourglass::PLUGIN_NAME
  - am_pm = t([:am, :pm], scope: :time)
  = render partial: 'hooks/javascript_setup'
  javascript:
    window.hourglass.DateTimeFormat = "#{format_identifier_to_js date_time_format}";
    window.hourglass.UtcOffset = "#{utc_offset}";
    moment.locale('redmine-settings', {
        months: #{date_strings_lookup :month_names},
        monthsShort: #{date_strings_lookup :abbr_month_names},
        weekdays: #{date_strings_lookup :day_names},
        weekdaysShort: #{date_strings_lookup :abbr_day_names}
    });

  = stylesheet_link_tag 'application', plugin: Hourglass::PLUGIN_NAME

= yield

= context_menu hourglass_ui_context_menu_path unless Hourglass.redmine_has_advanced_queries?
