Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ckanext-odsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Transparenzportal
ckanext-odsh
Commits
d58d5cab
Commit
d58d5cab
authored
5 years ago
by
Benjamin Becker
Browse files
Options
Downloads
Patches
Plain Diff
WIP: adds template for collection list
parent
3605a4b4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ckanext/odsh/collection/plugin.py
+15
-1
15 additions, 1 deletion
ckanext/odsh/collection/plugin.py
ckanext/odsh/templates/package/collection_read.html
+1
-0
1 addition, 0 deletions
ckanext/odsh/templates/package/collection_read.html
with
16 additions
and
1 deletion
ckanext/odsh/collection/plugin.py
+
15
−
1
View file @
d58d5cab
from
ckan.lib.plugins
import
DefaultTranslation
,
DefaultDatasetForm
import
ckan.plugins
as
plugins
import
ckan.plugins.toolkit
as
toolkit
import
helpers
as
collection_helpers
from
routes.mapper
import
SubMapper
...
...
@@ -8,6 +9,7 @@ class CollectionsPlugin(plugins.SingletonPlugin, DefaultDatasetForm):
plugins
.
implements
(
plugins
.
IDatasetForm
,
inherit
=
True
)
plugins
.
implements
(
plugins
.
IRoutes
,
inherit
=
True
)
plugins
.
implements
(
plugins
.
ITemplateHelpers
)
plugins
.
implements
(
plugins
.
IConfigurer
)
# IDataSetForm
...
...
@@ -17,6 +19,9 @@ class CollectionsPlugin(plugins.SingletonPlugin, DefaultDatasetForm):
def
is_fallback
(
self
):
return
False
def
read_template
(
self
):
return
'
package/collection_read.html
'
# IRoutes
def
before_map
(
self
,
map
):
...
...
@@ -55,3 +60,12 @@ class CollectionsPlugin(plugins.SingletonPlugin, DefaultDatasetForm):
return
{
'
get_collection
'
:
collection_helpers
.
get_collection
,
}
# IConfigurer
def
update_config
(
self
,
config
):
# Add this plugin's templates dir to CKAN's extra_template_paths, so
# that CKAN will use this plugin's custom templates.
# 'templates' is the path to the templates dir, relative to this
# plugin.py file.
toolkit
.
add_template_directory
(
config
,
'
templates_collections
'
)
This diff is collapsed.
Click to expand it.
ckanext/odsh/templates/package/collection_read.html
0 → 100644
+
1
−
0
View file @
d58d5cab
Test
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment