Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: g24at/g24.elements
base: 10b277e509
...
head fork: g24at/g24.elements
compare: 027e1434c1
  • 4 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jun 02, 2012
@thet thet add parent node and view it. looks the same as subsequent note. bette…
…r visual seperation necessary.
b8fc5b9
@thet thet print statements as long as it isnt clear, why they are called 7 time…
…s per request? maybe its the development mode, but i donna know. TODO: check with log messages in production mode
68b82a1
@thet thet more styling. e841dd3
Commits on Jun 03, 2012
@thet thet cleanup. make sharingbox an article, so the same styles apply (border…
… shadow was the reason). remove parent node again and add a link to the parent node instead. styling hover effect for article
027e143
View
13 src/g24/elements/browser/resources/views.css
@@ -4,13 +4,22 @@ ul.threadview li {
border-left:1px solid #EAEAEA; }
#sharingbox,
article.element {
+ background-color:white;
border-radius:0px 20px 5px 20px;
- border:1px solid grey;
+ border:1px solid black;
max-width:50em;
min-width:15em;
padding:1em 2em;
margin:1em 0; }
-article.element header h1 { margin:0 !important; }
+article.element header h1 { margin:0 !important; font-size:1.4em; }
+
+article.element {
+ box-shadow: 5px 5px 2px #888;
+}
+article.element:hover {
+ border-color:#0F0;
+ box-shadow: 5px 5px 2px #050;
+}
article.element img { max-width:100%; }
View
13 src/g24/elements/browser/threadview.pt
@@ -8,12 +8,21 @@
<body>
<metal:content-core fill-slot="content-core"><metal:block define-macro="content-core">
+
+<a href=""
+ tal:condition="view/parent_url"
+ tal:attributes="href view/parent_url"
+ title="go to the parent node">
+ bring me one level up!</a>
+
<ul class="threadview">
<li class="threadview-level-0">
- <tal:article replace="structure python:view.element_provider(context)"/>
- <tal:threadrunner replace="structure view/start_recurse"/>
+ <tal:article replace="structure python:view.element_provider(context)" />
+ <tal:threadrunner replace="structure view/start_recurse" />
</li>
</ul>
+
+
</metal:block></metal:content-core>
</body>
</html>
View
18 src/g24/elements/browser/threadview.py
@@ -1,3 +1,4 @@
+from Acquisition import aq_base, aq_inner, aq_parent
from Products.Five.browser import BrowserView
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from plone.app.layout.navigation.navtree import buildFolderTree
@@ -9,6 +10,20 @@
class ThreadView(BrowserView):
+ def __init__(self, context, request):
+ self.context = context
+ self.request = request
+
+ #parent = getattr(context, '__parent__', None)
+ #parent = self.context.getParentNode()
+ parent = aq_parent(self.context)
+ parent_url = None
+ if parent and IBasetype.providedBy(parent):
+ parent_url = parent.absolute_url()
+ self.parent_url = parent_url
+
+ print("ThreadView __init__ %s" % str(context))
+
def itemtree(self):
context = self.context
query = {}
@@ -17,14 +32,17 @@ def itemtree(self):
#query['path']['depth'] = BOTTOMLEVEL
query['sort_on'] = 'created'
query['sort_order'] = 'reverse'
+ print("ThreadView itemtree %s" % str(context))
return buildFolderTree(context, obj=context, query=query)
def start_recurse(self):
+ print("ThreadView start_recurse %s" % str(self.context))
return self.recurse(children=self.itemtree().get('children', []),
level=1, bottomLevel=self.bottomlevel)
def element_provider(self, context):
+ print("ThreadView element_provider %s" % str(context))
provider = getMultiAdapter((context, self.request, self),
IContentProvider,
name=u"element_provider")
View
6 src/g24/elements/sharingbox/form.pt
@@ -1,6 +1,6 @@
-<div xmlns="http://www.w3.org/1999/xhtml"
+<article xmlns="http://www.w3.org/1999/xhtml"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
i18n:domain="g24.elements"
- id="sharingbox">
+ id="sharingbox" class="element">
<tal:form replace="structure python:view.controller.rendered" />
-</div>
+</article>

No commit comments for this range

Something went wrong with that request. Please try again.