cccs-web / core

CCCS' customized django web application
4 stars 11 forks source link

ordering of project using 'to date' (rather than 'from date') #162

Open cccs-ip opened 9 years ago

cccs-ip commented 9 years ago

Projects in the CV front end are presented in descending order, which is great. I would like, however, to show them in descending order using the 'to date' (as opposed to the 'from date'). How to accomplish this?

screenshot from 2014-09-21 22 07 19

pwhipp commented 9 years ago

Actually, projects are listed alphabetically by title by default. CVProjects are already listed by reverse to date, not from date.

Each project does not currently display the from/to dates in the table. I've already made the data model consistent with the from/to dates and the CVEmployment set uses the 'Dates employed' column to present the dates in a manner along the lines you are looking for.

How about I change all of the date range presentation on the CV detail page to use the same style as the CVEmployment including the use of the word 'present' and add a 'Dates' field to the CVProject table using that style?

cccs-ip commented 9 years ago

Sounds very helpful. Thank you.

I am still having trouble with my local installation (a database issue, I am sure), so I haven't had time yet to play with the HTML. I was actually thinking of splitting that colum into six sub-columns:

Person Months 2 From March 2012 To present
pwhipp commented 9 years ago

You can certainly do that.

If you look at employment.html, you can see how I constructed the field. The other tables show how the columns are handled.

I would aim to present the date ranges consistently for all of the CV mappings so that the user can read the content easily.

There is always a compromise between template complexity like this and with migrating consistent field treatments into the python code that sets up the context (or models) for the template. For example, I could add a single method to the CVDateRangeSet (l91ff) date_range_string which returns e.g '2 months from Mar 2012 to May 2012'. This could then be used for any of the appropriate object in the template as {% obj.date_range_string %}.

Ping me online if your local install is still causing problems and we can sort it out interactively.