Changeset 3076 for trunk


Ignore:
Timestamp:
10/31/10 23:39:17 (9 years ago)
Author:
jukka
Message:

Portfolio for groups is working, starting to remove debugging prints.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LeMillCatalogTool.py

    r3069 r3076  
    158158                edited='edited' in form 
    159159        if hasattr(batch._sequence, '_seq'): 
    160             print 'using fast metadata to build results' 
    161160            seq=list(batch._sequence._seq[batch.start-1:batch.end]) 
    162161            keys=['rid','getHasCoverImage','getNicename','portal_type','getLocation_country','getTags', 'Language','listCreators'] 
     
    187186                useDateIndex=True                           
    188187        else: # batch has already been converted to catalog Brains object 
    189             print 'using Brains objects to build results' 
    190188            for item in batch:                 
    191189                d={'url':item.getURL(), 
     
    470468            keywords['getTags']=keywords['tags'] 
    471469            del keywords['tags'] 
    472         if 'author' in keywords: 
     470        if 'author' in keywords and keywords['author']: 
    473471            keywords['listCreators']=keywords['author'] 
    474472            del keywords['author'] 
     473        if 'group' in keywords and keywords['group']: 
     474            keywords['getRawGroupEditing']=keywords['group'] 
     475            del keywords['group'] 
    475476        if 'state' in keywords: 
    476477            keywords['getState']=keywords['state'] 
     
    517518                found=True 
    518519            else: 
    519                 for compensating in ['SearchableText','listCreators','getTarget_group','getTags','getSubject_area','created','getLatestEdit', 'getLocation_country']: 
     520                for compensating in ['SearchableText','listCreators','getTarget_group','getTags','getSubject_area','created','getLatestEdit', 'getLocation_country', 'getRawGroupEditing']: 
    520521                    if compensating in keywords: 
    521522                        found=True 
     
    859860                resultlist=[(x[1], ''.join((link_body, x[1]))) for x in resultlist] 
    860861            top5lists[ilanguage]=resultlist 
    861             print top5lists 
    862862            return resultlist 
    863863 
  • trunk/skins/lemill/content_edit.cpy

    r3045 r3076  
    2222 
    2323# Checked, this is ok, doesn't take much time.  
    24 context.dumpme('content_edit.cpy reached') 
    2524try: 
    2625    new_context = context.portal_factory.doCreate(context, id) 
     
    2928    new_context = context 
    3029new_context.processForm() 
    31 new_context.dumpme('content_edit.cpy: processForm completed') 
    3230 
    3331if not state.errors: 
  • trunk/skins/lemill/portfolio.cpt

    r3059 r3076  
    1414 
    1515<metal:portlet fill-slot="portlet_slot"> 
    16 <tal:def define="this_member context/getMemberFolder">  
    17     <metal:portrait use-macro="here/portlet_member/macros/memberportrait" /> 
     16<tal:def define="this_member context/getMemberFolder | nothing; 
     17                 this_group context/getBlog | nothing;">  
     18    <tal:b condition="this_member"><metal:portrait use-macro="here/portlet_member/macros/memberportrait"/></tal:b> 
     19    <tal:b condition="this_group"> 
     20    <div class="portlet grid"> 
     21        <p style="text-align: center;">  
     22          <a href="" tal:attributes="href this_group/absolute_url"><img src="images/default_groupblog.png" tal:attributes="src this_group/getCoverImageURL;" style="padding: 39px 0px 29px 0px;" /></a>      
     23        </p> 
     24    </div> 
     25    </tal:b> 
    1826</tal:def> 
    1927 
    20 <div metal:define-macro="portfolio_options" class="browse_options portlet grid" tal:define="pf_owner context/getMemberId | nothing;" tal:condition="pf_owner"> 
     28<div metal:define-macro="portfolio_options" class="browse_options portlet grid" tal:define="pf_owner context/getMemberId | python:'';this_member context/getMemberFolder | nothing;this_group context/getBlog | nothing; group_uid this_group/UID | python:''" tal:condition="python: this_member or this_group"> 
    2129  <div class="portlet-title" i18n:translate="heading_portfolio">Portfolio</div> 
    2230 
     
    2432           method="POST" 
    2533           action="portfolio" tal:define="form request/form; 
    26            global results request/results | python: here.portal_catalog.browsingSearch(REQUEST=request, author=pf_owner, portfolio=True); 
     34           global results request/results | python: here.portal_catalog.browsingSearch(REQUEST=request, author=pf_owner, group=group_uid, portfolio=True); 
    2735           d python:here.portal_catalog.createBrowsingOptions(REQUEST=request, results=results, portfolio=True);" 
    2836           tal:attributes="action string:$here_url/portfolio"> 
     
    4755</metal:portlet> 
    4856 
    49 <div metal:fill-slot="main" tal:define="pf_owner context/getMemberId | nothing; mf context/getMemberFolder | nothing;"> 
    50     <tal:proper_portfolio condition="pf_owner"> 
     57<div metal:fill-slot="main" tal:define="pf_owner context/getMemberId | nothing; mf context/getMemberFolder | nothing ;this_group context/getBlog | nothing;"> 
     58    <tal:proper_portfolio condition="python: mf or this_group"> 
    5159    <h1 i18n:translate="title_for_portfolio"><a href="" tal:attributes="href context/absolute_url" tal:content="context/getNicename" i18n:name="name">name</a>'s Portfolio</h1> 
    5260     
  • trunk/skins/lemill/portlet_groupblog_actions.pt

    r3052 r3076  
    99    <tal:block metal:use-macro="here/portlet_macros/macros/groupEditDiv"/> 
    1010    <tal:block metal:use-macro="here/portlet_macros/macros/groupMembersDiv"/> 
    11     <tal:block metal:use-macro="here/portlet_macros/macros/groupResourcesDiv"/>     
     11    <metal:options use-macro="here/portfolio/macros/portfolio_options" /> 
     12 
    1213  </div> 
    1314 
  • trunk/skins/lemill/validate_base.vpy

    r3045 r3076  
    1111 
    1212errors = {} 
    13 context.dumpme('validate_base.vpy called') 
    1413errors = context.validate(REQUEST=context.REQUEST, errors=errors, data=1, metadata=0) 
    1514 
    1615if errors: 
    17     context.dumpme('errors from validate_base.vpy: %s' % errors ) 
    1816    context.lemill_tool.addPortalMessage(gettext('Please correct the indicated errors.')) 
    1917    return state.set(status='failure', errors=errors) 
  • trunk/skins/lemill/validate_base_silently.vpy

    r3045 r3076  
    1111 
    1212errors = {} 
    13 context.dumpme('*** validation starting at validate_base_silently ***') 
    1413errors = context.validate(REQUEST=context.REQUEST, errors=errors, data=1, metadata=0) 
    15 context.dumpme('*** validation done.') 
    1614 
    1715if errors: 
    1816    context.lemill_tool.addPortalMessage(gettext('Please correct the indicated errors.')) 
    1917    state=state.set(status='failure', errors=errors) 
    20     context.dumpme(state) 
    2118    return state 
    2219else: 
Note: See TracChangeset for help on using the changeset viewer.