incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [24/24] git commit: [#6393] Remove download button from default wiki text
Date Wed, 22 Jan 2014 21:39:42 GMT
[#6393] Remove download button from default wiki text

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a2bc2dd6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a2bc2dd6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a2bc2dd6

Branch: refs/heads/cj/7002
Commit: a2bc2dd6444f1271a59ace9bf956c57b1c5072b7
Parents: 586eb2c
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Tue Jan 21 21:43:58 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Jan 22 19:36:00 2014 +0000

----------------------------------------------------------------------
 ForgeWiki/forgewiki/wiki_main.py | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a2bc2dd6/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 2709733..01a6008 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -146,6 +146,16 @@ class ForgeWikiApp(Application):
             if globals is not None:
                 session(globals).flush(globals)
 
+    def default_root_page_text(self):
+        return """Welcome to your wiki!
+
+This is the default page, edit it as you see fit. To add a new page simply reference it within
brackets, e.g.: [SamplePage].
+
+The wiki uses [Markdown](%s) syntax.
+
+[[members limit=20]]
+""" % (self.url + 'markdown_syntax/')
+
     @Property
     def show_discussion():
         def fget(self):
@@ -272,16 +282,7 @@ class ForgeWikiApp(Application):
             with h.push_config(c, app=self):
                 p = WM.Page.upsert(new_root)
                 p.viewable_by = ['all']
-                url = c.app.url + 'markdown_syntax' + '/'
-                p.text = """Welcome to your wiki!
-
-This is the default page, edit it as you see fit. To add a new page simply reference it within
brackets, e.g.: [SamplePage].
-
-The wiki uses [Markdown](%s) syntax.
-
-[[members limit=20]]
-[[download_button]]
-""" % url
+                p.text = self.default_root_page_text()
                 p.commit()
 
     def uninstall(self, project):


Mime
View raw message