Skip to content
Snippets Groups Projects
Select Git revision
  • eb4aaa2ff9b8e6e1717336d49cc705d29d52bf30
  • master default protected
2 results

README.md

Blame
  • main.html 826 B
    {% extends "base.html" %}
    
    {% block announce %}
    <label for="version">Version</label>
    <select style="margin-left:8px;" id="version" name="version" onchange="switchVersion(this.options[this.selectedIndex].value)">
        <option value="latest">latest</option>
        <option value="1.4">1.4</option>
        <option value="1.3">1.3</option>
    </select>
    <script>
        function getVersion() {
            const segments = location.pathname.split('/')
            if (segments.length >= 4) {
                return segments[3]
            } else {
                return '1.4'
            }
        }
        function switchVersion(value) {
            if (!value) { return }
            this.location.href = location.protocol + '//' + location.host + '/infrastructures/dbrepo/' + value + '/'
        }
        document.getElementById("version").value = getVersion()
    </script>
    {% endblock %}