Skip to content

Commit

Permalink
Added advanced search options for published and layout for pages module
Browse files Browse the repository at this point in the history
  • Loading branch information
David McReynolds committed Oct 29, 2014
1 parent 68e61f1 commit 6a8c6a2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
24 changes: 23 additions & 1 deletion fuel/modules/fuel/config/fuel_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,29 @@
'item_actions' => array(
'save', 'view', 'publish', 'delete', 'duplicate', 'replace', 'create',
'others' => array('pages/upload' => lang('btn_upload'))
)
),
'advanced_search' => TRUE,
'filters' => array(
'layout' => array(
'default' => 1,
'label' => lang('form_label_layout'),
'type' => 'select',
'model' => 'fuel_pages_model',
'model_params' => array('layout', 'layout'),
'hide_if_one' => TRUE,
'default' => '',
'first_option' => 'Select a layout...',
),
'published' => array(
'default' => 1,
'label' => lang('form_label_published'),
'type' => 'select',
'options' => array('yes' => 'Published', 'no' =>'Unpublished'),
'hide_if_one' => TRUE,
'default' => '',
'first_option' => 'Select only...',
),
),
);

// Page module init values
Expand Down
1 change: 1 addition & 0 deletions fuel/modules/fuel/models/fuel_pages_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

class Fuel_pages_model extends Base_module_model {

public $filter_join = 'and';
public $required = array('location'); // The location field is required
public $unique_fields = array('location'); // The location field is unique
public $hidden_fields = array('last_modified', 'last_modified_by'); // The Last modified and Last modified by are hidden fields
Expand Down

0 comments on commit 6a8c6a2

Please sign in to comment.