/**
  * fill row 
  *
  * @access public
  * @param $a_set
  */
 public function fillRow(ilDataCollectionField $a_set)
 {
     global $lng, $ilCtrl;
     $this->tpl->setVariable('NAME', "order[" . $a_set->getId() . "]");
     $this->tpl->setVariable('VALUE', $this->order);
     $this->tpl->setVariable("CHECKBOX_VISIBLE", "visible[" . $a_set->getId() . "]");
     if ($a_set->isVisible()) {
         $this->tpl->setVariable("CHECKBOX_VISIBLE_CHECKED", "checked");
     }
     $this->tpl->setVariable("CHECKBOX_FILTERABLE", "filterable[" . $a_set->getId() . "]");
     if ($a_set->isFilterable()) {
         $this->tpl->setVariable("CHECKBOX_FILTERABLE_CHECKED", "checked");
     }
     if (!$a_set->isStandardField()) {
         $this->tpl->setVariable("CHECKBOX_NAME_LOCKED", "locked[" . $a_set->getId() . "]");
         if ($a_set->getLocked()) {
             $this->tpl->setVariable("CHECKBOX_CHECKED_LOCKED", "checked");
         }
     } else {
         $this->tpl->setVariable("NOT_LOCKED", "-");
     }
     $this->order = $this->order + 10;
     $this->tpl->setVariable("ORDER_NAME", "order[" . $a_set->getId() . "]");
     $this->tpl->setVariable("ORDER_VALUE", $this->order);
     $this->tpl->setVariable('TITLE', $a_set->getTitle());
     $this->tpl->setVariable('DESCRIPTION', $a_set->getDescription());
     $this->tpl->setVariable('DATATYPE', $a_set->getDatatypeTitle());
     if (!$a_set->isStandardField()) {
         switch ($a_set->getRequired()) {
             case 0:
                 $required = ilUtil::getImagePath('icon_not_ok.png');
                 break;
             case 1:
                 $required = ilUtil::getImagePath('icon_ok.png');
                 break;
         }
         switch ($a_set->isUnique()) {
             case 0:
                 $uniq = ilUtil::getImagePath('icon_not_ok.png');
                 break;
             case 1:
                 $uniq = ilUtil::getImagePath('icon_ok.png');
                 break;
         }
         $this->tpl->setVariable('REQUIRED', $required);
         $this->tpl->setVariable('UNIQUE', $uniq);
     } else {
         $this->tpl->setVariable('NO_REQUIRED', "-");
         $this->tpl->setVariable('NO_UNIQUE', "-");
     }
     $ilCtrl->setParameterByClass("ildatacollectionfieldeditgui", "field_id", $a_set->getId());
     if (!$a_set->isStandardField()) {
         include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
         $alist = new ilAdvancedSelectionListGUI();
         $alist->setId($a_set->getId());
         $alist->setListTitle($lng->txt("actions"));
         if ($this->table->hasPermissionToFields($this->parent_obj->parent_obj->ref_id)) {
             $alist->addItem($lng->txt('edit'), 'edit', $ilCtrl->getLinkTargetByClass("ildatacollectionfieldeditgui", 'edit'));
             $alist->addItem($lng->txt('delete'), 'delete', $ilCtrl->getLinkTargetByClass("ildatacollectionfieldeditgui", 'confirmDelete'));
         }
         $this->tpl->setVariable("ACTIONS", $alist->getHTML());
     }
 }
 /**
  * @param ilDataCollectionField $a_set
  */
 public function fillRow(ilDataCollectionField $a_set)
 {
     global $lng, $ilCtrl;
     if (!$a_set->isStandardField()) {
         $this->tpl->setVariable('FIELD_ID', $a_set->getId());
     }
     $this->tpl->setVariable('NAME', 'order[' . $a_set->getId() . ']');
     $this->tpl->setVariable('VALUE', $this->order);
     $this->tpl->setVariable('CHECKBOX_VISIBLE', 'visible[' . $a_set->getId() . ']');
     if ($a_set->isVisible()) {
         $this->tpl->setVariable('CHECKBOX_VISIBLE_CHECKED', 'checked');
     }
     /* Don't enable setting filter for MOB fields or reference fields that reference a MOB field */
     $show_filter = true;
     $show_exportable = true;
     if ($a_set->getDatatypeId() == ilDataCollectionDatatype::INPUTFORMAT_MOB || $a_set->getDatatypeId() == ilDataCollectionDatatype::INPUTFORMAT_FILE) {
         $show_filter = false;
     }
     if ($a_set->getDatatypeId() == ilDataCollectionDatatype::INPUTFORMAT_REFERENCE) {
         $ref_field = ilDataCollectionCache::getFieldCache((int) $a_set->getFieldRef());
         if ($ref_field && ($ref_field->getDatatypeId() == ilDataCollectionDatatype::INPUTFORMAT_MOB || $ref_field->getDatatypeId() == ilDataCollectionDatatype::INPUTFORMAT_FILE)) {
             $show_filter = false;
         }
     }
     if ($a_set->getId() == 'comments') {
         $show_filter = false;
         $show_exportable = false;
     }
     if ($show_filter) {
         $this->tpl->setVariable('CHECKBOX_FILTERABLE', 'filterable[' . $a_set->getId() . ']');
         if ($a_set->isFilterable()) {
             $this->tpl->setVariable('CHECKBOX_FILTERABLE_CHECKED', 'checked');
         }
     } else {
         $this->tpl->setVariable('NO_FILTER', '');
     }
     if ($show_exportable) {
         $this->tpl->setVariable('CHECKBOX_EXPORTABLE', 'exportable[' . $a_set->getId() . ']');
         if ($a_set->getExportable()) {
             $this->tpl->setVariable('CHECKBOX_EXPORTABLE_CHECKED', 'checked');
         }
     } else {
         $this->tpl->setVariable('NO_FILTER_EXPORTABLE', '');
     }
     if (!$a_set->isStandardField()) {
         $this->tpl->setVariable('CHECKBOX_NAME_LOCKED', 'locked[' . $a_set->getId() . ']');
         if ($a_set->getLocked()) {
             $this->tpl->setVariable('CHECKBOX_CHECKED_LOCKED', 'checked');
         }
     } else {
         $this->tpl->setVariable('NOT_LOCKED', '');
     }
     $this->order = $this->order + 10;
     $this->tpl->setVariable('ORDER_NAME', 'order[' . $a_set->getId() . ']');
     $this->tpl->setVariable('ORDER_VALUE', $this->order);
     $this->tpl->setVariable('TITLE', $a_set->getTitle());
     $this->tpl->setVariable('DESCRIPTION', $a_set->getDescription());
     $this->tpl->setVariable('DATATYPE', $a_set->getDatatypeTitle());
     if (!$a_set->isStandardField()) {
         switch ($a_set->getRequired()) {
             case 0:
                 $required = ilUtil::getImagePath('icon_not_ok.svg');
                 break;
             case 1:
                 $required = ilUtil::getImagePath('icon_ok.svg');
                 break;
         }
         switch ($a_set->isUnique()) {
             case 0:
                 $uniq = ilUtil::getImagePath('icon_not_ok.svg');
                 break;
             case 1:
                 $uniq = ilUtil::getImagePath('icon_ok.svg');
                 break;
         }
         $this->tpl->setVariable('REQUIRED', $required);
         $this->tpl->setVariable('UNIQUE', $uniq);
     } else {
         $this->tpl->setVariable('NO_REQUIRED', '');
         $this->tpl->setVariable('NO_UNIQUE', '');
     }
     $ilCtrl->setParameterByClass('ildatacollectionfieldeditgui', 'field_id', $a_set->getId());
     if (!$a_set->isStandardField()) {
         include_once './Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
         $alist = new ilAdvancedSelectionListGUI();
         $alist->setId($a_set->getId());
         $alist->setListTitle($lng->txt('actions'));
         if ($this->table->hasPermissionToFields($this->parent_obj->parent_obj->ref_id)) {
             $alist->addItem($lng->txt('edit'), 'edit', $ilCtrl->getLinkTargetByClass('ildatacollectionfieldeditgui', 'edit'));
             $alist->addItem($lng->txt('delete'), 'delete', $ilCtrl->getLinkTargetByClass('ildatacollectionfieldeditgui', 'confirmDelete'));
         }
         $this->tpl->setVariable('ACTIONS', $alist->getHTML());
     }
 }