Add a new "About" menu choice to allow the user access to the kimchi version and
build number.
Signed-off-by: Adam King <rak(a)linux.vnet.ibm.com>
---
ui/css/theme-default/about.css | 21 +++++++++++++++++++++
ui/css/theme-default/topbar.css | 1 +
ui/images/theme-default/logo-plain.gif | Bin 0 -> 1601 bytes
ui/js/src/kimchi.main.js | 4 ++++
ui/pages/kimchi-ui.html.tmpl | 27 +++++++++++++++++++++++++++
5 files changed, 53 insertions(+)
create mode 100644 ui/css/theme-default/about.css
create mode 100644 ui/images/theme-default/logo-plain.gif
diff --git a/ui/css/theme-default/about.css b/ui/css/theme-default/about.css
new file mode 100644
index 0000000..577b403
--- /dev/null
+++ b/ui/css/theme-default/about.css
@@ -0,0 +1,21 @@
+/*
+ * Project Kimchi
+ *
+ * Copyright IBM, Corp. 2014
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+.about-window {
+ width: 350px;
+ height: 300px;
+}
diff --git a/ui/css/theme-default/topbar.css b/ui/css/theme-default/topbar.css
index 7180cd5..aed4f3f 100644
--- a/ui/css/theme-default/topbar.css
+++ b/ui/css/theme-default/topbar.css
@@ -155,6 +155,7 @@
color: black;
padding: 12px 18px;
white-space: nowrap;
+ line-height: 12px;
}
.user-menu-item {
diff --git a/ui/images/theme-default/logo-plain.gif
b/ui/images/theme-default/logo-plain.gif
new file mode 100644
index 0000000000000000000000000000000000000000..4fd30d56db7951bb3efda43ea250d6335a49e40a
GIT binary patch
literal 1601
zcmV-H2EO@6Nk%w1VK@LV0O$VzKmbEr00~J35jh7#M*>Y%1`#(4IBozFF%L973_wW_
z7ghyYe*hOg6C7axb3+pvHW(m?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
+++ b/ui/js/src/kimchi.main.js
@@ -204,6 +204,10 @@ kimchi.main = function() {
kimchi.message.error(err.responseJSON.reason);
});
});
+ $('#btn-about').on('click', function(event) {
+ kimchi.window.open({"content": $('#about-tmpl').html()});
+ event.preventDefault();
+ });
$('#btn-help').on('click', kimchi.getHelp);
};
diff --git a/ui/pages/kimchi-ui.html.tmpl b/ui/pages/kimchi-ui.html.tmpl
index eb3cd9d..9561e14 100644
--- a/ui/pages/kimchi-ui.html.tmpl
+++ b/ui/pages/kimchi-ui.html.tmpl
@@ -21,6 +21,7 @@
#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang)
#silent _ = t.gettext
#silent _t = t.gettext
+#from kimchi.config import get_version
<!DOCTYPE html>
<html lang="$lang.lang[0]">
<head>
@@ -77,6 +78,9 @@
<div class="action-panel popover right-side">
<a id="btn-help" class="user-menu-item"
href="javascript:void(0);">$_("Help")</a>
<br/>
+ <br/>
+ <a id="btn-about" class="user-menu-item"
href="javascript:void(0);">$_("About")</a>
+ <br/>
<hr/>
<a id="btn-logout" class="user-menu-item"
href="javascript: void(0);">$_("Log out")</a>
</div>
@@ -101,5 +105,28 @@
<p><code>make</code></p>
</div>
</div>
+
+<script id="about-tmpl" type="kimchi/template">
+ <div class="window about-window">
+ <header>
+ <h1 class="title"><img alt="Kimchi logo"
src="/images/logo.ico"/> $_("About")</h1>
+ <div class="close">X</div>
+ </header>
+ <div class="content" align="center">
+ <center>
+ <div>
+ <br/>
+ <br/>
+ <img src="/images/theme-default/logo-plain.gif"/>
+ <br/>
+ <br/>
+ <h2>Kimchi</h2>
+ <p>Version: $get_version()</p>
+ </div>
+ </center>
+ </div>
+ </div>
+</script>
+
</body>
</html>
--
1.9.0