aso2101 / satavahana-inscriptions

1 stars 0 forks source link

Add sort options to bibliography browse #46

Closed wsalesky closed 7 years ago

wsalesky commented 7 years ago

Supersedes: #23 Following up on our conversation: I'll change the title of the TEI documents to the short title (and maybe think about getting rid of this redundancy, although that will require changes to EM's ODD), and @wsalesky will try adding options to bibliography.html to allow different sorting options (by publication date, by author/editor, and by title).

wsalesky commented 7 years ago

New branch adds sort options to app:paginate function. You can feed in the sort options via the sort-option parameter.

Example in the HTML <ul class="pagination" data-template="app:paginate" data-template-per-page="20" data-template-max-pages="9" data-template-min-hits="21" data-template-sort-options="date,author,title"/>

This can be extended to use other elements to sort on.

wsalesky commented 7 years ago

There are some outlying CSS issues on the sort button.

aso2101 commented 7 years ago

this is excellent!

21dda30 fixes the css on my side, although my browser (chromium on ubuntu) is evidently a little idiosyncratic, so check how it looks whenever you next pull the code.

i've also been modifying style.less rather than style.css (i think that style.css is regenerated every time style.less is changed in the database but i'm not exactly sure how...).

looking forward to using the sort-options parameter on other browse pages. i'll probably try it with persons in a few days.

wsalesky commented 7 years ago

Okay, thanks. I will add css to the style.less from now on. I think you mentioned that before.

As for adding the sort options to other pages, we may need add some additional xpath options, but it should be easily extensible.

wsalesky commented 7 years ago

@aso2101 This one can also be closed I believe.