This is an automated email from the ASF dual-hosted git repository. jpirek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans-tools.git
The following commit(s) were added to refs/heads/master by this push: new 1d43681 NETBEANS-3569: clearing version badges on homepage list, show only verified badges, more details are on detail screen new b785fac Merge pull request #23 from jpirek/master 1d43681 is described below commit 1d436812055ca86cc39d3bf94204ecd66fb93a1c Author: Jan Pirek <jan.pi...@oracle.com> AuthorDate: Thu Jan 9 09:51:47 2020 +0100 NETBEANS-3569: clearing version badges on homepage list, show only verified badges, more details are on detail screen --- .../src/Application/Entity/Verification.php | 2 +- .../Application/view/application/index/index.phtml | 20 +++++++------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/pp3/module/Application/src/Application/Entity/Verification.php b/pp3/module/Application/src/Application/Entity/Verification.php index 7f08608..036fb92 100644 --- a/pp3/module/Application/src/Application/Entity/Verification.php +++ b/pp3/module/Application/src/Application/Entity/Verification.php @@ -65,7 +65,7 @@ class Verification extends Base\Verification { public function getStatusBadgeTitle() { if ($this->status === self::STATUS_NOGO) { - return 'Verification declined'; + return 'Verification failed'; } elseif ($this->status === self::STATUS_GO) { return 'Verified'; } diff --git a/pp3/module/Application/view/application/index/index.phtml b/pp3/module/Application/view/application/index/index.phtml index a6c8fcb..288b79e 100755 --- a/pp3/module/Application/view/application/index/index.phtml +++ b/pp3/module/Application/view/application/index/index.phtml @@ -100,7 +100,6 @@ <tr> <th>Plugin</th> <th>Categories</th> - <th>NetBeans compatible</th> <th>Description</th> </tr> </thead> @@ -109,9 +108,14 @@ foreach($this->paginator as $plugin) { $versionBadges = array(); foreach ($plugin->getVersions() as $version) { - $versionBadges[]='<span class="badge">'.$version->getVersion().'</span>'; + foreach ($version->getNbVersionsPluginVersions() as $nbvPv) { + $verif = $nbvPv->getVerification(); + if ($verif && $verif->isVerified()) { + $versionBadges[]='<span class="badge '.$nbvPv->getVerification()->getStatusBadgeClass().'" title="'.$nbvPv->getVerification()->getStatusBadgeTitle().'"> + NB '.$nbvPv->getNbVersion()->getVersion().' - '.$nbvPv->getVerification()->getStatusBadgeTitle().'</span>'; + } + } } - echo '<tr> <td> <h4 class="text-primary"><a href="'.$this->url('catalogue', array(), array('query' => array('id'=>$plugin->getId()))).'">'.$plugin->getName().'</a></h4> @@ -126,16 +130,6 @@ echo '<span class="badge badge-blue">'.$cat->getName().'</span> '; } - echo '</td><td>'; - $a = array(); - foreach ($plugin->getVersions() as $version) { - foreach ($version->getNbVersionsPluginVersions() as $nbvPv) { - $a[]=$nbvPv->getNbVersion()->getVersion(); - } - } - foreach (array_unique($a) as $nbvPv) { - echo '<span class="badge badge-brown">NB '.$nbvPv.'</span> '; - } echo '</td> <td>'.$plugin->getShortDescription().'</td> </tr>'; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists