Ticket #978 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

Edit Resource including Extras in Web UI

Reported by: dread Owned by: zephod
Priority: awaiting triage Milestone: ckan-sprint-2012-03-05
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description (last modified by zephod) (diff)

Part of super-ticket #1506.

Follows on from #826.

We can configure some extra fields in resources and can edit them in the Web UI, but we can't create new columns in the Web UI. Update the WUI to handle tis.

Change History

comment:1 Changed 3 years ago by dread

  • Description modified (diff)

comment:2 Changed 3 years ago by rgrp

  • Repository set to ckan
  • Theme set to none

Suggest we either a) get rid of columnar layout or b) (preferable) get a dedicated page for resource. That way summary on package page just shows main attributes.

comment:3 Changed 2 years ago by rgrp

  • Summary changed from Web UI for Resource Extras to Edit Resource Extras in Web UI

Think this should be part of a larger refactor of resource editing now that #1445 (resource page in WUI) is done

comment:4 Changed 2 years ago by rgrp

  • Owner set to zephod
  • Status changed from new to assigned
  • Milestone changed from ckan-backlog to current-ckan-sprint-2012-02-20

comment:5 Changed 2 years ago by rgrp

  • Summary changed from Edit Resource Extras in Web UI to Edit Resource including Extras in Web UI

comment:6 Changed 2 years ago by rgrp

We already have basic editing in the Resource section of dataset edit. However, need to extend this to additional fields such as webstore_url and "extras".

comment:7 Changed 2 years ago by rgrp

  • Description modified (diff)

comment:8 Changed 2 years ago by zephod

  • Description modified (diff)

comment:9 Changed 2 years ago by zephod

  • Description modified (diff)

comment:10 Changed 2 years ago by zephod

  • Description modified (diff)

comment:11 Changed 2 years ago by zephod

  • Status changed from assigned to closed
  • Resolution set to fixed

This was not trivial to implement. The backend supports arbitrary key/value pairings on resources, and the frontend can now handle this. Add, edit and delete resource extras according to the form state.

I had to make a modification to the backend: When saving a resource, you have to submit the complete set of extras. Unsubmitted extras are assumed to be deleted. (This matches the behaviour of the package form).

https://github.com/okfn/ckan/commit/a41cd0c9b04c757f5fa37acaba6be71e345a9c1f#L0R39

Note: See TracTickets for help on using tickets.