web/views/wdoc.py
changeset 3377 dd9d292b6a6d
parent 1977 606923dff11b
child 3451 6b46d73823f5
equal deleted inserted replaced
3376:f5c69485381f 3377:dd9d292b6a6d
    85 
    85 
    86 # help views ##################################################################
    86 # help views ##################################################################
    87 
    87 
    88 class InlineHelpView(StartupView):
    88 class InlineHelpView(StartupView):
    89     __select__ = match_form_params('fid')
    89     __select__ = match_form_params('fid')
    90     id = 'wdoc'
    90     __regid__ = 'wdoc'
    91     title = _('site documentation')
    91     title = _('site documentation')
    92 
    92 
    93     def call(self):
    93     def call(self):
    94         fid = self.req.form['fid']
    94         fid = self.req.form['fid']
    95         for lang in chain((self.req.lang, self.vreg.property_value('ui.language')),
    95         for lang in chain((self.req.lang, self.vreg.property_value('ui.language')),
   161         self.w(u'</ul>\n')
   161         self.w(u'</ul>\n')
   162 
   162 
   163 
   163 
   164 
   164 
   165 class InlineHelpImageView(StartupView):
   165 class InlineHelpImageView(StartupView):
   166     id = 'wdocimages'
   166     __regid__ = 'wdocimages'
   167     __select__ = match_form_params('fid')
   167     __select__ = match_form_params('fid')
   168     binary = True
   168     binary = True
   169     templatable = False
   169     templatable = False
   170     content_type = 'image/png'
   170     content_type = 'image/png'
   171 
   171 
   181             raise NotFound
   181             raise NotFound
   182         self.w(open(join(resourcedir, rid)).read())
   182         self.w(open(join(resourcedir, rid)).read())
   183 
   183 
   184 
   184 
   185 class ChangeLogView(StartupView):
   185 class ChangeLogView(StartupView):
   186     id = 'changelog'
   186     __regid__ = 'changelog'
   187     title = _('What\'s new?')
   187     title = _('What\'s new?')
   188     maxentries = 25
   188     maxentries = 25
   189 
   189 
   190     def call(self):
   190     def call(self):
   191         rid = 'ChangeLog_%s' % (self.req.lang)
   191         rid = 'ChangeLog_%s' % (self.req.lang)