"""For adding the edit link to edit form entry view. :return str: """ return """ <ul class="{container_class}"> {edit_option_html} <li><a href="{delete_url}" class="{delete_option_class}"> <span>{delete_text}</span></a> </li> </ul> <input type="hidden" value="{form_element_position}" name="form-{counter}-position" id="id_form-{counter}-position" class="form-element-position"> <input type="hidden" value="{form_element_pk}" name="form-{counter}-id" id="id_form-{counter}-id"> """.format( container_class=cls.form_list_container_class, edit_option_html="{edit_option_html}", delete_url="{delete_url}", delete_option_class=cls.form_delete_form_entry_option_class, delete_text="{delete_text}", form_element_position="{form_element_position}", counter="{counter}", form_element_pk="{form_element_pk}", ) theme_registry.register(DjangoCMSAdminStyleTheme)
# ************************ Form wizard entry CUD ************************ # *********************************************************************** create_form_wizard_entry_template = \ 'bootstrap3/create_form_wizard_entry.html' create_form_wizard_entry_ajax_template = \ 'bootstrap3/create_form_wizard_entry_ajax.html' edit_form_wizard_entry_template = \ 'bootstrap3/edit_form_wizard_entry.html' edit_form_wizard_entry_ajax_template = \ 'bootstrap3/edit_form_wizard_entry_ajax.html' view_form_wizard_entry_template = \ 'bootstrap3/view_form_wizard_entry.html' view_form_wizard_entry_ajax_template = \ 'bootstrap3/view_form_wizard_entry_ajax.html' # *********************************************************************** # ************************* Form importer templates ********************* # *********************************************************************** form_importer_template = 'bootstrap3/form_importer.html' form_importer_ajax_template = 'bootstrap3/form_importer_ajax.html' def __init__(self, user=None): """Constructor.""" super(Bootstrap3Theme, self).__init__(user=user) self.form_radio_element_html_class = '' theme_registry.register(Bootstrap3Theme)
dashboard_template = 'foundation5/dashboard.html' forms_list_template = 'foundation5/forms_list.html' edit_form_element_entry_template = \ 'foundation5/edit_form_element_entry.html' edit_form_element_entry_ajax_template = \ 'foundation5/edit_form_element_entry_ajax.html' edit_form_entry_template = 'foundation5/edit_form_entry.html' edit_form_entry_ajax_template = 'foundation5/edit_form_entry_ajax.html' edit_form_handler_entry_template = \ 'foundation5/edit_form_handler_entry.html' edit_form_handler_entry_ajax_template = \ 'foundation5/edit_form_handler_entry_ajax.html' form_entry_submitted_template = 'foundation5/form_entry_submitted.html' form_entry_submitted_ajax_template = \ 'foundation5/form_entry_submitted_ajax.html' view_form_entry_template = 'foundation5/view_form_entry.html' view_form_entry_ajax_template = 'foundation5/view_form_entry_ajax.html' import_form_entry_template = 'foundation5/import_form_entry.html' import_form_entry_ajax_template = \ 'foundation5/import_form_entry_ajax.html' theme_registry.register(Foundation5Theme)
from fobi.base import theme_registry from fobi.contrib.themes.foundation5.fobi_themes import Foundation5Theme __all__ = ('JustSpacesTheme', ) class JustSpacesTheme(Foundation5Theme): """Overriding the Foundation5 theme for Just Spaces.""" html_classes = ['my-simple-theme'] base_template = 'override_theme/base.html' # It's important to set the `force` argument to True, in # order to override the original theme. Force can be applied # only once. theme_registry.register(JustSpacesTheme, force=True)
from fobi.base import theme_registry from fobi.contrib.themes.simple.fobi_themes import SimpleTheme __all__ = ('MySimpleTheme',) class MySimpleTheme(SimpleTheme): """Overriding the "simple" theme.""" html_classes = ['my-simple-theme'] base_view_template = 'override_simple_theme/base_view.html' form_ajax = 'override_simple_theme/snippets/form_ajax.html' form_snippet_template_name = \ 'override_simple_theme/snippets/form_snippet.html' # It's important to set the `force` argument to True, in # order to override the original theme. Force can be applied # only once. theme_registry.register(MySimpleTheme, force=True)
For adding the edit link to edit form entry view. :return str: """ return """ <ul class="{container_class}"> {edit_option_html} <li><a href="{delete_url}" class="{delete_option_class}"> <span>{delete_text}</span></a> </li> </ul> <input type="hidden" value="{form_element_position}" name="form-{counter}-position" id="id_form-{counter}-position" class="form-element-position"> <input type="hidden" value="{form_element_pk}" name="form-{counter}-id" id="id_form-{counter}-id"> """.format( container_class = cls.form_list_container_class, edit_option_html = "{edit_option_html}", delete_url = "{delete_url}", delete_option_class = cls.form_delete_form_entry_option_class, delete_text = "{delete_text}", form_element_position = "{form_element_position}", counter = "{counter}", form_element_pk = "{form_element_pk}", ) theme_registry.register(DjangoCMSAdminStyleTheme)
create_form_entry_template = 'simple/create_form_entry.html' create_form_entry_ajax_template = 'simple/create_form_entry_ajax.html' dashboard_template = 'simple/dashboard.html' forms_list_template = 'simple/forms_list.html' edit_form_element_entry_template = 'simple/edit_form_element_entry.html' edit_form_element_entry_ajax_template = \ 'simple/edit_form_element_entry_ajax.html' edit_form_entry_template = 'simple/edit_form_entry.html' edit_form_entry_ajax_template = 'simple/edit_form_entry_ajax.html' edit_form_handler_entry_template = 'simple/edit_form_handler_entry.html' edit_form_handler_entry_ajax_template = \ 'simple/edit_form_handler_entry_ajax.html' form_entry_submitted_template = 'simple/form_entry_submitted.html' form_entry_submitted_ajax_template = \ 'simple/form_entry_submitted_ajax.html' view_form_entry_template = 'simple/view_form_entry.html' view_form_entry_ajax_template = 'simple/view_form_entry_ajax.html' import_form_entry_template = 'simple/import_form_entry.html' import_form_entry_ajax_template = 'simple/import_form_entry_ajax.html' theme_registry.register(SimpleTheme)
add_form_handler_entry_template = 'foundation5/add_form_handler_entry.html' add_form_handler_entry_ajax_template = \ 'foundation5/add_form_handler_entry_ajax.html' create_form_entry_template = 'foundation5/create_form_entry.html' create_form_entry_ajax_template = 'foundation5/create_form_entry_ajax.html' dashboard_template = 'foundation5/dashboard.html' edit_form_element_entry_template = 'foundation5/edit_form_element_entry.html' edit_form_element_entry_ajax_template = \ 'foundation5/edit_form_element_entry_ajax.html' edit_form_entry_template = 'foundation5/edit_form_entry.html' edit_form_entry_ajax_template = 'foundation5/edit_form_entry_ajax.html' edit_form_handler_entry_template = 'foundation5/edit_form_handler_entry.html' edit_form_handler_entry_ajax_template = \ 'foundation5/edit_form_handler_entry_ajax.html' form_entry_submitted_template = 'foundation5/form_entry_submitted.html' form_entry_submitted_ajax_template = \ 'foundation5/form_entry_submitted_ajax.html' view_form_entry_template = 'foundation5/view_form_entry.html' view_form_entry_ajax_template = 'foundation5/view_form_entry_ajax.html' theme_registry.register(Foundation5Theme)
__all__ = ('MySimpleTheme', ) from fobi.base import theme_registry from fobi.contrib.themes.simple.fobi_themes import SimpleTheme class MySimpleTheme(SimpleTheme): """ Overriding the "simple" theme. """ html_classes = [ 'my-simple-theme', ] base_view_template = 'override_simple_theme/base_view.html' form_ajax = 'override_simple_theme/snippets/form_ajax.html' form_snippet_template_name = 'override_simple_theme/snippets/form_snippet.html' # It's important to set the `force` argument to True, in # order to override the original theme. Force can be applied # only once. theme_registry.register(MySimpleTheme, force=True)
add_form_element_entry_ajax_template = 'simple/add_form_element_entry_ajax.html' add_form_handler_entry_template = 'simple/add_form_handler_entry.html' add_form_handler_entry_ajax_template = 'simple/add_form_handler_entry_ajax.html' create_form_entry_template = 'simple/create_form_entry.html' create_form_entry_ajax_template = 'simple/create_form_entry_ajax.html' dashboard_template = 'simple/dashboard.html' edit_form_element_entry_template = 'simple/edit_form_element_entry.html' edit_form_element_entry_ajax_template = 'simple/edit_form_element_entry_ajax.html' edit_form_entry_template = 'simple/edit_form_entry.html' edit_form_entry_ajax_template = 'simple/edit_form_entry_ajax.html' edit_form_handler_entry_template = 'simple/edit_form_handler_entry.html' edit_form_handler_entry_ajax_template = 'simple/edit_form_handler_entry_ajax.html' form_entry_submitted_template = 'simple/form_entry_submitted.html' form_entry_submitted_ajax_template = 'simple/form_entry_submitted_ajax.html' view_form_entry_template = 'simple/view_form_entry.html' view_form_entry_ajax_template = 'simple/view_form_entry_ajax.html' import_form_entry_template = 'simple/import_form_entry.html' import_form_entry_ajax_template = 'simple/import_form_entry_ajax.html' theme_registry.register(SimpleTheme)
edit_form_element_entry_template = 'bootstrap3/edit_form_element_entry.html' edit_form_element_entry_ajax_template = \ 'bootstrap3/edit_form_element_entry_ajax.html' edit_form_entry_template = 'bootstrap3/edit_form_entry.html' edit_form_entry_ajax_template = 'bootstrap3/edit_form_entry_ajax.html' edit_form_handler_entry_template = 'bootstrap3/edit_form_handler_entry.html' edit_form_handler_entry_ajax_template = \ 'bootstrap3/edit_form_handler_entry_ajax.html' form_entry_submitted_template = 'bootstrap3/form_entry_submitted.html' form_entry_submitted_ajax_template = \ 'bootstrap3/form_entry_submitted_ajax.html' embed_form_entry_submitted_ajax_template = \ 'bootstrap3/embed_form_entry_submitted_ajax.html' view_form_entry_template = 'bootstrap3/view_form_entry.html' view_form_entry_ajax_template = 'bootstrap3/view_form_entry_ajax.html' view_embed_form_entry_ajax_template = \ 'bootstrap3/view_embed_form_entry_ajax.html' form_importer_template = 'bootstrap3/form_importer.html' form_importer_ajax_template = 'bootstrap3/form_importer_ajax.html' def __init__(self, user=None): super(Bootstrap3Theme, self).__init__(user=user) self.form_radio_element_html_class = '' theme_registry.register(Bootstrap3Theme)
from django.utils.translation import ugettext_lazy as _ from fobi.base import theme_registry from fobi.contrib.themes.bootstrap3.fobi_themes import Bootstrap3Theme from . import UID __title__ = 'fobi.contrib.themes.class_based_views.apps' __author__ = 'Kyle Roux <*****@*****.**>' __license__ = 'GPL 2.0/LGPL 2.1' __copyright__ = '2018 Kyle Roux' __all__ = ('ClassBasedViewsTheme',) class ClassBasedViewsTheme(Bootstrap3Theme): """ ClassBasedViewsTheme """ uid = UID name = _("Class Based Views") dashboard = 'fobi.class_based.dashboard' form_wizards_dashboard = 'fobi.class_based.form_wizards_dashboard' create_form_entry = 'fobi.class_based.create_form_entry' edit_form_entry = 'fobi.class_based.edit_form_entry' create_form_wizard_entry = 'fobi.class_based.create_form_wizard_entry' edit_form_wizard_entry = 'fobi.class_based.edit_form_wizard_entry' add_form_element_entry = 'fobi.class_based.add_form_element_entry' theme_registry.register(ClassBasedViewsTheme)
from fobi.base import theme_registry from fobi.contrib.themes.bootstrap3.fobi_themes import Bootstrap3Theme from . import UID __title__ = 'fobi.contrib.themes.class_based_views.apps' __author__ = 'Kyle Roux <*****@*****.**>' __license__ = 'GPL 2.0/LGPL 2.1' __copyright__ = '2018 Kyle Roux' __all__ = ('ClassBasedViewsTheme', ) class ClassBasedViewsTheme(Bootstrap3Theme): """ ClassBasedViewsTheme """ uid = UID name = _("Class Based Views") dashboard = 'fobi.class_based.dashboard' form_wizards_dashboard = 'fobi.class_based.form_wizards_dashboard' create_form_entry = 'fobi.class_based.create_form_entry' edit_form_entry = 'fobi.class_based.edit_form_entry' create_form_wizard_entry = 'fobi.class_based.create_form_wizard_entry' edit_form_wizard_entry = 'fobi.class_based.edit_form_wizard_entry' add_form_element_entry = 'fobi.class_based.add_form_element_entry' theme_registry.register(ClassBasedViewsTheme)