have the distribution description in one place, just the model.
pull/63/head
noud 2012-11-16 11:43:47 +01:00
parent 2a12a5db3e
commit 5d37e93eb6
2 changed files with 3 additions and 1 deletions

View File

@ -272,6 +272,8 @@ class EventsController extends AppController {
// passing type and category definitions (explanations)
$this->set('typeDefinitions', $this->Attribute->typeDefinitions);
$this->set('categoryDefinitions', $this->Attribute->categoryDefinitions);
$this->set('distributionDescriptions', $this->Event->distributionDescriptions);
}
/**

View File

@ -59,7 +59,7 @@ if ($isAdmin || $mayPublish) {
<?php if ('true' == Configure::read('CyDefSIG.private')): ?>
<dt>Distribution</dt>
<dd>
<?php echo ($event['Event']['distribution'] == 'All') ? 'All, to be distributed to other connected CyDefSIG servers.' : (($event['Event']['distribution'] == 'Community') ? 'Community, event visible to all on this CyDefSIG instance but will not be shared past it.' : 'Org, only organization memebers will see the event.'); ?>
<?php echo $event['Event']['distribution'] . ', ' . lcfirst($distributionDescriptions[$event['Event']['distribution']]['formdesc']) . '.'; ?>
&nbsp;
</dd>
<?php else: ?>