1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-02 13:24:20 +01:00
fab-manager/app/views/application/index.html.erb

171 lines
8.9 KiB
Plaintext
Raw Normal View History

2015-05-05 03:10:25 +02:00
<!DOCTYPE html>
<html lang="<%= I18n.locale %>" ng-app="application" class="app">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="">
2016-03-23 18:39:41 +01:00
<meta name="author" content="">
<title><%=Setting.find_by(name: 'fablab_name').value%></title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,700,800,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700,300italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Loved+by+the+King' rel='stylesheet' type='text/css'>
<% if Rails.env.staging? && Rails.application.secrets.enable_in_context_translation %>
<script type="text/javascript">
var _jipt = [];
_jipt.push(['project', 'fab-manager']);
</script>
<script type="text/javascript" src="//cdn.crowdin.com/jipt/jipt.js"></script>
<% end %>
<script type="text/javascript" src="https://js.stripe.com/v3/"></script>
2016-03-23 18:39:41 +01:00
<script type="text/javascript">
var Fablab = Fablab || {};
Fablab.withoutPlans = ('<%= Rails.application.secrets.fablab_without_plans %>' === 'true');
Fablab.withoutSpaces = ('<%= Rails.application.secrets.fablab_without_spaces %>' !== 'false');
Fablab.withoutOnlinePayment = ('<%= Rails.application.secrets.fablab_without_online_payments %>' === 'true');
Fablab.withoutInvoices = ('<%= Rails.application.secrets.fablab_without_invoices %>' === 'true');
Fablab.phoneRequired = ('<%= Rails.application.secrets.phone_required %>' === 'true');
2020-02-12 18:15:44 +01:00
Fablab.fablabWithoutWallet = ('<%= Rails.application.secrets.fablab_without_wallet %>' === 'true');
Fablab.bookSlotAtSameTime = ('<%= Rails.application.secrets.book_slot_at_same_time %>' === 'true');
2019-11-27 11:52:37 +01:00
Fablab.eventsInCalendar = ('<%= Rails.application.secrets.events_in_calendar %>' === 'true');
Fablab.slotDuration = parseInt("<%= ApplicationHelper::SLOT_DURATION %>", 10);
2020-02-25 18:02:41 +01:00
Fablab.featureTourDisplay = "<%= Rails.application.secrets.feature_tour_display %>";
2016-03-23 18:39:41 +01:00
Fablab.disqusShortname = "<%= Rails.application.secrets.disqus_shortname %>";
Fablab.defaultHost = "<%= Rails.application.secrets.default_host %>";
Fablab.gaId = "<%= Rails.application.secrets.google_analytics_id %>";
Fablab.superadminId = parseInt("<%= User.superadmin&.id %>", 10);
2016-03-23 18:39:41 +01:00
// i18n stuff
Fablab.locale = "<%= Rails.application.secrets.app_locale %>";
2016-03-23 18:39:41 +01:00
Fablab.moment_locale = "<%= Rails.application.secrets.moment_locale %>";
Fablab.summernote_locale = "<%= Rails.application.secrets.summernote_locale %>";
Fablab.fullcalendar_locale = "<%= Rails.application.secrets.fullcalendar_locale %>";
Fablab.timezone = "<%= Time.zone.tzinfo.name %>";
Fablab.translations = {
app: {
shared: {
buttons: <%= I18n.t('app.shared.buttons').to_json.html_safe %>,
messages: <%= I18n.t('app.shared.messages').to_json.html_safe %>
}
}
};
Fablab.weekStartingDay = <%= Date.parse(Rails.application.secrets.week_starting_day).strftime('%w') %>;
Fablab.d3DateFormat = "<%= Rails.application.secrets.d3_date_format %>";
Fablab.uibDateFormat = "<%= Rails.application.secrets.uib_date_format %>";
Fablab.openlabProjectsActive = <%= Rails.application.secrets.openlab_app_secret.present? %>;
Fablab.openlabDefault = ('<%= Rails.application.secrets.openlab_default %>' !== 'false');
<% if Rails.application.secrets.openlab_app_id.present? %>
Fablab.openlabAppId = "<%= Rails.application.secrets.openlab_app_id %>";
<% end %>
<% if RecaptchaService.recaptcha_enabled? %>
Fablab.recaptchaSiteKey = "<%= RecaptchaService.site_key %>";
<% end %>
2020-01-07 10:34:12 +01:00
Fablab.userConfirmationNeededToSignIn = ('<%= Rails.application.secrets.user_confirmation_needed_to_sign_in %>' === 'true');
2020-03-02 11:17:28 +01:00
// feature tour (used when feature_tour_display = session)
Fablab.sessionTours = [];
2016-03-23 18:39:41 +01:00
</script>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= stylesheet_link_tag 'app.printer', media: 'print' %>
2020-01-27 17:10:29 +01:00
<% unless Stylesheet.theme.nil? %>
<link rel="stylesheet" media="all" href="<%= stylesheet_path(Stylesheet.theme.id) %>-<%= Stylesheet.theme.updated_at.to_i.to_s %>.css" />
<% end %>
<% unless Stylesheet.home_page.nil? %>
<link rel="stylesheet" media="all" href="<%= stylesheet_path(Stylesheet.home_page.id) %>-<%= Stylesheet.home_page.updated_at.to_i.to_s %>.css" />
<% end %>
2015-05-05 03:10:25 +02:00
<base href="/"></base>
<% if CustomAsset.get_url('favicon-file') %>
<link rel="shortcut icon" type="image/x-icon" href="<%= CustomAsset.get_url('favicon-file') %>">
<link rel="shortcut icon" type="image/ico" href="<%= CustomAsset.get_url('favicon-file') %>">
<% end %>
2015-05-05 03:10:25 +02:00
<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS: <%= t('app.public.projects_list.the_fablab_projects') %>" href="<%= rss_projects_path %>.xml">
<link rel="alternate" type="application/rss+xml" title="RSS: <%= t('app.public.events_list.the_fablab_s_events') %>" href="<%= rss_events_path %>.xml">
2015-05-05 03:10:25 +02:00
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body ng-controller="ApplicationController"
ng-init="setCurrentUser(<%= current_user ? current_user.to_json : 'null' %>)"
ng-cloak>
2016-03-23 18:39:41 +01:00
<div growl></div>
2015-05-05 03:10:25 +02:00
2016-03-23 18:39:41 +01:00
<%= flash_messages %>
2015-05-05 03:10:25 +02:00
2016-03-23 18:39:41 +01:00
<section class="vbox">
2015-05-05 03:10:25 +02:00
2016-03-23 18:39:41 +01:00
<header class="header header-md navbar navbar-fixed-top-xs">
<div ui-view="header"></div>
</header>
2015-05-05 03:10:25 +02:00
2016-03-23 18:39:41 +01:00
<section ui-view="content">
<section class="hbox stretch">
<aside id="nav" class="aside-md bg-red hidden-print" ui-view="leftnav"></aside>
2015-05-05 03:10:25 +02:00
2016-03-23 18:39:41 +01:00
<section id="content">
<section class="vbox">
2019-06-13 11:28:55 +02:00
<section id="cookies-modal" ui-view="cookies">
</section>
<section id="content-main" class="scrollable" ui-view="main">
</section>
2015-05-05 03:10:25 +02:00
</section>
</section>
2016-03-23 18:39:41 +01:00
</section> <!-- /.hbox -->
</section>
</section> <!-- /.vbox -->
2015-05-05 03:10:25 +02:00
<div class="app-generator">
2020-01-14 17:39:13 +01:00
<span class="app-version" uib-tooltip="{{'app.public.common.version' | translate}} {{version.current}}" ng-if="currentUser && currentUser.role == 'admin'" ng-click="versionModal()">
<i class="fa fa-question-circle" aria-label="Version ?" ng-show="version.up_to_date"></i>
<i class="fa fa-refresh pointer" aria-label="Upgrade required" ng-show="!version.up_to_date && !version.security"></i>
<i class="fa fa-warning pointer" aria-label="Security upgrade required" ng-show="!version.up_to_date && version.security"></i>
</span>
2020-03-02 08:59:43 +01:00
<span class="text-sm">Powered by <a href="http://www.fab-manager.com" target="_blank">Fab-manager</a></span>
</div>
2015-05-05 03:10:25 +02:00
<%= javascript_include_tag 'application' %>
2016-03-23 18:39:41 +01:00
<!-- i18n of external libraries -->
<script type="text/javascript" src="<%= asset_path "angular-i18n/angular-locale_#{Rails.application.secrets.angular_locale}.js" %>"></script>
<% if Rails.env.staging? && Rails.application.secrets.enable_in_context_translation %>
2019-12-23 11:29:02 +01:00
<script type="text/javascript">MessageFormat.locale.ach=function(n){return n===0||n===1?"one":"other"};</script>
<% end %>
<!-- if required locale does not exist, use the default "en" -->
2020-03-31 17:36:00 +02:00
<% if Rails.application.assets_manifest.find("moment/locale/#{Rails.application.secrets.moment_locale}.js").first %>
2016-03-23 18:39:41 +01:00
<script type="text/javascript" src="<%= asset_path "moment/locale/#{Rails.application.secrets.moment_locale}.js" %>"></script>
<%
elsif Rails.application.secrets.moment_locale != 'en'
raise LoadError, "moment/locale/#{Rails.application.secrets.moment_locale}.js does not exists"
end
%>
<!-- if required locale does not exist, use the default "en-US" -->
2020-03-31 17:36:00 +02:00
<% if Rails.application.assets_manifest.find("summernote/lang/summernote-#{Rails.application.secrets.summernote_locale}.js").first %>
2016-03-23 18:39:41 +01:00
<script type="text/javascript" src="<%= asset_path "summernote/lang/summernote-#{Rails.application.secrets.summernote_locale}.js" %>"></script>
<%
elsif Rails.application.secrets.summernote_locale != 'en-US'
raise LoadError, "summernote/lang/summernote-#{Rails.application.secrets.summernote_locale}.js does not exists"
end
%>
<!-- if required locale does not exist, use the default "en" -->
2020-03-31 17:36:00 +02:00
<% if Rails.application.assets_manifest.find("fullcalendar/dist/lang/#{Rails.application.secrets.fullcalendar_locale}.js").first %>
2016-03-23 18:39:41 +01:00
<script type="text/javascript" src="<%= asset_path "fullcalendar/dist/lang/#{Rails.application.secrets.fullcalendar_locale}.js" %>"></script>
<%
elsif Rails.application.secrets.fullcalendar_locale != 'en'
raise LoadError, "fullcalendar/dist/lang/#{Rails.application.secrets.fullcalendar_locale}.js does not exists"
end
%>
2015-05-05 03:10:25 +02:00
</body>
</html>