OpenDevelopmentMekong / wp-odm_tabular_pages

Internal ODM Wordpress plugin for exposing a page template for tabular pages
https://opendevelopmentmekong.net
GNU General Public License v3.0
0 stars 2 forks source link

Allow to group different rows into a single one and present sub-rows in a collapsed way #49

Open acorbi opened 7 years ago

acorbi commented 7 years ago

The use case is the following:

On the laws pages, users find entries on the table that are actually amendments and revisions of the same law. The fact that these laws are related can be programatically determined by looking at certain metadata fields on them (status and relations). These records should optimally appear represented together in the same row. Ideally, users should be able to expand/collapse the row in order to see all versions of the same law. The most actual law (status = active) should be the highlighted one, the rest should be exposed when the user expands the row.

@Huyeng I recall seeing a row on one of the tables (in one of the profiles probably) where the user could expand/collapse the row to see more information. Do you have some hints for me on how to implement this? I am thinking on using https://datatables.net/examples/api/row_details.html for implementing this, what do you think?

screenshot from 2016-12-15 19-18-25

Huyeng commented 7 years ago

@Alex, to show the extra / detailed information has never done before, but it is similar to the responsive function of the datatable that you saw.

acorbi commented 7 years ago

@Huyeng thanks for your comment. I will work on it today, will keep you informed.

prustar commented 7 years ago

@acorbi @Huyeng -- this is great! Looking forward to seeing result.

acorbi commented 7 years ago

@prustar If I recall properly, we agreed that the logic should group laws considering both the status and the relations between them.

In general lines, we will be able to develop, test and deploy this once the underlying data (relations) is there. I would therefore wait to implement this until that is the case.

prustar commented 7 years ago

@acorbi -- there are two aspects here:

  1. Group by expandable category based upon document type. -- Just tried this again and it didn't work.
  2. Group the same documents (different versions) together highlight the most recent and active one on top. -- this would be based upon odm_laws_previous_legal_document and/or date The most recent date being presented on top.