Reworked routing and breadcrumb mechanism. It allows resolved parameters in paths, which allows including names of entities in the breadcrumb. Secondary navigation which is aware of permissions.
209 lines
9.4 KiB
Handlebars
209 lines
9.4 KiB
Handlebars
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<meta name="description" content="{{#translate}}Self hosted email newsletter app{{/translate}}">
|
|
<meta name="author" content="Andris Reinman">
|
|
<link rel="icon" href="/favicon.ico">
|
|
|
|
<title>Mailtrain
|
|
{{#if title}} | {{title}}{{/if}}
|
|
</title>
|
|
|
|
{{#if reactEntryPoint}}
|
|
<link rel="stylesheet" href="/bootstrap/themes/united.min.css">
|
|
<link rel="stylesheet" href="/css/footer.css">
|
|
<link rel="stylesheet" href="/css/mailtrain.css">
|
|
<script src="/javascript/jquery-2.2.1.min.js"></script>
|
|
<script src="/bootstrap/js/bootstrap.min.js"></script>
|
|
<script src="/mailtrain/common.js"></script>
|
|
|
|
<script>
|
|
window.csfrToken = '{{reactCsrfToken}}';
|
|
window.mailtrainConfig = {{{mailtrainConfig}}};
|
|
</script>
|
|
|
|
<script src="/mailtrain/{{reactEntryPoint}}.js"></script>
|
|
{{else}}
|
|
<link rel="stylesheet" href="/bootstrap/themes/united.min.css">
|
|
<link rel="stylesheet" href="/datatables/datatables.min.css">
|
|
|
|
<link rel="stylesheet" href="/datepicker/css/bootstrap-datepicker3.css">
|
|
<link rel="stylesheet" href="/css/footer.css">
|
|
<link rel="stylesheet" href="/css/mailtrain.css">
|
|
|
|
{{#if useEditor}}
|
|
<link rel="stylesheet" href="/summernote/summernote.css">
|
|
{{/if}}
|
|
|
|
{{#each customStyles}}
|
|
<link rel="stylesheet" href="{{this}}">
|
|
{{/each}}
|
|
|
|
{{#each customScripts}}
|
|
<script src="{{this}}"></script>
|
|
{{/each}}
|
|
{{/if}}
|
|
</head>
|
|
|
|
<body class="{{bodyClass}}">
|
|
|
|
<nav class="navbar navbar-default navbar-static-top">
|
|
<div class="container-fluid">
|
|
<!-- Brand and toggle get grouped for better mobile display -->
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
|
<span class="sr-only">{{#translate}}Toggle navigation{{/translate}}</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<a class="navbar-brand" href="/"><i class="glyphicon glyphicon-envelope"></i> Mailtrain</a>
|
|
</div>
|
|
|
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
|
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
|
<ul class="nav navbar-nav">
|
|
{{#each menu}}
|
|
{{#if selected}}
|
|
<li class="active"><a href="{{url}}">{{title}} <span class="sr-only">(current)</span></a></li>
|
|
{{else}}
|
|
<li><a href="{{url}}">{{title}}</a></li>
|
|
{{/if}}
|
|
{{/each}}
|
|
|
|
{{#if admin }}
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Administration<span class="caret"></span></a>
|
|
<ul class="dropdown-menu">
|
|
<li>
|
|
<a href="/users">
|
|
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span> {{#translate}}Users{{/translate}}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/namespaces">
|
|
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span> {{#translate}}Namespaces{{/translate}}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/settings">
|
|
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span> {{#translate}}Settings{{/translate}}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/blacklist">
|
|
<span class="glyphicon glyphicon-ban-circle" aria-hidden="true"></span> {{#translate}}Blacklist{{/translate}}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/account/api">
|
|
<span class="glyphicon glyphicon-retweet" aria-hidden="true"></span> {{#translate}}API{{/translate}}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
{{/if}}
|
|
|
|
<li><a href="https://github.com/Mailtrain-org/mailtrain/wiki"><span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span> {{#translate}}Wiki{{/translate}}</a></li>
|
|
<li><a href="https://mailtrain.wordpress.com/"><span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span> {{#translate}}Blog{{/translate}}</a></li>
|
|
</ul>
|
|
|
|
|
|
{{#if user }}
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
|
<span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{user.username}} <span class="caret"></span>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<li>
|
|
<a href="/account">
|
|
<span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{#translate}}Account{{/translate}}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/account/logout">
|
|
<span class="glyphicon glyphicon-log-out" aria-hidden="true"></span> {{#translate}}Log out{{/translate}}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
{{else}}
|
|
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li>
|
|
<a href="/account/login" role="button" aria-haspopup="true" aria-expanded="false">
|
|
<span class="glyphicon glyphicon-log-in" aria-hidden="true"></span> {{#translate}}Sign in{{/translate}}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Main jumbotron for a primary marketing message or call to action -->
|
|
|
|
{{#if indexPage}}
|
|
<div class="jumbotron">
|
|
<div class="container-fluid">
|
|
<div class="pull-right col-md-4">
|
|
{{{shoutout}}}
|
|
</div>
|
|
|
|
<h1><img class="img-responsive" src="/mailtrain-header.png"></h1>
|
|
<p>{{#translate}}Self Hosted Newsletter App Built on Top of Nodemailer{{/translate}}</p>
|
|
<p>
|
|
<a class="btn btn-info btn-md" href="https://github.com/Mailtrain-org/mailtrain" role="button"><span class="glyphicon glyphicon-cloud-download" aria-hidden="true"></span> {{#translate}}Source on GitHub{{/translate}}</a>
|
|
|
|
<a class="btn btn-success btn-md" href="http://mailtrain.org/subscription/EysIv8sAx" role="button"><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> {{#translate}}Subscribe to Our Newsletter{{/translate}}</a>
|
|
</p>
|
|
<div class="clearfix"></div>
|
|
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="container-fluid">
|
|
|
|
{{flash_messages}} {{{body}}}
|
|
|
|
</div>
|
|
|
|
<footer class="footer">
|
|
<div class="container-fluid">
|
|
<p class="text-muted">© 2016 Kreata OÜ <a href="https://mailtrain.org">Mailtrain.org</a>, <a href="mailto:info@mailtrain.org">info@mailtrain.org</a>. <a href="https://github.com/Mailtrain-org/mailtrain">{{#translate}}Source on GitHub{{/translate}}</a></p>
|
|
</div>
|
|
</footer>
|
|
|
|
{{#unless reactEntryPoint}}
|
|
<script src="/javascript/jquery-2.2.1.min.js"></script>
|
|
<script src="/bootstrap/js/bootstrap.min.js"></script>
|
|
|
|
<script src="/datepicker/js/bootstrap-datepicker.min.js"></script>
|
|
<script src="/datatables/datatables.min.js"></script>
|
|
<script src="/moment/moment.min.js"></script>
|
|
<script src="/javascript/tables.js"></script>
|
|
<script src="/javascript/fetch.js"></script>
|
|
|
|
{{#if useEditor}}
|
|
<script src="/ace/ace.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="/summernote/summernote.min.js"></script>
|
|
<script src="/javascript/editor.js"></script>
|
|
{{/if}}
|
|
{{/unless}}
|
|
|
|
{{> tracking_scripts}}
|
|
|
|
</body>
|
|
|
|
</html>
|