abartov / bybeconv

Project Ben-Yehuda's content management system.
https://benyehuda.org/
Other
10 stars 5 forks source link

Authorities #363

Closed damisul closed 1 month ago

damisul commented 1 month ago

This PR splits existing People table to Authorities (storing common attributes) and People (storing person-only attributes) tables. It also adds new CorporateBodies table to store organization-specific properties.

I've modified existing tables to point to Authorities table insted of People and updated related code.

Same form is used for CRUD both for person- and corporate_body- authorities (we hide/show related fields depending on specified type).

Also I've renamed PeopleIndex to AuthoritiesIndex, now it stores data both for People and CorporateBodies.

NOTE: I've did not touched PeopleAPI yet, only updated it to work with new structure. It will ignore CorporateBodies for now. I think we should rename endpoint to Authorities later (let's create separate ticket for this).

Also I did my best to update bib_controller. but I have little knowledge of its logic. So I'd propose to test it deeply, as there are more chances for bugs.

And as usual there are number of i18n strings waiting for translation to Hebrew.

And one more smaller issue to be fixed, is to rename url_helper redirecting to TOC of authority. I kept it 'person_path', but in reality it leads to 'toc' page. I'd propose to rename it to 'authority_toc' instead. WDYT? I can do it in a separate PR later.