예제 #1
0
 private function createTagsEdit()
 {
     //Suppression d'un tag
     $sTags = '';
     foreach ($this->oRelease->getTags() as $iTagId => $oRegex) {
         $oButton = new View('button');
         $oButton->addData('link', 'index.php?p=modrelease&a=deletetag&id=' . $this->oRelease->getId() . '&tag=' . $iTagId);
         $oButton->addData('icon', 'fa-times');
         $oButton->addData('style', 'info');
         $oButton->addData('text', $oRegex->getName());
         $oButton->create();
         $sTags .= $oButton->getCode() . ' ';
     }
     //Ajout d'un tag
     $aRegex = Regex::getSelectRegex();
     $oPopupAdd = new View('popup');
     $oPopupAdd->addData('id', 'addtag');
     $oPopupAdd->addData('buttonstyle', 'btn-success');
     $oPopupAdd->addData('buttonicon', 'fa-plus');
     $oPopupAdd->addData('buttontext', 'Ajouter');
     $oPopupAdd->addData('title', 'Ajouter un tag');
     $oFormAdd = new FormGenerator();
     $oFormAdd->setAction('index.php?p=modrelease&a=addtag&id=' . $this->oRelease->getId());
     $oFormAdd->addSelect('Tag', 'tag', $aRegex);
     $oFormAdd->create();
     $oPopupAdd->addData('content', $oFormAdd->getCode());
     $oPopupAdd->create();
     $sTags .= $oPopupAdd->getCode();
     $this->oView->addData('tagsdelete', $sTags);
 }