EduploneWebdidactics/skins/EduploneWebdidactics relations_edit.cpt,1.2,1.3

Nils Haagen <[email protected]>
Newsgroups gmane.comp.web.zope.eduplone.cvs
Message-ID <[email protected]>
Update of /cvsroot/eduplone/EduploneWebdidactics/skins/EduploneWebdidactics
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32009/skins/EduploneWebdidactics

Modified Files:
	relations_edit.cpt 
Log Message:
interface for Relations using tweaked ATReferenceBrowserWidget

Index: relations_edit.cpt
===================================================================
RCS file: /cvsroot/eduplone/EduploneWebdidactics/skins/EduploneWebdidactics/relations_edit.cpt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** relations_edit.cpt	2 Nov 2004 22:17:45 -0000	1.2
--- relations_edit.cpt	3 Nov 2004 12:55:27 -0000	1.3
***************
*** 10,13 ****
--- 10,19 ----
    </metal:border>
  
+   <metal:head fill-slot="javascript_head_slot">
+       <script type="text/javascript" charset="iso-8859-1"
+               tal:attributes="src string:$portal_url/referencebrowser.js" />
+   </metal:head>
+ 		    
+ 
    <body>
  
***************
*** 18,22 ****
           >
  
!       <h1 i18n:translate="relations_editreferences">Edit References</h1>
  
  
--- 24,31 ----
           >
  
!       <h1 i18n:translate="relations_editreferences">Edit References for:</h1>
!       <div class="contentHeader">
!             <h4 tal:content="structure python:here.title_or_id()">Title or id</h4>
!       </div>
  
  
***************
*** 24,74 ****
        Use references to describe relations between objects. Valid references are described in the ReferenceRegistry as "Jigs".
        </p>
- <!--
-     <tal:block repeat="mdsetname python:binding.getSetNames()">
- 
-           <fieldset tal:define="mdset python:binding.getSet(mdsetname)">
-             <legend tal:content="mdset/title_or_id" />
-             <tal:block repeat="mdelement mdset/objectValues">
- 
-               <div class="field"
-                    tal:define="mdelement_key mdelement/getFieldKey;
-                                mdelement_id mdelement/id;
-                                error python:errors.get(mdelement_key, None) or errors.get(mdelement_id, None);"
-                    tal:attributes="class python:test(error,
-                                    'field error', 'field')">
- 
-                 <label tal:content="mdelement/title_or_id"
-                        i18n:translate="">Label</label>
- 
-                        <span tal:condition="mdelement/isRequired"
-                              class="fieldRequired"
-                              title="Required"
-                              i18n:domain="plone"
-                              i18n:attributes="title"
-                              i18n:translate="label_required">(Required)</span>
- 
-                              <div class="formHelp"
-                                   tal:define="desc python:mdelement.Description()"
-                                   tal:condition="desc"
-                                   tal:content="structure desc"
-                                   i18n:translate="">Help</div>
- 
-                                   <div tal:content="error">
-                                     Validation error output
-                                   </div>
-                                   <div tal:define="input python:mdelement.renderEdit(value=binding[mdsetname][mdelement_id], request=request)"
-                                        tal:replace="structure input"
-                                        tal:attributes="tabindex tabindex/next;">
-                                   </div>
- 
-               </div>
- 
- 
-             </tal:block>
-           </fieldset>
-         </tal:block>
- 
- -->
- 
  
        <form id="referencesform"
--- 33,36 ----
***************
*** 81,92 ****
          <input type="hidden" name="form.submitted" value="1" />
  
!         sID:
!         <input type=text name="sUid" tal:attributes="value python:here.UID()">
  
!         <br>
!         tID:
!         <input type=text name="tUid">
  
!         <bR>
          <select name="jigId">
              <option tal:repeat="JigItem python: relJig.objectIds()"
--- 43,94 ----
          <input type="hidden" name="form.submitted" value="1" />
  
!         <input type="hidden" name="sUid" tal:attributes="value python:here.UID()">
  
!         
!         <b>tID:</b>
!         <input type=text name="tUid" id="tUid">
  
! 
! <div tal:define="startup_directory python:here.absolute_url();
!                  fieldName python:'tUid';
! 
!                  multi              python: '0';
!                  title              python: 'Single Relation';
!                  description        python: 'Pick an object'; 
!                  allowed_types      python: 'Document*ATDocument*ATFile*Article*ATRefBrowserDemo';
!                  search_index       python: request.get('search_index', 'SearchableText');
!                  show_indexes       python: '1';
!                  search_text        python: ''; 
!                  available_indexes  python: {}; 
!                  allow_search       python: '1';
!                  allow_browse       python: '1';
!                                                 
!                  req_param python: '&'.join(    
!                                         ['multi='             + multi,
!                                          'title='             + title,
!                                          'description='       + description,
!                                          'allowed_types='     + str(allowed_types),
!                                          'search_index='      + search_index, 
!                                          'show_indexes='      + show_indexes, 
!                                          'search_text='       + search_text,  
!                                          'available_indexes=' + str(available_indexes),
!                                          'allow_search='      + allow_search, 
!                                          'allow_browse='      + allow_browse  
!                                         ]
!                                      ).replace('\'','#');
!                  ">
!                    
!  <input type="button"
!         class="searchButton"
!         value="Browse..."   
!         onClick=""
!         i18n:attributes="value"
!         tal:attributes="onClick string:javascript:referencebrowser_openBrowser('${startup_directory}','${fieldName}', '${here/UID}', '${req_param}')" />
!         
! </div>  
! 
! 
! 
!         <br>
          <select name="jigId">
              <option tal:repeat="JigItem python: relJig.objectIds()"
***************
*** 97,120 ****
  <bR><bR><bR>
  
!        <table border="1">
!            <tr tal:repeat="ref python: here.reference_catalog.getReferences(here)">
  
!            <td tal:define="sUID python: ref.getSourceObject().UID();
!                            tUID python: ref.getTargetObject().UID();
!                            jigID python: ref.relationship">
!                
!             <input tal:attributes="type python:'checkbox';
!                    name python:'ids:list';
!                    value python:','.join([sUID,tUID,jigID])"></td>
  
!            <td tal:content="python: ref.relationship" />
!            <td tal:content="python: ref.targetTitle()" />
!            <!--<td tal:content="python: ref[]"/>-->
!            <td tal:content="python: ref.getSourceObject().UID()"/>
!            <td tal:content="python: ref.getTargetObject().UID()"/>
  
!            </tr>
  
         </table>
      
         <bR><bR>
--- 99,147 ----
  <bR><bR><bR>
  
!      
!        <table id="sortable"
!                  class="listing"
!                  summary="Content listing"
!                  cellpadding="0" cellspacing="0">
!            <thead>
  
!               <metal:block tal:condition="batch|not:standalone|nothing">
!                 <tr>
!                   <th class="nosort"><input class="noborder"
!                                             type="checkbox"
!                                             src="select_all_icon.gif"
!                                             name="selectButton"
!                                             title="Select all items"
!                                             onClick="toggleSelect(this);"
!                                             tal:attributes="src string:$portal_url/select_all_icon.gif"
!                                             alt="Select all items"
!                                             i18n:attributes="title alt"
!                                             />
!                    </th>
  
!                    <th><b i18n:translate="reference_title">Reference Title</b>&nbsp;&nbsp;&nbsp;</th>
!                    <th><b i18n:translate="target_title">Target Title</b></th> 
!            
!                  </tr>
!               </metal:block>
!             </thead>
!             
!                 <tr tal:repeat="ref python: here.reference_catalog.getReferences(here)">
!                                        
!                    <td tal:define="sUID python: ref.getSourceObject().UID();
!                                    tUID python: ref.getTargetObject().UID();
!                                    jigID python: ref.relationship">
  
!                     <input tal:attributes="type python:'checkbox';
!                            name python:'ids:list';
!                            value python:','.join([sUID,tUID,jigID])"></td>
! 
!                    <td tal:content="python: ref.relationship" />
!                    <td tal:content="python: ref.targetTitle()" />
!          
!                </tr>
  
         </table>
+ 
      
         <bR><bR>



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.