Commit graph

187 commits

Author SHA1 Message Date
Sébastien Lucas 8a72e1a6fd Ensure the check can be tested. re #127 2013-12-14 18:48:34 +01:00
Sébastien Lucas cd626b25ef Factorize a little more the DB handling. re #127 2013-12-14 18:25:32 +01:00
Sébastien Lucas a1cb83eea9 Refactor the detection of the case when no database has been selected. re #127 2013-12-14 11:30:42 +01:00
Sébastien Lucas 90cfeb57c1 Simplify a little the code to get the title of the search page. re #127 2013-12-14 10:44:48 +01:00
Sébastien Lucas 8fac662f4b Try to use the method created ... re #127 2013-12-14 10:32:28 +01:00
Sébastien Lucas 7ba85d150b Add a new config item to ignore a category in search. Simplify the queries. re #123 2013-12-08 21:01:17 +01:00
At-Libitum 79c2c431cc publisher category did not get included in regular search.
added publisher "exists (select ..." as 4th or branch to SQL_BOOKS_QUERY

added argument placeholder as 4th to the various calls to getBooksByQuery.

re #123
2013-12-08 15:43:23 +01:00
Sébastien Lucas 79e070833d Forgot a bit of the last commit. re #124 2013-12-07 21:29:37 +01:00
Sébastien Lucas 002c7596ea Changing the number of book per pages changed the search with multiple database. Reported by At-Libitum. fix #124 2013-12-07 21:17:38 +01:00
Sébastien Lucas 0f09ef5f8c Remove trailing spaces 2013-12-05 10:52:51 +01:00
At-Libitum f87963ea8a Merge git://github.com/seblucas/cops
Conflicts:
	test/pageTest.php - RESOLVED
2013-12-02 14:53:10 +01:00
At-Libitum d4cedf3737 removed some unused variables from base.php and pageTest.php
added custom columns to ```default_config.php``` for pageTest.php
2013-12-01 13:25:34 +01:00
Sébastien Lucas 19baa9bdf5 Fix some tabs :(. 2013-11-30 16:45:56 +01:00
At-Libitum d540cba22a renamed constant and removed some accidental tabs. 2013-11-30 16:21:52 +01:00
Sébastien Lucas 13d0b4c471 Fix a problem with PHP embedded server. $_SERVER['QUERY_STRING'] is not set if it's empty. 2013-11-29 09:34:32 +01:00
Sébastien Lucas ef4cbb79cd Getting closer maybe. 2013-11-29 07:32:08 +01:00
Sébastien Lucas f7be2ce893 Fix scrutinizer warnings. 2013-11-25 21:40:54 +01:00
Sébastien Lucas d12c7e9086 Better test for missing metadata.db (also test if it's readable). re #116 2013-11-25 21:16:34 +01:00
Sébastien Lucas 4d9b3a4925 Fix the redirect in case the database is not found. I also handle better the case were no file are actually found. Thanks to At Libitum. fix #116 2013-11-25 17:10:43 +01:00
At-Libitum 9efcd661a0 **2012-11-22**
**Added global support for publishers**

Files modified:

*base.php*

-   changed class Entry,

	-   adding a constant ```cops:publishers``` to the icon array for the feed.

-   changed class Page

	-   added branches to the page selector switch

-   changed Page->public function InitializeContent

	-   added call to pull publisher count from database

-   changed class PageAllBooks

	-   changed it so ```getCurrentOption``` is actually used...

-   added page descendant class ```PageAllPublishers```

	-   handles pulling the publishers category from database

-   added page descendant class ```PagePublisherDetail```

	-   handles pulling the books per publisher data from database

-   changed class PageQueryResult

	-   added constant and switches for publisher search scope

-   abstract class Base

	-   added constants for the publisher pages

*book.php*

-   added require statement for publisher.php
-   added ```SQL_BOOKS_BY_PUBLISHER``` query to retrieve books by publisher.

-   changed class Book

	-   added query constant
	-   added publisher item
	-   added test in case no known publisher
	-   added publishername and url array elements for the JSON output
	-   added public function ```getPublisher```
	-   added public static function ```getBooksByPublisher``` to fire the query

-   changed function getJson

	-   added publisher category to search
	-   added publishername (single) and publishertitle(plural) localization entries to i18n translation array

*index.php*

-   added require statement for publisher.php

*lang/Localization_en.json

-   added new localization entries for publisher labels (see below)
```
"publisher.alphabetical.many":"Alphabetical index of the {0} publishers",
"publisher.alphabetical.none":"Alphabetical index of absolutely no publisher",
"publisher.alphabetical.one":"Alphabetical index of the single publisher",
"publisher.name":"Publisher",
"publisher.title":"Publishers",
"publisherword.many":"{0} publishers",
"publisherword.none":"No publisher",
"publisherword.one":"1 publisher",

"search.result.publisher":"Search result for *{0}* in publishers",
```

*templates\bookdetail.html*

-   added publisher label and item to bookdetail popup

*test\bookTest.php*

-   added indices and names of publishers added to testdatabase as comment
-   added test function ```testGetBooksByPublisher```
-   changed test function testGetBookById to add assertion for publisher name
-   changed test function testTypeaheadSearch to add search on partial publisher name.

*test\pageTest.php*

-   changed test function testPageIndex to insert publisher category and adjust page indices
-   changed test function testPageIndexWithCustomColum to adjust for the changed page indices
-   added test function testPageAllPublishers
-   added test function testPagePublishersDetail
-   added test function testPageSearchScopePublishers

*test\BaseWithSomeBooks\metadata.db*

-   added 5 publishers spread across all 14 books, replacing the original publisher Feedbooks

Files added:

*publisher.php*
2013-11-22 22:08:09 +01:00
Sébastien Lucas 185c59ce15 Fix some warnings and errors caused by the previous commit. re #34 2013-11-22 15:22:03 +01:00
Sébastien Lucas caa46c50e3 Add a way to specify the number of item per page. re #34 2013-11-22 14:36:39 +01:00
Sébastien Lucas 25a2088f9a Fix some warnings. re #96 2013-11-18 22:00:23 +01:00
At-Libitum 8db9489e07 Added support for optional flat-list display of "All Books"
Files modified:

config_default.php

base.php

changed class PageAllBooks to test for configuration option "cops_titles_split_first_letter".
Used getCurrentOption to prepare for making Split Letter options configurable in web GUI

book.php

added SQL_BOOKS_ALL query to have a flat-list datasource not grouped by first letter.
added const SQL_BOOKS_ALL to class Book
added public static function "getBooks", called from Base::PageAllBooks to retrieve the flat-list
2013-11-08 17:53:11 +01:00
Sébastien Lucas 9cf33d7d1c Forgot two while fixing the ids. re #104 2013-10-25 08:07:42 +02:00
Sébastien Lucas fa5ec6cb58 Fix the ids in OPDS feed to produce a valid feed. fix #104 2013-10-25 07:59:27 +02:00
Sébastien Lucas bbdf4a432e Merge 2013-10-13 22:23:20 +02:00
Marsender e77777e9e8 COPS config: Add author name, uri and email 2013-10-10 06:11:32 +01:00
Marsender 701cb291a8 COPS config: Add author name, uri and email 2013-10-10 05:25:04 +01:00
Sébastien Lucas 3e98615ea9 Cleanly handle suggestion title. re #34 2013-10-06 18:58:16 +02:00
Sébastien Lucas 23129b9c9e The search page title is now more precise in case a scope is provided. re #34 2013-10-06 18:08:26 +02:00
Sébastien Lucas 9c09b8797c Add a test for the localize function. re #96 2013-10-04 12:20:34 +02:00
Sébastien Lucas 69614a0291 Small modif 2013-10-03 09:05:38 +02:00
Sébastien Lucas 3943205b58 Change the search to look into tags and series (in addition to book title and author).
re #34, #47, #78
2013-09-27 17:13:31 +02:00
Sébastien Lucas 9a857a8c6f Better english ... maybe 2013-09-20 20:44:15 +02:00
Sébastien Lucas 04cdaf5972 Fix untranslated strings. 2013-09-17 17:28:42 +02:00
Sébastien Lucas a46bc7d05a Update all translations to be sure to only have strings really used in COPS. re #39 2013-09-16 20:34:50 +02:00
Sébastien Lucas 2bcd38f4f1 Merge pull request #93 from Marsender/master
Création de bases Calibre pour COPS
2013-09-15 00:24:44 -07:00
Sébastien Lucas 60f865f51b Prepare next version 2013-09-13 18:03:04 +02:00
Didier Corbière dd242052f7 Add directory prefix to localisation files 2013-09-10 23:41:14 +01:00
Sébastien Lucas 9d117220c4 Handle better when server side rendering is enabled. re #82 2013-09-05 08:41:40 +02:00
Sébastien Lucas 429bfb1cdb Prepare for next version. 2013-08-27 10:31:33 +02:00
Sébastien Lucas 9c8ec7fb8a Add (again) server side rendering ! the list of user agent need to be completed but it should work. 2013-08-22 15:20:30 +02:00
Sébastien Lucas c84cec9516 Fix language if it is not found in the i18n. Reported by le_ 2013-07-29 10:10:54 +02:00
Sébastien Lucas 5ab905472d Next version will be only bugfixes. 2013-07-29 07:49:25 +02:00
Sébastien Lucas 826bb9e436 Handle many email recipient. fix #53 2013-07-24 20:49:24 +02:00
Sébastien Lucas 3ed5685f12 Next version will be 0.6.0. Update README and Changelog 2013-07-22 20:58:17 +02:00
Sébastien Lucas 3ca1d1d3df Cleanly fix the problems with line feed 2013-07-22 14:29:32 +02:00
Sébastien Lucas f5b9492e06 Remove all new lines after the end of PHP files. Fix a bug causing corrupt images with Wheezy. fix #81 2013-07-20 13:35:51 +02:00
Sébastien Lucas 948c1cb3fa Add a way to enable tag filter directly in the customize page. re #46 2013-07-13 08:29:17 +02:00
Sébastien Lucas bb0ba69c09 Add the email in the customize page. re #53 2013-07-03 23:40:08 +02:00
Sébastien Lucas 428550f27c Move customize inside the current template. re #73 2013-06-27 08:27:29 +02:00
Sébastien Lucas 15237ee78d Add paging to the customize page. 2013-06-26 21:28:04 +02:00
Sébastien Lucas eac4944429 Merge again 2013-06-25 11:35:30 +02:00
Sébastien Lucas 8314ae1623 Update version 2013-06-25 11:16:07 +02:00
Sébastien Lucas d3ce31c6be Move from Xhtml to Html. re #73 2013-06-25 08:40:08 +02:00
Sébastien Lucas 6b8846e02b Fix search. re #73 2013-06-21 08:38:02 +02:00
Sébastien Lucas 2029ab7d01 Simplify a little the JSON, a little more to do. re # 73 2013-06-17 22:23:58 +02:00
Sébastien Lucas a0cb911ce9 Bookdetail is handled with ajax. Template is not complete though. re #73
Fixes some small bugs with the other template.
2013-06-15 16:09:37 +02:00
Sébastien Lucas b7ab8bd9d9 Move most of JSON code to getJSON. re #73 2013-06-15 08:43:38 +02:00
Sébastien Lucas a509e3389d The new interface is completely in Ajax. Feel a lot faster. re #73
Uses pushState / popState to keep browser history correct and allow using back in the browser.
2013-06-15 08:03:22 +02:00
Sébastien Lucas f5ff23cf9d The current Css is modified if a specific cookie is set. re #25 2013-05-29 21:13:02 +02:00
Sébastien Lucas 7228af68ec rename the default css. re #25
--HG--
rename : styles/style.css => styles/style-default.css
2013-05-28 07:53:53 +02:00
Sébastien Lucas e2622191b4 Move the CSS to a specific directory. re #25 2013-05-28 07:49:52 +02:00
Sébastien Lucas df03815ec6 remove ugly debug code 2013-05-24 11:07:37 +02:00
Sébastien Lucas c6e75b7258 Add the number of book in each databases (multidatabase). 2013-05-23 18:55:45 +02:00
Sébastien Lucas afb9c8e28f Fix a PHP warning. re #66 2013-05-22 18:31:44 +02:00
ipuiu f4e365ce96 Merged Language Feature. 2013-05-21 20:49:21 +03:00
Sébastien Lucas bbc6d858b3 Next release will be 0.5.0 2013-05-21 09:48:51 +02:00
Sébastien Lucas 99f0c63a0f Merge the html5 branch. fix #45 2013-05-21 09:40:39 +02:00
Sébastien Lucas 32279afc6e Hide tags & series if there is none. re #63 2013-05-21 09:10:05 +02:00
Sébastien Lucas a56184153c Prepare for next release. 2013-05-09 02:51:26 +02:00
Sébastien Lucas 32d4588cbd Merge pull request #61 from wogong/master
add Chinese localization file and add charset setting
2013-05-07 05:10:35 -07:00
wogong 26c1d8f1c4 remove debug code 2013-05-07 16:30:53 +08:00
wogong 4c3f9b2820 zh localize almost done 2013-05-07 16:29:17 +08:00
wogong 0e6320e5a3 remove debug codes 2013-05-07 09:18:07 +08:00
Sébastien Lucas 6cd2cf8f0a Next version will be 0.4.0 2013-05-06 18:30:04 +02:00
wogong e2dd39dfdd Chinese localize basicly OK 2013-05-04 11:53:21 +08:00
Sébastien Lucas 7ae55f0ba6 Fix string. re #40 2013-04-30 10:17:38 +02:00
Sébastien Lucas 6512313733 Fix a bad URL in OPDS catalog. re #40 2013-04-30 09:57:12 +02:00
Sébastien Lucas 526483d7a5 OPDS id are cleanly handled. re #40 2013-04-30 09:11:04 +02:00
Sébastien Lucas ad52901226 Fix OPDS link. re #40 2013-04-29 16:47:16 +02:00
Sébastien Lucas 33cad7ad98 Fix search when no database is selected. re #40 2013-04-29 16:46:52 +02:00
Sébastien Lucas 059f05fac1 Fix some strings. re #37 2013-04-21 15:47:32 +02:00
Sébastien Lucas 6272cd1b01 Get rid of fancybox completely if not enabled. fixes #50
About.xml is still utf8 but looses it's BOM
2013-04-21 15:00:21 +02:00
Sébastien Lucas 0682c568b4 Add missing translation for search result. Based on a patch by Tobias. re #37 2013-04-20 15:19:48 +02:00
Sébastien Lucas 1a501e3c6c Fix database title with multiple database. re #40 2013-04-17 13:36:19 +02:00
Sébastien Lucas 16c85418c0 Reindent. re #55 2013-04-09 21:30:33 +02:00
Sébastien Lucas 893855a81d Hopefully fix the book summary problem with Wamp. re #45 2013-04-09 21:29:43 +02:00
Sébastien Lucas 60e8619d21 Prepare release 2013-04-04 21:12:52 +02:00
Sébastien Lucas b34af8ae1f Fix bookdetail when Fancyapps is enabled. re #40 2013-04-04 21:11:45 +02:00
Sébastien Lucas ff95d618db Checkconfig can now handle multi database. re #40 2013-04-04 20:53:44 +02:00
Sébastien Lucas 78b60baebd Basic multidatabase support. re #40
TODO :
 * Document the new option
 * Handle URL rewriting
 * Handle bookdetail
 * Test the case without fancybox
 * Update the title with database name
2013-04-04 08:55:58 +02:00
Sébastien Lucas d86d544074 Refactor the use of Calibre path to prepare multi database. re #40 2013-04-03 15:00:09 +02:00
Sébastien Lucas f8f20f3d5c Update addURLParameter to allow for a leading ?. re #40 2013-04-03 14:54:03 +02:00
Sébastien Lucas 51a97f8e57 Hopefully fix again comments. Reported by Alain. fixes #55 2013-04-03 14:41:58 +02:00
Sébastien Lucas fee2275393 Prepare next release 2013-03-26 22:53:20 +01:00
Sébastien Lucas 6a9646bf15 Enhance the search to have a different output depending on the current page. re #34 2013-03-08 09:40:25 +01:00
Sébastien Lucas 02b55687e2 Fix book comment handling ... once again 2013-03-07 10:58:58 +01:00
Sébastien Lucas 75862fe24c Prepare next version 2013-03-06 08:21:46 +01:00