From: Plone S. <ps...@pr...> - 2004-01-28 14:33:51
|
Update of /cvsroot/collective/CMFBibliographyAT/skins/bibliography In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv840/skins/bibliography Modified Files: Tag: plonesolutions-customerspecific-branch bibliography_view.pt Added Files: Tag: plonesolutions-customerspecific-branch bibliography_view_core.pt printAuthors.pt Log Message: opimizations --- NEW FILE: printAuthors.pt --- <tal:bib condition="exists:here/portal_bibliography"> <tal:bib condition="python:here.portal_type in here.portal_bibliography.getReferenceTypes()"> <span tal:define="authors here/getNotI18NLLDAuthors" tal:condition="authors"> <span tal:repeat="person python:here.portal_catalog.searchResults(UID=authors)"> <a tal:attributes="href person/getURL"><span tal:replace="python:path('person/Title') or path('person/id')" /></a><span tal:condition="not:repeat/person/end">, </span> </span> </span> <span tal:replace="structure here/Authors" > Authors </span> (<span tal:replace="here/getNotI18Npublication_year">1900</span>). <br> </tal:bib></tal:bib> --- NEW FILE: bibliography_view_core.pt --- <div tal:define="reference_types python:container.portal_bibliography.getReferenceTypes(); raw_results python:container.portal_catalog(meta_type=reference_types); results python:sequence.sort(raw_results, (('publication_year', 'cmp', 'desc'),('Authors', 'nocase', 'asc'))); Batch python:modules['Products.CMFPlone'].Batch; DateTime python:modules['DateTime'].DateTime; b_start python:request.get('b_start',0);"> <h1 tal:content="here/Title">Bibliography</h1> <div i18n:translate="description_bibliography" class="description">References to publications, sorted by year and author.</div> <div> </div> <form name="searchresults" action="" method="post" tal:condition="results" tal:define="batch python:Batch(results, 25, int(b_start), orphan=1)"> <metal:block tal:repeat="results batch"> <p class="body" tal:condition="results/Title|nothing" tal:on-error="nothing"> <span tal:replace="structure results/printAuthors" /> <a href="/view" tal:attributes="href results/getURL"> <b tal:content="structure results/Title"> Title </b> </a> <br> <span tal:content="structure python:test(results.Source, results.Source, '(No Source specified)')"> Citation </span> </p> </metal:block> <div class="spacer"> </div> <!-- Navigation --> <div metal:use-macro="here/batch_macros/macros/navigation" /> </form> <p tal:condition="not: results" i18n:translate="no_refs"> There are no bibliographic entries on this site. </p> </div> Index: bibliography_view.pt =================================================================== RCS file: /cvsroot/collective/CMFBibliographyAT/skins/bibliography/bibliography_view.pt,v retrieving revision 1.1.1.1.2.4 retrieving revision 1.1.1.1.2.5 diff -u -d -r1.1.1.1.2.4 -r1.1.1.1.2.5 --- bibliography_view.pt 8 Dec 2003 21:02:25 -0000 1.1.1.1.2.4 +++ bibliography_view.pt 28 Jan 2004 14:32:34 -0000 1.1.1.1.2.5 @@ -12,68 +12,11 @@ </tal:block> </metal:block> -<div metal:fill-slot="main" - tal:define="reference_types python:container.portal_bibliography.getReferenceTypes(); - raw_results python:container.portal_catalog(meta_type=reference_types); - results python:sequence.sort(raw_results, (('publication_year', 'cmp', 'desc'),('Authors', 'nocase', 'asc'))); - Batch python:modules['Products.CMFPlone'].Batch; - DateTime python:modules['DateTime'].DateTime; - b_start python:request.get('b_start',0);"> - - - <h1 i18n:translate="bibliography">Bibliography</h1> - - <div i18n:translate="description_bibliography" class="description">References to publications, sorted by year and author.</div> - - <form name="searchresults" action="" method="post" tal:condition="results" - tal:define="batch python:Batch(results, 25, int(b_start), orphan=1)"> - - <metal:block tal:repeat="result batch"> - - <tal:block - tal:define="resultObject result/getObject" tal:condition="python:resultObject is not None"> - - <p class="body" tal:condition="result/Title|nothing" tal:on-error="nothing"> - - <span tal:define="accessor python:getattr(resultObject, resultObject.Schema()['LLDAuthors'].accessor)" tal:condition="python:accessor()"> - <span tal:repeat="person python:here.portal_catalog.searchResults(UID=accessor(),)"> - <a tal:attributes="href person/getURL"><span tal:replace="python:path('person/Title') or path('person/id')" /></a><span tal:condition="not:repeat/person/end">, </span> - </span> - </span> - <span tal:replace="structure result/Authors" > - Authors - </span> (<span tal:replace="result/publication_year">1900</span>). <br> - - <a href="/view" tal:attributes="href resultObject/absolute_url"> - <b tal:content="structure result/Title"> - Title - </b> - </a> <br> - - <span tal:content="structure python:test(result.Source, result.Source, '(No Source specified)')"> - Citation - </span> - - </p> - - </tal:block> +<div metal:fill-slot="main"> - </metal:block> - - <div class="spacer"> - - </div> - - <!-- Navigation --> - <div metal:use-macro="here/batch_macros/macros/navigation" /> +<div tal:replace="structure here/bibliography_view_core" /> - </form> - - <p tal:condition="not: results" i18n:translate="no_refs"> - There are no bibliographic entries on this site. - </p> - - </div> +</div> </html> |