1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
<!-- jQuery -->
<script src="{{pathto('_static/js/jquery-3.2.1.min.js', 1)}}"></script>
<!-- Bootstrap JavaScript -->
<script src="{{pathto('_static/js/bootstrap.min.js', 1)}}"></script>
<!-- The rest of the JS -->
<script src="{{pathto('_static/js/navigation.js', 1)}}"></script>
<!-- Docs JS -->
<script src="{{pathto('_static/js/docs.js', 1)}}"></script>
<!-- Javascript for page -->
<script>
/* Build a description of this page including SHA, source location on git
* repo, build time and the project's launchpad bug tag. Set the HREF of the
* bug buttons
*/
{%- if bug_project %}
var lineFeed = "%0A";
var gitURL = "Source: Can't derive source file URL";
/* there have been cases where "pagename" wasn't set; better check for it */
{%- if pagename %}
/* "giturl" is the URL of the source file on Git and is auto-generated by
* openstackdocstheme.
*
* "pagename" is a standard sphinx parameter containing the name of
* the source file, without extension.
*/
var sourceFile = "{{ pagename }}" + ".rst";
gitURL = "Source: {{ giturl }}" + "/" + sourceFile;
{%- endif %}
/* gitsha, project and bug_tag rely on variables in conf.py */
var gitSha = "SHA: {{ gitsha }}";
var repositoryName = "{{ repository_name }}";
var bugProject = "{{ bug_project }}";
{%- if bug_title %}
var bugTitle = "{{ bug_title }}";
{%- else %}
var bugTitle = "{{ title|striptags }} in {{ project }}";
{%- endif %}
var fieldTags = "{{ bug_tag }}";
{%- if use_storyboard %}
var useStoryboard = "{{ use_storyboard }}";
{%- else %}
var useStoryboard = "";
{%- endif %}
/* "last_updated" is the build date and time. It relies on the
conf.py variable "html_last_updated_fmt", which should include
year/month/day as well as hours and minutes */
var buildstring = "Release: {{ release }} on {{ last_updated }}";
var fieldComment = encodeURI(buildstring) +
lineFeed + encodeURI(gitSha) +
lineFeed + encodeURI(gitURL) ;
logABug(bugTitle, bugProject, fieldComment, fieldTags, repositoryName, useStoryboard);
{%- endif %}
{%- if pdf_link %}
var currentSourceFile = "{{ pagename }}";
var pdfFileName = "{{ pdf_filename }}";
pdfLink(currentSourceFile, pdfFileName);
{%- endif %}
</script>
|