Changeset 487 in main


Ignore:
Timestamp:
11/16/11 16:59:12 (8 years ago)
Author:
pcosquer
Message:

add type, reference and revision on the attributes page (fix #15)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/plmapp/models.py

    r459 r487  
    498498    def attributes(self): 
    499499        u"Attributes to display in `Attributes view`" 
    500         return ["name",  "creator", "owner", "group", "ctime", "mtime"] 
     500        return ["type", "reference", "revision", "name", "creator", "owner", 
     501                "group", "ctime", "mtime"] 
    501502 
    502503    @property 
     
    535536        """ 
    536537        Returns fields which should not be available in a modification form 
     538        """ 
     539        return [ugettext_noop("type"), ugettext_noop("reference"), 
     540                ugettext_noop("revision"), 
     541                ugettext_noop("ctime"), ugettext_noop("creator"), 
     542                ugettext_noop("owner"), ugettext_noop("ctime"), 
     543                ugettext_noop("mtime"), ugettext_noop("group")] 
     544 
     545    @classmethod 
     546    def get_modification_fields(cls): 
     547        """ 
     548        Returns fields which should be displayed in a modification form 
    537549         
    538550        By default, it returns :attr:`attributes` less attributes returned by 
    539551        :meth:`excluded_modification_fields` 
    540552        """ 
    541         return [ugettext_noop("creator"), ugettext_noop("owner"), ugettext_noop("ctime"), ugettext_noop("mtime"), ugettext_noop("group")] 
    542  
    543     @classmethod 
    544     def get_modification_fields(cls): 
    545         "Returns fields which should be displayed in a modification form" 
    546553        fields = [] 
    547554        for field in cls().attributes: 
Note: See TracChangeset for help on using the changeset viewer.