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

130 lines
5.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>
<% if ENV['DEFAULT_HOST'] == 'fablab.lacasemate.fr' %>
<script type="text/javascript" src="//use.typekit.net/rih5zfr.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<% else %>
<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'>
<% end %>
<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
<script type="text/javascript">
Stripe.setPublishableKey('<%= Rails.application.secrets.stripe_publishable_key %>');
var Fablab = Fablab || {};
Fablab.withoutPlans = ('<%= Rails.application.secrets.fablab_without_plans %>' == 'true');
2016-03-23 18:39:41 +01:00
Fablab.disqusShortname = "<%= Rails.application.secrets.disqus_shortname %>";
Fablab.defaultHost = "<%= ENV['DEFAULT_HOST'] %>";
Fablab.gaId = "<%= ENV['GA_ID'] %>";
// i18n stuff
Fablab.locale = "<%= I18n.locale %>";
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 %>";
2016-03-23 18:39:41 +01:00
</script>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= stylesheet_link_tag 'app.printer', media: 'print' %>
<% if !Stylesheet.first.nil? %>
<link rel="stylesheet" media="all" href="<%= stylesheet_path(Stylesheet.first.id) %>-<%=Stylesheet.first.updated_at.to_i.to_s%>.css" />
<% end %>
2015-05-05 03:10:25 +02:00
<base href="/"></base>
2016-03-23 18:39:41 +01:00
<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') %>">
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_builder.target! : '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">
<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
2016-03-23 18:39:41 +01:00
<div class="app-generator"><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>
<script type="text/javascript" src="<%= asset_path "messageformat/locale/#{Rails.application.secrets.messageformat_locale}.js" %>"></script>
<!-- if required locale does not exist, use the default "en" -->
<% if Rails.application.assets.find_asset "moment/locale/#{Rails.application.secrets.moment_locale}.js" %>
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" -->
<% if Rails.application.assets.find_asset "summernote/lang/summernote-#{Rails.application.secrets.summernote_locale}.js" %>
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" -->
<% if Rails.application.assets.find_asset "fullcalendar/dist/lang/#{Rails.application.secrets.fullcalendar_locale}.js" %>
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>