The Storm lists all appear to contain 10 entries. 20 would fit my screen. An administration option to change all the list lengths would be useful.

Comments

Magnity’s picture

This can already be done using the filter options on each list.

(EDIT: Although this is setting per list rather than globally)

Mark_Watson27’s picture

Status: Active » Needs review

This could be easily acheivable by adding the following lines to the storm_admin_settings function in storm.module

  $form['storm_default_items_per_page'] = array(
    '#type' => 'textfield',
    '#title' => t('Default Items per Page'),
    '#default_value' => variable_get('storm_default_items_per_page', 10),
    '#description' => t('Default items per page when viewing lists'),
    '#size' => 5,
    '#weight' => $w++
  );

Then in the modeles theme.inc i.e. for Tickets stormticket.theme.inc change the code in stormticket_list

  $itemsperpage = $_SESSION['stormticket_list_filter']['itemsperpage'];
  if (!$itemsperpage) {
    $itemsperpage = variable_get('storm_default_items_per_page', 10);
    $_SESSION['stormticket_list_filter']['itemsperpage'] = $itemsperpage;
  }

So that you're getting the default setting or using 10 if there isn't one.

Magnity’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

Magnity’s picture

Title: Change length of lists from 10 to 20 » Add default length of lists
Status: Reviewed & tested by the community » Fixed

Committed to all modules.

Note that the items per page settings are in each module's admin.inc file, not theme.inc and that it is the setting in stormmodule_list_filter which matters rather than stormmodule_list.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.