Skip to content
Snippets Groups Projects
Select Git revision
  • a2e09003c6af76a3222bc5c8b9c06892e0b821ab
  • main default protected
  • OZG-7981-Statistik-Anzeige-von-Mandanten
  • OZG-7986-mandat-anfragen
  • fix-storybook
  • OZG-8378-ods-heading
  • OZG-8405-Alfa-Bearbeiter-auswählen-und-entfernen-Design
  • OZG-6978-prevent-other-pages-from-being-called
  • OZG-8314-Alfa-Vorgang-Bearbeiter-Zuweisung-entfernen
  • testing-imports
  • storybook-improvements
  • OZG-7287-forward-saml-token
  • release-administration
  • OZG-8422-BenutzerSpeichern
  • release-info
  • release
  • OZG-7856_schadcode-scanner-e2e
  • OZG-7985-fix-sorting
  • OZG-8305-Create-webpack-sbom
  • tooltip-improvements
  • OZG-7714-UpgradeKeycloakDependencyTo25
  • 1.12.1-administration
  • 1.12.0-administration
  • 1.12.0-info
  • 2.27.0-alfa
  • 1.11.0-info
  • 1.11.0-administration
  • 2.26.0-alfa
  • 1.10.0-info
  • 1.10.0-administration
  • 2.25.0-alfa
  • 1.9.0-info
  • 1.9.0-administration
  • 2.24.0-alfa
  • 1.8.0-info
  • 1.8.0-administration
  • 2.23.0-alfa
  • 1.7.0-info
  • 1.7.0-administration
  • 2.22.0-alfa
  • 1.6.0-info
41 results

index.ts

Blame
  • plugin.py 985 B
    import ckan.plugins as plugins
    import ckan.plugins.toolkit as toolkit
    
    def odsh_main_groups():
        '''Return a list of the groups to be shown on the start page.'''
    
        # Get a list of all the site's groups from CKAN, sorted by number of
        # datasets.
        groups = toolkit.get_action('group_list')(
            data_dict={'all_fields': True})
    
        return groups
    
    class OdshPlugin(plugins.SingletonPlugin):
        plugins.implements(plugins.IConfigurer)
        plugins.implements(plugins.ITemplateHelpers)
    
        # IConfigurer
    
        def update_config(self, config_):
            toolkit.add_template_directory(config_, 'templates')
            toolkit.add_public_directory(config_, 'public')
            toolkit.add_resource('fanstatic', 'odsh')
        
        def get_helpers(self):
            # Template helper function names should begin with the name of the
            # extension they belong to, to avoid clashing with functions from
            # other extensions.
            return {'odsh_main_groups': odsh_main_groups}