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
thirdPartyArchiving
Commits
e7b00483
Verified
Commit
e7b00483
authored
Feb 26, 2019
by
Arnaud Pauget
Browse files
Add propreties on appraisalRule for correctly displaying it
parent
a1d0ef76
Changes
1
Show whitespace changes
Inline
Side-by-side
presentation/maarchRM/Presenter/medona/message.php
View file @
e7b00483
...
...
@@ -315,11 +315,29 @@ class message
}
}
foreach
(
$messageObject
->
archive
as
$archive
)
{
if
(
isset
(
$archive
->
appraisalRule
))
{
$dateInter
=
new
\
DateInterval
(
$archive
->
appraisalRule
->
duration
);
$numberDuration
=
0
;
$toDisplay
=
''
;
if
(
$dateInter
->
y
!=
0
)
{
$numberDuration
=
$dateInter
->
y
;
$toDisplay
=
"Year(s)"
;
}
elseif
(
$dateInter
->
m
!=
0
)
{
$numberDuration
=
$dateInter
->
m
;
$toDisplay
=
"Month(s)"
;
}
elseif
(
$dateInter
->
d
!=
0
)
{
$numberDuration
=
$dateInter
->
d
;
$toDisplay
=
"Day(s)"
;
}
$archive
->
appraisalRule
->
durationNumber
=
$numberDuration
;
$archive
->
appraisalRule
->
durationToDisplay
=
$toDisplay
;
}
}
$messageObjects
[]
=
$messageObject
;
}
end
(
$messageObjects
)
->
last
=
true
;
$this
->
view
->
addContentFile
(
$baseMessage
->
schema
.
"/message/messageModal.html"
);
$messageDiv
=
$this
->
view
->
getElementById
(
'[?merge .messageId ?]'
);
...
...
@@ -347,6 +365,7 @@ class message
$dataTable
->
setPaginationType
(
"full_numbers"
);
$dataTable
->
setSorting
(
array
(
array
(
0
,
'desc'
)));
}
// var_dump($messageObjects[0]->archive[0]->appraisalRule);
$this
->
view
->
setSource
(
'messages'
,
$messageObjects
);
$this
->
view
->
merge
();
...
...
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