diff --git a/invenio_jobs/administration/jobs.py b/invenio_jobs/administration/jobs.py index 0c3b4c7..5609f54 100644 --- a/invenio_jobs/administration/jobs.py +++ b/invenio_jobs/administration/jobs.py @@ -8,7 +8,11 @@ """Invenio administration view module.""" -from invenio_administration.views.base import AdminResourceListView, AdminResourceEditView, AdminResourceDetailView, AdminResourceCreateView +from invenio_administration.views.base import ( + AdminResourceListView, + AdminResourceEditView, + AdminResourceCreateView, +) from invenio_i18n import lazy_gettext as _ @@ -44,7 +48,7 @@ class JobsListView(AdminResourceListView): search_facets_config_name = "JOBS_FACETS" -class JobsDetailsView(AdminResourceDetailView): +class JobsDetailsView(AdminResourceListView): """Configuration for Jobs detail view which shows runs.""" def get_api_endpoint(self, pid_value=None): @@ -79,6 +83,7 @@ def get_api_endpoint(self, pid_value=None): search_sort_config_name = "JOBS_SORT_OPTIONS" search_facets_config_name = "JOBS_FACETS" + class JobsEditView(AdminResourceEditView): """Configuration for job edit view.""" @@ -91,18 +96,18 @@ class JobsEditView(AdminResourceEditView): list_view_name = "jobs" form_fields = { - "title": { - "order": 1, - "text": _("Title"), - "description": _("A title of the job."), - }, - "description": { - "order": 2, - "text": _("Description"), - "description": _("A short description about the job."), - }, - "created": {"order": 5}, - "updated": {"order": 6}, + "title": { + "order": 1, + "text": _("Title"), + "description": _("A title of the job."), + }, + "description": { + "order": 2, + "text": _("Description"), + "description": _("A short description about the job."), + }, + "created": {"order": 5}, + "updated": {"order": 6}, } @@ -116,7 +121,7 @@ class JobsCreateView(AdminResourceCreateView): api_endpoint = "/jobs" title = "Create Job" list_view_name = "jobs" - + form_fields = { "title": { "order": 1, @@ -131,4 +136,3 @@ class JobsCreateView(AdminResourceCreateView): "created": {"order": 3}, "updated": {"order": 4}, } - diff --git a/invenio_jobs/assets/semantic-ui/js/invenio_jobs/administration/search/JobSearchResultItemLayout.js b/invenio_jobs/assets/semantic-ui/js/invenio_jobs/administration/search/JobSearchResultItemLayout.js index c80be0f..60b583c 100644 --- a/invenio_jobs/assets/semantic-ui/js/invenio_jobs/administration/search/JobSearchResultItemLayout.js +++ b/invenio_jobs/assets/semantic-ui/js/invenio_jobs/administration/search/JobSearchResultItemLayout.js @@ -21,7 +21,7 @@ import { http } from "react-invenio-forms"; class SearchResultItemComponent extends Component { render() { - const { + const { title, actions, apiEndpoint, @@ -30,7 +30,8 @@ class SearchResultItemComponent extends Component { resourceName, displayDelete, displayEdit, - result } = this.props; + result, + } = this.props; return (