Skip to content
Snippets Groups Projects
Commit 903dee3f authored by Shane Tomlinson's avatar Shane Tomlinson
Browse files

Add a link to the repo and current source in the top level of each served up HTML resource.

* in each top level layout or ejs template, include a link to a partial that contains the license.
* The bottom of the license contains a link to the repo and the current SHA's commit.
parent a55dfb78
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,8 @@ und = require('underscore'), ...@@ -13,7 +13,8 @@ und = require('underscore'),
util = require('util'), util = require('util'),
httputils = require('../httputils.js'), httputils = require('../httputils.js'),
etagify = require('etagify'), etagify = require('etagify'),
secrets = require('../secrets'); secrets = require('../secrets'),
version = require('../version');
require("jwcrypto/lib/algs/rs"); require("jwcrypto/lib/algs/rs");
...@@ -43,6 +44,12 @@ function renderCachableView(req, res, template, options) { ...@@ -43,6 +44,12 @@ function renderCachableView(req, res, template, options) {
options.enable_development_menu = config.get('enable_development_menu'); options.enable_development_menu = config.get('enable_development_menu');
// The real version number is not ready until sometime after initial load,
// until it is ready a fake randomly generated string is used. Go get
// the real SHA whenever it is actually needed so that the randomly
// generated SHA is not returned to the user.
options.commit = version();
res.local('util', util); res.local('util', util);
res.render(template, options); res.render(template, options);
} }
......
<!DOCTYPE html> <!DOCTYPE html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public <%- partial('partial/license_with_code_ver') %>
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
......
<!DOCTYPE html> <!DOCTYPE html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public <%- partial('partial/license_with_code_ver') %>
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html> <html>
<head><title>non-interactive iframe</title> <head><title>non-interactive iframe</title>
<meta charset="utf-8"> <meta charset="utf-8">
......
<!DOCTYPE html> <!DOCTYPE html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public <%- partial('partial/license_with_code_ver') %>
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html LANG="<%= lang %>" dir="<%= lang_dir %>"> <html LANG="<%= lang %>" dir="<%= lang_dir %>">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
......
<!DOCTYPE html> <!DOCTYPE html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public <%- partial('partial/license_with_code_ver') %>
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
......
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
- Source: https://github.com/mozilla/browserid/
- Current Commit: https://github.com/mozilla/browserid/commit/<%- commit %>
-->
<!DOCTYPE html> <!DOCTYPE html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public <%- partial('partial/license_with_code_ver') %>
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment