Unverified Commit 40a9497a authored by Jerome Boucher's avatar Jerome Boucher
Browse files

feat/16378 : fix presenter display

parent f007fb9a
......@@ -40,18 +40,14 @@ class Collection extends \presentation\maarchRM\Presenter\recordsManagement\arch
{
$archives = \laabs::callService('recordsManagement/archives/readArchives', $collection->archiveIds);
$html = parent::search($archives, \laabs::configuration("presentation.maarchRM")["maxResults"]);
$resultListElement = parent::presentResultList($archives, \laabs::configuration("presentation.maarchRM")["maxResults"]);
$this->view->addContentFile("Collection/Collection.html");
$collectionListHtmlHandler = $this->view->getElementById('collectionList');
$this->view->addContent($html, $collectionListHtmlHandler);
$this->view->merge();
$collectionListHtmlHandler->appendChild($resultListElement);
$this->view->translate();
// var_dump($this->view->saveHtml());
// exit;
return $this->view->saveHtml();
}
}
......@@ -125,7 +125,22 @@ class archive
*/
public function search($archives, $count)
{
$this->view->addContentFile("recordsManagement/archive/resultList.html");
$this->presentResultList($archives, $count);
return $this->view->saveHtml();
}
/**
*
*
* @param array $archives Array of archive object
* @param integer $count Count of archive object without limit
*
* @return domElement
*/
public function presentResultList($archives, $count)
{
$resultList = $this->view->addContentFile("recordsManagement/archive/resultList.html");
$this->view->translate();
......@@ -225,8 +240,8 @@ class archive
$dataTable = $this->view->getElementsByClass("dataTable")->item(0)->plugin['dataTable'];
$dataTable->setPaginationType("full_numbers");
$dataTable->setUnsortableColumns(8);
$dataTable->setUnsearchableColumns(8);
$dataTable->setUnsortableColumns([8, 9]);
$dataTable->setUnsearchableColumns([8, 9]);
$dataTable->setUnsortableColumns(0);
$dataTable->setUnsearchableColumns(0);
......@@ -271,7 +286,7 @@ class archive
$this->view->merge();
return $this->view->saveHtml();
return $resultList;
}
/**
......
......@@ -1319,3 +1319,9 @@ msgstr "Référentiel des personnes et organisations"
msgid "Object"
msgstr "Objet"
msgid "Archive added to collection."
msgstr "Archive ajoutée à la collection."
msgid "Archive removed from collection."
msgstr "Archive retirée de la collection."
......@@ -31,7 +31,7 @@
<th>Deposit date</th>
<th>Disposal date</th>
<th>Status</th>
<th></th>
<th><span><i class="fa fa-star-o" title="collection"></i></span></th>
<th style="min-width:150px;"></th>
</tr>
</thead>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment