summaryrefslogtreecommitdiffstats
path: root/web/template
AgeCommit message (Collapse)AuthorFilesLines
2012-09-28Deprecate actions bar when virtual URLs are usedcanyonknight1-3/+1
The only buttons on the actions bar that were still used when virtual URLs are enabled were the package deletion and package merging. These now reside in separate pages, so remove the need for the actions bar when virtual URLs are enabled. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-28Move package merging to a separate pagecanyonknight1-0/+1
Package actions now have a separate box on the package details page. Add a package merge link in that box. Link leads to a new page (pkgmerge.php) that can be used to confirm package merging. A separate page with confirmation is used to avoid CSRFs. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-28Move package deletion to a separate pagecanyonknight1-0/+3
Package actions now have a separate box on the package details page. Make a package deletion link in that box. Link leads to a new page (pkgdel.php) that can be used to confirm package deletion. A separate page with confirmation is used to avoid CSRFs. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24Avoid use of "<b>"/"</b>"Lukas Fleischer1-4/+4
* Use "<label>"/"</label>" for form labels. * Use "<strong>"/"</strong>" for important text. * Use "<h4>"/"</h4>" for headings. * Drop "<b>"/"</b>" everywhere else. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24Use echo shortcut syntaxLukas Fleischer17-312/+312
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 Fleischer2-7/+10
* 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-09-19Wrap long lines in the "Recent Updates" sidebarLukas Fleischer1-3/+7
* Sync the sidebar layout with archweb, use the "pkg-name" class to wrap long package names. * Move the "New!" logo to a separate column to make sure it isn't wrapped to a new line on its own. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18Fix language selectionLukas Fleischer1-1/+1
Use "REQUEST_URI" instead of the "PHP_SELF" sever variable to determine the redirection URL for the language selection form. This fixes the language selection feature to work well with virtual URLs. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18pkg_details.php: Hide "Adopt" button from logged out usersLukas Fleischer1-0/+2
Reported-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18pkg_comments.php: Fix "Latest Comments" linkLukas Fleischer1-2/+2
Avoid adding "?comments=all" more than once if the "Latest Comments" link is clicked multiple times. Reported-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18Make account registration work with recent account editing changescanyonknight1-0/+4
The account editing form requires two different form action URLs due to the fact that the same template is shared for both account registration and account editing. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18header.php: Update account editing linkcanyonknight1-1/+4
* Use AUR_URL/account/userfoo/edit format for own account editing. * Change "Accounts" label to "My Account" for regular users. * Add ability for Developers and Trusted Users to edit their account without having to use the search form first. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18Use URL rewriting for user account update pagecanyonknight1-1/+1
The "UpdateAccount" page displays information as to whether an account update was successful. All POST account info goes to this page, so use it with sane URLs. Before: AUR_URL/account/?Action=UpdateAccount&U=userfoo After: AUR_URL/account/userfoo/update Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18Use URL rewriting for user editing pagecanyonknight1-1/+1
Allows for easier account editing and saner URLs. Update account editing links to use new URL. Before: AUR_URL/account/?Action=DisplayAccount&U=userfoo After: AUR_URL/account/userfoo/edit Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18Use URL rewriting for user info pagecanyonknight1-1/+1
Navigation to the "AccountInfo" page should only require a user to know the username of the account they are looking for. Update all AUR links that use the user info page to reflect the new URL. Before: AUR_URL/account/?Action=AccountInfo&U=userfoo After: AUR_URL/account/userfoo Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18Fix account search page results routing to /account/canyonknight2-3/+3
Account search page has /account/ in the address bar when it should still be /accounts/. The only time /account/ should be used is on a specific user's page. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18pkg_comment_form.php: Fix PHP undefined variable notice for package "ID"canyonknight1-1/+1
Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18Use the "new" icon from archweb for the recent updates tablecanyonknight1-1/+1
Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18Add the new package icon back to the front pagecanyonknight1-0/+3
This regression was introduced with d2480e8b9d3d0f946d57fa9422811cb37296b8b4. Re-implement the functionality in a cleaner way. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18Migrate all DB code to use PDOcanyonknight1-1/+1
All DB code currently uses the quickly aging mysql_* functions. These functions are strongly discouraged and may eventually be deprecated. Transition all code to utilize the PDO data access abstraction layer. PDO allows for consistent query code across multiple databases. This could potentially allow for someone to use a database other than MySQL with minimal code changes. All functions and behaviors are reproduced as faithfully as possible with PDO equivalents and some changes in code. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-08-23Fix broken RSS feed link on front pagecanyonknight1-1/+1
Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-08-23Allow only Trusted Users, Developers, and Maintainers to unflag packagescanyonknight2-2/+4
Currently everyone is allowed to unflag a package as out of date. This should be limited to only the appropriate people for a specific package. Fixes FS#27263 Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-08-23pkg_details.php: Fix broken HTML for package page with no dependenciescanyonknight1-1/+1
The "Required by" column already handles an empty list appropriately. Move a </div> tag to match that behavior in the "Dependencies" column Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-18Use virtual paths for voters pageLukas Fleischer1-4/+6
Link to "/packages/$pkgname/voters/" instead of using "/voters/" and a get parameter to request a specific package by ID. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-18pkg_details.php: Remove field set in actions boxLukas Fleischer1-2/+4
archweb uses "<div></div>" and "<p></p>" here. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-18pkg_comments.php: Fix comment deletion linksLukas Fleischer1-2/+3
* Add a missing quote to the "alt" attribute. Regression introduced in d8b2eb4b628e8927b0bed1b254c996520de95b83. * Retrieve and store the package name before overwriting the "$row" variable. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-18pkg_comments.php: Fix links to user accountsLukas Fleischer1-1/+1
Regression introduced in 2425f963f8ad45292c217914b5fee1ed18104c26. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-17pkg_comments.php: Fix noticeLukas Fleischer1-1/+1
Fix a notice that appeared if comments were available and the package was requested by name. See 07d3649c2d68bd67ebbcbe10ee9535364903a0f8 for a similar fix for links to the voters page. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-17Rearrange package actionsLukas Fleischer1-5/+5
Move the flag/unflag action below the flag date. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-17pkg_details.php: Verbose labels for package actionsLukas Fleischer1-6/+6
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-17actions_form.php: Hide empty formLukas Fleischer1-0/+2
Do not show the actions form if it doesn't contain any elements. This comes into effect if the virtual path feature is enabled and the current user doesn't have TU/developer privileges. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-17Move adoption button to package actions boxLukas Fleischer2-7/+13
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-17Move package actions to the action boxLukas Fleischer2-0/+19
Note that this currently only works if the virtual path feature is enabled. If you don't use virtual paths, these will still be displayed as buttons below the package details listing. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-17account_edit_form.php: Remove another stray "</div>"Lukas Fleischer1-1/+1
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-17pkg_details.php: Fix link to voters if ID is unsetLukas Fleischer1-1/+1
When a package is requested by name, the "ID" request parameter might be unset. Use the "ID" field of the query result instead. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-15Use virtual paths for package detailsLukas Fleischer5-8/+8
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 Fleischer14-40/+40
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-15Use absolute URIs for style sheets and imagesLukas Fleischer2-4/+4
This is needed for our new URI scheme, since we will use virtual directories, such as "/packages/" instead of "/packages.php" etc. Having relative URIs results in incorrect paths, such as "/packages/css/aur.css" (instead of "/css/aur.css"). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-14Merge branch 'maint'Lukas Fleischer7-1/+10
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-09pkg_details.php: Move "<div>" tag into if-branchLukas Fleischer1-1/+1
The corresponding closing "</div>" tag is only printed if the if-branch is taken, which results in broken HTML code if the if-branch is skipped. Move the "<div>" tag so that either both or none of the tags are included in the generated HTML code. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-09pkg_details.php: Fix dependency linksLukas Fleischer1-1/+1
Remove an erroneous quote from the destination URL of links to officially supported package dependencies on archweb. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-08Remove legacy CSSLukas Fleischer1-3/+0
We completely switched to using the archweb stylesheet (with some custom extensions in "aur.css"). The old CSS files are no longer needed. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06acctfuncs.inc.php: Move XHTML to account_details.php templatecanyonknight1-0/+57
XHTML should be eliminated from lib/ as much as possible. This pulls the XHTML out of the display_account_info function that echoes the code, and moves it to the new account_details.php template file. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06Pull out DB code from trusted user pagecanyonknight1-14/+12
* Move DB code in tu.php and tu.php and tu_list.php to new functions in accfuncs.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_comment_form.php: Pull out DB codecanyonknight1-51/+0
* Move DB code and e-mail code from pkg_comment_form.php to new 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: 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-06account_search_results.php: Pull out DB codecanyonknight1-2/+1
* Move DB code from account_search_results.php to already existing function in acctfuncs.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-06action_form.php: Pull out DB codecanyonknight1-24/+8
* Create new functions in pkgfuncs.inc.php with SQL queries from action_form.php * Centralization of DB code important in a future transition to PDO interface * Flip logic of vote and notify XHTML button to use function return rather than a more confusing NOT (!) logical operator statement Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06Move language selection to a drop-down listLukas Fleischer1-12/+20
Move all languages to a select container to save some space. Language selection is a rarely used feature, so there's no need to make this a one click option. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06actions_form.php: Overhaul to match archwebcanyonknight1-48/+41
* Change all CSS to match archweb * General clean-up of XHTML formatting * Change control structures to use PHP alternative syntax for better readability with inter-mixed XHTML Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>