[aur-dev] [PATCH] Show popularity in package base details

Johannes Löthberg johannes at kyriasis.com
Tue Jul 21 14:27:03 UTC 2015


On 21/07, Lukas Fleischer wrote:
> # In case of wanting to put a custom message
> $msg = __('unknown');
>@@ -254,6 +255,10 @@ endif;
> 			<?php endif; ?>
> 		</tr>
> 		<tr>
>+			<th><?= __('Popularity') . ': ' ?></th>
>+			<td><?= number_format($popularity, 6) ?></td>
>+		</tr>
>+		<tr>
> 			<th><?= __('First Submitted') . ': ' ?></th>
> 			<td><?= $submitted_time ?></td>
> 		</tr>

I still wonder if it'd be nicer to do something like:

  Popularity:  1.0 (15 votes)

or

  Votes: 15 (popularity: 1.0)

or something to that effect, instead of another full line. We already 
have quite a few lines used, and on smaller displays it'll take up quite 
a lot of it.

I'm unsure though, and that might make it a bit confusing I guess.

>diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php
>index 667b3f7..d4304e3 100644
>--- a/web/template/pkgbase_details.php
>+++ b/web/template/pkgbase_details.php
>@@ -24,6 +24,7 @@ if ($row["MaintainerUID"] !== NULL) {
> }
>
> $votes = $row['NumVotes'];
>+$popularity = $row['Popularity'];
>
> # In case of wanting to put a custom message
> $msg = __('unknown');
>@@ -105,6 +106,10 @@ endif;
> 			<?php endif; ?>
> 		</tr>
> 		<tr>
>+			<th><?= __('Popularity') . ': ' ?></th>
>+			<td><?= number_format($popularity, 6) ?></td>
>+		</tr>
>+		<tr>
> 			<th><?= __('First Submitted') . ': ' ?></th>
> 			<td><?= $submitted_time ?></td>
> 		</tr>
>-- 
>2.4.6

-- 
Sincerely,
  Johannes Löthberg
  PGP Key ID: 0x50FB9B273A9D0BB5
  https://theos.kyriasis.com/~kyrias/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1495 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/aur-dev/attachments/20150721/2fd2309c/attachment.asc>


More information about the aur-dev mailing list