summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_search_results.php
AgeCommit message (Collapse)AuthorFilesLines
2017-02-08Hide the table sorting links on the dashboardLukas Fleischer1-8/+27
The tables on the dashboard always show the 50 most recent packages, ordered by last update. Do not make the table headers of these tables clickable. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-04pkg_search_results.php: Split out package results boxLukas Fleischer1-88/+86
Do not print the wrapper div container when calling pkg_search_page(). Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-04Refactor pkg_search_page()Lukas Fleischer1-2/+6
* Pass search parameters using an associative array instead of $_GET. * Add a boolean parameter to enable and disable headers/footers. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-07-23Remove wearout factor from translatable stringLukas Fleischer1-1/+1
Even though that number is hardcoded in the source code, it is better to make it not appear in the message catalog such that it can be made configurable easily later. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-24Disable mass unflaggingLukas Fleischer1-1/+0
This currently does not work. Disable it until we have proper support for flagging multiple packages on the flag page. Fixes FS#46780. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27Make confirmation label of width 'auto'Johannes Löthberg1-1/+1
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27Wrap all confirmation checkbox labels in label tagJohannes Löthberg1-1/+1
Without a label tag around the label it won't be clickable. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-15Store 10 significant digits of the popularity scoreLukas Fleischer1-1/+1
Even if we only display two digits after the decimal point, storing more digits internally allows us to order the search results more accurately. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-15Add explanation for Popularity field in search resultsLeonidas Spyropoulos1-1/+1
Fixes FS#45327. Signed-off-by: Leonidas Spyropoulos <artafinde@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14Replace categories with keywordsLukas Fleischer1-2/+0
Remove package base categories. Instead, users can now specify up to twenty custom keywords that are taken into consideration when searching. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11Show package popularity in search resultsLukas Fleischer1-0/+2
Display the popularity score (weighted votes) in the package search results. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09Add a confirmation check box below search resultsLukas Fleischer1-1/+1
Always show the confirmation check box next to the package actions drop-down on the package search results page. This allows regular users to confirm disown commands. Fixes FS#45264. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09Drop suffixes from confirm parametersLukas Fleischer1-1/+1
Remove the _delete and _disown suffixes from HTTP POST confirmation parameters. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2014-07-15Rework permission handlingLukas Fleischer1-8/+2
Add a new function has_credential() that checks whether the currently logged in user is allowed to perform a given action. Moving all permission handling to this central place makes adding new user groups and adjusting permissions much more convenient. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04Handle plurals in translationsLukas Fleischer1-2/+8
Use ngettext() to handle plurals properly. Also, split pagination captions into two strings. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05pkg_search_results.php: Link to account when logged inLukas Fleischer1-0/+4
Replace the maintainer package search links with links to the maintainer's account when browsing the search results as a logged-in user. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05Move package actions to package basesLukas Fleischer1-2/+2
Package actions now operate on package bases instead of packages. Move all actions to the correct locations. This also fixes some issues with comment notifications. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-14pkg_search_results.php: Mark out-of-date packagesLukas Fleischer1-1/+1
Highlight the version number of out-of-date packages on the package search results page using the "flagged" class from archweb. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-14pkg_search_results.php: Move version to a separate columnLukas Fleischer1-1/+3
Synchronize the column layout with archweb. This also allows for easily highlighting the version number of out-of-date packages. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-04pkg_search_results.php: Word-wrap package descriptionLukas Fleischer1-1/+1
Implements FS#31803. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24Use echo shortcut syntaxLukas Fleischer1-40/+40
Replace all occurrences of "<?php echo" and "<?php print" by "<?=" to reduce noise in templates. Note that as of PHP 5.4.0, "<?=" is always available and no longer requires "short_open_tag" to be set. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-19Sync search result statistics with archwebLukas Fleischer1-5/+8
* Use archweb classes for search result statistics. * Add some space between page numbers. * Display current page number instead of current item range. * Hide page numbers if the result fits into a single page. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-15Use virtual paths for package detailsLukas Fleischer1-1/+1
Extend the routing front/back ends to allow for using "/package/$pkgname/" for individual packages. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-15Use virtual path feature for linksLukas Fleischer1-5/+5
Use virtual paths in links (e.g. link to "/packages/" instead of "/packages.php" etc.) if the virtual path feature is enabled. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-14Merge branch 'maint'Lukas Fleischer1-0/+1
Conflicts: web/html/account.php web/html/addvote.php web/html/pkgsubmit.php web/lib/acctfuncs.inc.php web/template/actions_form.php web/template/pkg_comment_form.php web/template/pkg_comments.php web/template/pkg_details.php web/template/pkg_search_results.php web/template/tu_details.php
2012-07-06pkg_search_results.php: Pull out DB codecanyonknight1-4/+3
* Move DB code from pkg_search_results.php to already existing function in pkgfuncs.inc.php * Centralization of DB code important in a future transition to PDO interface Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06pkg_search_results.php: Overhaul to match archwebcanyonknight1-126/+113
* Change search results table to use CSS from archweb with better alternating line contrast * Change table results header to match archweb * General clean-up of XHTML Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06Remove all traces of "pgboxtitle"Lukas Fleischer1-3/+1
Using a div container to format heading is ridiculous. Use "<h2></h2>" instead. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: canyonknight <canyonknight@gmail.com>
2012-06-24Implement token system to fix CSRF vulnerabilitiescanyonknight1-0/+1
Specially crafted pages can force authenticated users to unknowingly perform actions on the AUR website despite being on an attacker's website. This cross-site request forgery (CSRF) vulnerability applies to all POST data on the AUR. Implement a token system using a double submit cookie. Have a hidden form value on every page containing POST forms. Use the newly added check_token() to verify the token sent via POST matches the "AURSID" cookie value. Random nature of the token limits potential for CSRF. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-24Remove a boatload of inline table stylesDan McGee1-9/+9
Replacing with CSS styles where appropriate. A previously unused CSS style is tweaked in the stylesheet to match most of what was done via non-CSS styling. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-08-11Allow for merging deleted packages into existing onesLukas Fleischer1-0/+2
Merge all comments and votes of deleted packages into another package if the "Merge with" field is used. Duplicate votes (votes from a user who already voted on the target package or voted on more than one of the deleted packages) are discarded. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-11Fix XSS vulnerability in package search results and package details.Lukas Fleischer1-3/+3
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-11Fix broken XHTML.Lukas Fleischer1-5/+5
Fix a lot of invalid XHTML in the templates and actions. There might still be some legacy code left, but this should cover most of it. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-10More PHP Notice undefined fixupsDan McGee1-1/+5
Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-18pkg_search_results: replace blind-table with floating divsPyroPeter1-60/+56
* I tried to remove errors in the sgml-structure e.g.: <div> <?php if (foo) { ?> </div> <?php } ?> * I did not remove or add code (except the <table> and <div> stuff, of cause). I only changed the order of the html/php-tags. * The bottom and top of the script are now properly indented. I did not indent the middle part (table of search results) because that would render the diff completely useless. Signed-off-by: PyroPeter <abi1789@googlemail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-17pkg_search_results: rewrite of paginationPyroPeter1-63/+14
* Most of the PHP-code was moved to pkgfuncs.php to keep the template simple. Signed-off-by: PyroPeter <abi1789@googlemail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01Drop PackageLocations table and referencesDan McGee1-4/+0
We don't need this anymore since all packages managed here are well...managed here. Rip out all of the places we were using this field, many of which depended on the magic value '2' anyway. On the display side of things, we had a column that was always showing 'unsupported' that is now gone, and you can no longer sort by this column. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-20Implemented "First" and "Last" link for search results (fixes FS#15690).Lukas Fleischer1-0/+2
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2010-11-10Add timestamp when a package is flagged out-of-date (FS#20848).Lukas Fleischer1-1/+1
Signed-off-by: Loui Chang <louipc.ist@gmail.com> - resolve conflict and omit i18n changes.
2010-10-03Fix columns headers visibilityManuel Tortosa1-2/+2
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-07-02Confirmation when deleting packagesLukas Fleischer1-0/+3
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-06-05Add sorting by "Voted" and "Notify" fieldsLukas Fleischer1-2/+6
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-11-24Change legend style and default font size.Loui Chang1-3/+2
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-10-26pkg_search_results: Translate special characters to html entities.Loui Chang1-1/+1
Reported-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03Fix search output if no results are found.Loui Chang1-4/+3
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-18XHTML Validation fixes.Loui Chang1-1/+1
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-07Clean up some markup and styles in page navigation.Loui Chang1-8/+7
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-03Change pagination styleCallan Barrett1-16/+22
Looks different now, next and previous on their own sides and elips for both Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-24Indicate when there are more search result pages than numbered links show.Loui Chang1-24/+25
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23Fix a few xhtml validation errors.Loui Chang1-2/+2
Signed-off-by: Loui Chang <louipc.ist@gmail.com>