diff options
author | Jayaram Pai | 2014-03-02 14:57:48 +0530 |
---|---|---|
committer | Jayaram Pai | 2014-03-02 14:57:48 +0530 |
commit | f4bc0e0afdc808878157d8e49cd5e36000a66e19 (patch) | |
tree | b5e04e6c4c28766c66bb2055833b5afed0cda543 | |
parent | 3b83dad22ca304cd664c1b866ff6074656301e4b (diff) | |
download | tbc-external-review-f4bc0e0afdc808878157d8e49cd5e36000a66e19.tar.gz tbc-external-review-f4bc0e0afdc808878157d8e49cd5e36000a66e19.tar.bz2 tbc-external-review-f4bc0e0afdc808878157d8e49cd5e36000a66e19.zip |
/selected_books: ul to table
-rw-r--r-- | tbc_external_review.module | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tbc_external_review.module b/tbc_external_review.module index ea3f635..5596227 100644 --- a/tbc_external_review.module +++ b/tbc_external_review.module @@ -365,20 +365,27 @@ function tbc_external_review_selected_books_all() { global $user; $page_content = ""; - $page_content .= "- Please click the books to <b>download</b> them."; $query = " SELECT * FROM {textbook_companion_preference} WHERE id IN (SELECT preference_id FROM {external_review_details} WHERE uid = %d) "; $result = db_query($query, $user->uid); - $page_content .= "<ol>"; + $headers = array( + "Book", "Author", + "Edition", "Action", + ); + $rows = array(); while($row = db_fetch_object($result)) { - $page_content .= "<li>"; - $page_content .= l(t("{$row->book} by {$row->author} ( ed: {$row->edition}, pub: {$row->year})"), "full_download_external/book/{$row->id}"); - $page_content .= "</li>"; + $item = array( + "{$row->book}", + "{$row->author}", + "{$row->edition}", + l(t("Download [.zip]"), "full_download_external/book/{$row->id}") + ); + array_push($rows, $item); } - $page_content .= "</ol>"; + $page_content .= theme("table", $headers, $rows); return $page_content; } |