doctype html
html
head
= capybara_lockstep if defined?(Capybara::Lockstep)
meta charset="UTF-8"
meta http-equiv="X-UA-Compatible" content="IE=edge"
meta name="viewport" content="width=device-width,initial-scale=1"
- if @turbo_page_requires_reload
meta name="turbo-visit-control" content="reload"
- cache :title_icon
title = t(Current.app_name, scope: 'app_name')
- begin
= render partial: 'layouts/favicon'
- rescue ActionView::MissingTemplate => e
- pg_err e
- if @turbo_no_cache
meta name="turbo-cache-control" content="no-cache"
/ El morph no estaría siendo de utilidad
/ meta name="turbo-refresh-method" content="morph"
/ En general es deseable el comportamiento scroll "reset", por ejemplo en los forms,
/ ya que los errores se muestran arriba y el botón de submit está abajo
/ meta name="turbo-refresh-scroll" content="preserve"
meta name="turbo-prefetch" content="#{ENV.fetch('TURBO_PREFETCH_ENABLE', 'false')}"
meta name="view-transition" content="same-origin"
meta name="cable-history-timestamp" content="#{Time.now.to_i}"
= csrf_meta_tags
= csp_meta_tag
- if defined?(AnyCable::Rails)
= action_cable_with_jwt_meta_tag
= stylesheet_link_tag 'application', 'data-turbo-track': 'reload'
= javascript_include_tag 'application', 'data-turbo-track': 'reload', type: 'module'
meta(name="actioncable-protocol"
content="#{Rails.env.test? ? 'actioncable-v1-json' : 'actioncable-v1-ext-json'}")
- if @rollbar_token.present?
meta name="rollbar-token" content="#{@rollbar_token}"
meta name="rollbar-env" content="#{Rails.env}"
link rel="preconnect" href="https://fonts.googleapis.com"
link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="crossorigin"
link href=PgEngine::GOOGLE_FONTS_URL rel="stylesheet"
css:
body {
font-family: "Ubuntu", sans-serif;
font-weight: 400;
font-style: normal;
}
body
span#tid.d-none data-tid="#{Current.tid}"
- sidebar_present = @navbar.present? && @sidebar != false
= render partial: 'pg_layout/sidebar_mobile'
div class="#{ 'with-sidebar' if sidebar_present }"
- if sidebar_present
= render partial: 'pg_layout/sidebar'
div
= render partial: 'pg_layout/navbar' if @navbar.present?
div
- captured_content = capture do
- if user_signed_in? && breadcrumbs.any?
.d-flex.d-print-none
.d-flex.flex-grow-1.px-3.py-1[
class="#{nav_bg} align-items-center xjustify-content-between gap-5"
style="min-height: 2.5em;"]
nav.d-flex aria-label="breadcrumb"
- unless frame_embedded?
i.bi-segmented-nav.me-2 style="transform: rotate(180deg);"
ol.breadcrumb
= render_breadcrumbs builder: PgEngine::Bootstrap5BreadcrumbsBuilder
.vr
.btn-toolbar.gap-1
= yield(:actions)
= yield(:extra_actions)
- if using_modal?
.px-2.d-flex.align-items-center.border.border-start-0
= button_tag type: :button, class: 'btn btn-sm btn-link',
data: { action: 'modal#maximize',
controller: :tooltip, 'bs-title': 'Maximizar' } do
i.bi-fullscreen
= link_to request.url,
class: 'btn btn-sm btn-link',
data: { controller: :tooltip,
'turbo-frame': :_top,
'bs-title': 'Reemplazar ventana principal' } do
i.bi-box-arrow-up-right
= button_tag type: :button, class: 'btn btn-sm btn-link',
data: { controller: :tooltip,
'bs-title': 'Cerrar', 'bs-dismiss': :modal },
'aria-label': 'Close' do
i.bi-x-lg
/ hr.my-0
- content = content_for?(:content) ? yield(:content) : yield
/ TODO!!: rename to main?
- if (!turbo_frame? || current_turbo_frame == 'top') && \
content.exclude?('flash-container')
= render FlashContainerComponent.new
/ TODO: si hay varios flashes toast, se superponen. habría que
hacer un container con position absolute para los toasts
= yield(:filtros)
= content
- if @no_main_frame
= captured_content
- else
/ TODO!!: rename to main, use a constant
= turbo_frame_tag current_turbo_frame || 'top',
**{ 'data-turbo-action': (turbo_frame? ? nil : :advance) }.compact do
= captured_content
div style="width:100%; height: 10em"
.d-flex.gap-1.justify-content-center.opacity-50 data-controller="theme"
| (Beta) Tema:
= link_to 'Claro', 'javascript:void(0)', 'data-action': 'theme#light'
= link_to 'Oscuro', 'javascript:void(0)', 'data-action': 'theme#dark'
= render partial: 'layouts/footer'
div style="width:100%; height: 10em"
= render_turbo_stream_title