[Checkins] SVN: Products.CMFDefault/trunk/Products/CMFDefault/ Handle permalinks but warn if CMFUId is not installed.

Charlie Clark charlie at begeistert.org
Tue Sep 28 13:33:51 EDT 2010


Log message for revision 117023:
  Handle permalinks but warn if CMFUId is not installed.

Changed:
  U   Products.CMFDefault/trunk/Products/CMFDefault/browser/portal/config.pt
  U   Products.CMFDefault/trunk/Products/CMFDefault/browser/portal/interfaces.py
  U   Products.CMFDefault/trunk/Products/CMFDefault/skins/absolut/main_template.pt

-=-
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/portal/config.pt
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/portal/config.pt	2010-09-28 17:30:23 UTC (rev 117022)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/portal/config.pt	2010-09-28 17:33:51 UTC (rev 117023)
@@ -22,6 +22,7 @@
           replace="structure widget/error" />
     </fieldset>
 
+    <span class="errors" tal:condition="not: globals/uidtool_installed">CMFUId is not installed</span>
 
   <div class="buttons">
     <tal:loop tal:repeat="action view/actions"

Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/portal/interfaces.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/portal/interfaces.py	2010-09-28 17:30:23 UTC (rev 117022)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/portal/interfaces.py	2010-09-28 17:33:51 UTC (rev 117023)
@@ -72,4 +72,9 @@
     enable_actionicons = Bool(
                     title=_(u"Action icons"),
                     description=_(u"Actions available to the user are shown as                    textual links. With this option enabled, they are also shown as icons if the action definition specifies one."),
+                    required=False)
+                    
+    enable_permalink = Bool(
+                    title=_(u"Permalink"),
+                    description=_(u"If permalinks are enabled then a unique identifier is assigned to every item of content independent of it's id or position in a site. This requires the CMFUid tool to be installed."),
                     required=False)
\ No newline at end of file

Modified: Products.CMFDefault/trunk/Products/CMFDefault/skins/absolut/main_template.pt
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/skins/absolut/main_template.pt	2010-09-28 17:30:23 UTC (rev 117022)
+++ Products.CMFDefault/trunk/Products/CMFDefault/skins/absolut/main_template.pt	2010-09-28 17:33:51 UTC (rev 117023)
@@ -172,6 +172,15 @@
    <metal:slot metal:define-slot="main" />
   </metal:slot>
 
+  <div id="Permalink"
+       tal:define="url context/get_permalink | nothing"
+       tal:condition="url">
+   <span i18n:translate="" tal:omit-tag="">Permanent Link:</span>
+   <a href="" tal:content="url" tal:attributes="href url">
+     the permanent link if enabled
+   </a>
+  </div>
+
  </div>
 
 </body>



More information about the checkins mailing list