[Pki-devel] [PATCH] 577 Parameterized service.template in all subsystems.

Endi Sukma Dewata edewata at redhat.com
Wed Apr 22 02:55:26 UTC 2015


https://fedorahosted.org/pki/ticket/1296

-- 
Endi S. Dewata
-------------- next part --------------
From 18cb997398a076edf477446d4e75041092b15630 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata at redhat.com>
Date: Tue, 21 Apr 2015 22:05:10 -0400
Subject: [PATCH] Parameterized service.template in all subsystems.

https://fedorahosted.org/pki/ticket/1296
---
 base/ca/shared/webapps/ca/services.template      |   5 +-
 base/kra/shared/webapps/kra/services.template    |  30 ++++++-
 base/ocsp/shared/webapps/ocsp/services.template  |  30 ++++++-
 base/tks/shared/webapps/tks/services.template    |  30 ++++++-
 base/tps/shared/webapps/tps/services.template    | 106 -----------------------
 dogtag/common-ui/shared/kra/services.properties  |   2 +
 dogtag/common-ui/shared/ocsp/services.properties |   2 +
 dogtag/common-ui/shared/tks/services.properties  |   2 +
 8 files changed, 93 insertions(+), 114 deletions(-)
 delete mode 100644 base/tps/shared/webapps/tps/services.template
 create mode 100644 dogtag/common-ui/shared/kra/services.properties
 create mode 100644 dogtag/common-ui/shared/ocsp/services.properties
 create mode 100644 dogtag/common-ui/shared/tks/services.properties

diff --git a/base/ca/shared/webapps/ca/services.template b/base/ca/shared/webapps/ca/services.template
index fc855901746776d64cda5b480ad3de6bf3f005bf..648ffd8a9a1c605139b435e653e2b824def781c8 100644
--- a/base/ca/shared/webapps/ca/services.template
+++ b/base/ca/shared/webapps/ca/services.template
@@ -17,6 +17,7 @@
      --- END COPYRIGHT BLOCK --- -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
+<head>
 <script type="text/javascript" language="JavaScript" src="/pki/js/jquery.js"></script>
 <script type="text/javascript" language="JavaScript" src="/pki/js/jquery.i18n.properties.js"></script>
 
@@ -49,11 +50,11 @@ $(function() {
 
 <div id="header">
     <span class="message" name="logo">
-    <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="/pki/images/logo_header.gif" alt="Dogtag" id="myLogo" /></a>
+    <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Certificate System products and services"><img src="/pki/images/logo_header.gif" alt="Certificate System" id="myLogo" /></a>
     </span>
     <div id="headertitle">
     <span class="message" name="title">
-    <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">®</font></sup> Certificate System</a>
+    <a href="/" title="Certificate System">Certificate System</a>
     </span>
     </div>
     <div id="account">
diff --git a/base/kra/shared/webapps/kra/services.template b/base/kra/shared/webapps/kra/services.template
index 392c714dae45481cce56d756fd14a029ec43f373..3b9f4ee4828d1caf296cb2554ba2c5cc72018341 100644
--- a/base/kra/shared/webapps/kra/services.template
+++ b/base/kra/shared/webapps/kra/services.template
@@ -17,6 +17,28 @@
      --- END COPYRIGHT BLOCK --- -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
+<head>
+<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.js"></script>
+<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.i18n.properties.js"></script>
+
+<script type="text/javascript" language="JavaScript">
+$(function() {
+    $.i18n.properties({
+        name: 'services',
+        language: ' ', // suppress potential 404's due to .i18n.browserLang()
+        path: '/pki/kra/',
+        mode: 'map',
+        callback: function() {
+            var key;
+            for (key in $.i18n.map) {
+                var message = $.i18n.prop(key);
+                $('span.message[name='+key+']').html(message);
+            }
+        }
+    });
+});
+</script>
+
 <CMS_TEMPLATE>
 <title>DRM Services</title>
     <link rel="shortcut icon" href="/pki/images/favicon.ico" />
@@ -27,9 +49,13 @@
 <body bgcolor="#FFFFFF" link="#666699" vlink="#666699" alink="#333366">
 
 <div id="header">
-    <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="/pki/images/logo_header.gif" alt="Dogtag" id="myLogo" /></a>
+    <span class="message" name="logo">
+    <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Certificate System products and services"><img src="/pki/images/logo_header.gif" alt="Certificate System" id="myLogo" /></a>
+    </span>
     <div id="headertitle">
-    <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">®</font></sup> Certificate System</a>
+    <span class="message" name="title">
+    <a href="/" title="Certificate System">Certificate System</a>
+    </span>
     </div>
     <div id="account">
           <dl><dt><span></span></dt><dd></dd></dl>
diff --git a/base/ocsp/shared/webapps/ocsp/services.template b/base/ocsp/shared/webapps/ocsp/services.template
index 4b45118891f0edf956d678cdaf69bae10b23a206..a34d75deb6c8fffcc08aa6664bc96c59e67c7916 100644
--- a/base/ocsp/shared/webapps/ocsp/services.template
+++ b/base/ocsp/shared/webapps/ocsp/services.template
@@ -17,6 +17,28 @@
      --- END COPYRIGHT BLOCK --- -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
+<head>
+<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.js"></script>
+<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.i18n.properties.js"></script>
+
+<script type="text/javascript" language="JavaScript">
+$(function() {
+    $.i18n.properties({
+        name: 'services',
+        language: ' ', // suppress potential 404's due to .i18n.browserLang()
+        path: '/pki/ocsp/',
+        mode: 'map',
+        callback: function() {
+            var key;
+            for (key in $.i18n.map) {
+                var message = $.i18n.prop(key);
+                $('span.message[name='+key+']').html(message);
+            }
+        }
+    });
+});
+</script>
+
 <CMS_TEMPLATE>
 <title>OCSP Services</title>
     <link rel="shortcut icon" href="/pki/images/favicon.ico" />
@@ -27,9 +49,13 @@
 <body bgcolor="#FFFFFF" link="#666699" vlink="#666699" alink="#333366">
 
 <div id="header">
-    <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="/pki/images/logo_header.gif" alt="Dogtag" id="myLogo" /></a>
+    <span class="message" name="logo">
+    <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Certificate System products and services"><img src="/pki/images/logo_header.gif" alt="Certificate System" id="myLogo" /></a>
+    </span>
     <div id="headertitle">
-    <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">®</font></sup> Certificate System</a>
+    <span class="message" name="title">
+    <a href="/" title="Certificate System">Certificate System</a>
+    </span>
     </div>
     <div id="account">
           <dl><dt><span></span></dt><dd></dd></dl>
diff --git a/base/tks/shared/webapps/tks/services.template b/base/tks/shared/webapps/tks/services.template
index 133bcf24b19119f724b9003e9e1f83194082ca1e..212374d7f113e789cd8c4bdf0a6690d202f5eb5a 100644
--- a/base/tks/shared/webapps/tks/services.template
+++ b/base/tks/shared/webapps/tks/services.template
@@ -17,6 +17,28 @@
      --- END COPYRIGHT BLOCK --- -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
+<head>
+<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.js"></script>
+<script type="text/javascript" language="JavaScript" src="/pki/js/jquery.i18n.properties.js"></script>
+
+<script type="text/javascript" language="JavaScript">
+$(function() {
+    $.i18n.properties({
+        name: 'services',
+        language: ' ', // suppress potential 404's due to .i18n.browserLang()
+        path: '/pki/tks/',
+        mode: 'map',
+        callback: function() {
+            var key;
+            for (key in $.i18n.map) {
+                var message = $.i18n.prop(key);
+                $('span.message[name='+key+']').html(message);
+            }
+        }
+    });
+});
+</script>
+
 <CMS_TEMPLATE>
 <title>TKS Services</title>
     <link rel="shortcut icon" href="/pki/images/favicon.ico" />
@@ -27,9 +49,13 @@
 <body bgcolor="#FFFFFF" link="#666699" vlink="#666699" alink="#333366">
 
 <div id="header">
-    <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="/pki/images/logo_header.gif" alt="Dogtag" id="myLogo" /></a>
+    <span class="message" name="logo">
+    <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Certificate System products and services"><img src="/pki/images/logo_header.gif" alt="Certificate System" id="myLogo" /></a>
+    </span>
     <div id="headertitle">
-    <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">®</font></sup> Certificate System</a>
+    <span class="message" name="title">
+    <a href="/" title="Certificate System">Certificate System</a>
+    </span>
     </div>
     <div id="account">
           <dl><dt><span></span></dt><dd></dd></dl>
diff --git a/base/tps/shared/webapps/tps/services.template b/base/tps/shared/webapps/tps/services.template
deleted file mode 100644
index c6792fea1ee01676197bcb798d9fc8a84825a2f1..0000000000000000000000000000000000000000
--- a/base/tps/shared/webapps/tps/services.template
+++ /dev/null
@@ -1,106 +0,0 @@
-<!-- --- BEGIN COPYRIGHT BLOCK ---
-     This program is free software; you can redistribute it and/or modify
-     it under the terms of the GNU General Public License as published by
-     the Free Software Foundation; version 2 of the License.
-
-     This program is distributed in the hope that it will be useful,
-     but WITHOUT ANY WARRANTY; without even the implied warranty of
-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-     GNU General Public License for more details.
-
-     You should have received a copy of the GNU General Public License along
-     with this program; if not, write to the Free Software Foundation, Inc.,
-     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-     Copyright (C) 2007 Red Hat, Inc.
-     All rights reserved.
-     --- END COPYRIGHT BLOCK --- -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<CMS_TEMPLATE>
-<title>TKS Services</title>
-    <link rel="shortcut icon" href="/pki/images/favicon.ico" />
-    <link rel="stylesheet" href="/pki/css/pki-base.css" type="text/css" />
-    <META http-equiv=Content-Type content="text/html; charset=UTF-8">
-
-</head>
-<body bgcolor="#FFFFFF" link="#666699" vlink="#666699" alink="#333366">
-
-<div id="header">
-    <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="/pki/images/logo_header.gif" alt="Dogtag" id="myLogo" /></a>
-    <div id="headertitle">
-    <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">®</font></sup> Certificate System</a>
-    </div>
-    <div id="account">
-          <dl><dt><span></span></dt><dd></dd></dl>
-    </div>
-</div>
-
-<div id="mainNavOuter">
-<div id="mainNav">
-<div id="mainNavInner">
-
-</div><!-- end mainNavInner -->
-</div><!-- end mainNav -->
-</div><!-- end mainNavOuter -->
-
-
-<div id="bar">
-
-<div id="systembar">
-<div id="systembarinner">
-
-<div>
-  -
-</div>
-
-
-</div>
-</div>
-
-</div>
-
-
-<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
-Certificate System TKS Services Page
-</font><br>
-<p>
-</font>
-<p>
-<center>
-<table border="0" cellspacing="0" cellpadding="0">
-<tr valign="TOP">
-<td> </td>
-<td> </td>
-</tr>
-<script language=javascript>
-for (var i=0; i<result.recordSet.length; ++i) {
-    document.write('<tr valign="TOP">');
-    document.write('<td>');
-    document.write('<td>');
-    document.write('<font size=4 face="PrimaSans BT, Verdana, sans-serif">');
-    document.write('<li><a href="');
-    document.write(result.recordSet[i].prefix + "://" +
-      result.recordSet[i].host + ":" + result.recordSet[i].port + "/"+
-      result.recordSet[i].uri);
-    if (result.recordSet[i].type == "admin") {
-        document.write('">Admin Services</a></font>');
-    } else if (result.recordSet[i].type == "agent") {
-        document.write('">Agent Services</a></font>');
-    } else if (result.recordSet[i].type == "ee") {
-        document.write('">SSL End Users Services</a></font>');
-    }
-
-    document.write('</font></td></tr>');
-}
-</script>
-<tr valign="TOP">
-<td> </td>
-<td> </td>
-</tr>
-</table>
-</center>
-<div id="footer">
-</div>
-</body>
-</html>
diff --git a/dogtag/common-ui/shared/kra/services.properties b/dogtag/common-ui/shared/kra/services.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e9a1b34da6dfd39763e02aa2756ae5ad52ebfe55
--- /dev/null
+++ b/dogtag/common-ui/shared/kra/services.properties
@@ -0,0 +1,2 @@
+logo = <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="/pki/images/logo_header.gif" alt="Dogtag" id="myLogo" /></a>
+title = <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">®</font></sup> Certificate System</a>
diff --git a/dogtag/common-ui/shared/ocsp/services.properties b/dogtag/common-ui/shared/ocsp/services.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e9a1b34da6dfd39763e02aa2756ae5ad52ebfe55
--- /dev/null
+++ b/dogtag/common-ui/shared/ocsp/services.properties
@@ -0,0 +1,2 @@
+logo = <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="/pki/images/logo_header.gif" alt="Dogtag" id="myLogo" /></a>
+title = <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">®</font></sup> Certificate System</a>
diff --git a/dogtag/common-ui/shared/tks/services.properties b/dogtag/common-ui/shared/tks/services.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e9a1b34da6dfd39763e02aa2756ae5ad52ebfe55
--- /dev/null
+++ b/dogtag/common-ui/shared/tks/services.properties
@@ -0,0 +1,2 @@
+logo = <a href="http://pki.fedoraproject.org/" title="Visit pki.fedoraproject.org for more information about Dogtag products and services"><img src="/pki/images/logo_header.gif" alt="Dogtag" id="myLogo" /></a>
+title = <a href="/" title="Dogtag Network homepage">Dogtag<sup><font size="-2">®</font></sup> Certificate System</a>
-- 
1.9.3



More information about the Pki-devel mailing list