Skip to content

Commit

Permalink
Allow using the agenda item in ODT export
Browse files Browse the repository at this point in the history
  • Loading branch information
CatoTH committed Nov 17, 2024
1 parent caaa434 commit 3768b42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions views/amendment/LayoutHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ public static function printAmendmentToOdt(Amendment $amendment, \CatoTH\HTML2Op
}
$initiatorStr .= ': ' . implode(', ', $initiators);
$doc->addReplace('/\{\{ANTRAGSGRUEN:TITLE\}\}/siu', $amendment->getTitle());
$doc->addReplace('/\{\{ANTRAGSGRUEN:AGENDA\}\}/siu', ($amendment->getMyAgendaItem() ? $amendment->getMyAgendaItem()->title : ''));
$doc->addReplace('/\{\{ANTRAGSGRUEN:INITIATORS\}\}/siu', $initiatorStr);
if ($amendment->getMyMotionType()->getSettingsObj()->showProposalsInExports && $amendment->proposalStatus !== null && $amendment->isProposalPublic()) {
$doc->addReplace('/\{\{ANTRAGSGRUEN:STATUS\}\}/siu', \Yii::t('export', 'proposed_procedure') . ': ' . strip_tags($amendment->getFormattedProposalStatus(false)));
Expand Down
1 change: 1 addition & 0 deletions views/motion/LayoutHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,7 @@ public static function printMotionToOdt(Motion $motion, \CatoTH\HTML2OpenDocumen
$initiatorStr = \Yii::t('export', 'InitiatorMulti');
}
$initiatorStr .= ': ' . implode(', ', $initiators);
$doc->addReplace('/\{\{ANTRAGSGRUEN:AGENDA\}\}/siu', ($motion->getMyAgendaItem() ? $motion->getMyAgendaItem()->title : ''));
$doc->addReplace('/\{\{ANTRAGSGRUEN:TITLE\}\}/siu', $motion->getTitleWithPrefix());
$doc->addReplace('/\{\{ANTRAGSGRUEN:INITIATORS\}\}/siu', $initiatorStr);
if ($motion->getMyMotionType()->getSettingsObj()->showProposalsInExports && $motion->proposalStatus !== null && $motion->isProposalPublic()) {
Expand Down

0 comments on commit 3768b42

Please sign in to comment.