You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2014/01/21 23:09:35 UTC
[20/22] git commit: [#6393] Remove download button from default wik
text
[#6393] Remove download button from default wik text
Signed-off-by: Tim Van Steenburgh <tv...@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/b92873ce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b92873ce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b92873ce
Branch: refs/heads/tv/6393
Commit: b92873cefa927abd215c0f4eb1990006d14dbc39
Parents: 6c96721
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Tue Jan 21 21:43:58 2014 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Jan 21 21:52:59 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/b92873ce/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 7a90a3b..ce1e2b7 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):