Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
archivesCourrier
Commits
89bb9b07
Commit
89bb9b07
authored
Aug 29, 2017
by
Cyril Vazquez
Browse files
Merge branch 'master' of
https://labs.maarch.org/maarch/archivesCourrier
parents
37cfee42
be4f091a
Changes
6
Hide whitespace changes
Inline
Side-by-side
bundle/archivesCourrier/
c
ontentInterface.php
→
bundle/archivesCourrier/
C
ontentInterface.php
View file @
89bb9b07
File moved
bundle/archivesCourrier/Controller/Content.php
View file @
89bb9b07
...
...
@@ -47,6 +47,7 @@ class Content
$dateTo
=
null
,
$originatorOrgRegNumber
=
null
)
{
var_dump
(
func_get_args
());
$queryParts
=
array
();
$queryParams
=
array
();
...
...
presentation/maarchRM/Presenter/archivesCourrier/
c
ontent.php
→
presentation/maarchRM/Presenter/archivesCourrier/
C
ontent.php
View file @
89bb9b07
...
...
@@ -26,7 +26,7 @@ namespace ext\archivesCourrier\presentation\maarchRM\Presenter\archivesCourrier;
*
* @author Alexandre Morin <alexandre.morin@maarch.org>
*/
class
c
ontent
class
C
ontent
{
use
\
presentation\maarchRM\Presenter\exceptions\exceptionTrait
;
...
...
presentation/maarchRM/Resources/view/archivesCourrier/list.html
View file @
89bb9b07
...
...
@@ -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>
...
...
presentation/maarchRM/Resources/view/archivesCourrier/search.html
View file @
89bb9b07
...
...
@@ -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=
"
t
er
m
"
name=
"
t
er
m
"
placeholder=
"Terme"
/>
<input
type=
"text"
class=
"form-control"
id=
"
qu
er
y
"
name=
"
qu
er
y
"
placeholder=
"Terme"
/>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
Dates extr
ê
mes
</label>
<div
class=
"col-sm-4"
>
<input
type=
"text"
class=
"form-control datePicker"
name=
"
startDate
"
placeholder=
"Début"
/>
<input
type=
"text"
class=
"form-control datePicker"
name=
"
dateFrom
"
placeholder=
"Début"
/>
</div>
<div
class=
"col-sm-4"
>
<input
type=
"text"
class=
"form-control datePicker"
name=
"
endD
ate"
placeholder=
"Fin"
/>
<input
type=
"text"
class=
"form-control datePicker"
name=
"
d
ate
To
"
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>
presentation/maarchRM/UserStory/archiveRetrieval/
i
ndexCourrierInterface.php
→
presentation/maarchRM/UserStory/archiveRetrieval/
I
ndexCourrierInterface.php
View file @
89bb9b07
...
...
@@ -26,13 +26,13 @@ namespace ext\archivesCourrier\presentation\maarchRM\UserStory\archiveRetrieval;
* @package archivesCourrier
* @author Alexandre Morin <alexandre.morin@maarch.org>
*/
interface
i
ndexCourrierInterface
interface
I
ndexCourrierInterface
{
/**
* Formulaire de recherche d'un contenu d'archive
*
* @return archivesCourrier/
c
ontent/searchForm
* @return archivesCourrier/
C
ontent/searchForm
*/
public
function
readArchivescourrierContent
();
...
...
@@ -41,14 +41,14 @@ interface indexCourrierInterface
* @param string $query
* @param string $originatorOrgRegNumber
* @param bool $hasParent
* @param date $dateF
o
rm
* @param date $dateFr
o
m
* @param date $dateTo
*
* @return archivesCourrier/
c
ontent/search
* @uses archivesCourrier/
c
ontent/readSearch
* @return archivesCourrier/
C
ontent/search
* @uses archivesCourrier/
C
ontent/readSearch
*/
public
function
readArchivescourrierSearch
(
$dateF
o
rm
,
$dateFr
o
m
,
$dateTo
,
$query
,
$originatorOrgRegNumber
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment