aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/mod_help.js50
-rw-r--r--view/tpl/help.tpl21
2 files changed, 5 insertions, 66 deletions
diff --git a/view/js/mod_help.js b/view/js/mod_help.js
index 9c3591498..e2b1f4785 100644
--- a/view/js/mod_help.js
+++ b/view/js/mod_help.js
@@ -69,54 +69,4 @@ $(document).ready(function () {
var newref = p.protocol + '//' + p.hostname + portstr + p.pathname + p.hash.split('?').shift();
location.replace(newref)
}
-
-
- // Determine language translations available from the language selector menu itself
- var langChoices = [];
- $('.lang-selector').find('.lang-choice').each(function (idx, a) {
- langChoices.push($(a).html());
- });
- // Parse the URL and insert the language code for the loaded language, based
- // on the variable "help_language" that is declared in the help.tpl page template
- var path = window.location.pathname.split('/');
- var pathParts = [];
- var pick_me = true;
- for (var i = 0; i < path.length; i++) {
- if(i === 2 && pick_me ) {
- if(path[i].length > 0) {
- pathParts.push(help_language);
- pick_me = false;
- if($.inArray(path[i], langChoices) < 0) {
- i--;
- }
- }
- } else {
- if(path[i].length > 0) {
- pathParts.push(path[i]);
- }
- }
-
- }
- // Update the address bar to reflect the loaded language
- window.history.replaceState({}, '', '/' + pathParts.join('/'));
-
- // Highlight the language in the language selector that is currently viewed
- $('.lang-selector').find('.lang-choice:contains("' + help_language + '")').addClass('active');
-
- // Construct the links to the available translations based and populate the selector menu
- $('.lang-selector').find('.lang-choice').each(function (idx, a) {
- var langLink = [];
-
- for (var i = 0; i < pathParts.length; i++) {
-
- if(i === 1) {
- langLink.push($(a).html());
- } else {
- langLink.push(pathParts[i]);
- }
-
- }
- $(a).attr('href', '/' + langLink.join('/'));
- });
-
});
diff --git a/view/tpl/help.tpl b/view/tpl/help.tpl
index ba61a43ce..0dc9bc686 100644
--- a/view/tpl/help.tpl
+++ b/view/tpl/help.tpl
@@ -1,20 +1,12 @@
<div id="help-content" class="generic-content-wrapper">
<div class="clearfix section-title-wrapper">
- <div class="float-end">
- <div class="btn-group">
- <button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-bs-toggle="dropdown">
- <i class="fa fa-language" style="font-size: 1.4em;"></i>
- </button>
- <div class="dropdown-menu dropdown-menu-end flex-column lang-selector">
- <a class="dropdown-item lang-choice" href="/help">de</a>
- <a class="dropdown-item lang-choice" href="/help">en</a>
- <a class="dropdown-item lang-choice" href="/help">es</a>
- <a class="dropdown-item lang-choice" href="/help">fr</a>
- </div>
- </div>
- </div>
<h2>{{$module->get_page_title()}}</h2>
</div>
+ {{if $module->missing_translation()}}
+ <div class="notice section-content-info-wrapper">
+ {{$module->missing_translation_message()}}
+ </div>
+ {{/if}}
<div class="section-content-wrapper" id="doco-content">
<h3 id="doco-top-toc-heading">
<span class="fakelink" onclick="docoTocToggle(); return false;">
@@ -26,6 +18,3 @@
{{$module->render_content()}}
</div>
</div>
-<script>
- var help_language = '{{$module->lang["language"]}}'
-</script>