distroquery.php: display packages list as a table

This commit is contained in:
Silvan Calarco 2024-07-06 19:21:58 +02:00
parent 6e8233b9f1
commit d625cb83c3
7 changed files with 133 additions and 100 deletions

View File

@ -30,7 +30,6 @@ a.blacklink:hover { text-decoration: none; font-weight:bold; }
white-space: nowrap; font-weight: normal; } white-space: nowrap; font-weight: normal; }
.distromatic img { border: 0px; margin: 0px; margin-right: 0px; vertical-align: top; } .distromatic img { border: 0px; margin: 0px; margin-right: 0px; vertical-align: top; }
.distromatic table { font-size: 9pt; border: 1px solid #2b6600; text-align: left; padding: 0; font-size: 8pt; } .distromatic table { font-size: 9pt; border: 1px solid #2b6600; text-align: left; padding: 0; font-size: 8pt; }
.pkgpage td { vertical-align: top; }
div.infomenu { font-size:9pt; font-family:Helvetica Narrow,Arial Narrow,Tahoma,Arial,Helvetica,sans-serif; div.infomenu { font-size:9pt; font-family:Helvetica Narrow,Arial Narrow,Tahoma,Arial,Helvetica,sans-serif;
border:1px solid #c5ddb7; margin:0; margin-left:-1px; margin-bottom:-6px; padding:4px; padding-right:3px; background-color: #e4ffd3; } border:1px solid #c5ddb7; margin:0; margin-left:-1px; margin-bottom:-6px; padding:4px; padding-right:3px; background-color: #e4ffd3; }
div.info { font-size:9pt; font-family:Helvetica Narrow,Arial Narrow,Tahoma,Arial,Helvetica,sans-serif; border:1px solid #c5ddb7; margin:3px; padding:3px; background-color: #e4ffd3; } div.info { font-size:9pt; font-family:Helvetica Narrow,Arial Narrow,Tahoma,Arial,Helvetica,sans-serif; border:1px solid #c5ddb7; margin:3px; padding:3px; background-color: #e4ffd3; }

View File

@ -109,15 +109,20 @@ $url_prefix = home_url() . "/rpms/";
if ($next_page < 1) $next_page = 1; if ($next_page < 1) $next_page = 1;
echo "<a href=\"" . $url_prefix . "/" . $repo . "?page=" . $next_page . $query_append . "\">&gt;</a>&nbsp;"; echo "<a href=\"" . $url_prefix . "/" . $repo . "?page=" . $next_page . $query_append . "\">&gt;</a>&nbsp;";
} }
echo "]</br></br>"; echo "]</br>";
} else { } else {
echo "0 " . _r("result(s) found"); echo "0 " . _r("result(s) found");
} }
echo "<table class=\"pkgpage\"><tr><th>" . _r("Name") . "</th><th>" . _r("Version") . "</th><th>" .
_r("Summary") . "</th><th>" . _r("Last update") . "</th></tr>";
foreach ($j["packages"] as $package) { foreach ($j["packages"] as $package) {
$package_url = $url_prefix . $repo . "/" . $package["name"]; $package_url = $url_prefix . $repo . "/" . $package["name"];
echo "<a href=\"" . $package_url . "\">". $package["name"] . "</a>: " . $package["summary"] . "</br>"; echo "<tr><td><a href=\"" . $package_url . "\">". $package["name"] . "</a></td><td>" .
$package["version"] . "-" . $package["release"] . "</td><td>" .
$package["summary"] . "</td><td style=\"white-space:no-wrap\">" . substr($package["buildtime"], 0, 10) . "</td></tr>";
} }
echo "</table>";
echo "</form>"; echo "</form>";

Binary file not shown.

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Responsive Theme\n" "Project-Id-Version: Responsive Theme\n"
"Report-Msgid-Bugs-To: bugs@openmamba.org\n" "Report-Msgid-Bugs-To: bugs@openmamba.org\n"
"POT-Creation-Date: 2024-07-06 18:03+0200\n" "POT-Creation-Date: 2024-07-06 19:15+0200\n"
"PO-Revision-Date: 2014-12-08 16:25+0100\n" "PO-Revision-Date: 2014-12-08 16:25+0100\n"
"Last-Translator: Silvan Calarco <silvan.calarco@mambasoft.it>\n" "Last-Translator: Silvan Calarco <silvan.calarco@mambasoft.it>\n"
"Language-Team: Italian, Italy\n" "Language-Team: Italian, Italy\n"
@ -26,7 +26,7 @@ msgstr "Leggi di più &#8250;"
msgid "Pages:" msgid "Pages:"
msgstr "Pagine:" msgstr "Pagine:"
#: ../distroquery.php:40 ../distroquery.php:128 ../distroquery.php:186 #: ../distroquery.php:40 ../distroquery.php:135 ../distroquery.php:193
msgid "Repositories" msgid "Repositories"
msgstr "Repository" msgstr "Repository"
@ -50,7 +50,7 @@ msgstr "Cerca qui"
msgid "Results for:" msgid "Results for:"
msgstr "Risultati per:" msgstr "Risultati per:"
#: ../distroquery.php:92 #: ../distroquery.php:92 ../distroquery.php:114
msgid "result(s) found" msgid "result(s) found"
msgstr "risultati trovati" msgstr "risultati trovati"
@ -62,99 +62,111 @@ msgstr "Mostro la pagina"
msgid "of" msgid "of"
msgstr "di" msgstr "di"
#: ../distroquery.php:134 ../distroquery.php:191 #: ../distroquery.php:117 ../distroquery.php:160 ../distroquery.php:217
msgid "ERROR"
msgstr "ERRORE"
#: ../distroquery.php:141 ../distroquery.php:198
msgid "Resources"
msgstr "Risorse"
#: ../distroquery.php:142 ../distroquery.php:199
msgid "Source files"
msgstr "File sorgenti"
#: ../distroquery.php:143 ../distroquery.php:200
msgid "Changes"
msgstr "Modifiche"
#: ../distroquery.php:144 ../distroquery.php:201
msgid "Issues"
msgstr "Problemi"
#: ../distroquery.php:145 ../distroquery.php:202
msgid "Add a new issue"
msgstr "Segnala un problema"
#: ../distroquery.php:146 ../distroquery.php:203
msgid "Download"
msgstr "Scarica"
#: ../distroquery.php:153 ../distroquery.php:210
msgid "Name" msgid "Name"
msgstr "Nome" msgstr "Nome"
#: ../distroquery.php:154 ../distroquery.php:211 #: ../distroquery.php:117
msgid "Version"
msgstr "Versione"
#: ../distroquery.php:118
msgid "Last update"
msgstr "Ultimo aggiornamento"
#: ../distroquery.php:118
msgid "Summary"
msgstr "Descrizione"
#: ../distroquery.php:141 ../distroquery.php:198
msgid "ERROR"
msgstr "ERRORE"
#: ../distroquery.php:148 ../distroquery.php:205
msgid "Resources"
msgstr "Risorse"
#: ../distroquery.php:149 ../distroquery.php:206
msgid "Source files"
msgstr "File sorgenti"
#: ../distroquery.php:150 ../distroquery.php:207
msgid "Changes"
msgstr "Modifiche"
#: ../distroquery.php:151 ../distroquery.php:208
msgid "Issues"
msgstr "Problemi"
#: ../distroquery.php:152 ../distroquery.php:209
msgid "Add a new issue"
msgstr "Segnala un problema"
#: ../distroquery.php:153 ../distroquery.php:210
msgid "Download"
msgstr "Scarica"
#: ../distroquery.php:161 ../distroquery.php:218
msgid "Release" msgid "Release"
msgstr "Versione" msgstr "Versione"
#: ../distroquery.php:157 ../distroquery.php:215 #: ../distroquery.php:164 ../distroquery.php:222
msgid "Group" msgid "Group"
msgstr "Gruppo" msgstr "Gruppo"
#: ../distroquery.php:158 #: ../distroquery.php:165
msgid "Maintainer" msgid "Maintainer"
msgstr "Manutentore" msgstr "Manutentore"
#: ../distroquery.php:159 ../distroquery.php:216 #: ../distroquery.php:166 ../distroquery.php:223
msgid "Description" msgid "Description"
msgstr "Descrizione" msgstr "Descrizione"
#: ../distroquery.php:160 #: ../distroquery.php:167
msgid "License" msgid "License"
msgstr "Licenza" msgstr "Licenza"
#: ../distroquery.php:161 ../distroquery.php:217 #: ../distroquery.php:168 ../distroquery.php:224
msgid "Size" msgid "Size"
msgstr "Dimensione" msgstr "Dimensione"
#: ../distroquery.php:162 ../distroquery.php:218 #: ../distroquery.php:169 ../distroquery.php:225
msgid "Upstream URL" msgid "Upstream URL"
msgstr "URL di origine" msgstr "URL di origine"
#: ../distroquery.php:163 #: ../distroquery.php:170
msgid "Build time" msgid "Build time"
msgstr "Data di compilazione" msgstr "Data di compilazione"
#: ../distroquery.php:164 #: ../distroquery.php:171
msgid "Built RPMS" msgid "Built RPMS"
msgstr "RPM creati" msgstr "RPM creati"
#: ../distroquery.php:170 #: ../distroquery.php:177
msgid "Build requirements" msgid "Build requirements"
msgstr "Dipendenze di compilazione" msgstr "Dipendenze di compilazione"
#: ../distroquery.php:214 #: ../distroquery.php:221
msgid "Architecture" msgid "Architecture"
msgstr "Architettura" msgstr "Architettura"
#: ../distroquery.php:219 #: ../distroquery.php:226
msgid "Source RPM" msgid "Source RPM"
msgstr "RPM sorgente" msgstr "RPM sorgente"
#: ../distroquery.php:222 #: ../distroquery.php:229
msgid "Brothers" msgid "Brothers"
msgstr "Collegati" msgstr "Collegati"
#: ../distroquery.php:228 #: ../distroquery.php:235
msgid "Provides" msgid "Provides"
msgstr "Fornisce" msgstr "Fornisce"
#: ../distroquery.php:235 #: ../distroquery.php:242
msgid "Obsoletes" msgid "Obsoletes"
msgstr "Rende obsoleti" msgstr "Rende obsoleti"
#: ../distroquery.php:242 #: ../distroquery.php:249
msgid "Requires" msgid "Requires"
msgstr "Richiede" msgstr "Richiede"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: openmamba 1.0\n" "Project-Id-Version: openmamba 1.0\n"
"Report-Msgid-Bugs-To: bugs@openmamba.org\n" "Report-Msgid-Bugs-To: bugs@openmamba.org\n"
"POT-Creation-Date: 2024-07-06 18:03+0200\n" "POT-Creation-Date: 2024-07-06 19:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -27,7 +27,7 @@ msgstr ""
msgid "Pages:" msgid "Pages:"
msgstr "" msgstr ""
#: ../distroquery.php:40 ../distroquery.php:128 ../distroquery.php:186 #: ../distroquery.php:40 ../distroquery.php:135 ../distroquery.php:193
msgid "Repositories" msgid "Repositories"
msgstr "" msgstr ""
@ -51,7 +51,7 @@ msgstr ""
msgid "Results for:" msgid "Results for:"
msgstr "" msgstr ""
#: ../distroquery.php:92 #: ../distroquery.php:92 ../distroquery.php:114
msgid "result(s) found" msgid "result(s) found"
msgstr "" msgstr ""
@ -63,99 +63,111 @@ msgstr ""
msgid "of" msgid "of"
msgstr "" msgstr ""
#: ../distroquery.php:134 ../distroquery.php:191 #: ../distroquery.php:117 ../distroquery.php:160 ../distroquery.php:217
msgid "ERROR"
msgstr ""
#: ../distroquery.php:141 ../distroquery.php:198
msgid "Resources"
msgstr ""
#: ../distroquery.php:142 ../distroquery.php:199
msgid "Source files"
msgstr ""
#: ../distroquery.php:143 ../distroquery.php:200
msgid "Changes"
msgstr ""
#: ../distroquery.php:144 ../distroquery.php:201
msgid "Issues"
msgstr ""
#: ../distroquery.php:145 ../distroquery.php:202
msgid "Add a new issue"
msgstr ""
#: ../distroquery.php:146 ../distroquery.php:203
msgid "Download"
msgstr ""
#: ../distroquery.php:153 ../distroquery.php:210
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: ../distroquery.php:154 ../distroquery.php:211 #: ../distroquery.php:117
msgid "Version"
msgstr ""
#: ../distroquery.php:118
msgid "Last update"
msgstr ""
#: ../distroquery.php:118
msgid "Summary"
msgstr ""
#: ../distroquery.php:141 ../distroquery.php:198
msgid "ERROR"
msgstr ""
#: ../distroquery.php:148 ../distroquery.php:205
msgid "Resources"
msgstr ""
#: ../distroquery.php:149 ../distroquery.php:206
msgid "Source files"
msgstr ""
#: ../distroquery.php:150 ../distroquery.php:207
msgid "Changes"
msgstr ""
#: ../distroquery.php:151 ../distroquery.php:208
msgid "Issues"
msgstr ""
#: ../distroquery.php:152 ../distroquery.php:209
msgid "Add a new issue"
msgstr ""
#: ../distroquery.php:153 ../distroquery.php:210
msgid "Download"
msgstr ""
#: ../distroquery.php:161 ../distroquery.php:218
msgid "Release" msgid "Release"
msgstr "" msgstr ""
#: ../distroquery.php:157 ../distroquery.php:215 #: ../distroquery.php:164 ../distroquery.php:222
msgid "Group" msgid "Group"
msgstr "" msgstr ""
#: ../distroquery.php:158 #: ../distroquery.php:165
msgid "Maintainer" msgid "Maintainer"
msgstr "" msgstr ""
#: ../distroquery.php:159 ../distroquery.php:216 #: ../distroquery.php:166 ../distroquery.php:223
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#: ../distroquery.php:160 #: ../distroquery.php:167
msgid "License" msgid "License"
msgstr "" msgstr ""
#: ../distroquery.php:161 ../distroquery.php:217 #: ../distroquery.php:168 ../distroquery.php:224
msgid "Size" msgid "Size"
msgstr "" msgstr ""
#: ../distroquery.php:162 ../distroquery.php:218 #: ../distroquery.php:169 ../distroquery.php:225
msgid "Upstream URL" msgid "Upstream URL"
msgstr "" msgstr ""
#: ../distroquery.php:163 #: ../distroquery.php:170
msgid "Build time" msgid "Build time"
msgstr "" msgstr ""
#: ../distroquery.php:164 #: ../distroquery.php:171
msgid "Built RPMS" msgid "Built RPMS"
msgstr "" msgstr ""
#: ../distroquery.php:170 #: ../distroquery.php:177
msgid "Build requirements" msgid "Build requirements"
msgstr "" msgstr ""
#: ../distroquery.php:214 #: ../distroquery.php:221
msgid "Architecture" msgid "Architecture"
msgstr "" msgstr ""
#: ../distroquery.php:219 #: ../distroquery.php:226
msgid "Source RPM" msgid "Source RPM"
msgstr "" msgstr ""
#: ../distroquery.php:222 #: ../distroquery.php:229
msgid "Brothers" msgid "Brothers"
msgstr "" msgstr ""
#: ../distroquery.php:228 #: ../distroquery.php:235
msgid "Provides" msgid "Provides"
msgstr "" msgstr ""
#: ../distroquery.php:235 #: ../distroquery.php:242
msgid "Obsoletes" msgid "Obsoletes"
msgstr "" msgstr ""
#: ../distroquery.php:242 #: ../distroquery.php:249
msgid "Requires" msgid "Requires"
msgstr "" msgstr ""

View File

@ -2,4 +2,4 @@
xgettext --default-domain=responsive --language=PHP --keyword=__ --keyword=_e --keyword=_r --sort-by-file --copyright-holder="Silvan Calarco" --package-name=openmamba --package-version=1.0 --msgid-bugs-address="bugs@openmamba.org" ../*.php xgettext --default-domain=responsive --language=PHP --keyword=__ --keyword=_e --keyword=_r --sort-by-file --copyright-holder="Silvan Calarco" --package-name=openmamba --package-version=1.0 --msgid-bugs-address="bugs@openmamba.org" ../*.php
msgmerge it_IT.po responsive.po -o it_IT.po msgmerge it_IT.po responsive.po -o it_IT.po
sed -i "s|#~ ||" it_IT.po sed -i "s|#~ ||" it_IT.po
msgcat it_IT.po | msgfmt -o it_IT.mo - #msgcat it_IT.po | msgfmt -o it_IT.mo -

View File

@ -330,3 +330,8 @@ table.queryfiletable td {
padding:1px; padding:1px;
font-family:courier; font-family:courier;
} }
table.pkgpage tr:nth-child(even) td { background-color: #F2F2F2; }
table.pkgpage th { padding:0; font-weight: 800; border: 0; text-align: left; vertical-align: top; }
table.pkgpage td { vertical-align: top; }