Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html table code of DataFrame and Vector are modified #366

Merged
merged 7 commits into from
Jul 18, 2017

Conversation

Shekharrajak
Copy link
Member

It will be better if we use thead and tbody tag in the html table code of the DataFrame and Vector . Also I have defined to_html_thead and to_html_tbody method to get the header and body part of the html table. These things will be helpful for daru-view table ( generate table using DataTables gem ).

See how I am using this PR branch in datatables example to generate table code with pagination, search and other features. . Actually DataTables gem will check the thead and tbody of the table.

Copy link
Collaborator

@zverok zverok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@v0dro v0dro merged commit 9f304c1 into SciRuby:master Jul 18, 2017
@v0dro
Copy link
Member

v0dro commented Jul 18, 2017

@athityakumar use this in daru-io.

@Shekharrajak
Copy link
Member Author

Few things that can be useful in future (TODO):

  • df.to_html(options) : where options may contains table id, class or other styling to include in table tag. (this can be done using content_tag)

  • In each row , first column must have th tag (first column is always index. Right now it is in tr tag. ) Just need to modify the tbody erb file.

Shekharrajak added a commit to Shekharrajak/daru that referenced this pull request Sep 5, 2017
* table id is added in table html code

* separating thead and tbody

* methods for accessing thead and tbody

* working tbody and thead script in datatables gem

* modified some testcases

* rubocop errors fixed

* vector html table code modified and used thead and tbody tag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants