diff --git a/app/Controller/AttributesController.php b/app/Controller/AttributesController.php index aefb80a99..17c1c900d 100755 --- a/app/Controller/AttributesController.php +++ b/app/Controller/AttributesController.php @@ -80,6 +80,7 @@ class AttributesController extends AppController { */ public function index() { $this->Attribute->recursive = 0; + $this->Attribute->contain = array('Event.id', 'Event.orgc', 'Event.org'); $this->set('isSearch', 0); $this->set('attributes', $this->paginate()); $this->set('attrDescriptions', $this->Attribute->fieldDescriptions); @@ -963,7 +964,8 @@ class AttributesController extends AppController { $this->paginate = array( 'limit' => 60, 'maxLimit' => 9999, // LATER we will bump here on a problem once we have more than 9999 attributes? - 'conditions' => $conditions + 'conditions' => $conditions, + 'contain' => array('Event.orgc', 'Event.id', 'Event.org') ); if (!$this->_isSiteAdmin()) { // merge in private conditions diff --git a/app/View/Attributes/index.ctp b/app/View/Attributes/index.ctp index 3423f4993..bf42e86cd 100755 --- a/app/View/Attributes/index.ctp +++ b/app/View/Attributes/index.ctp @@ -29,6 +29,9 @@ if ($isSearch == 1) { + + + @@ -58,15 +61,26 @@ foreach ($attributes as $attribute):
- > + >
+ + +
Paginator->sort('event_id');?>Paginator->sort('orgc', 'Org');?> Paginator->sort('category');?> Paginator->sort('type');?> Paginator->sort('value');?> + Html->image('orgs/' . h($attribute['Event']['orgc']) . '.png', array('alt' => h($attribute['Event']['orgc']), 'title' => h($attribute['Event']['orgc']), 'style' => 'width:24px; height:24px')); + else echo $this->Html->tag('span', h($attribute['Event']['orgc']), array('class' => 'welcome', 'style' => 'float:left;')); + ?> +   +