Changeset 496


Ignore:
Timestamp:
07/20/06 11:45:01 (13 years ago)
Author:
vahur
Message:

new material types now inherith from Material.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Material.py

    r490 r496  
    9999    security = ClassSecurityInfo() 
    100100    security.declareObjectPublic() 
     101 
     102    def manage_afterAdd(self, item, container): 
     103        LearningResource.manage_afterAdd(self, item, container) 
    101104 
    102105    def getImagesFromCollections(self): 
  • trunk/MultimediaMaterial.py

    r490 r496  
    2424from FieldsWidgets import WYSIWYMWidget, WYSIWYMField, ImageSelectorWidget, PieceField, PieceWidget 
    2525from SharedMetadata import coverImage, tags, audioFile 
     26from SharedMetadata import coverImage, audioFile, lemill_metadata_mods, no_description, language_schema, license_schema, author_schema, tags, learning_metadata, age_group 
    2627from Material import Material 
    2728from Resources import LearningResource 
     
    5152 
    5253)) + tags + coverImage 
     54schema = schema + learning_metadata + age_group 
    5355 
    54 class MultimediaMaterial(LearningResource): 
     56class MultimediaMaterial(Material): 
    5557    """Multimedia page""" 
    5658 
     
    6567    def manage_afterAdd(self, item, container): 
    6668        """ manage after add """ 
    67         LearningResource.manage_afterAdd(self, item, container) 
     69        Material.manage_afterAdd(self, item, container) 
    6870        if not hasattr(item.aq_base, 'left_slots'): 
    6971            self._setProperty('left_slots', ['here/portlet_material_actions/macros/portlet',], 'lines') 
  • trunk/PresentationMaterial.py

    r488 r496  
    2323from config import PROJECTNAME, MODIFY_CONTENT, VIEW 
    2424from FieldsWidgets import WYSIWYMWidget, WYSIWYMField, ImageSelectorWidget, TagsField, TagsWidget 
    25 from SharedMetadata import coverImage, audioFile, lemill_metadata_mods, no_description, language_schema, license_schema, author_schema, tags 
    26 from Material import Material, learning_metadata 
     25from SharedMetadata import coverImage, audioFile, lemill_metadata_mods, no_description, language_schema, license_schema, author_schema, tags, learning_metadata, age_group 
     26from Material import Material 
    2727from Resources import LearningResource 
    2828 
     
    5454))  
    5555 
    56 schema = BaseSchema + tags + bodyText + audioFile + refsToImages + coverImage + lemill_metadata_mods + no_description + language_schema + license_schema + author_schema + learning_metadata 
     56schema = BaseSchema + tags + bodyText + audioFile + refsToImages + coverImage + lemill_metadata_mods + no_description + language_schema + license_schema + author_schema + learning_metadata + age_group 
    5757 
    5858schema.moveField('rights', pos='bottom') 
     
    6161 
    6262 
    63 class PresentationMaterial(LearningResource): 
     63class PresentationMaterial(Material): 
    6464    """ Presentation """ 
    6565 
     
    7474    def manage_afterAdd(self, item, container): 
    7575        """ manage after add """ 
    76         LearningResource.manage_afterAdd(self, item, container) 
     76        Material.manage_afterAdd(self, item, container) 
    7777        if not hasattr(item.aq_base, 'left_slots'): 
    7878            self._setProperty('left_slots', ['here/portlet_material_actions/macros/portlet',], 'lines') 
  • trunk/__init__.py

    r495 r496  
    1818 
    1919from config import * 
     20import config 
    2021 
    2122# CMF imports 
     
    6768 
    6869    # making config accessible from python scripts. 
    69     from AccessControl import allow_module 
     70    from AccessControl import allow_module, ModuleSecurityInfo 
     71    #ModuleSecurityInfo('config').declarePublic() 
    7072    allow_module('Products.LeMill.config') 
    7173 
  • trunk/config.py

    r495 r496  
    4141REMOTE_SERVERS = ["http://lemill.net"]  
    4242 
    43 CONTENT_TYPES = ('Piece', 'PresentationMaterial',) 
    44 MATERIAL_TYPES = ('PresentationMaterial',) 
     43CONTENT_TYPES = ('Piece', 'PresentationMaterial', 'MultimediaMaterial',) 
     44MATERIAL_TYPES = ('PresentationMaterial', 'MultimediaMaterial',) 
    4545ACTIVITY_TYPES = ('Activity',) 
    4646TOOLS_TYPES = ('Tool',) 
Note: See TracChangeset for help on using the changeset viewer.