Changeset 1286


Ignore:
Timestamp:
01/17/07 14:08:20 (13 years ago)
Author:
jukka
Message:

Fixed #1076, spent 1h. Cleaned a bit in portlet_material_actions.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LeMillReference.py

    r1264 r1286  
    132132 
    133133# removed target_group_schema and lrt for LeMill 1.1. They're still up there if needed. 
    134 schema = BaseSchema + author + language_schema + location + tags + bodytext + no_coverImage + subject_area_schema + target_group_schema + licenses 
     134schema = BaseSchema + author + language_schema + location + tags + bodytext + coverImage + subject_area_schema + target_group_schema + licenses 
    135135 
    136136schema = schema.copy() 
  • trunk/skins/lemill/portlet_lemillreference_actions.pt

    r1261 r1286  
    1111 
    1212<div class="tb-portlet" metal:use-macro="here/portlet_material_actions/macros/image_div"> 
    13 <tal:block metal:fill-slot="image_edit"></tal:block> 
     13<tal:block metal:fill-slot="image_edit"> 
     14    <ul> 
     15        <li> 
     16            <a  href="" tal:attributes="href string:${here_url}/change_coverimage"><tal:block i18n:translate="label_change_cover_image">Change cover image</tal:block>...</a> 
     17        </li> 
     18    </ul> 
     19</tal:block> 
    1420</div> 
    1521 
  • trunk/skins/lemill/portlet_material_actions.pt

    r1267 r1286  
    1414    <p style="text-align: center;" tal:condition="python: is_History or is_Translation or is_Version"><a href="" tal:define="myUrl python: context.absolute_url()" tal:attributes="href string: ${myUrl}/view"><img src="images/default_learningresource.png" tal:attributes="src here/getCoverImageURL; alt python:here.meta_type" style="padding: 39px 0px 29px 0px;" /></a></p> 
    1515    <p style="text-align: center;" tal:condition="python: not (is_History or is_Version or is_Translation)"><img src="images/default_learningresource.png" tal:attributes="src here/getCoverImageURL; alt python:here.meta_type" style="padding: 39px 0px 29px 0px;" /></p> 
    16     <tal:condition condition="is_editable"> 
    17     <ul metal:define-slot="image_edit" tal:condition="python: context.meta_type not in ['Piece', 'LeMillReference']"> 
    18         <li tal:condition="python:wf_state=='public' and not no_edit_links and (here.amIMaterial() or here.amIOwner() or here.canIModerate())"> 
     16    <ul metal:define-slot="image_edit" tal:condition="python:is_editable and not no_edit_links"> 
     17        <li tal:condition="python:wf_state=='public'"> 
    1918            <a  href="" tal:attributes="href string:${here_url}/change_coverimage"><tal:block i18n:translate="label_change_cover_image">Change cover image</tal:block>...</a> 
    2019        </li> 
    21         <li tal:condition="python:wf_state=='draft' and not no_edit_links and (here.amIOwner() or here.canIModerate())"> 
     20        <li tal:condition="python:wf_state=='draft' and (here.amIOwner() or here.canIModerate())"> 
    2221            <a href="" tal:attributes="href string:$here_url/lemill_ask_publish"><tal:block i18n:domain="plone" i18n:translate="Publish">Publish</tal:block>...</a> 
    2322        </li> 
     
    2726 
    2827    </ul> 
    29     </tal:condition> 
    3028</div> 
    3129 
  • trunk/skins/lemill/portlet_piece_actions.pt

    r1261 r1286  
    99                    is_Translation python:path_end=='show_translations';"> 
    1010<tal:visible condition="python:wf_state!='deleted'"> 
    11     <div class="tb-portlet" metal:use-macro="here/portlet_material_actions/macros/image_div"/> 
     11    <div class="tb-portlet" metal:use-macro="here/portlet_material_actions/macros/image_div"> 
     12        <tal:block metal:fill-slot="image_edit"></tal:block> 
     13    </div> 
    1214 
    1315    <tal:hide condition="not:is_History"> 
  • trunk/tests/testReference.py

    r1261 r1286  
    4747    def testPortletExistence(self): 
    4848        material = self.construct('LeMillReference', 'TestMaterialReference' ,self.portal.content) 
    49         page = self.publish(material.absolute_url_path()+'/view').getBody() 
     49        page = self.publish(material.absolute_url_path()+'/view', basic=auth).getBody() 
    5050        self.failUnless(re.search('portlet-material-actions', page), 'Cannot find portlet-material-actions from material\'s view page %s' % page) 
     51        self.failIf(re.search('Change to draft', page), "References shouldn't be retracted") 
     52        self.failIf(re.search('Translate', page), "References shouldn't be translated") 
     53        self.failIf(re.search('Student view', page), "References shouldn't have fullscreen view") 
     54        self.failUnless(re.search('cover image', page), 'Cannot find link to edit cover image in reference') 
     55        self.failUnless(re.search('History', page), 'Cannot find link to history in reference') 
     56        self.failUnless(re.search('Delete', page), 'Cannot find link to delete reference') 
     57        self.failUnless(re.search('Edit...', page), 'Cannot find link to edit reference') 
     58 
     59 
    5160 
    5261    def testEditing(self): 
Note: See TracChangeset for help on using the changeset viewer.