[ckan-dev] Issue 334 edit related on /app
Toby Dacre
toby.okfn at gmail.com
Wed Feb 20 10:14:28 UTC 2013
On 20 February 2013 09:29, Sean Hammond <sean.hammond at okfn.org> wrote:
> > Currently the edit url looks like /package/XXX/related/edit/YYY where
> > XXX is the dataset id of the item and YYY is the id of the related
> > item.
>
> Not all related items belong to a dataset, so maybe this should change.
> On publicdata.eu for example, none of the related items on the /apps
> page (also on the front page) belong to a dataset.
>
so these currently cannot be edited/deleted? is this the case?
>
> > So on the /app url we would need to supply the dataset id to get the
> > edit button (in fact if we passed the dataset id we would indeed get an
> > edit button) however the snippets assume that we pass the package id
> > (which is identical for all related items) which works for the dataset
> > related item pages but not for the /app url.
>
> Dataset id vs package id? Was one of these meant to be related item id?
>
no this is the`owning` dataset of the related item. and is broken as it
assumes all displayed apps are owned by a single dataset - this is easily
fixed if we addthe new column to related items data
> > 2) agree to fix this issue which would need the following
> >
> > a) add a dataset field to the related table that links back to the
> > dataset that has the item (an populate it)
> > b) change the logic functions to update this field
> > c) use this field in the related snippets for correct results
>
> So you're saying that when a related item does belong to a dataset, some
> of the action and auth functions need the dataset id in order to e.g.
> decide if a user is allowed to delete the related item?
>
> If that's the case, I think adding a column of dataset IDs to the
> related table seems like a good idea. But it should be allowed to have
> NULL in this column, and all the action, auth and snippets should be
> aware of this.
>
This does feel the only real solution then the urls can be simplified too.
One issue is do we call it dataset_id or package_id - dataset_id seems more
sensible but we still have this package/dataset issue we should get resolved
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130220/39a894ac/attachment-0001.html>
More information about the ckan-dev
mailing list