Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

set up a bunch of skeleton stuff for the actual control flow. Most wi…

…ll likely be killed once I really know how this works, but this is a good starting point for thinking about the right control flow
  • Loading branch information...
commit a03573f6d06aed2c5923ed4aa988c9ef46b8a96a 1 parent 264a4be
@cewing cewing authored
View
9 src/eastofeaton/pay2plone/browser/admin.py
@@ -0,0 +1,9 @@
+from zope.publisher.browser import BrowserView
+
+
+class AddSite(BrowserView):
+ pass
+
+
+class FinishSite(BrowserView):
+ pass
View
7 src/eastofeaton/pay2plone/browser/callback.py
@@ -0,0 +1,7 @@
+from zope.publisher.browser import BrowserView
+
+
+class PaymentCallback(BrowserView):
+
+ view_title = "Welcome Back"
+ view_description = "The easiest way to Plone"
View
40 src/eastofeaton/pay2plone/browser/configure.zcml
@@ -0,0 +1,40 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+ xmlns:browser="http://namespaces.zope.org/browser"
+ xmlns:five="http://namespaces.zope.org/five">
+
+ <!-- pick a site, press 'pay' -->
+ <browser:page
+ for="Products.CMFPlone.interfaces.IPloneSiteRoot"
+ name="pay2plone"
+ class="eastofeaton.pay2plone.browser.listing.TemplateListings"
+ template="template_listing.pt"
+ permission="zope2.View"
+ />
+
+ <!-- back from paypal, success or failure -->
+ <browser:page
+ for="Products.CMFPlone.interfaces.IPloneSiteRoot"
+ name="pay2plone_callback"
+ class="eastofeaton.pay2plone.browser.callback.PaymentCallback"
+ template="payment_callback.pt"
+ permission="zope2.View"
+ />
+
+ <!-- on success, forward to here to start site installation -->
+ <browser:page
+ for="OFS.interfaces.IApplication"
+ name="pay2plone_addsite"
+ class="eastofeaton.pay2plone.browser.admin.AddSite"
+ template="addsite.pt"
+ permission="zope2.View"
+ />
+
+ <!-- after site is successfully installed, go here to be forwarded to new site -->
+ <browser:page
+ for="OFS.interfaces.IApplication"
+ name="pay2plone_finishsite"
+ class="eastofeaton.pay2plone.browser.admin.FinishSite"
+ permission="zope2.View"
+ />
+
+</configure>
View
7 src/eastofeaton/pay2plone/browser/listing.py
@@ -0,0 +1,7 @@
+from zope.publisher.browser import BrowserView
+
+
+class TemplateListings(BrowserView):
+
+ view_title = "Pay-2-Plone"
+ view_description = "The easiest way to Plone"
View
37 src/eastofeaton/pay2plone/browser/payment_callback.pt
@@ -0,0 +1,37 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ xmlns:tal="http://xml.zope.org/namespaces/tal"
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
+ xml:lang="en" lang="en"
+ i18n:domain="plone"
+ metal:use-macro="here/main_template/macros/master">
+
+ <head>
+
+ <metal:block fill-slot="top_slot">
+ <tal:insert tal:replace="nothing"
+ tal:define="dummy python:request.set('disable_border', 1)" />
+ </metal:block>
+
+ </head>
+
+ <body>
+
+ <metal:content-title fill-slot="content-title">
+ <h1 class="documentFirstHeading">
+ <span tal:replace="view/view_title">
+ [Listing Page Title]
+ </span>
+ </h1>
+ </metal:content-title>
+
+ <metal:content-description fill-slot="content-description">
+ <div class="documentDescription">
+ <span tal:replace="view/view_description">
+ [Listing Page Description]
+ </span>
+ </div>
+ </metal:content-description>
+
+ </body>
+</html>
View
37 src/eastofeaton/pay2plone/browser/template_listing.pt
@@ -0,0 +1,37 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ xmlns:tal="http://xml.zope.org/namespaces/tal"
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
+ xml:lang="en" lang="en"
+ i18n:domain="plone"
+ metal:use-macro="here/main_template/macros/master">
+
+ <head>
+
+ <metal:block fill-slot="top_slot">
+ <tal:insert tal:replace="nothing"
+ tal:define="dummy python:request.set('disable_border', 1)" />
+ </metal:block>
+
+ </head>
+
+ <body>
+
+ <metal:content-title fill-slot="content-title">
+ <h1 class="documentFirstHeading">
+ <span tal:replace="view/view_title">
+ [Listing Page Title]
+ </span>
+ </h1>
+ </metal:content-title>
+
+ <metal:content-description fill-slot="content-description">
+ <div class="documentDescription">
+ <span tal:replace="view/view_description">
+ [Listing Page Description]
+ </span>
+ </div>
+ </metal:content-description>
+
+ </body>
+</html>
View
3  src/eastofeaton/pay2plone/configure.zcml
@@ -7,7 +7,8 @@
i18n_domain="eastofeaton.pay2plone">
<!-- <five:registerPackage package="." initialize=".initialize" /> -->
-
+
+ <include package=".browser" />
<include package=".exportimport" />
<genericsetup:registerProfile
View
4 src/eastofeaton/pay2plone/testing.py
@@ -32,8 +32,6 @@ def setUpPloneSite(self, portal):
name="EastofeatonPay2Plone:Functional")
-
-
class Pay2PloneZCMLLayer(ExportImportZCMLLayer):
@classmethod
@@ -48,4 +46,4 @@ def setUp(cls):
from Products.Five import zcml
import eastofeaton.pay2plone
- zcml.load_config('configure.zcml', eastofeaton.pay2plone)
+ zcml.load_config('configure.zcml', eastofeaton.pay2plone)
Please sign in to comment.
Something went wrong with that request. Please try again.