src/pyams_content/component/extfile/__init__.py
changeset 1040 d2485124991c
parent 1037 5a697cde9826
child 1404 8be1cfb23338
equal deleted inserted replaced
1039:6ff6690ac4df 1040:d2485124991c
    85     def user_title(self):
    85     def user_title(self):
    86         request = check_request()
    86         request = check_request()
    87         manager_info = IExtFileManagerInfo(request.root)
    87         manager_info = IExtFileManagerInfo(request.root)
    88         title = II18n(self.context).query_attribute('title')
    88         title = II18n(self.context).query_attribute('title')
    89         if not title:
    89         if not title:
    90             title, extension = self.context.filename.rsplit('.', 1)
    90             title = self.context.filename
       
    91             if '.' in title:
       
    92                 title, extension = title.rsplit('.', 1)
    91         return '{0} {1}'.format(II18n(manager_info).query_attribute('default_title_prefix', request=request) or '',
    93         return '{0} {1}'.format(II18n(manager_info).query_attribute('default_title_prefix', request=request) or '',
    92                                 title)
    94                                 title)
    93 
    95 
    94     @property
    96     @property
    95     def user_icon(self):
    97     def user_icon(self):