[Kimchi-devel] [PATCH] [Wok] Create file structure to Wok tab

Aline Manera alinefm at linux.vnet.ibm.com
Wed Feb 24 18:39:33 UTC 2016


Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
---
 IBM-license-blacklist            |  1 +
 configure.ac                     |  2 ++
 src/wok/config.py.in             |  6 ++++++
 ui/Makefile.am                   |  2 +-
 ui/config/Makefile.am            | 22 ++++++++++++++++++++++
 ui/config/tab-ext.xml            | 10 ++++++++++
 ui/pages/Makefile.am             |  2 ++
 ui/pages/tabs/Makefile.am        | 20 ++++++++++++++++++++
 ui/pages/tabs/settings.html.tmpl | 31 +++++++++++++++++++++++++++++++
 9 files changed, 95 insertions(+), 1 deletion(-)
 create mode 100644 ui/config/Makefile.am
 create mode 100644 ui/config/tab-ext.xml
 create mode 100644 ui/pages/tabs/Makefile.am
 create mode 100644 ui/pages/tabs/settings.html.tmpl

diff --git a/IBM-license-blacklist b/IBM-license-blacklist
index 133f119..7210b82 100644
--- a/IBM-license-blacklist
+++ b/IBM-license-blacklist
@@ -65,6 +65,7 @@ ui/css/src/vendor/compass-mixins/lib/compass/utilities/lists/.*.scss
 ui/css/src/vendor/compass-mixins/lib/compass/utilities/sprites/.*.scss
 ui/css/src/vendor/compass-mixins/lib/compass/utilities/tables/.*.scss
 ui/css/src/vendor/compass-mixins/lib/compass/utilities/text/.*.scss
+ui/config/tab-ext.xml
 ui/images/theme-default/.*.svg
 ui/libs/bootstrap-editable/LICENSE
 ui/libs/bootstrap-editable/dist/css/bootstrap-editable.css
diff --git a/configure.ac b/configure.ac
index 9925753..0a5ce80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,6 +142,8 @@ AC_CONFIG_FILES([
     ui/libs/list-js/Makefile
     ui/libs/typeahead/Makefile
     ui/pages/Makefile
+    ui/pages/tabs/Makefile
+    ui/config/Makefile
     contrib/Makefile
     contrib/DEBIAN/Makefile
     contrib/DEBIAN/control
diff --git a/src/wok/config.py.in b/src/wok/config.py.in
index 40fbcda..5138d13 100644
--- a/src/wok/config.py.in
+++ b/src/wok/config.py.in
@@ -188,6 +188,12 @@ class WokConfig(dict):
             'tools.sessions.timeout': SESSIONSTIMEOUT,
             'tools.wokauth.on': False
         },
+        '/ui/config/tab-ext.xml': {
+            'tools.staticfile.on': True,
+            'tools.staticfile.filename': os.path.join(paths.ui_dir,
+                                                      'config/tab-ext.xml'),
+            'tools.nocache.on': True
+        },
         '/base64/jquery.base64.js': {
             'tools.staticfile.on': True,
             'tools.staticfile.filename': '%s/base64/jquery.base64.js' %
diff --git a/ui/Makefile.am b/ui/Makefile.am
index c3ee649..07218dc 100644
--- a/ui/Makefile.am
+++ b/ui/Makefile.am
@@ -17,7 +17,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-SUBDIRS = base64 css images js libs pages
+SUBDIRS = base64 css images js libs pages config
 
 uidir = $(datadir)/wok/ui
 
diff --git a/ui/config/Makefile.am b/ui/config/Makefile.am
new file mode 100644
index 0000000..a723dff
--- /dev/null
+++ b/ui/config/Makefile.am
@@ -0,0 +1,22 @@
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2016
+#
+# 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.
+
+xmldir = $(datadir)/wok/ui/config
+
+dist_xml_DATA = \
+	tab-ext.xml \
+	$(NULL)
diff --git a/ui/config/tab-ext.xml b/ui/config/tab-ext.xml
new file mode 100644
index 0000000..0b0e2b6
--- /dev/null
+++ b/ui/config/tab-ext.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<tabs-ext>
+    <functionality>Wok</functionality>
+    <tab>
+        <access role="admin" mode="admin"/>
+        <access role="user" mode="none"/>
+        <title>Settings</title>
+        <path>tabs/settings.html</path>
+    </tab>
+</tabs-ext>
diff --git a/ui/pages/Makefile.am b/ui/pages/Makefile.am
index 0b13c0d..5b8370d 100644
--- a/ui/pages/Makefile.am
+++ b/ui/pages/Makefile.am
@@ -17,6 +17,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+SUBDIRS = tabs
+
 htmldir = $(datadir)/wok/ui/pages
 
 dist_html_DATA = $(wildcard *.tmpl) $(NULL)
diff --git a/ui/pages/tabs/Makefile.am b/ui/pages/tabs/Makefile.am
new file mode 100644
index 0000000..351ba1b
--- /dev/null
+++ b/ui/pages/tabs/Makefile.am
@@ -0,0 +1,20 @@
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2013-2016
+#
+# 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.
+
+tabshtmldir = $(datadir)/wok/ui/pages/tabs
+
+dist_tabshtml_DATA = $(wildcard *.html.tmpl) $(NULL)
diff --git a/ui/pages/tabs/settings.html.tmpl b/ui/pages/tabs/settings.html.tmpl
new file mode 100644
index 0000000..811f147
--- /dev/null
+++ b/ui/pages/tabs/settings.html.tmpl
@@ -0,0 +1,31 @@
+#*
+* Project Wok
+*
+* Copyright IBM Corp, 2016
+*
+* 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.
+*#
+#unicode UTF-8
+#import gettext
+#from wok.cachebust import href
+#silent t = gettext.translation($lang.domain, $lang.localedir, languages=$lang.lang, fallback=True)
+#silent _ = t.gettext
+#silent _t = t.gettext
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<p>Content here</p>
+</body>
+</html>
-- 
2.5.0




More information about the Kimchi-devel mailing list