pp3/module/Application/view/partials/_nbVersion-select.phtml (56 lines of code) (raw):

<?php /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ ?> <?php $mapping = array(); $assignedNbVersions = array(); foreach($this->pluginVersion->getNbVersionsPluginVersions() as $nbvPv) { $assignedNbVersions[$nbvPv->getNbVersionId()] = $nbvPv; } if($this->nbVersions) { echo '<table class="table table-striped">'; foreach ($this->nbVersions as $nbv) { echo ' <tr> <td> <div class="checkbox"> <label> <input type="checkbox" value="'.$nbv->getId().'" name="nbVersion_ids[]" '.(array_key_exists($nbv->getId(), $assignedNbVersions) ? 'checked' : '').'> <span class="badge badge-brown">NB '.$nbv->getVersion().'</span> </label> </div> <td> <td>'; if (array_key_exists($nbv->getId(), $assignedNbVersions)) { $nbvPv = $assignedNbVersions[$nbv->getId()]; if ($nbvPv->getVerificationId()) { echo 'Verification request created on '.$nbvPv->getVerification()->getCreatedAt()->format('Y-m-d').' &nbsp; &nbsp; <span class="badge '.$nbvPv->getVerification()->getStatusBadgeClass().'">'.$nbvPv->getVerification()->getStatusBadgeTitle().'</span> &nbsp;&nbsp; <a href="'.$this->url('plugin-version',array('action'=>'edit'),array('query' => array('id' => $this->pluginVersion->getId(), 'verifId' => $nbvPv->getVerification()->getId()))).'" class="btn btn-default" role="button">Drop verification</a>'; } elseif(!in_array($nbv->getId(), $this->verifiedNbVersionIds)) { echo '<a href="'.$this->url('verification',array('action'=>'create'),array('query' => array('nbvPvId' => $nbvPv->getId()))).'" class="btn btn-default" role="button">Request verification</a>'; } } echo '</td> </tr>'; } echo '</table>'; }