RelationsPortlet/skins/RelationsPortlet portlet_relations.pt,1.4,1.5

Nils Haagen <[email protected]> Tue, 13 Dec 2005 10:54:20 +0000
Newsgroups gmane.comp.web.zope.eduplone.cvs
Message-ID <[email protected]>
Update of /cvsroot/eduplone/RelationsPortlet/skins/RelationsPortlet
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16403/skins/RelationsPortlet

Modified Files:
	portlet_relations.pt 
Log Message:
Portlet shows Relations of LU in context of KU

Index: portlet_relations.pt
===================================================================
RCS file: /cvsroot/eduplone/RelationsPortlet/skins/RelationsPortlet/portlet_relations.pt,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** portlet_relations.pt	13 Dec 2005 10:33:04 -0000	1.4
--- portlet_relations.pt	13 Dec 2005 10:54:18 -0000	1.5
***************
*** 10,14 ****
      
      <div class="portlet" tal:define="rp       python: here.portal_relationsportlet;
!                                      regTypes python: rp.registeredTypes()"
                           tal:condition="python: here.portal_type in regTypes or hasattr(here, 'lu_in_parents')">
  
--- 10,18 ----
      
      <div class="portlet" tal:define="rp       python: here.portal_relationsportlet;
!                                      regTypes python: rp.registeredTypes();
!                                      mdtool   here/portal_metadata;
!                                      references python: here.reference_catalog.getReferences(here);
!                                      LuReferences python: here.reference_catalog.getReferences(here.lu_in_parents());
!                                      createable python: rp.createableRelationsForType(here.portal_type);"
                           tal:condition="python: here.portal_type in regTypes or hasattr(here, 'lu_in_parents')">
  
***************
*** 16,22 ****
          <h5 i18n:translate="box_relations_headline">Relations</h5>
  
!         <div class="portletBody"
!              tal:define="references python: here.reference_catalog.getReferences(here);
!                          createable python: rp.createableRelationsForType(here.portal_type);">
  
  
--- 20,24 ----
          <h5 i18n:translate="box_relations_headline">Relations</h5>
  
!         <div class="portletBody">
  
  
***************
*** 49,75 ****
              <hr>
          </div>
-             <ul tal:define="mdtool here/portal_metadata;">
  
!             <metal:block tal:repeat="ref references">
!                   <tal tal:define="sUID python: ref.getSourceObject().UID();
!                                    tUID python: ref.getTargetObject().UID();
!                                    jigID python: ref.relationship;
!                                    binding  python:mdtool.getMetadata(ref) or None;
!                                    mdset    python: binding.getSet('dcwd');
!                                    wd_relation  python:binding['dcwd']['Relation'];
!                                    wd_relation_key  python:mdset['Relation'].field.render_key(wd_relation);"
!                         tal:condition="python:jigID in rp.registeredRelations(here.portal_type) and jigID not in createable"
!                         tal:omit-tag=" ">
!                                        
!                    <li><span tal:omit-tag=" "
!                              tal:replace="python: context.translate(msgid=wd_relation_key, domain='eduplone')" />
!                        <a tal:content="python: ref.targetTitle()" 
!                           tal:attributes="href python:ref.getTargetObject().absolute_url()"/>
!                    </li>
!          
!                 </tal>
!             </metal:block>
  
!             </ul>
  
          </div>
--- 51,100 ----
              <hr>
          </div>
  
!         <ul>
!         <metal:block tal:repeat="ref references">
!               <tal tal:define="sUID python: ref.getSourceObject().UID();
!                                tUID python: ref.getTargetObject().UID();
!                                jigID python: ref.relationship;
!                                binding  python:mdtool.getMetadata(ref) or None;
!                                mdset    python: binding.getSet('dcwd');
!                                wd_relation  python:binding['dcwd']['Relation'];
!                                wd_relation_key  python:mdset['Relation'].field.render_key(wd_relation);
!                                regRef python:rp.registeredRelations(here.portal_type);"
!                     tal:condition="python:jigID in regRef and jigID not in createable"
!                     tal:omit-tag=" ">
!                                    
!                <li><span tal:omit-tag=" "
!                          tal:replace="python: context.translate(msgid=wd_relation_key, domain='eduplone')" />
!                    <a tal:content="python: ref.targetTitle()" 
!                       tal:attributes="href python:ref.getTargetObject().absolute_url()"/>
!                </li>
!      
!             </tal>
!         </metal:block>
!         </ul>
  
!         <ul tal:condition="python:here.portal_type != 'LearningUnit'">
!         <metal:block tal:repeat="ref LuReferences">
!               <tal tal:define="sUID python: ref.getSourceObject().UID();
!                                tUID python: ref.getTargetObject().UID();
!                                jigID python: ref.relationship;
!                                binding  python:mdtool.getMetadata(ref) or None;
!                                mdset    python: binding.getSet('dcwd');
!                                wd_relation  python:binding['dcwd']['Relation'];
!                                wd_relation_key  python:mdset['Relation'].field.render_key(wd_relation);
!                                regRef python:rp.registeredRelations('LearningUnit');"
!                     tal:condition="python:jigID in regRef and jigID not in createable"
!                     tal:omit-tag=" ">
!                                    
!                <li><span tal:omit-tag=" "
!                          tal:replace="python: context.translate(msgid=wd_relation_key, domain='eduplone')" />
!                    <a tal:content="python: ref.targetTitle()" 
!                       tal:attributes="href python:ref.getTargetObject().absolute_url()"/>
!                </li>
!      
!             </tal>
!         </metal:block>
!         </ul>
  
          </div>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click