Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 6 commits
  • 15 files changed
  • 0 commit comments
  • 1 contributor
View
5 Products/Ploneboard/browser/configure.zcml
@@ -88,7 +88,10 @@
<browser:resource
name="ploneboard.css"
file="ploneboard.css"
-
+ />
+ <browser:resource
+ name="pb_attachment.js"
+ file="pb_attachment.js"
/>
</configure>
View
0  .../skins/ploneboard_templates/pb_attachment.js.dtml → Products/Ploneboard/browser/pb_attachment.js
File renamed without changes
View
4 Products/Ploneboard/browser/rss.pt
@@ -11,7 +11,7 @@
<channel rdf:about="http://localhost/ploneboard/RSS"
tal:attributes="rdf:about string:${view/url}/RSS">
<title tal:content="view/title">Futurama, FOX</title>
- <link tal:attributes="href view/url" href="http://localhost/futurama/RSS" />
+ <link tal:content="view/url" />
<description tal:content="view/description">
</description>
@@ -32,7 +32,7 @@
rdf:about="http://localhost/board/forum/conversation"
tal:attributes="rdf:about comment/url">
<title tal:content="comment/title">Comment title</title>
- <link tal:attributes="href comment/url" href="http://localhost/board/forum/conv/1" />
+ <link tal:content="comment/url" />
<description tal:content="comment/description">
The first part of the comment text goes here
</description>
View
32 Products/Ploneboard/browser/templates/board.pt
@@ -5,22 +5,20 @@
metal:use-macro="here/main_template/macros/master"
i18n:domain="ploneboard">
-<body>
- <div metal:fill-slot="main"
- tal:define="categories here/getCategories|nothing;
- keyedforums view/getKeyedForums;
- portal context/@@plone_portal_state/portal | nocall:portal;
- mtool context/@@plone_tools/membership">
-
- <div tal:replace="structure provider:plone.abovecontenttitle" />
-
+ <metal:css fill-slot="css_slot">
+ <style type="text/css" media="all"
+ tal:content="string: @import url($portal_url/ploneboard.css);"></style>
+ </metal:css>
+
+ <div metal:fill-slot="content-title">
<h1 class="documentFirstHeading">
<img src="" tal:replace="structure here/ploneboard_icon.gif" />
<span tal:replace="here/Title">Board title</span>
</h1>
-
- <div tal:replace="structure provider:plone.belowcontenttitle" />
+ </div>
+ <div metal:fill-slot="content-description"
+ tal:define="portal context/@@plone_portal_state/portal | nocall:portal">
<ul class="visualNoMarker discreet"
style="float:right; margin: 0 0 1em 1em;">
<li>
@@ -57,15 +55,19 @@
Board Description
</p>
- <div tal:replace="structure provider:plone.abovecontentbody" />
-
<div class="visualClear"></div>
+ </div>
+ <div metal:fill-slot="content-core"
+ tal:define="categories here/getCategories|nothing;
+ keyedforums view/getKeyedForums;
+ portal context/@@plone_portal_state/portal | nocall:portal;
+ mtool context/@@plone_tools/membership">
+
<div class="discreet"
tal:condition="not: keyedforums" i18n:translate="not_forums">
No forums exist in this board yet, use the add menu to add forums.
</div>
-
<tal:categories repeat="category categories">
<tal:category define="forums keyedforums/?category|nothing"
@@ -154,8 +156,6 @@
Board footer
</metal:footer>
- <div tal:replace="structure provider:plone.belowcontentbody" />
</div>
-</body>
</html>
View
36 Products/Ploneboard/browser/templates/forum.pt
@@ -5,34 +5,21 @@
metal:use-macro="here/main_template/macros/master"
i18n:domain="ploneboard">
-<head>
<metal:top fill-slot="top_slot">
<tal:block condition="python:not user.has_permission('Ploneboard: Add Forum', here) and not user.has_permission('Ploneboard: Moderate Forum', here)">
<tal:border define="dummy python:request.set('disable_border', True)" />
</tal:block>
</metal:top>
-</head>
-
-<body>
-
- <div metal:fill-slot="main"
- tal:define="numConversations view/getNumberOfConversations;
- pss modules/Products/PythonScripts/standard;
- DateTime nocall:modules/DateTime/DateTime;
- last_login view/last_login;
- isAnon context/@@plone_portal_state/anonymous;
- portal context/@@plone_portal_state/portal | nocall:portal;
- mtool context/@@plone_tools/membership;">
-
- <div tal:replace="structure provider:plone.abovecontenttitle" />
+ <div metal:fill-slot="content-title"
+ tal:define="portal context/@@plone_portal_state/portal | nocall:portal;">
<h1 class="documentFirstHeading">
<img src="" tal:replace="structure portal/ploneboard_forum_icon.gif" />
<span tal:replace="here/Title">Forum title</span>
</h1>
+ </div>
- <div tal:replace="structure provider:plone.belowcontenttitle" />
-
+ <div metal:fill-slot="content-description">
<ul class="visualNoMarker discreet"
style="float:right; margin: 0 0 1em 1em;">
<li>
@@ -58,10 +45,18 @@
Forum Description
</div>
- <div tal:replace="structure provider:plone.abovecontentbody" />
-
<div class="visualClear"></div>
+ </div>
+ <div metal:fill-slot="content-core"
+ tal:define="numConversations view/getNumberOfConversations;
+ pss modules/Products/PythonScripts/standard;
+ DateTime nocall:modules/DateTime/DateTime;
+ last_login view/last_login;
+ isAnon context/@@plone_portal_state/anonymous;
+ portal context/@@plone_portal_state/portal | nocall:portal;
+ mtool context/@@plone_tools/membership;">
+
<p class="discreet"
i18n:translate="not_conversations"
tal:condition="python:numConversations == 0">
@@ -207,9 +202,6 @@
<metal:footer use-macro="here/board_footer/macros/footer">Board footer</metal:footer>
- <div tal:replace="structure provider:plone.belowcontentbody" />
-
</div>
-</body>
</html>
View
25 Products/Ploneboard/profiles/default/jsregistry.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- This file holds the setup configuration for the portal_javascripts tool.
+ -->
+
+<object name="portal_javascripts">
+
+ <!-- Javascript files that will be registered with the
+ portal_javascripts tool are defined here. You can also specify values
+ for existing resources if you need to modify some of their properties.
+ Javascript elements accept these parameters:
+ - 'id' (required): same rules as for stylesheets (see
+ 'cssregistry.xml').
+ - 'expression' (optional - default: ''): a tal condition.
+ - 'inline' (optional - default: False)
+ - 'enabled' (optional - default: True): boolean
+ - 'cookable' (optional - default: True): boolean (aka 'merging allowed')
+ See registerScript() arguments in ResourceRegistries/tools/JSRegistry.py
+ for the latest list of all available keys and default values.
+ -->
+ <javascript
+ id="++resource++pb_attachment.js"
+ cacheable="True" compression="safe" cookable="True"
+ enabled="True" expression="" inline="False"/>
+
+</object>
View
6 Products/Ploneboard/skins/ploneboard_templates/add_comment_form.cpt
@@ -7,12 +7,6 @@
i18n:domain="ploneboard">
<head>
- <metal:js fill-slot="javascript_head_slot">
- <script type="text/javascript"
- tal:attributes="src string:${portal_url}/pb_attachment.js">
- </script>
- </metal:js>
-
<metal:block fill-slot="top_slot"
tal:define="dummy python:request.set('disable_border',1);
kdummy python:request.set('text_text_format', 'text/html');" />
View
7 Products/Ploneboard/skins/ploneboard_templates/add_conversation_form.cpt
@@ -10,13 +10,6 @@
<metal:top fill-slot="top_slot">
<tal:block define="dummy python:request.set('disable_border', True)" />
</metal:top>
-
- <metal:js fill-slot="javascript_head_slot">
- <script type="text/javascript"
- tal:attributes="src string:${portal_url}/pb_attachment.js">
- </script>
- </metal:js>
-
</head>
<body>
View
40 Products/Ploneboard/skins/ploneboard_templates/board_view.pt
@@ -5,39 +5,30 @@
metal:use-macro="here/main_template/macros/master"
i18n:domain="ploneboard">
-<head>
<metal:css fill-slot="css_slot">
<style type="text/css" media="all"
tal:content="string: @import url($portal_url/ploneboard.css);"></style>
</metal:css>
-</head>
-<body>
- <div metal:fill-slot="main"
- tal:define="forums here/getForums;
- keyedforums python:here.getKeyedForums(forums);
- categories here/getCategories|nothing;
- view context/@@ploneboard_view;">
-
- <div tal:replace="structure provider:plone.abovecontenttitle" />
-
+ <div metal:fill-slot="content-title">
<h1 class="documentFirstHeading">
<img src="" tal:replace="structure here/ploneboard_icon.gif" />
<span tal:replace="here/Title">Board title</span>
</h1>
-
- <div tal:replace="structure provider:plone.belowcontenttitle" />
+ </div>
+ <div metal:fill-slot="content-description">
+<!-- board_view.pt -->
<ul class="visualNoMarker discreet"
style="float:right; margin: 0 0 1em 1em;">
<li>
<form tal:attributes="action string:${context/absolute_url}/search">
<label class="hiddenStructure" for="boardSearch"
i18n:domain="ploneboard" i18n:translate="board_search_label">
- Search Boards
+ search forums
</label>
<input type="text" name="q" class="inputLabel"
- title="Search Board"
+ title="search forums"
i18n:attributes="title board_search_label"/>
<input class="searchButton" type="submit" value="Search"
i18n:attributes="value board_search_button"/>
@@ -64,9 +55,14 @@
Board Description
</p>
- <div tal:replace="structure provider:plone.abovecontentbody" />
-
<div class="visualClear"></div>
+ </div>
+
+ <div metal:fill-slot="content-core"
+ tal:define="forums here/getForums;
+ keyedforums python:here.getKeyedForums(forums);
+ categories here/getCategories|nothing;
+ view context/@@ploneboard_view;">
<div class="discreet"
tal:condition="not: forums" i18n:translate="not_forums">
@@ -132,10 +128,12 @@
<div i18n:translate="label_by_author">
by <tal:author i18n:name="author"
define="creator author;
- creatorinfo python: here.portal_membership.getMemberInfo(creator);"
+ mtool here/portal_membership;
+ creatorinfo python: mtool.getMemberInfo(creator);"
content="python:creatorinfo and creatorinfo['fullname'] or creator" />
</div>
+
<span class="discreet"
tal:content="python:here.restrictedTraverse('@@ploneboard_recent_view').toPloneboardTime(forum.getLastCommentDate())">
Thursday 13:21
@@ -159,8 +157,6 @@
Board footer
</metal:footer>
- <div tal:replace="structure provider:plone.belowcontentbody" />
-
</div>
-</body>
-</html>
+</html>
+
View
45 Products/Ploneboard/skins/ploneboard_templates/comment_view.pt
@@ -10,22 +10,12 @@
########################################
</tal:comment>
- <body>
-
<metal:css fill-slot="css_slot">
<style type="text/css" media="all"
tal:content="string: @import url($portal_url/ploneboard.css);"></style>
</metal:css>
- <div metal:fill-slot="main"
- tal:define="view context/@@singlecomment_view">
-
- <div tal:replace="structure provider:plone.abovecontenttitle" />
-
- <h2 tal:content="here/Title">Conversation title</h2>
-
- <div tal:replace="structure provider:plone.belowcontenttitle" />
-
+ <div metal:fill-slot="content-description">
<a href=""
class="link-parent"
tal:define="parent_url python:here.navigationParent(here, template.getId())"
@@ -38,15 +28,17 @@
<div class="documentdescription" tal:content="here/Description">
description
</div>
+ </div>
- <div tal:replace="structure provider:plone.abovecontentbody" />
+ <div metal:fill-slot="content-core"
+ tal:define="view context/@@singlecomment_view">
<div class="boardComment visualIEFloatFix"
tal:define="comment python:view/comment">
<metal:comment metal:define-macro="comment"
tal:define="creator comment/Creator;
- mtool mtool | context/@@plone_tools/membership;
+ mtool context/@@plone_tools/membership;
creatorinfo python: mtool.getMemberInfo(creator);
creation_date comment/creation_date;
state comment/review_state;
@@ -58,7 +50,7 @@
<div class="boardCommentDetails" tal:attributes="id comment/getId;">
<div tal:attributes="class python:test(state == 'published', 'boardCommentHeaderTitleBlock', 'boardCommentHeaderTitleBlock state-%s' % state)">
-
+
<h3 tal:content="comment/Title">Comment title</h3>
<a class="link-plain"
@@ -96,10 +88,25 @@
</div>
</tal:block>
- <div class="boardCommentContent"
+ <div class="boardCommentContent"
tal:content="structure comment/getText">
Comment text.
</div>
+ <div tal:define="attachments comment/getAttachments"
+ tal:condition="attachments">
+ <tal:block tal:repeat="attachment attachments">
+ <div tal:define="pt attachment/portal_type;
+ width attachment/getWidth | string:400;
+ good_width python:width > 400 and 400 or width">
+ <a tal:attributes="href attachment/absolute_url">
+ <img style="cursor: -moz-zoom-in;" tal:attributes="src attachment/absolute_url;
+ width good_width" />
+ </a>
+ </div>
+ &nbsp;<br />
+ </tal:block>
+ </div>
+
</div>
@@ -174,7 +181,7 @@
<!-- bis hier-->
<div class="boardCommentReplyActions"
- tal:define="isAnon isAnon | context/@@plone_portal_state/anonymous">
+ tal:define="isAnon context/@@plone_portal_state/anonymous">
<form tal:condition="comment/canReply"
tal:attributes="action string:${comment/absolute_url}/add_comment_form#${comment/getId}">
@@ -205,7 +212,7 @@
tal:condition="attachments">
<legend i18n:translate="legend_attachments">Attachments</legend>
<ul class="visualNoMarker"
- tal:define="normalizeString nocall:normalizeString | nocall:context/@@plone/normalizeString">
+ tal:define="normalizeString nocall: context/@@plone/normalizeString">
<li tal:repeat="attachment attachments">
<a tal:attributes="href attachment/absolute_url">
<span tal:define="pt attachment/portal_type;
@@ -227,8 +234,6 @@
</metal:comment>
</div>
- <div tal:replace="structure provider:plone.belowcontentbody" />
-
</div>
- </body>
</html>
+
View
35 Products/Ploneboard/skins/ploneboard_templates/conversation_view.pt
@@ -4,36 +4,19 @@
metal:use-macro="here/main_template/macros/master"
i18n:domain="ploneboard">
-<head>
<metal:top fill-slot="top_slot">
<tal:block condition="python:not user.has_permission('Ploneboard: Manage Conversation', here)">
<tal:border define="dummy python:request.set('disable_border', True)" />
</tal:block>
</metal:top>
- <metal:js fill-slot="javascript_head_slot">
- <script type="text/javascript"
- tal:attributes="src string:${portal_url}/pb_attachment.js">
- </script>
- </metal:js>
-
-</head>
-
-<body>
- <div metal:fill-slot="main"
- tal:define="view context/@@conversation_browserview;
- isAnon isAnon | context/@@plone_portal_state/anonymous;
- mtool mtool | context/@@plone_tools/membership;">
-
- <div tal:replace="structure provider:plone.abovecontenttitle" />
-
+ <div metal:fill-slot="content-title">
<h1 class="documentFirstHeading">
<img tal:attributes="src string:${portal_url}/ploneboard_conversation_icon.gif" alt="" />
<span tal:replace="here/Title">Conversation title</span>
</h1>
-
- <div tal:replace="structure provider:plone.belowcontenttitle" />
-
+ </div>
+ <div metal:fill-slot="content-description">
<a href=""
class="link-parent"
tal:define="parent_url python:here.navigationParent(here, template.getId())"
@@ -42,17 +25,17 @@
i18n:translate="go_to_parent_url">
Up to <span tal:content="here/aq_parent/title_or_id" i18n:name="title" />
</a>
-
<div class="documentDescription"
tal:content="here/Description">
description
</div>
-
- <div tal:replace="structure provider:plone.abovecontentbody" />
+ </div>
+ <div metal:fill-slot="content-core">
<div class="boardConversation"
metal:define-macro="view_comments"
- tal:define="batch view/comments">
+ tal:define="view context/@@conversation_browserview;
+ batch view/comments">
<div class="boardComment visualIEFloatFix" tal:repeat="comment batch">
<metal:comment metal:use-macro="here/comment_view/macros/comment" />
@@ -88,8 +71,6 @@
Board footer
</metal:footer>
- <div tal:replace="structure provider:plone.belowcontentbody" />
-
</div>
-</body>
</html>
+
View
41 Products/Ploneboard/skins/ploneboard_templates/ploneboard_recent.pt
@@ -15,41 +15,38 @@
<body>
- <div metal:fill-slot="main"
- tal:define="view context/@@ploneboard_recent_view;
- numConversations view/num_conversations;
- pss modules/Products/PythonScripts/standard;
- isAnon nocall:isAnon | context/@@plone_portal_state/anonymous;">
-
- <div tal:replace="structure provider:plone.abovecontenttitle" />
-
- <h1 class="documentFirstHeading" i18n:translate="title_recent_conversations">
+ <div metal:fill-slot="content-title">
+ <h1 class="documentFirstHeading" i18n:translate="title_recent_conversations">
Recent conversations in
<span i18n:name="title" tal:replace="here/Title">title</span>
- </h1>
-
- <div tal:replace="structure provider:plone.belowcontenttitle" />
-
+ </h1>
+ </div>
+ <div metal:fill-slot="content-description"
+ tal:define="view context/@@ploneboard_recent_view;
+ numConversations view/num_conversations;">
<a href=""
class="link-parent"
tal:attributes="href context/absolute_url"
i18n:translate="go_to_view_url">
Return to <span i18n:name="name" tal:content="context/Title" />
</a>
-
- <div tal:replace="structure provider:plone.abovecontentbody" />
-
<p class="discreet"
i18n:translate="no_recent_conversations"
tal:condition="python:numConversations == 0">
No conversations found.
</p>
-
- <tal:haveConversations condition="python:numConversations > 0">
-
- <p i18n:translate="recent_conversations_description">
+ <p i18n:translate="recent_conversations_description"
+ tal:condition="python:numConversations > 0">
The following conversations have had recent activity.
</p>
+ </div>
+ <div metal:fill-slot="content-core"
+ tal:define="view context/@@ploneboard_recent_view;
+ numConversations view/num_conversations;
+ isAnon nocall:isAnon | context/@@plone_portal_state/anonymous;">
+
+
+ <tal:haveConversations condition="python:numConversations > 0">
<p class="discreet" tal:condition="not:isAnon"
i18n:translate="new_conversations_marked_with">
@@ -145,10 +142,8 @@
</tal:conversations>
</tal:haveConversations>
-
- <div tal:replace="structure provider:plone.belowcontentbody" />
-
</div>
</body>
</html>
+
View
40 Products/Ploneboard/skins/ploneboard_templates/ploneboard_unanswered.pt
@@ -3,52 +3,46 @@
metal:use-macro="here/main_template/macros/master"
i18n:domain="ploneboard">
-<head>
<metal:top fill-slot="top_slot">
<tal:block condition="python:not user.has_permission('Ploneboard: Add Forum', here) and not user.has_permission('Ploneboard: Moderate Forum', here)">
<tal:border define="dummy python:request.set('disable_border', True)" />
</tal:block>
</metal:top>
-</head>
-<body>
-
- <div metal:fill-slot="main"
- tal:define="view context/@@ploneboard_unanswered_view;
- numConversations view/num_conversations;
- pss modules/Products/PythonScripts/standard;
- isAnon nocall:isAnon | context/@@plone_portal_state/anonymous;">
-
- <div tal:replace="structure provider:plone.abovecontenttitle" />
+ <div metal:fill-slot="content-title">
<h1 class="documentFirstHeading" i18n:translate="title_unanswered_conversations">
Unanswered posts in
<span i18n:name="title" tal:replace="here/Title">title</span>
</h1>
-
- <div tal:replace="structure provider:plone.belowcontenttitle" />
-
+ </div>
+ <div metal:fill-slot="content-description"
+ tal:define="view context/@@ploneboard_unanswered_view;
+ numConversations view/num_conversations;">
<a href=""
class="link-parent"
tal:attributes="href context/absolute_url"
i18n:translate="go_to_view_url">
Return to <span i18n:name="name" tal:content="context/Title" />
</a>
-
- <div tal:replace="structure provider:plone.abovecontentbody" />
-
<p class="discreet"
i18n:translate="no_recent_conversations"
tal:condition="python:numConversations == 0">
No conversations found.
</p>
-
- <tal:haveConversations condition="python:numConversations > 0">
-
- <p i18n:translate="unanswered_conversations_description">
+ <p i18n:translate="unanswered_conversations_description"
+ tal:condition="python:numConversations > 0">
The following conversations have been posted, but have not yet
received any replies.
</p>
+ </div>
+ <div metal:fill-slot="content-core"
+ tal:define="view context/@@ploneboard_unanswered_view;
+ numConversations view/num_conversations;
+ isAnon nocall:isAnon | context/@@plone_portal_state/anonymous;"
+ tal:condition="python:numConversations > 0">
+
+
<p class="discreet" tal:condition="not:isAnon"
i18n:translate="new_conversations_marked_with">
Conversations marked with
@@ -112,11 +106,7 @@
<div metal:use-macro="here/batch_macros/macros/navigation" />
</tal:conversations>
- </tal:haveConversations>
-
- <div tal:replace="structure provider:plone.belowcontentbody" />
</div>
-</body>
</html>
View
7 Products/Ploneboard/skins/ploneboard_templates/threaded_conversation_view.pt
@@ -10,13 +10,6 @@
<tal:border define="dummy python:request.set('disable_border', True)" />
</tal:block>
</metal:top>
-
- <metal:js fill-slot="javascript_head_slot">
- <script type="text/javascript"
- tal:attributes="src string:${portal_url}/pb_attachment.js">
- </script>
- </metal:js>
-
</head>
<body>
View
6 docs/HISTORY.txt
@@ -4,6 +4,12 @@ Changelog
2.1 - Unreleased
----------------
+- Make pb_attachment.js a browser resource to facilitate caching/merging
+ [sureshvv]
+
+- Use new plone4 slots like content-core, content-title etc.
+ [sureshvv]
+
- Minor updates to German translation. "Message Board" is now "Foren" instead of
"Forum".
[thet]

No commit comments for this range

Something went wrong with that request. Please try again.