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
maarchRM
Commits
0b21dedc
Verified
Commit
0b21dedc
authored
May 17, 2018
by
Alexandre Morin
Browse files
Final disposition management
parent
3f10514c
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/bundle/recordsManagement/Controller/archiveModificationTrait.php
View file @
0b21dedc
...
...
@@ -110,7 +110,9 @@ trait archiveModificationTrait
$retentionRule
->
retentionDuration
=
null
;
}
if
(
$retentionRule
->
finalDisposition
===
''
)
{
if
(
$retentionRule
->
finalDisposition
===
null
)
{
$retentionRule
->
finalDisposition
=
$archive
->
finalDisposition
;
}
elseif
(
$retentionRule
->
finalDisposition
===
''
)
{
$retentionRule
->
finalDisposition
=
null
;
}
...
...
src/presentation/maarchRM/Presenter/recordsManagement/retentionRule.php
View file @
0b21dedc
...
...
@@ -62,14 +62,18 @@ class retentionRule
*/
public
function
index
(
$retentionRule
)
{
//$this->view->addHeaders();
//$this->view->useLayout();
$publicArchives
=
\
laabs
::
configuration
(
'presentation.maarchRM'
)[
'publicArchives'
];
$this
->
view
->
addContentFile
(
'recordsManagement/retentionRule/index.html'
);
$this
->
view
->
translate
();
$dataTable
=
$this
->
view
->
getElementById
(
"rulesTable"
)
->
plugin
[
'dataTable'
];
$dataTable
->
setPaginationType
(
"full_numbers"
);
$dataTable
->
setUnsortableColumns
(
5
);
if
(
$publicArchives
)
{
$dataTable
->
setUnsortableColumns
(
4
);
}
else
{
$dataTable
->
setUnsortableColumns
(
5
);
}
foreach
(
$retentionRule
as
$rule
)
{
if
(
!
isset
(
$rule
->
durationUnit
))
{
...
...
@@ -77,8 +81,13 @@ class retentionRule
$rule
->
duration
=
substr
(
$rule
->
duration
,
1
,
-
1
);
$rule
->
durationUnit
=
$this
->
view
->
translator
->
getText
(
$rule
->
durationUnit
,
"duration"
,
"recordsManagement/retentionRule"
);
}
$rule
->
finalDispositionTran
=
$this
->
view
->
translator
->
getText
(
$rule
->
finalDisposition
,
false
,
"recordsManagement/retentionRule"
);
if
(
!
$publicArchives
)
{
$rule
->
finalDispositionTran
=
$this
->
view
->
translator
->
getText
(
$rule
->
finalDisposition
,
false
,
"recordsManagement/retentionRule"
);
}
}
$this
->
view
->
setSource
(
'publicArchives'
,
$publicArchives
);
$this
->
view
->
setSource
(
'retentionRule'
,
$retentionRule
);
$this
->
view
->
merge
();
...
...
@@ -93,6 +102,7 @@ class retentionRule
*/
public
function
listRules
(
$retentionRule
)
{
$publicArchives
=
\
laabs
::
configuration
(
'presentation.maarchRM'
)[
'publicArchives'
];
$this
->
view
->
addContentFile
(
'recordsManagement/retentionRule/list.html'
);
$this
->
view
->
translate
();
...
...
@@ -107,6 +117,7 @@ class retentionRule
$rule
->
durationUnit
=
$this
->
view
->
translator
->
getText
(
$rule
->
durationUnit
,
"duration"
,
"recordsManagement/retentionRule"
);
}
$this
->
view
->
setSource
(
'publicArchives'
,
$publicArchives
);
$this
->
view
->
setSource
(
'retentionRule'
,
$retentionRule
);
$this
->
view
->
merge
();
...
...
src/presentation/maarchRM/Resources/locale/fr/recordsManagement/messages.po
View file @
0b21dedc
...
...
@@ -971,3 +971,6 @@ msgstr "Aucune organisation sélectionnée"
msgid "You have to choose a working organization unit to proceed this action."
msgstr "L'utilisateur courant n'est affecté à aucune organisation. Contactez votre administrateur."
msgid "Do not update the final disposition"
msgstr "Ne pas mettre à jour le sort final"
src/presentation/maarchRM/Resources/view/recordsManagement/archive/archiveModificationForm.html
View file @
0b21dedc
...
...
@@ -5,43 +5,68 @@
<div
class=
"table-responsive"
>
<table
class=
"table table-condensed"
>
<tbody>
<tr
id=
"selectedArchiveId"
><td><strong>
Reference
</strong></td><td><span></span></td></tr>
<tr
id=
"selectedArchiveReference"
><td><strong>
Archive name
</strong></td><td><span></span></td></tr>
<tr
id=
"startDate"
style=
"display: none;"
><td><strong>
Start date
</strong></td><td><input
class=
'form-control input-sm ruleInput datePicker'
name=
"startDate"
></td></tr>
<tr
id=
"accessCode"
><td><strong>
Code
</strong></td><td>
<tr
id=
"selectedArchiveId"
>
<td><strong>
Reference
</strong></td>
<td><span></span></td>
</tr>
<tr
id=
"selectedArchiveReference"
>
<td><strong>
Archive name
</strong></td>
<td><span></span></td>
</tr>
<tr
id=
"startDate"
style=
"display: none;"
>
<td><strong>
Start date
</strong></td>
<td><input
class=
'form-control input-sm ruleInput datePicker'
name=
"startDate"
></td>
</tr>
<tr
id=
"finalDisposition"
>
<td><strong>
Final disposition
</strong></td>
<td>
<select
id=
"retentionRuleFinalDisposition"
name=
"retentionRuleFinalDisposition"
class=
"form-control"
>
<option
value=
''
>
To be defined later
</option>
<option
value=
'destruction'
>
Destruction
</option>
<option
value=
'preservation'
>
Preservation
</option>
</select>
<div
id=
"updateFinalDisposition"
style=
"display: none;"
>
<input
id=
"checkboxUpdateFinalDisposition"
type=
"checkbox"
>
Do not update the final disposition
</div>
</td>
</tr>
<tr
id=
"accessCode"
>
<td><strong>
Code
</strong></td>
<td>
<select
id=
"accessRuleCode"
name=
"accessRuleCode"
class=
"form-control input-sm ruleInputAccess"
>
<option
value=
""
>
Select a rule
</option>
<?merge accessRules ?>
<option
value=
'[?merge .code ?]'
data-json=
'[?merge .json ?]'
>
<?merge .code ?>
</option>
<option
value=
""
>
Select a rule
</option>
<?merge accessRules ?>
<option
value=
'[?merge .code ?]'
data-json=
'[?merge .json ?]'
>
<?merge .code ?>
</option>
</select><br>
<dl
class=
"dl dl-horizontal"
id=
"accessRule"
>
<dt><span>
Duration
</span>
:
</dt><dd
span
id=
"accessRuleDuration"
></dd>
<dt><span>
Description
</span>
:
</dt><dd
id=
"accessRuleDescription"
></dd>
<dt><span>
Duration
</span>
:
</dt>
<dd
span
id=
"accessRuleDuration"
></dd>
<dt><span>
Description
</span>
:
</dt>
<dd
id=
"accessRuleDescription"
></dd>
</dl>
</td></tr>
<tr
id=
"retentionCode"
><td><strong>
Code
</strong></td><td>
<select
id=
"retentionRuleCode"
name=
"retentionRuleCode"
class=
"form-control input-sm ruleInputAccess"
>
<option
value=
""
>
Select a rule
</option>
<?merge retentionRules ?>
<option
value=
'[?merge .code ?]'
data-json=
'[?merge .json ?]'
>
<?merge .label ?>
</option>
</td>
</tr>
<tr
id=
"retentionCode"
>
<td><strong>
Code
</strong></td>
<td>
<select
id=
"retentionRuleCode"
name=
"retentionRuleCode"
class=
"form-control input-sm ruleInputAccess"
>
<option
value=
""
>
Select a rule
</option>
<?merge retentionRules ?>
<option
value=
'[?merge .code ?]'
data-json=
'[?merge .json ?]'
>
<?merge .label ?>
</option>
</select><br>
<dl
class=
"dl dl-horizontal"
id=
"retentionRule"
>
<dt><span>
Duration
</span>
:
</dt><dd
id=
"retentionRuleDuration"
></dd>
<div
class=
"pull-left"
>
<dt><span>
Final disposition
</span>
:
</dt>
<div
class=
"col-md-6"
>
<select
id=
"finalDisposition"
name=
"finalDisposition"
class=
"form-control"
>
<option
value=
''
>
To be defined later
</option>
<option
value=
'destruction'
>
Destruction
</option>
<option
value=
'preservation'
>
Preservation
</option>
</select>
</div><br/>
<dt><span>
Description
</span>
:
</dt><dd
id=
"retentionRuleDescription"
></dd>
</dl>
</tr>
<dt><span>
Duration
</span>
:
</dt>
<dd
id=
"retentionRuleDuration"
></dd>
<div
class=
"pull-left"
>
<dt><span>
Description
</span>
:
</dt>
<dd
id=
"retentionRuleDescription"
></dd>
</div>
</dl>
</td>
</tr>
</tbody>
</table>
</div>
...
...
@@ -49,29 +74,32 @@
</div>
<script>
var
ArchiveModification
=
{
modal
:
$
(
'
#modificationModal
'
),
serialize
:
function
(
type
)
{
var
parameter
=
{}
serialize
:
function
(
type
)
{
var
parameter
=
{}
;
if
(
type
===
"
accessRule
"
)
{
if
(
type
===
"
accessRule
"
)
{
var
code
=
this
.
modal
.
find
(
'
[name="accessRuleCode"]
'
).
find
(
'
option:selected
'
).
data
(
'
json
'
);
parameter
.
accessRule
=
{
accessRuleCode
:
this
.
modal
.
find
(
'
[name="accessRuleCode"]
'
).
val
(),
accessRuleStartDate
:
this
.
modal
.
find
(
'
[name="startDate"]
'
).
val
(),
accessRuleDuration
:
code
.
duration
accessRuleCode
:
this
.
modal
.
find
(
'
[name="accessRuleCode"]
'
).
val
(),
accessRuleStartDate
:
this
.
modal
.
find
(
'
[name="startDate"]
'
).
val
(),
accessRuleDuration
:
code
.
duration
}
}
else
if
(
type
===
"
retentionRule
"
)
{
var
code
=
this
.
modal
.
find
(
'
[name="retentionRuleCode"]
'
).
find
(
'
option:selected
'
).
data
(
'
json
'
);
parameter
.
retentionRule
=
{
retentionStartDate
:
this
.
modal
.
find
(
'
[name="startDate"]
'
).
val
(),
retentionRuleCode
:
this
.
modal
.
find
(
'
[name="retentionRuleCode"]
'
).
val
(),
retentionDuration
:
code
.
duration
,
finalDisposition
:
$
(
'
#finalDisposition
'
).
val
()
retentionStartDate
:
this
.
modal
.
find
(
'
[name="startDate"]
'
).
val
(),
retentionRuleCode
:
this
.
modal
.
find
(
'
[name="retentionRuleCode"]
'
).
val
(),
retentionDuration
:
code
.
duration
};
if
(
!
(
$
(
"
#updateFinalDisposition
"
).
css
(
'
display
'
)
===
'
block
'
&&
$
(
'
#retentionRuleFinalDisposition
'
).
prop
(
"
disabled
"
)))
{
parameter
.
retentionRule
.
finalDisposition
=
$
(
'
#retentionRuleFinalDisposition
'
).
val
();
}
}
...
...
src/presentation/maarchRM/Resources/view/recordsManagement/archive/modalModification.html
View file @
0b21dedc
...
...
@@ -71,6 +71,14 @@
ModificationModal
.
loadRetentionCode
();
});
$
(
"
#checkboxUpdateFinalDisposition
"
).
on
(
'
change
'
,
function
()
{
if
(
this
.
checked
)
{
$
(
"
#retentionRuleFinalDisposition
"
).
prop
(
"
disabled
"
,
true
);
}
else
{
$
(
"
#retentionRuleFinalDisposition
"
).
prop
(
"
disabled
"
,
false
);
}
});
$
(
"
#comment
"
).
bind
(
'
input propertychange
'
,
function
()
{
if
(
$
(
"
#comment
"
).
val
()
==
""
)
{
$
(
"
#save
"
).
prop
(
"
disabled
"
,
true
);
...
...
@@ -107,26 +115,29 @@
if
(
type
==
'
accessRule
'
)
{
$
(
'
#startDate, #accessCode
'
).
css
(
'
display
'
,
''
);
$
(
'
#retentionCode
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#retentionCode
, #finalDisposition, #updateFinalDisposition
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#archivalAgency
'
).
css
(
'
display
'
,
'
none
'
);
this
.
loadRule
(
archiveId
,
archiveName
,
type
);
}
else
if
(
type
==
"
retentionRule
"
)
{
$
(
'
#startDate,#retentionCode
'
).
css
(
'
display
'
,
''
);
$
(
'
#accessCode
'
).
css
(
'
display
'
,
'
none
'
);
}
else
if
(
type
==
"
retentionRule
"
)
{
$
(
'
#retentionRuleDuration
'
).
text
(
''
);
$
(
'
#retentionRuleDescription
'
).
text
(
''
);
$
(
'
#startDate, #retentionCode, #finalDisposition
'
).
css
(
'
display
'
,
''
);
$
(
'
#accessCode, #updateFinalDisposition
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#archivalAgency
'
).
css
(
'
display
'
,
'
none
'
);
this
.
loadRule
(
archiveId
,
archiveName
);
}
else
if
(
type
==
"
flagForTransfer
"
)
{
$
(
'
#archivalAgency
'
).
css
(
'
display
'
,
''
);
$
(
'
#startDate,#accessCode,#retentionCode
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#startDate,
#accessCode,
#retentionCode
, #finalDisposition, #updateFinalDisposition
'
).
css
(
'
display
'
,
'
none
'
);
this
.
loadArchivalAgency
();
}
else
{
$
(
'
#archivalAgency
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#startDate,#accessCode,#retentionCode
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#startDate,
#accessCode,
#retentionCode
, #finalDisposition, #updateFinalDisposition
'
).
css
(
'
display
'
,
'
none
'
);
this
.
modal
.
modal
();
}
$
(
'
#save
'
).
data
(
"
archiveids
"
,
""
);
$
(
'
#archiveModificationForm
'
).
css
(
'
display
'
,
''
);
$
(
'
#modal_multipleSelection
'
).
css
(
'
display
'
,
'
none
'
);
...
...
@@ -226,26 +237,29 @@
if
(
type
===
"
accessRule
"
)
{
$
(
'
#startDate, #accessCode
'
).
css
(
'
display
'
,
''
);
$
(
'
#retentionCode
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#retentionCode
, #finalDisposition, #updateFinalDisposition
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#archiveModificationForm
'
).
css
(
'
display
'
,
''
);
$
(
'
#archivalAgency
'
).
css
(
'
display
'
,
'
none
'
);
}
else
if
(
type
===
"
retentionRule
"
)
{
$
(
'
#startDate,#retentionCode
'
).
css
(
'
display
'
,
''
);
$
(
'
#retentionRuleDuration
'
).
text
(
''
);
$
(
'
#retentionRuleDescription
'
).
text
(
''
);
$
(
'
#startDate, #retentionCode, #finalDisposition, #updateFinalDisposition
'
).
css
(
'
display
'
,
''
);
$
(
'
#accessCode
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#archiveModificationForm
'
).
css
(
'
display
'
,
''
);
$
(
'
#archivalAgency
'
).
css
(
'
display
'
,
'
none
'
);
}
else
if
(
type
==
"
flagForTransfer
"
)
{
$
(
'
#archivalAgency
'
).
css
(
'
display
'
,
''
);
$
(
'
#startDate,#accessCode,#retentionCode
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#startDate,
#accessCode,
#retentionCode
, #finalDisposition, #updateFinalDisposition
'
).
css
(
'
display
'
,
'
none
'
);
this
.
loadArchivalAgency
();
}
else
{
$
(
'
#archivalAgency
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#startDate,#accessCode,#retentionCode
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
#startDate,
#accessCode,
#retentionCode
, #finalDisposition, #updateFinalDisposition
'
).
css
(
'
display
'
,
'
none
'
);
this
.
modal
.
modal
();
}
$
(
'
#save
'
).
data
(
"
archiveids
"
,
ids
);
$
(
'
#modal_multipleSelection
'
).
css
(
'
display
'
,
''
);
$
(
'
#modal_selected
'
).
html
(
selected
);
...
...
@@ -293,9 +307,9 @@
success
:
function
(
response
)
{
gritter
.
show
(
response
.
message
,
response
.
status
,
response
.
errors
);
if
(
response
.
status
)
{
$
(
"
#retentionRuleFinalDisposition
"
).
prop
(
"
disabled
"
,
false
);
ModificationModal
.
close
();
ModificationModal
.
modal
.
one
(
'
hidden.bs.modal
'
,
function
()
{
console
.
log
(
"
passage
"
);
//$('#modificationModal').modal();*
$
(
'
#archive_search
'
).
click
();
});
...
...
@@ -365,7 +379,6 @@
}
else
{
$
(
'
#retentionRule
'
).
css
(
"
display
"
,
''
);
$
(
'
#retentionRuleDuration
'
).
text
(
retentionRuleDuration
[
1
]
+
'
'
+
$
(
'
#text_
'
+
retentionRuleDurationUnit
).
html
());
$
(
'
#retentionRuleFinalDisposition
'
).
val
(
retentionRuleCode
.
finalDisposition
);
$
(
'
#retentionRuleDescription
'
).
text
(
retentionRuleCode
.
description
);
}
...
...
src/presentation/maarchRM/Resources/view/recordsManagement/retentionRule/index.html
View file @
0b21dedc
...
...
@@ -13,7 +13,7 @@
Retention rules
</h1>
</div>
<span
id=
"publicArchives"
class=
"hidden"
>
<?merge publicArchives ?>
</span>
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<div
id=
'retentionRuleList'
>
...
...
@@ -68,6 +68,7 @@
</div>
</div>
</div>
<?merge publicArchives.bool().not() ?>
<div
class=
"form-group col-md-12"
>
<div
class=
"col-md-10"
>
<label
class=
"control-label"
>
Final disposition
<span
style=
"color: red"
>
*
</span></label>
...
...
src/presentation/maarchRM/Resources/view/recordsManagement/retentionRule/list.html
View file @
0b21dedc
...
...
@@ -17,7 +17,8 @@
<th>
Label
</th>
<th>
Description
</th>
<th>
Retention duration
</th>
<th>
Final disposition
</th>
<?merge publicArchives.bool().not() ?>
<th
id=
"theadFinalDisposition"
>
Final disposition
</th>
<th/>
</tr>
</thead>
...
...
@@ -28,7 +29,8 @@
<td>
<?merge .label ?>
</td>
<td>
<?merge .description ?>
</td>
<td>
<?merge .duration ?>
<?merge .durationUnit ?>
</td>
<td>
<?merge .finalDispositionTran ?>
</td>
<?merge publicArchives.bool().not() ?>
<td
id=
"tbodyFinalDisposition"
>
<?merge .finalDispositionTran ?>
</td>
<td>
<div
class=
"btn-group pull-right"
>
<button
type=
"button"
class=
"btn btn-info btn-sm edit"
data-code=
'[?merge .code ?]'
title=
"Edit"
><span
class=
"fa fa-edit"
>
</span></button>
...
...
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