MI-DPLA / combine

Combine /kämˌbīn/ - Metadata Aggregator Platform
MIT License
26 stars 11 forks source link

add Organization to Jobs DT tables #147

Closed ghukill closed 6 years ago

ghukill commented 6 years ago

For both jobs and input jobs - it would be helpful to be able to limit by organization.

blancoj commented 6 years ago

These are notes from my conversation with @ghukill about this issue:

This issue appears easy, but has some nit picky things with the table. There is a fair amount of javascript that fires between the table and the graph, that is — unfortunately — tied to the column index from the table. So, adding one column, requires updating javascripts in lots of places. And updating a custom class that returns results for the table. It’s not hard per say, but lots of threads.

It would be adding a column to the actual HTML table on this page: http://159.65.187.6:8000/combine/jobs/all

I’m imagining before the “Record Group” column. The column name would be "Organization". It would point to the organization of the job belongs to.

Those tables are made with the DataTables library, which requires data in a specific form. This class in views.py provides the data for it: https://github.com/WSULib/combine/blob/master/core/views.py#L1909-L2042

This is the file that provides the HTML for the table (this is the template): https://github.com/WSULib/combine/blob/master/core/templates/core/jobs_dt_table.html

The trickiness are parts like this, that are keying off column indexes in the table: https://github.com/WSULib/combine/blob/master/core/templates/core/jobs_dt_table.html#L137-L142

Just making sure to bump these all one number (or wherever it makes sense depending on where they fall in the table) because adding a new column… here too: https://github.com/WSULib/combine/blob/master/core/templates/core/jobs_dt_table.html#L124-L125 and there might be more…

ghukill commented 6 years ago

Done.