add support for placing a custom footer in the manifest (#8081)
This commit is contained in:
parent
8a3b1aefc9
commit
1ef0a5b2d2
|
@ -60,6 +60,19 @@
|
|||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-tmpl" id="momo-default-footer-tmpl">
|
||||
<div class="col-xs-6 navbar-btn text-left">
|
||||
<a href="https://dev.entrouvert.org/projects/momo/"
|
||||
class="btn btn-success pull-left momo-repo"
|
||||
target="_system"
|
||||
onclick="javascript:app.utils.onExternalLinkClick()">Momo repository</a>
|
||||
</div>
|
||||
<div class="col-xs-6 navbar-btn text-right">
|
||||
<a href="mailto:{%= o.meta.contact %}"
|
||||
class="btn btn-success pull-right momo-contact">{%= o.meta.contact %}</a>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-tmpl" id="momo-icon-tmpl">
|
||||
{% if(o.icon){ %}
|
||||
{% if(o.icon.isFramable()){ %}
|
||||
|
@ -307,16 +320,7 @@
|
|||
<footer class="navbar navbar-inverse momo-footer">
|
||||
<div class="container-fluid clearfix">
|
||||
<div class="row">
|
||||
<div class="col-xs-6 navbar-btn text-left">
|
||||
<a href="https://dev.entrouvert.org/projects/momo/"
|
||||
class="btn btn-success pull-left momo-repo"
|
||||
target="_system"
|
||||
onclick="javascript:app.utils.onExternalLinkClick()">Momo repository</a>
|
||||
</div>
|
||||
<div class="col-xs-6 navbar-btn text-right">
|
||||
<a href="mailto:{%= o.meta.contact %}"
|
||||
class="btn btn-success pull-right momo-contact">{%= o.meta.contact %}</a>
|
||||
</div>
|
||||
{%# o.footer %}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
@ -54,7 +54,8 @@ var app = {
|
|||
'menu': [],
|
||||
'stylesheets': [],
|
||||
'javascripts': [],
|
||||
'content': tmpl('momo-first-launch-tmpl', {})
|
||||
'content': tmpl('momo-first-launch-tmpl', {}),
|
||||
'footer': undefined
|
||||
},
|
||||
|
||||
// Default page attributes
|
||||
|
@ -132,6 +133,7 @@ var app = {
|
|||
app.manifest.title = new_manifest.title;
|
||||
app.manifest.content = new_manifest.content;
|
||||
app.manifest.pages = new_manifest.pages;
|
||||
app.manifest.footer = new_manifest.footer;
|
||||
app.onDefaultManifestLoaded();
|
||||
}
|
||||
};
|
||||
|
@ -640,6 +642,11 @@ var app = {
|
|||
app.utils.setLoadingMsg("Démarrage de l'application");
|
||||
app.hasStarted = true;
|
||||
|
||||
/* if there's no footer, fallback to the default */
|
||||
if (typeof app.manifest.footer === 'undefined') {
|
||||
app.manifest.footer = tmpl('momo-default-footer-tmpl', app.manifest);
|
||||
}
|
||||
|
||||
// Default route to home
|
||||
app.manifest.id = app.currentPage = 'home';
|
||||
|
||||
|
|
Reference in New Issue