[Kimchi-devel] [PATCH v2] [Wok 1/2] Issue #114: Help page for "Settings" tab

sureshab at linux.vnet.ibm.com sureshab at linux.vnet.ibm.com
Thu May 19 08:58:12 UTC 2016


From: Suresh Babu Angadi <sureshab at in.ibm.com>

made changes in config to add '/help' uri
made Makefile.am and configure.ac changes to
add "help" directory
added makefiles for "help" and "en_Us" directory

Signed-off-by: Suresh Babu Angadi <sureshab at in.ibm.com>
---
 configure.ac                    |  2 ++
 src/wok/config.py.in            |  6 ++++++
 tests/test_config.py.in         |  5 +++++
 ui/pages/Makefile.am            |  2 +-
 ui/pages/help/Makefile.am       | 37 +++++++++++++++++++++++++++++++++++++
 ui/pages/help/en_US/Makefile.am | 26 ++++++++++++++++++++++++++
 6 files changed, 77 insertions(+), 1 deletion(-)
 create mode 100644 ui/pages/help/Makefile.am
 create mode 100644 ui/pages/help/en_US/Makefile.am

diff --git a/configure.ac b/configure.ac
index 8b35de6..002774d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -143,7 +143,9 @@ AC_CONFIG_FILES([
     ui/libs/list-js/Makefile
     ui/libs/typeahead/Makefile
     ui/pages/Makefile
+    ui/pages/help/Makefile
     ui/pages/tabs/Makefile
+    ui/pages/help/en_US/Makefile
     ui/config/Makefile
     contrib/Makefile
     contrib/DEBIAN/Makefile
diff --git a/src/wok/config.py.in b/src/wok/config.py.in
index 1b0e7bd..fd30fd6 100644
--- a/src/wok/config.py.in
+++ b/src/wok/config.py.in
@@ -218,6 +218,12 @@ class WokConfig(dict):
             'tools.staticfile.on': True,
             'tools.staticfile.filename': '%s/robots.txt' % paths.ui_dir
         },
+        '/help': {
+            'tools.staticdir.on': True,
+            'tools.nocache.on': True,
+            'tools.staticdir.dir': os.path.join(paths.ui_dir,
+                                                'pages/help')
+        },
     }
 
     def __init__(self):
diff --git a/tests/test_config.py.in b/tests/test_config.py.in
index b221d18..9b8c851 100644
--- a/tests/test_config.py.in
+++ b/tests/test_config.py.in
@@ -111,6 +111,11 @@ class ConfigTests(unittest.TestCase):
                 'tools.staticfile.on': True,
                 'tools.staticfile.filename': '%s/robots.txt' % paths.ui_dir
             },
+            '/help': {
+                'tools.staticdir.on': True,
+                'tools.nocache.on': True,
+                'tools.staticdir.dir': '%s/pages/help' % paths.ui_dir
+            },
             '/libs': {
                 'tools.wokauth.on': False,
                 'tools.nocache.on': False,
diff --git a/ui/pages/Makefile.am b/ui/pages/Makefile.am
index 5b8370d..dde6026 100644
--- a/ui/pages/Makefile.am
+++ b/ui/pages/Makefile.am
@@ -17,7 +17,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-SUBDIRS = tabs
+SUBDIRS = help tabs
 
 htmldir = $(datadir)/wok/ui/pages
 
diff --git a/ui/pages/help/Makefile.am b/ui/pages/help/Makefile.am
new file mode 100644
index 0000000..121f9a8
--- /dev/null
+++ b/ui/pages/help/Makefile.am
@@ -0,0 +1,37 @@
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2016
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+
+SUBDIRS = en_US
+
+DITA_HTML_FILES = $(patsubst %.dita,%.html,$(wildcard */*.dita))
+HTML_FILES = $(if $(DITA_HTML_FILES), $(DITA_HTML_FILES), $(wildcard */*.html))
+DITA_XSL_FILE = dita-help.xsl
+
+EXTRA_DIST = $(DITA_XSL_FILE)
+
+helpdir = $(datadir)/wok/ui/pages/help
+
+dist_help_DATA = wok.css
+
+all: $(HTML_FILES) $(wildcard */*.dita)
+
+%.html: %.dita $(DITA_XSL_FILE)
+	xsltproc -o $@ $(DITA_XSL_FILE) $<
+
+CLEANFILES = $(HTML_FILES)
diff --git a/ui/pages/help/en_US/Makefile.am b/ui/pages/help/en_US/Makefile.am
new file mode 100644
index 0000000..f2ab607
--- /dev/null
+++ b/ui/pages/help/en_US/Makefile.am
@@ -0,0 +1,26 @@
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2016
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+
+en_US_helpdir = $(datadir)/wok/ui/pages/help/en_US
+
+dist_en_US_help_DATA = $(wildcard *.html) $(NULL)
+
+EXTRA_DIST = $(wildcard *.dita)
+
+CLEANFILES = $(wildcard *.html)
-- 
2.1.0




More information about the Kimchi-devel mailing list