Commit 89bb9b07 authored by Cyril Vazquez's avatar Cyril Vazquez
Browse files
parents 37cfee42 be4f091a
......@@ -47,6 +47,7 @@ class Content
$dateTo = null,
$originatorOrgRegNumber = null)
{
var_dump(func_get_args());
$queryParts = array();
$queryParams = array();
......
......@@ -26,7 +26,7 @@ namespace ext\archivesCourrier\presentation\maarchRM\Presenter\archivesCourrier;
*
* @author Alexandre Morin <alexandre.morin@maarch.org>
*/
class content
class Content
{
use \presentation\maarchRM\Presenter\exceptions\exceptionTrait;
......
......@@ -43,9 +43,14 @@
</td>
<td>
<?merge .descriptionLevel.ifeq('RecordGrp') ?>
<?merge .startDate.format('d-m-Y H:i:s') ?> au <?merge .endDate.format('d-m-Y H:i:s') ?>
<span>
<?merge .startDate.format('d-m-Y') ?> au <?merge .endDate.format('d-m-Y') ?>
</span>
<?merge .descriptionLevel.ifeq('RecordGrp').not() ?>
<?merge .sentDate.format('d-m-Y H:i:s') ?>
<span>
<?merge .sentDate.format('d-m-Y') ?>
</span>
</td>
<td><?merge .originator ?></td>
<td>
......
......@@ -32,16 +32,16 @@
<div class="form-group">
<label class="col-sm-4 control-label">Terme</label>
<div class="col-md-8">
<input type="text" class="form-control" id="term" name="term" placeholder="Terme"/>
<input type="text" class="form-control" id="query" name="query" placeholder="Terme"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">Dates extr&ecirc;mes</label>
<div class="col-sm-4">
<input type="text" class="form-control datePicker" name="startDate" placeholder="D&eacute;but"/>
<input type="text" class="form-control datePicker" name="dateFrom" placeholder="D&eacute;but"/>
</div>
<div class="col-sm-4">
<input type="text" class="form-control datePicker" name="endDate" placeholder="Fin"/>
<input type="text" class="form-control datePicker" name="dateTo" placeholder="Fin"/>
</div>
</div>
</div>
......@@ -68,9 +68,6 @@
<label class="btn btn-default" title="Objet d'archive">
<input type="radio" name="hasParent" value="1"/> Objet
</label>
<label class="btn btn-default" title="Objet d'archive">
<input type="radio" name="hasParent" value="2"/> Document
</label>
</div>
</div>
</div>
......@@ -101,8 +98,6 @@
<script>
$(".document").hide();
urlArchivesPubliques = '/archivesCourrier/Search';
type = 'GET';
$('#publicArchive_searchFormCollapse').on('click', 'label.btn', function() {
var select = $(this);
......@@ -122,16 +117,11 @@
});
$('#archive_search').on('click', function() {
//$('#archive_search').prop('disabled', true);
type = "GET";
data = JSON.stringify(serialize());
$.ajax({
type : type,
url : urlArchivesPubliques,
data : data,
type : 'GET',
url : '/archivesCourrier/Search?' + $('#publicArchive_searchForm').serialize(),
dataType : 'html',
contentType : 'application/json',
async : false,
success : function (response) {
$('#publicArchive_searchResult').empty().html(response);
......@@ -149,22 +139,5 @@
$(".document").hide();
});
/* ------ FUNCTION ------ */
function serialize() {
jsonObject = {
//keyword : []
};
$('#publicArchive_searchForm').find('input[type="text"], input[type="radio"]:checked, select').each(function(){
var name = $(this).attr('name');
var value = $(this).val();
if (name && value != "") {
jsonObject[name] = $(this).val();
}
});
return jsonObject;
}
</script>
......@@ -26,13 +26,13 @@ namespace ext\archivesCourrier\presentation\maarchRM\UserStory\archiveRetrieval;
* @package archivesCourrier
* @author Alexandre Morin <alexandre.morin@maarch.org>
*/
interface indexCourrierInterface
interface IndexCourrierInterface
{
/**
* Formulaire de recherche d'un contenu d'archive
*
* @return archivesCourrier/content/searchForm
* @return archivesCourrier/Content/searchForm
*/
public function readArchivescourrierContent();
......@@ -41,14 +41,14 @@ interface indexCourrierInterface
* @param string $query
* @param string $originatorOrgRegNumber
* @param bool $hasParent
* @param date $dateForm
* @param date $dateFrom
* @param date $dateTo
*
* @return archivesCourrier/content/search
* @uses archivesCourrier/content/readSearch
* @return archivesCourrier/Content/search
* @uses archivesCourrier/Content/readSearch
*/
public function readArchivescourrierSearch(
$dateForm,
$dateFrom,
$dateTo,
$query,
$originatorOrgRegNumber,
......
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