Commit graph

504 commits

Author SHA1 Message Date
Lukas Fleischer
57db4814a4 Allow users to unflag packages they flagged themselves
Sometimes, a user accidentally flags a package out-of-date. Allow users
to unflag packages that they flagged themselves, thereby providing a way
to undo these actions.

Implements FS#46145.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-30 16:51:14 +02:00
Marcel Korpel
57250a1641 updates_table.php: Fix identification of new packages
Currently, package creation has to be done separately from first
submission, so ModifiedTS will never be the same as SubmittedTS.
Consider all packages that are submitted within an hour from package
creation as new.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-19 09:49:28 +02:00
Marcel Korpel
e1f6de68a2 account_edit_form.php: Warn users to correctly enter their email address
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-19 09:48:10 +02:00
Stefan Auditor
85b54157ea Display sources count on package details page
Show item count on sources section just like it is done for
dependencies and required by.

Fixes FS#45881.

Signed-off-by: Stefan Auditor <stefan.auditor@erdfisch.de>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-17 04:20:45 +02:00
Marcel Korpel
60433a930d Remove success message from comment form
To be more flexible with messages, we shouldn't always output this
message when a comment has been sent. Moreover, currently it is not
displayed due to the POST-Redirect-GET pattern, where the comment
parameter is lost after redirection.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-17 04:20:45 +02:00
Marcel Korpel
54d812ec79 pkg_comments.php: Add JavaScript function to edit comments
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
c7025054c6 Split pkg_comment_form.php so the outer box is not always included
For use in the new RPC interface to edit comments, the form shouldn't
always print a header. Create a new template pkg_comment_box.php that
prints form and box, change template pkg_comment_form.php to only
print the form.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
41b6cff7c0 pkg_comments.php: Merge two DIVs with same ID
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Lukas Fleischer
c751921aff Do not use the term "unsupported" for AUR packages
We no longer use the term [unsupported] to refer to the "repository" of
AUR packages. Update texts and variable names accordingly.

Fixes FS#45381.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Lukas Fleischer
e610360c95 Show popularity in package base details
Fixes FS#45600.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
7927a6decd Use username from the database if one is provided by the user
This fixes a bug where the new user name input by the user was
invalid, causing the account deletion link and the form action to be
wrong.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
67cff2cd5a Add IDs to comments
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
4c5a299e80 Only autofocus search field on the package search page
This needs to be disabled on package pages to be able to add a URL
fragment after comment editing.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
9cde6b0566 Show dateline when a comment is edited or deleted
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
92e19e95f3 Add comment edit icon and form
Show an icon next to the comment deletion icon, which leads to a
comment edit form.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Marcel Korpel
8375d21210 Use SVG image for comment deletion icon
This also puts the icon to the right and the timestamp in the byline
and wipes out a repeated instance of the byline.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Marcel Korpel
4ca8747396 Remove superfluous close tags
These are already output by html_action_link.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Gordian Edenhofer
8bd03adb61 Fake pkgbase actions for unconfirmed users
Displaying flag, notify, vote, adopt and file request links for
users which did not authenticate themselves and letting those fake
buttons link to the login page.

Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Lukas Fleischer
dbe56342a1 Split out package actions into a separate template
This package base details and package details pages now use exactly the
same code for the package actions box, so it makes sense to use a
separate template file instead.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Lukas Fleischer
4bc990f9c0 Split out code to generate action links
Add (and use) two new helper functions html_account_link() and
html_account_form() to generate the links in the package actions box.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
d1fe28ff7e Make confirmation label of width 'auto'
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Lukas Fleischer
d1c331613d Display (reverse) optional dependencies as "Required by"
Also, change pkg_required() such that the returned array has the same
structure as the result of pkg_dependencies().

Fixes FS#45452.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
226376fc62 Wrap all confirmation checkbox labels in label tag
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-27 13:04:03 +02:00
Johannes Löthberg
61cdf09cd0 Make url and pkgdesc fields optional
The url and pkgdesc PKGBUILD variables are optional, so they should be
in the AUR as well.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-20 14:29:43 +02:00
Johannes Löthberg
885a2d2dca Let co-maintainers see the private clone URI
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-20 14:27:00 +02:00
Johannes Löthberg
918f00f9a2 Let co-maintainers edit package keywords
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-20 14:27:00 +02:00
Johannes Löthberg
a5fd2bb39d Let co-maintainers unflag the package
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-20 14:27:00 +02:00
Marcel Korpel
d852da79e4 pkgbase_details.php/pkg_details.php: Show keywords
Keywords are hyperlinked so a user can search for other packages with
the same name and/or keyword.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-19 14:40:08 +02:00
Lukas Fleischer
1e3a7179bd Clarify that HTTPs clone URIs are for read-only access
Fixes FS#45335.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-17 17:06:41 +02:00
Lukas Fleischer
2284cb3e4a Store 10 significant digits of the popularity score
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-15 22:37:45 +02:00
Leonidas Spyropoulos
74c7cf70ff Add explanation for Popularity field in search results
Fixes FS#45327.

Signed-off-by: Leonidas Spyropoulos <artafinde@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-15 22:37:45 +02:00
Johannes Löthberg
37960beea1 footer: Link version number to release log
Fixes FS#45321

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14 19:14:34 +02:00
Lukas Fleischer
fb42ec696c Show co-maintainers next to maintainers in details
Implements FS#45313.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14 17:58:56 +02:00
Lukas Fleischer
a2f79eb2e1 Refactor code for printing account links
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14 17:58:56 +02:00
Lukas Fleischer
5fb7a74e23 Replace categories with keywords
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-14 17:58:55 +02:00
Gordian Edenhofer
fe46b01519 Autofocus input fields at login and package-search
At the login and the package search page, the user is promted to
provide some input. Until now it was neccessary to first click the
field in which the input should be placed.
This can be simplified with HTML5 using the autofocus attribute of
the input element, though not included in XHTML 1.0, the attribute
was at least given a value to comply with the standard.

Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-12 00:12:14 +02:00
Lukas Fleischer
15ee85b456 Show package popularity in search results
Display the popularity score (weighted votes) in the package search
results.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 19:15:44 +02:00
Lukas Fleischer
d1fd6f4897 Make URIs to the individual cgit pages configurable
Make the locations of the PKGBUILD preview, the log and the snapshot
tarball configurable. This increases flexibility and simplifies the code
a bit.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 13:36:27 +02:00
Lukas Fleischer
631d7bdff9 Encode cgit URIs properly
Fixes FS#45276 and FS#45277.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09 13:50:39 +02:00
Lukas Fleischer
dc86f6cc82 pkgbase_details.php: Fix cgit links
We forgot to amend those when switching to gitnamespaces-based storage
in b44411f (Use gitnamespaces for efficient storage, 2015-06-01).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09 10:53:28 +02:00
Lukas Fleischer
6ce4433b88 Add a confirmation check box below search results
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-09 09:12:51 +02:00
Lukas Fleischer
5c64ae1a0e Drop suffixes from confirm parameters
Remove the _delete and _disown suffixes from HTTP POST confirmation
parameters.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09 09:05:05 +02:00
Johannes Löthberg
3b9cb66a1e pkg_details: Use correct clone URL
The clone URLs should use the pkgbase name, not the pkgname itself

Reported-by: Jonathan Steel <jsteel@archlinux.org>
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08 21:24:46 +02:00
Lukas Fleischer
c08c384e9a Show official language names in the drop-down list
We already store the native language names. Display them in the
drop-down list instead of using language codes.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08 14:26:26 +02:00
Lukas Fleischer
b44411fb53 Use gitnamespaces for efficient storage
Instead of using one Git repository per package, use a single large
object storage for space efficiency. The refs of the individual package
bases are divided using gitnamespaces(7) which allows for exposing each
namespace as an independent repository easily. Also, git-serve is
modified to create a branch for each package, allowing to browse the
large repository with cgit.

Helped-by: Florian Pritz <bluewind@xinu.at>
Helped-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-01 23:24:52 +02:00
Lukas Fleischer
ecfa27e406 Do not show the activity check box when registering
Creating an inactive account does not make sense. Hide the activity
check box from the registration page.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-31 19:33:13 +02:00
Lukas Fleischer
8885796e80 Show the SSH key field on the registration page
Now that we have a short explanation on how we use the SSH public key,
we can show that field on the registration page.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-31 19:31:36 +02:00
Lukas Fleischer
5b5950e51d Add more details on the SSH public key field
Also, reorder the fields such that optional fields come last.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-31 19:26:07 +02:00
Lukas Fleischer
cc1e8aed30 Rename the AUR software to aurweb
Rename the project to help differentiate between the software providing
access to the Arch User Repository and the collection of source packages
itself.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-02-04 09:50:01 +01:00
Lukas Fleischer
85b48ceb12 Link to the cgit log from package details
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-09 17:50:39 +01:00