Skip to content

Commit

Permalink
Allow internally changing the visibility of obsoleted motions
Browse files Browse the repository at this point in the history
  • Loading branch information
CatoTH committed Oct 19, 2024
1 parent aae6943 commit cc11e0c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions models/settings/Consultation.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class Consultation implements \JsonSerializable

public bool $commentsSupportable = false;
public bool $screeningMotionsShown = false;
public bool $obsoletedByMotionsShown = true;
public bool $odtExportHasLineNumers = true;
public bool $pProcedureExpandAll = true; // If false: only show max. 1 section in the internal proposed procedure
public bool $adminListFilerByMotion = false; // If true: the admin list is filtered by motion. To be activated manually.
Expand Down
18 changes: 15 additions & 3 deletions models/settings/IMotionStatusEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class IMotionStatusEngine
private array $allStatusesCache;

public function __construct(
private \app\models\db\Consultation $consultation
private readonly \app\models\db\Consultation $consultation
) {
$statuses = [];
foreach (AntragsgruenApp::getActivePlugins() as $pluginClass) {
Expand Down Expand Up @@ -119,8 +119,20 @@ public function __construct(
false,
true
);
$statuses[] = new IMotionStatus(IMotion::STATUS_OBSOLETED_BY_MOTION, \Yii::t('structure', 'STATUS_OBSOLETED_BY_MOTION'));
$statuses[] = new IMotionStatus(IMotion::STATUS_OBSOLETED_BY_AMENDMENT, \Yii::t('structure', 'STATUS_OBSOLETED_BY_AMEND'));
$statuses[] = new IMotionStatus(
IMotion::STATUS_OBSOLETED_BY_MOTION,
\Yii::t('structure', 'STATUS_OBSOLETED_BY_MOTION'),
null,
false,
!$this->consultation->getSettings()->obsoletedByMotionsShown
);
$statuses[] = new IMotionStatus(
IMotion::STATUS_OBSOLETED_BY_AMENDMENT,
\Yii::t('structure', 'STATUS_OBSOLETED_BY_AMEND'),
null,
false,
!$this->consultation->getSettings()->obsoletedByMotionsShown
);
$statuses[] = new IMotionStatus(IMotion::STATUS_CUSTOM_STRING, \Yii::t('structure', 'STATUS_CUSTOM_STRING'));
$statuses[] = new IMotionStatus(
IMotion::STATUS_INLINE_REPLY,
Expand Down

0 comments on commit cc11e0c

Please sign in to comment.