[ckan-dev] Issue 334 edit related on /app
Mark Wainwright
mark.wainwright at okfn.org
Wed Feb 20 10:08:43 UTC 2013
I'm not sure there is a use case for related items that aren't
actually related to any dataset, and there's no UI for it, either.
It's used by publicdata.eu because there were a bunch of pre-existing
links that needed to be stuck somewhere, but we shouldn't give
ourselves headaches to keep this feature, unless anyone has other
ideas for why it's needed.
Mark
On 20/02/2013, 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 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?
>
>> 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.
>
> _______________________________________________
> 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
>
More information about the ckan-dev
mailing list