示例#1
0
文件: html.py 项目: hforge/itws
 def _get_widgets(self, resource, context):
     base_widgets = HTMLEditView._get_widgets(self, resource, context)
     # Delete unused description/subject(keywords)
     widgets = [ widget for widget in base_widgets
                 if widget.name not in ('description', 'subject', 'state',
                                        'data') ]
     return freeze(widgets + [
         display_title_widget,
         PathSelectorWidget('title_link', title=MSG(u'Title link')),
         RadioWidget('title_link_target', title=MSG(u'Title link target'),
                     has_empty_option=False, oneline=True),
         advance_rte_widget, state_widget ])
示例#2
0
    def _get_widgets(self, resource, context):
        widgets = HTMLEditView._get_widgets(self, resource, context)[:]
        # Add display title widget
        display_title_widget = RadioWidget('display_title',
                title=MSG(u'Display title on webpage view ?'))
        widgets.insert(2, display_title_widget)
        # Tags
        widgets.extend(TagsAware_Edit._get_widgets(self, resource, context))

        # TODO: Add a mechanism in ikaaro that allow to configure RTE
        new_widgets = []
        for w in widgets:
            if issubclass(w, RTEWidget):
                w = Advance_RTEWidget(w.name, title=w.title)
            new_widgets.append(w)
        return freeze(new_widgets)