mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 10:06:53 +08:00
b40c750965
* Fix broken Turbolinks with CSP nonce [SCI-8583]
124 lines
5.6 KiB
Text
124 lines
5.6 KiB
Text
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta data-hook="head-js">
|
|
<title><%=t "head.title", title: (yield :head_title) %></title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
<meta name="max-file-size" content="<%= Rails.configuration.x.file_max_size_mb %>">
|
|
<meta name="tiny-mce-assets-url" content="<%= tiny_mce_assets_path %>">
|
|
<% if user_signed_in? %>
|
|
<meta name="expiration-url" content="<%= users_expire_in_path %>">
|
|
<meta name="revive-url" content="<%= users_revive_session_path %>">
|
|
<% end %>
|
|
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
|
|
<%= stylesheet_link_tag 'application', media: 'all' %>
|
|
<%= csp_meta_tag %>
|
|
<% if ::NewRelic::Agent.instance.started? %>
|
|
<%= ::NewRelic::Agent.browser_timing_header(controller.request.content_security_policy_nonce) %>
|
|
<% end %>
|
|
<%= javascript_include_tag 'jquery_bundle' %>
|
|
<%= javascript_include_tag 'application' %>
|
|
<%= javascript_include_tag 'application_pack' %>
|
|
<%= javascript_include_tag 'session_end' %>
|
|
<%= javascript_include_tag 'sidebar_toggle' %>
|
|
|
|
|
|
<% if MarvinJsService.enabled? && ENV['MARVINJS_API_KEY'] %>
|
|
<%= javascript_include_tag "https://marvinjs.chemicalize.com/v1/#{ ENV['MARVINJS_API_KEY'] }/client-settings.js",
|
|
nonce: true %>
|
|
<%= javascript_include_tag 'https://marvinjs.chemicalize.com/v1/client.js', nonce: true %>
|
|
<% end %>
|
|
|
|
<%= favicon_link_tag "favicon.ico" %>
|
|
<%= favicon_link_tag "favicon-16.png", type: "image/png", size: "16x16" %>
|
|
<%= favicon_link_tag "favicon-32.png", type: "image/png", size: "32x32" %>
|
|
<%= favicon_link_tag "favicon-48.png", type: "image/png", size: "48x48" %>
|
|
<%= stylesheet_link_tag 'fonts', id: 'font-css-pack' %>
|
|
<%= stylesheet_link_tag 'fontawesome' %>
|
|
|
|
<%= stylesheet_link_tag 'prism' %>
|
|
|
|
<%= csrf_meta_tags %>
|
|
<% if content_for?(:head) %>
|
|
<%= yield(:head) %>
|
|
<% end %>
|
|
|
|
<%= javascript_include_tag 'tui_image_editor', nonce: true %>
|
|
<%= stylesheet_link_tag 'tui_image_editor_styles' %>
|
|
<%= javascript_include_tag 'vue_navigation_navigator' %>
|
|
<%= javascript_include_tag 'vue_navigation_top_menu', nonce: true %>
|
|
</head>
|
|
<body
|
|
class="<%= yield :body_class %>"
|
|
<% if user_signed_in? && current_team.present? %>
|
|
data-current-team-id="<%= current_team.id %>"
|
|
data-atwho-users-url="<%= atwho_users_team_path(current_team) %>"
|
|
data-atwho-task-url="<%= atwho_my_modules_team_path(current_team) %>"
|
|
data-atwho-project-url="<%= atwho_projects_team_path(current_team) %>"
|
|
data-atwho-experiment-url="<%= atwho_experiments_team_path(current_team) %>"
|
|
data-atwho-repositories-url="<%= atwho_menu_team_path(current_team) %>"
|
|
data-atwho-rep-items-url="<%= atwho_rep_items_team_path(current_team) %>"
|
|
data-atwho-menu-items="<%= atwho_menu_items_team_path(current_team) %>"
|
|
data-datetime-picker-format-date-only="<%= datetime_picker_format_date_only %>"
|
|
<% end %>
|
|
>
|
|
|
|
<span style="display: none;" data-hook="body-js"></span>
|
|
<span style="display: none;" data-hook="application-body-html"></span>
|
|
|
|
<div class="sci--layout"
|
|
data-breadcrumbs-collapsed="<%= !@breadcrumbs_items.present? %>"
|
|
data-navigator-collapsed="<%= !@navigator || session[:navigator_collapsed] %>"
|
|
data-left-navigation-collapsed=<%= !user_signed_in? %>
|
|
>
|
|
<div class="sci--layout-navigation-top" >
|
|
<%= render "shared/navigation/top" %>
|
|
</div>
|
|
<div class="sci--layout-navigation-left">
|
|
<%= render "shared/navigation/left" if user_signed_in? %>
|
|
</div>
|
|
<div class="sci--layout-navigation-navigator overflow-hidden relative">
|
|
<%= render "shared/navigation/navigator" %>
|
|
</div>
|
|
<div class="sci--layout-navigation-breadcrumbs">
|
|
<%= render "shared/navigation/breadcrumbs" %>
|
|
</div>
|
|
<div class="sci--layout-content">
|
|
<% if user_signed_in? && current_user.teams.blank? && !(activities_are_selected? || settings_are_selected?) %>
|
|
<!-- If member of no teams -->
|
|
<div id="no-teams-jumbotron" class="jumbotron">
|
|
<%= image_tag "empty-screen-illustration.png", size: "500x500" %>
|
|
<h2><%=t 'general.no_teams.title' %></h2>
|
|
<p data-hook="general-no-teams-text"><%=t 'general.no_teams.text' %></p>
|
|
</div>
|
|
<% else %>
|
|
<%= yield :content %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<%= render "shared/comments/comments_sidebar.html.erb" %>
|
|
</div>
|
|
|
|
<%= render partial: 'shared/flash_alerts',
|
|
locals: { flash: flash, notice: notice, alert: alert } %>
|
|
|
|
<% if user_signed_in? %>
|
|
<%= render "shared/about_modal" %>
|
|
<%= render "shared/file_preview/modal.html.erb" %>
|
|
<%= render "shared/file_edit_modal.html.erb" %>
|
|
<%= render "shared/marvinjs_modal.html.erb" %>
|
|
<%= render "users/sessions/session_expire_modal.html.erb" %>
|
|
<%= render "users/sessions/session_end_modal.html.erb" %>
|
|
<% end %>
|
|
|
|
<% if user_signed_in? && flash[:system_notification_modal] && current_user.show_login_system_notification? %>
|
|
<%= render partial: "/system_notifications/system_notification_modal", locals: { notification: current_user.user_system_notifications.show_on_login(true) } %>
|
|
<% else %>
|
|
<%= render partial: "/system_notifications/system_notification_modal", locals: { notification: nil} %>
|
|
<% end %>
|
|
|
|
<span style="display: none;" data-hook="application-body-end-html"></span>
|
|
|
|
<%= javascript_include_tag 'prism' %>
|
|
</body>
|
|
</html>
|