Skip to content
Snippets Groups Projects
Commit 67e7d96c authored by Cyril Vazquez's avatar Cyril Vazquez
Browse files

Merge branch 'develop' into 'master'

Develop

See merge request !839
parents fd88a137 078d842a
Branches Support/3.0.X
Tags 3.0.0
1 merge request!839Develop
...@@ -137,8 +137,6 @@ class archive ...@@ -137,8 +137,6 @@ class archive
} }
/** /**
*
*
* @param array $archives Array of archive object * @param array $archives Array of archive object
* @param integer $count Count of archive object without limit * @param integer $count Count of archive object without limit
* *
...@@ -394,6 +392,12 @@ class archive ...@@ -394,6 +392,12 @@ class archive
$lifeCycleDataTable->setPaginationType("full_numbers"); $lifeCycleDataTable->setPaginationType("full_numbers");
$lifeCycleDataTable->setSorting(array(array(0, 'desc'))); $lifeCycleDataTable->setSorting(array(array(0, 'desc')));
$relationshipDataTable = $this->view->getElementById('relationshipsTable')->plugin['dataTable'];
$relationshipDataTable->setPaginationType("full_numbers");
$relationshipDataTable->setUnsearchableColumns(3);
$relationshipDataTable->setUnsortableColumns(3);
$relationshipDataTable->setSorting(array(array(0, 'desc')));
$this->view->translate(); $this->view->translate();
$this->view->merge(); $this->view->merge();
...@@ -1400,10 +1404,11 @@ class archive ...@@ -1400,10 +1404,11 @@ class archive
$relationship->relatedArchiveName = $childRelationship->relatedArchiveName; $relationship->relatedArchiveName = $childRelationship->relatedArchiveName;
$relationship->description = $childRelationship->description; $relationship->description = $childRelationship->description;
$relationship->typeCode = $childRelationship->typeCode; $relationship->typeCode = $childRelationship->typeCode;
$relationships[] = $relationship;
} }
$relationships[] = $relationship; $archive->relationships = $relationships;
} }
if (!empty($archive->relationships["parentRelationships"])) { if (!empty($archive->relationships["parentRelationships"])) {
foreach ($archive->relationships["parentRelationships"] as $parentRelationship) { foreach ($archive->relationships["parentRelationships"] as $parentRelationship) {
$relationship = new \stdClass(); $relationship = new \stdClass();
...@@ -1411,10 +1416,10 @@ class archive ...@@ -1411,10 +1416,10 @@ class archive
$relationship->relatedArchiveName = $parentRelationship->relatedArchiveName; $relationship->relatedArchiveName = $parentRelationship->relatedArchiveName;
$relationship->description = $parentRelationship->description; $relationship->description = $parentRelationship->description;
$relationship->typeCode = $parentRelationship->typeCode; $relationship->typeCode = $parentRelationship->typeCode;
$relationships[] = $relationship;
} }
$relationships[] = $relationship; $archive->relationships = $relationships;
} }
$archive->relationships = $relationships;
} }
protected function checkMessage($archive) protected function checkMessage($archive)
......
...@@ -83,12 +83,11 @@ class archiveRelationship ...@@ -83,12 +83,11 @@ class archiveRelationship
*/ */
public function getByArchiveId($archiveRelationships) public function getByArchiveId($archiveRelationships)
{ {
$this->view->addContentFile("recordsManagement/archiveRelationship/relationshipTable.html"); $this->view->addContentFile("recordsManagement/archiveRelationship/relationshipTable.html");
$this->view->setSource("archiveRelationships", $archiveRelationships); $this->view->setSource("archiveRelationships", $archiveRelationships);
$this->view->merge(); $this->view->merge();
$this->view->translate(); $this->view->translate();
return $this->view->saveHtml(); return $this->view->saveHtml();
} }
...@@ -121,4 +120,4 @@ class archiveRelationship ...@@ -121,4 +120,4 @@ class archiveRelationship
return $this->json->save(); return $this->json->save();
} }
} }
\ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<a href="#relationshipTab" data-toggle="tab">Relationships</a> <a href="#relationshipTab" data-toggle="tab">Relationships</a>
</li> </li>
<?merge archive.messages.bool() ?> <?merge archive.messages.bool() ?>
<li role="presentation" id="organizationInfo_messageTab"> <li role="presentation" id="organizationInfo_messageTab">archiveInfo
<a href="#messageTab" data-toggle="tab">Message</a> <a href="#messageTab" data-toggle="tab">Message</a>
</li> </li>
</ul> </ul>
...@@ -62,4 +62,4 @@ ...@@ -62,4 +62,4 @@
$("#lifeCycleTab").on('click', '.attestation', function () { $("#lifeCycleTab").on('click', '.attestation', function () {
eventCertificate.load($(this).data('eventid')); eventCertificate.load($(this).data('eventid'));
}); });
</script> </script>
\ No newline at end of file
<?merge archive.relationships.bool() ?> <?merge archive.relationships.bool() ?>
<div class="table-responsive"> <div>
<table id="relationshipsTable" class="table table-condensed table-striped dataTable"> <table id="relationshipsTable" class="table dataTable">
<thead> <thead>
<tr> <tr>
<th>Type</th> <th>Type</th>
<th>Related archive</th> <th>Related archive</th>
<th>Description</th> <th>Description</th>
<th style="opacity: 0;"/> <th class="sorting_disabled"></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -20,11 +20,15 @@ ...@@ -20,11 +20,15 @@
<?merge .relatedArchiveName ?> <?merge .relatedArchiveName ?>
</td> </td>
<td> <td>
<?merge .description ?> <?merge .description.json() ?>
</td> </td>
<td style="padding-right:1em;" class='pull-right'> <td>
<button type="button" class="btn btn-success btn-sm viewRelatedArchive" title="Show the archive info" <button
data-archiveid='[?merge .relatedArchiveId ?]'> type="button"
class="btn btn-success btn-sm viewRelatedArchive pull-right"
title="Show the archive info"
data-archiveid='[?merge .relatedArchiveId ?]'
>
<i class="fa fa-eye"></i> <i class="fa fa-eye"></i>
</button> </button>
</td> </td>
......
...@@ -7,31 +7,33 @@ ...@@ -7,31 +7,33 @@
</div> </div>
</div> </div>
<div class="table-responsive"> <div class="table-responsive">
<table id="relationshipsTable" class="table table-condensed table-striped dataTable"> <table id="relationshipsTable" class="table dataTable"">
<thead> <thead>
<tr> <tr>
<th>Archive</th> <th>Archive</th>
<th>Type</th> <th>Type</th>
<th>Related archive</th> <th>Related archive</th>
<th>Description</th> <th>Description</th>
<th></th>
</tr> </tr>
<thead> <thead>
<tbody> <tbody>
<?merge archive.childrenRelationships ?> <?merge archive.childrenRelationships ?>
<tr> <tr>
<td><i class="fa fa-thumb-tack" style="font-size:25px">&nbsp;</i></td> <td><i class="fa fa-thumb-tack" style="font-size:25px">&nbsp;</i></td>
<td><?merge .typeCode ?></td> <td><?merge relationship.typeCode ?></td>
<td><?merge .description ?></td>
<td> <td>
<button type="button" class="btn btn-success btn-sm viewRelatedArchive" title="Show the archive info" data-archiveid='[?merge .relatedArchiveId ?]'> <button type="button" class="btn btn-success btn-sm viewRelatedArchive pull-right" title="Show the archive info" data-archiveid='[?merge relationship.relatedArchiveId ?]'>
<i class="fa fa-info-circle"></i>&nbsp;<?merge .relatedArchiveId ?> <i class="fa fa-info-circle"></i>&nbsp;<?merge relationship.relatedArchiveId ?>
</button> </button>
</td> </td>
<td><?merge .description ?></td>
</tr> </tr>
<?merge archive.parentRelationships ?> <?merge archive.parentRelationships ?>
<tr> <tr>
<td> <td>
<button type="button" class="btn btn-success btn-sm viewRelatedArchive" title="Show the archive info" data-archiveid='[?merge .archiveId ?]'> <button type="button" class="btn btn-success btn-sm viewRelatedArchive pull-right" title="Show the archive info" data-archiveid='[?merge .archiveId ?]'>
<i class="fa fa-info-circle"></i>&nbsp;<?merge .archiveId ?> <i class="fa fa-info-circle"></i>&nbsp;<?merge .archiveId ?>
</button> </button>
</td> </td>
......
...@@ -240,8 +240,6 @@ ...@@ -240,8 +240,6 @@
addHelperText(helperText, helperName, helperType, helperFormat, isExternalRef, enumeration, enumNames); addHelperText(helperText, helperName, helperType, helperFormat, isExternalRef, enumeration, enumNames);
}); });
$('#addHelper').on('click', function () { $('#addHelper').on('click', function () {
var helper = $('#helperSelect').find("option:selected"); var helper = $('#helperSelect').find("option:selected");
var helperText = $("#helperSelect :selected").text(); var helperText = $("#helperSelect :selected").text();
......
...@@ -106,11 +106,15 @@ var BootstrapTree = { ...@@ -106,11 +106,15 @@ var BootstrapTree = {
i.addClass(openedIcon).removeClass(closedIcon); i.addClass(openedIcon).removeClass(closedIcon);
} }
}, },
toggleChildren :function(element) {
toggleChildren: function(element) {
element.each(function() { element.each(function() {
var childLi = $(this); var childLi = $(this);
var childIcon = childLi.find(' > span > i'); var childIcon = childLi.find(' > span > i');
var closedIcon = childIcon.data('closed-icon');
var openedIcon = childIcon.data('opened-icon');
if (childIcon.hasClass(openedIcon)) { if (childIcon.hasClass(openedIcon)) {
childLi.find('> ul > li').css({'display':'none'}); childLi.find('> ul > li').css({'display':'none'});
childIcon.addClass(closedIcon).removeClass(openedIcon); childIcon.addClass(closedIcon).removeClass(openedIcon);
...@@ -119,7 +123,7 @@ var BootstrapTree = { ...@@ -119,7 +123,7 @@ var BootstrapTree = {
childIcon.addClass(openedIcon).removeClass(closedIcon); childIcon.addClass(openedIcon).removeClass(closedIcon);
} }
toggleChildren(childLi.find('> ul > li')); BootstrapTree.toggleChildren(childLi.find('> ul > li'));
}); });
}, },
...@@ -139,10 +143,8 @@ var BootstrapTree = { ...@@ -139,10 +143,8 @@ var BootstrapTree = {
children.css({'display':'block'}); children.css({'display':'block'});
i.addClass(openedIcon).removeClass(closedIcon); i.addClass(openedIcon).removeClass(closedIcon);
} }
BootstrapTree.toggleChildren(children);
toggleChildren(children);
event.stopPropagation(); event.stopPropagation();
$('.tree').find('.hideTreeElement').css('display', 'none'); $('.tree').find('.hideTreeElement').css('display', 'none');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment