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
35f0d500
Unverified
Commit
35f0d500
authored
May 02, 2018
by
Dylan
Browse files
#7528 fix translation
parent
7976bd6f
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/bundle/recordsManagement/Controller/retentionRule.php
View file @
35f0d500
...
...
@@ -54,10 +54,6 @@ class retentionRule
if
(
$retentionRule
->
duration
==
null
)
{
continue
;
}
if
(
$retentionRule
->
duration
->
y
==
999999999
)
{
$retentionRule
->
duration
=
null
;
$retentionRule
->
durationUnit
=
"Illimité"
;
}
}
return
$retentionRules
;
...
...
src/presentation/maarchRM/Presenter/recordsManagement/retentionRule.php
View file @
35f0d500
...
...
@@ -67,21 +67,25 @@ class retentionRule
$this
->
view
->
addContentFile
(
'recordsManagement/retentionRule/index.html'
);
$this
->
view
->
translate
();
$dataTable
=
$this
->
view
->
getElementById
(
"rulesTable"
)
->
plugin
[
'dataTable'
];
$dataTable
->
setPaginationType
(
"full_numbers"
);
$dataTable
->
setUnsortableColumns
(
5
);
foreach
(
$retentionRule
as
$rule
)
{
if
(
!
isset
(
$rule
->
durationUnit
))
{
$rule
->
durationUnit
=
substr
(
$rule
->
duration
,
-
1
);
$rule
->
duration
=
substr
(
$rule
->
duration
,
1
,
-
1
);
$rule
->
durationUnit
=
substr
(
$rule
->
duration
,
-
1
);
$rule
->
duration
=
substr
(
$rule
->
duration
,
1
,
-
1
);
if
(
$rule
->
duration
>=
9999
&&
$rule
->
durationUnit
==
'Y'
){
$rule
->
durationText
=
$this
->
view
->
translator
->
getText
(
'Unlimited'
,
null
,
"recordsManagement/retentionRule"
);
}
else
{
$rule
->
durationUnit
=
$this
->
view
->
translator
->
getText
(
$rule
->
durationUnit
,
"duration"
,
"recordsManagement/retentionRule"
);
$rule
->
durationText
=
$rule
->
duration
.
' '
.
$rule
->
durationUnit
;
}
$rule
->
finalDispositionTran
=
$this
->
view
->
translator
->
getText
(
$rule
->
finalDisposition
,
false
,
"recordsManagement/retentionRule"
);
}
$this
->
view
->
setSource
(
'retentionRule'
,
$retentionRule
);
$this
->
view
->
merge
();
$dataTable
=
$this
->
view
->
getElementById
(
"rulesTable"
)
->
plugin
[
'dataTable'
];
$dataTable
->
setPaginationType
(
"full_numbers"
);
$dataTable
->
setUnsortableColumns
(
array
(
4
));
return
$this
->
view
->
saveHtml
();
}
...
...
@@ -96,20 +100,27 @@ class retentionRule
$this
->
view
->
addContentFile
(
'recordsManagement/retentionRule/list.html'
);
$this
->
view
->
translate
();
$dataTable
=
$this
->
view
->
getElementById
(
"rulesTable"
)
->
plugin
[
'dataTable'
];
$dataTable
->
setPaginationType
(
"full_numbers"
);
$dataTable
->
setUnsortableColumns
(
array
(
4
));
foreach
(
$retentionRule
as
$rule
)
{
$rule
->
durationUnit
=
substr
(
$rule
->
duration
,
-
1
);
$rule
->
duration
=
substr
(
$rule
->
duration
,
1
,
-
1
);
$rule
->
durationUnit
=
$this
->
view
->
translator
->
getText
(
$rule
->
durationUnit
,
"duration"
,
"recordsManagement/retentionRule"
);
if
(
$rule
->
duration
>=
9999
&&
$rule
->
durationUnit
==
'Y'
){
$this
->
view
->
translator
->
getText
(
'unlimited'
,
null
,
"recordsManagement/retentionRule"
);
}
else
{
$rule
->
durationUnit
=
$this
->
view
->
translator
->
getText
(
$rule
->
durationUnit
,
"duration"
,
"recordsManagement/retentionRule"
);
}
$rule
->
durationText
=
$rule
->
duration
.
' '
.
$rule
->
durationUnit
;
}
$this
->
view
->
setSource
(
'retentionRule'
,
$retentionRule
);
$this
->
view
->
merge
();
$dataTable
=
$this
->
view
->
getElementById
(
"rulesTable"
)
->
plugin
[
'dataTable'
];
$dataTable
->
setPaginationType
(
"full_numbers"
);
$dataTable
->
setUnsortableColumns
(
array
(
4
));
return
$this
->
view
->
saveHtml
();
}
...
...
src/presentation/maarchRM/Resources/view/recordsManagement/archive/modalModification.html
View file @
35f0d500
...
...
@@ -351,7 +351,7 @@
var
retentionRuleCode
=
$
(
"
#retentionRuleCode
"
).
find
(
'
:selected
'
).
data
(
'
json
'
);
var
retentionRules
=
""
;
var
retentionRuleTable
=
$
(
'
#retentionRuleTable
'
);
console
.
log
(
retentionRuleCode
)
if
(
retentionRuleCode
)
{
var
retentionRuleDurationUnit
=
retentionRuleCode
.
duration
.
substr
(
retentionRuleCode
.
duration
.
length
-
1
,
1
);
...
...
src/presentation/maarchRM/Resources/view/recordsManagement/retentionRule/index.html
View file @
35f0d500
...
...
@@ -352,6 +352,10 @@
$
.
each
(
object
,
function
(
key
,
value
)
{
$
(
'
[name="
'
+
key
+
'
"]
'
).
val
(
value
);
});
if
(
$
(
'
[name="duration"]
'
).
val
()
>=
9999
&
$
(
'
#durationUnit
'
).
val
()
==
'
Y
'
)
{
$
(
'
#durationUnit
'
).
val
(
'
*
'
);
$
(
'
[name="duration"]
'
).
val
(
''
).
prop
(
'
disabled
'
,
true
);
}
}
</script>
src/presentation/maarchRM/Resources/view/recordsManagement/retentionRule/list.html
View file @
35f0d500
...
...
@@ -27,7 +27,7 @@
<td>
<?merge .code ?>
</td>
<td>
<?merge .label ?>
</td>
<td>
<?merge .description ?>
</td>
<td>
<?merge .duration
?>
<?merge .durationUni
t ?>
</td>
<td>
<?merge .duration
Tex
t ?>
</td>
<td>
<?merge .finalDispositionTran ?>
</td>
<td>
<div
class=
"btn-group pull-right"
>
...
...
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