Project import generated by Copybara.
GitOrigin-RevId: d9e9e3fb4e31372ec1fb43b178994ca78fa8fe70
diff --git a/templates/framework/footer-shared.ezt b/templates/framework/footer-shared.ezt
new file mode 100644
index 0000000..9630e4c
--- /dev/null
+++ b/templates/framework/footer-shared.ezt
@@ -0,0 +1,107 @@
+[# This template displays the part of the footer used by both web components and EZT pages. ]
+
+<div id="footer">
+ [if-any old_ui_url]
+ <a href="[old_ui_url]">
+ View in the old UI
+ </a>
+ [else][if-any new_ui_url]
+ <a href="[new_ui_url]">
+ View in the new UI
+ </a>
+ [end][end]
+ [is projectname "fuchsia"]
+ <a href="https://bugs.fuchsia.dev/p/fuchsia/issues/entry?template=Report+Community+Abuse" title="Monorail [app_version]">Report Abuse</a>
+ [end]
+ <a href="https://bugs.chromium.org/p/monorail/adminIntro" title="Monorail [app_version]">About Monorail</a>
+ <a href="https://chromium.googlesource.com/infra/infra/+/main/appengine/monorail/doc/userguide/README.md">User Guide</a>
+ <a href="https://chromium.googlesource.com/infra/infra/+/main/appengine/monorail/doc/release-notes.md">Release Notes</a>
+ <a href="https://bugs.chromium.org/p/monorail/issues/entry?template=Online%20Feedback" target="_blank">Feedback on Monorail</a>
+ <a href="https://chromium.googlesource.com/infra/infra/+/main/appengine/monorail/doc/terms.md">Terms</a>
+ <a href="https://www.google.com/policies/privacy/">Privacy</a>
+</div>
+
+[include "debug.ezt"]
+
+[include "../webpack-out/ezt-footer-scripts-package.ezt"]
+
+<script type="module" nonce="[nonce]">
+// Load and instantiate pRPC client before any other script.
+window.prpcClient = new AutoRefreshPrpcClient(
+ CS_env.token, CS_env.tokenExpiresSec);
+</script>
+
+[if-any is_ezt]
+ <script type="text/javascript" defer src="[version_base]/static/js/framework/externs.js" nonce="[nonce]"></script>
+ <script type="text/javascript" defer src="[version_base]/static/js/framework/env.js" nonce="[nonce]"></script>
+ <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-ajax.js" nonce="[nonce]"></script>
+ <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-cues.js" nonce="[nonce]"></script>
+ <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-display.js" nonce="[nonce]"></script>
+ <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-menu.js" nonce="[nonce]"></script>
+ <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-myhotlists.js" nonce="[nonce]"></script>
+ <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-stars.js" nonce="[nonce]"></script>
+ <script type="text/javascript" defer src="[version_base]/static/js/framework/project-name-check.js" nonce="[nonce]"></script>
+ <script type="text/javascript" defer src="[version_base]/static/js/graveyard/xmlhttp.js" nonce="[nonce]"></script>
+[end]
+[include "footer-script.ezt"]
+
+
+[if-any is_ezt]
+ <script type="text/javascript" nonce="[nonce]">
+ runOnLoad(function() {
+ var toggles = document.getElementsByClassName("toggleHidden");
+ for (var i = 0; i < toggles.length; ++i) {
+ var toggle = toggles[[]i];
+ toggle.addEventListener("click", function (event) {
+ _toggleHidden(event.target);
+ event.preventDefault();
+ });
+ }
+
+ toggles = document.getElementsByClassName("toggleCollapse");
+ for (var i = 0; i < toggles.length; ++i) {
+ var toggle = toggles[[]i];
+ toggle.addEventListener("click", function (event) {
+ _toggleCollapse(event.target);
+ event.preventDefault();
+ });
+ }
+
+ [if-any form_token]
+ var tokenFields = document.querySelectorAll("input[[]name=token]");
+ for (var i = 0; i < tokenFields.length; ++i) {
+ var field = tokenFields[[]i];
+ field.form.addEventListener("submit", function(event) {
+ refreshTokens(
+ event, "[form_token]", "[form_token_path]", [token_expires_sec]);
+ });
+ }
+ [end]
+
+ [if-any project]
+ _fetchUserProjects(false);
+ [end]
+ _onload();
+
+ });
+ </script>
+[else]
+ <script type="text/javascript" nonce="[nonce]">
+ runOnLoad(function() {
+ TKR_install_ac();
+ });
+ </script>
+[end]
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+ // CrDX Feedback Button
+ (function(i,s,o,g,r,a,m){i[[]'CrDXObject']=r;i[[]r]=i[[]r]||function(){
+ (i[[]r].q=i[[]r].q||[]).push(arguments)},a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.setAttribute('nonce','[nonce]');
+ a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','https://storage.googleapis.com/chops-feedback/feedback.js','crdx');
+
+ crdx('setFeedbackButtonLink', 'https://bugs.chromium.org/p/monorail/issues/entry?template=Online%20Feedback');
+});
+</script>