--- /usr/share/zabbix/include/views/configuration.action.list.php.orig	2013-10-15 11:25:56.000000000 +0200
+++ /usr/share/zabbix/include/views/configuration.action.list.php	2013-11-04 18:52:05.000000000 +0100
@@ -44,22 +44,44 @@
 $actionForm->setName('actionForm');
 
 // create table
+$expred_ico_item = new CImg('images/general/plus.png');
+$expred_ico_item->setAttribute('id', 'expRedConIco');
+$expred_ico_url = 'javascript:expandReduce(".expRedCon", "'._('[expand]').'", "'._('[reduce]').'", "#expRedConIco");';
+$expred_ico = new CLink($expred_ico_item, $expred_ico_url, null, null, false);
+
 $actionTable = new CTableInfo(_('No actions defined.'));
 $actionTable->setHeader(array(
 	new CCheckBox('all_items', null, "checkAll('".$actionForm->getName()."', 'all_items', 'g_actionid');"),
 	make_sorting_header(_('Name'), 'name'),
-	_('Conditions'),
+	array(_('Conditions'), SPACE, $expred_ico),
 	_('Operations'),
 	make_sorting_header(_('Status'), 'status')
 ));
 
 foreach ($this->data['actions'] as $action) {
-	$conditions = array();
+	$conditions = $conditions_short = array();
 	order_result($action['conditions'], 'conditiontype', ZBX_SORT_DOWN);
 	foreach ($action['conditions'] as $condition) {
 		$conditions[] = array(get_condition_desc($condition['conditiontype'], $condition['operator'], $condition['value']), BR());
 	}
 
+	$conditions_short = array_slice($conditions, 0, 3);
+	foreach(array_keys($conditions_short) as $key) {
+		$max_text_length = ZBX_TEXTBOX_FILTER_SIZE * 3;
+		if (zbx_strlen($conditions_short[$key][0]) > $max_text_length)
+			$conditions_short[$key][0] = zbx_substr($conditions_short[$key][0], 0, $max_text_length).' ...';
+	};
+
+	if ($conditions_short != $conditions) {
+		$expred_lnk_url = 'javascript:expandReduce(".expRedCon' . $action['actionid'].'", "'._('[expand]').'", "'._('[reduce]').'");';
+		$expred_lnk = new CLink(_('[expand]'), $expred_lnk_url, 'expRedCon'.$action['actionid'].' expRedCon', null, false);
+		$conditions_short_class = "expRedCon${action['actionid']}_short expRedCon_short visible";
+		$conditions_long_class = "expRedCon${action['actionid']}_long expRedCon_long hidden";
+		$conditions = array(new CDiv($conditions_short, $conditions_short_class), new CDiv($conditions, $conditions_long_class), $expred_lnk);
+	} else {
+		$conditions = array(new CDiv($conditions_short));
+	}
+
 	sortOperations($action['eventsource'], $action['operations']);
 	$operations = array();
 	foreach ($action['operations'] as $operation) {
--- /usr/share/zabbix/include/views/configuration.hostgroups.list.php.orig	2013-10-15 11:25:56.000000000 +0200
+++ /usr/share/zabbix/include/views/configuration.hostgroups.list.php.exred	2013-11-04 18:49:26.000000000 +0100
@@ -44,29 +44,34 @@
 $hostgroupForm->setName('hostgroupForm');
 
 // create table
+$expred_ico_item = new CImg('images/general/plus.png');
+$expred_ico_item->setAttribute('id', 'expRedMemIco');
+$expred_ico_url = 'javascript:expandReduce(".expRedMem", "...", "'._('[reduce]').'", "#expRedMemIco");';
+$expred_ico = new CLink($expred_ico_item, $expred_ico_url, null, null, false);
+
 $hostgroupTable = new CTableInfo(_('No host groups defined.'));
 $hostgroupTable->setHeader(array(
 	new CCheckBox('all_groups', null, "checkAll('".$hostgroupForm->getName()."', 'all_groups', 'groups');"),
 	make_sorting_header(_('Name'), 'name'),
 	' # ',
-	_('Members')
+	array(_('Members'), SPACE, $expred_ico)
 ));
 
 foreach ($this->data['groups'] as $group) {
 	$tpl_count = 0;
 	$host_count = 0;
-	$hosts_output = array();
+	$hosts_output = $hosts_output_short = array();
 	$i = 0;
 
 	foreach ($group['templates'] as $template) {
 		$i++;
-		if ($i > $this->data['config']['max_in_table']) {
-			$hosts_output[] = '...';
-			$hosts_output[] = '//empty for array_pop';
-			break;
+		$url = 'templates.php?form=update&templateid='.$template['hostid'].'&groupid='.$group['groupid'];
+
+		if ($i <= $this->data['config']['max_in_table']) {
+			$hosts_output_short[] = new CLink($template['name'], $url, 'unknown');
+			$hosts_output_short[] = ', ';
 		}
 
-		$url = 'templates.php?form=update&templateid='.$template['hostid'].'&groupid='.$group['groupid'];
 		$hosts_output[] = new CLink($template['name'], $url, 'unknown');
 		$hosts_output[] = ', ';
 	}
@@ -74,16 +79,11 @@
 		array_pop($hosts_output);
 		$hosts_output[] = BR();
 		$hosts_output[] = BR();
+		$hosts_output_short = $hosts_output;
 	}
 
 	foreach ($group['hosts'] as $host) {
 		$i++;
-		if ($i > $this->data['config']['max_in_table']) {
-			$hosts_output[] = '...';
-			$hosts_output[] = '//empty for array_pop';
-			break;
-		}
-
 		switch ($host['status']) {
 			case HOST_STATUS_NOT_MONITORED:
 				$style = 'on';
@@ -94,11 +94,27 @@
 				$url = 'hosts.php?form=update&hostid='.$host['hostid'].'&groupid='.$group['groupid'];
 			break;
 		}
+
+		if ($i <= $this->data['config']['max_in_table']) {
+			$hosts_output_short[] = new CLink($host['name'], $url, $style);
+			$hosts_output_short[] = ', ';
+		}
+
 		$hosts_output[] = new CLink($host['name'], $url, $style);
 		$hosts_output[] = ', ';
 	}
+	array_pop($hosts_output_short);
 	array_pop($hosts_output);
 
+	if ($hosts_output_short != $hosts_output) {
+		$hosts_output_short[] = ', ';
+		$expred_lnk_url = 'javascript:expandReduce(".expRedMem' . $group['groupid'].'", "...", "'._('[reduce]').'");';
+		$expred_lnk = new CLink('...', $expred_lnk_url, 'expRedMem'.$group['groupid'].' expRedMem', null, false);
+		$hosts_output_short_class = "expRedMem${group['groupid']}_short expRedMem_short visible";
+		$hosts_output_long_class = "expRedMem${group['groupid']}_long expRedMem_long hidden";
+		$hosts_output = array(new CSpan($hosts_output_short, $hosts_output_short_class), new CDiv($hosts_output, $hosts_output_long_class), $expred_lnk);
+	}
+
 	$hostCount = $this->data['groupCounts'][$group['groupid']]['hosts'];
 	$templateCount = $this->data['groupCounts'][$group['groupid']]['templates'];
 
--- /usr/share/zabbix/hosts.php.orig	2013-10-15 11:25:56.000000000 +0200
+++ /usr/share/zabbix/hosts.php	2013-11-04 19:03:26.000000000 +0100
@@ -673,6 +673,16 @@
 	$hosts_wdgt->addFlicker($filter_form, CProfile::get('web.hosts.filter.state', 0));
 
 	// table hosts
+	$expred_if_ico_item = new CImg('images/general/plus.png');
+	$expred_if_ico_item->setAttribute('id', 'expRedIfIco');
+	$expred_if_ico_url = 'javascript:expandReduce(".expRedIf", "'._('[expand]').'", "'._('[reduce]').'", "#expRedIfIco");';
+	$expred_if_ico = new CLink($expred_if_ico_item, $expred_if_ico_url, null, null, false);
+
+	$expred_tpl_ico_item = new CImg('images/general/plus.png');
+	$expred_tpl_ico_item->setAttribute('id', 'expRedTplIco');
+	$expred_tpl_ico_url = 'javascript:expandReduce(".expRedTpl", "'._('[show]').'", "'._('[hide]').'", "#expRedTplIco");';
+	$expred_tpl_ico = new CLink($expred_tpl_ico_item, $expred_tpl_ico_url, null, null, false);
+
 	$form = new CForm();
 	$form->setName('hosts');
 
@@ -685,8 +695,8 @@
 		_('Triggers'),
 		_('Graphs'),
 		_('Discovery'),
-		_('Interface'),
-		_('Templates'),
+		array(_('Interface'), SPACE, $expred_if_ico),
+		array(_('Templates'), SPACE, $expred_tpl_ico),
 		make_sorting_header(_('Status'), 'status'),
 		_('Availability')
 	));
@@ -782,6 +792,14 @@
 		$hostIF = ($interface['useip'] == INTERFACE_USE_IP) ? $interface['ip'] : $interface['dns'];
 		$hostIF .= empty($interface['port']) ? '' : ': '.$interface['port'];
 
+		foreach ($host['interfaces'] as $interface) {
+			$if = ($interface['useip'] == INTERFACE_USE_IP) ? $interface['ip'] : $interface['dns'];
+			$if .= empty($interface['port']) ? '' : ': '.$interface['port'];
+			$if .= ' ('.interfaceType2str($interface['type']).')';
+			$host['hostIF_long'][] = $if;
+			$host['hostIF_long'][] = BR();
+		}
+
 		$status_script = null;
 		switch ($host['status']) {
 			case HOST_STATUS_MONITORED:
@@ -844,6 +862,18 @@
 				array_pop($hostTemplates);
 			}
 		}
+		if (count($host['hostIF_long']) > 2) {
+			$expred_if_lnk_url = 'javascript:expandReduce(".expRedIf' . $host['hostid'].'", "'._('[expand]').'", "'._('[reduce]').'");';
+			$expred_if_lnk = new CLink(_('[expand]'), $expred_if_lnk_url, 'expRedIf'.$host['hostid'].' expRedIf', null, false);
+			$hostIF_short_class = "expRedIf${host['hostid']}_short expRedIf_short visible";
+			$hostIF_long_class = "expRedIf${host['hostid']}_long expRedIf_long hidden";
+			$hostIF = array(new CSpan(array($hostIF, SPACE), $hostIF_short_class), new CDiv($host['hostIF_long'], $hostIF_long_class), $expred_if_lnk);
+		}
+
+		$expred_tpl_lnk_url = 'javascript:expandReduce(".expRedTpl' . $host['hostid'].'", "'._('[show]').'", "'._('[hide]').'");';
+		$expred_tpl_lnk = new CLink(_('[show]'), $expred_tpl_lnk_url, 'expRedTpl'.$host['hostid'].' expRedTpl', null, false);
+		$hostTemplates_class = "expRedTpl${host['hostid']}_long expRedTpl_long hidden";
+		$hostTemplates = new CCol(array(new CDiv($hostTemplates, $hostTemplates_class), $expred_tpl_lnk), 'wraptext');
 
 		$table->addRow(array(
 			new CCheckBox('hosts['.$host['hostid'].']', null, null, $host['hostid']),
@@ -854,7 +884,7 @@
 			$graphs,
 			$discoveries,
 			$hostIF,
-			new CCol($hostTemplates, 'wraptext'),
+			$hostTemplates,
 			$status,
 			getAvailabilityTable($host)
 		));
--- /usr/share/zabbix/include/views/configuration.item.list.php.orig	2013-10-15 11:25:56.000000000 +0200
+++ /usr/share/zabbix/include/views/configuration.item.list.php	2013-11-04 18:47:11.000000000 +0100
@@ -47,6 +47,24 @@
 }
 
 // create table
+$expred_key_ico_item = new CImg('images/general/plus.png');
+$expred_key_ico_item->setAttribute('id', 'expRedKeyIco');
+$expred_key_ico_url = 'javascript:expandReduce(".expRedKey", "'._('[show]').'", "'._('[hide]').'", "#expRedKeyIco");';
+$expred_key_ico_lnk = new CLink($expred_key_ico_item, $expred_key_ico_url, null, null, false);
+$expred_key_ico = new CSpan(array(SPACE, $expred_key_ico_lnk));
+
+$expred_app_ico_item = new CImg('images/general/plus.png');
+$expred_app_ico_item->setAttribute('id', 'expRedAppIco');
+$expred_app_ico_url = 'javascript:expandReduce(".expRedApp", "'._('[show]').'", "'._('[hide]').'", "#expRedAppIco");';
+$expred_app_ico_lnk = new CLink($expred_app_ico_item, $expred_app_ico_url, null, null, false);
+$expred_app_ico = new CSpan(array(SPACE, $expred_app_ico_lnk));
+
+$expred_err_ico_item = new CImg('images/general/plus.png');
+$expred_err_ico_item->setAttribute('id', 'expRedErrIco');
+$expred_err_ico_url = 'javascript:expandReduce(".expRedErr", "'._('[show]').'", "'._('[hide]').'", "#expRedErrIco");';
+$expred_err_ico_lnk = new CLink($expred_err_ico_item, $expred_err_ico_url, null, null, false);
+$expred_err_ico = new CSpan(array(SPACE, $expred_err_ico_lnk));
+
 $itemTable = new CTableInfo(_('No items defined.'));
 $itemTable->setHeader(array(
 	new CCheckBox('all_items', null, "checkAll('".$itemForm->getName()."', 'all_items', 'group_itemid');"),
@@ -54,14 +72,14 @@
 	empty($this->data['filter_hostname']) ? _('Host') : null,
 	make_sorting_header(_('Name'), 'name'),
 	_('Triggers'),
-	make_sorting_header(_('Key'), 'key_'),
+	make_sorting_header(_('Key'), 'key_', null, $expred_key_ico),
 	make_sorting_header(_('Interval'), 'delay'),
 	make_sorting_header(_('History'), 'history'),
 	make_sorting_header(_('Trends'), 'trends'),
 	make_sorting_header(_('Type'), 'type'),
-	_('Applications'),
+	array(_('Applications'), $expred_app_ico),
 	make_sorting_header(_('Status'), 'status'),
-	_('Error')
+	array(_('Error'), $expred_err_ico)
 ));
 
 foreach ($this->data['items'] as $item) {
@@ -215,18 +233,33 @@
 	$checkBox = new CCheckBox('group_itemid['.$item['itemid'].']', null, null, $item['itemid']);
 	$checkBox->setEnabled(empty($item['discoveryRule']));
 
+	$expred_key_lnk_url = 'javascript:expandReduce(".expRedKey' . $item['itemid'].'", "'._('[show]').'", "'._('[hide]').'");';
+	$expred_key_lnk = new CLink(_('[show]'), $expred_key_lnk_url, 'expRedKey'.$item['itemid'].' expRedKey', null, false);
+	$item_key_class = "expRedKey${item['itemid']}_long expRedKey_long hidden";
+	$item_key = new CCol(array(new CDiv($item['key_'], $item_key_class), $expred_key_lnk));
+
+	$expred_app_lnk_url = 'javascript:expandReduce(".expRedApp' . $item['itemid'].'", "'._('[show]').'", "'._('[hide]').'");';
+	$expred_app_lnk = new CLink(_('[show]'), $expred_app_lnk_url, 'expRedApp'.$item['itemid'].' expRedApp', null, false);
+	$applications_class = "expRedApp${item['itemid']}_long expRedApp_long hidden wraptext";
+	$applications = new CCol(array(new CDiv($item['applications_list'], $applications_class), $expred_app_lnk));
+
+	if (empty($item['error'])) $item['error'] = '-';
+	$item_error_class = "expRedErr${item['itemid']}_long expRedErr_long hidden";
+	$statusIcons_class = "expRedErr${item['itemid']}_short expRedErr_short visible";
+	$statusIcons = new CCol(array(new CDiv($statusIcons, $statusIcons_class), new CDiv($item['error'], $item_error_class)));
+
 	$itemTable->addRow(array(
 		$checkBox,
 		$menuIcon,
 		empty($this->data['filter_hostname']) ? $item['host'] : null,
 		$description,
 		$triggerInfo,
-		$item['key_'],
+		$item_key,
 		$item['type'] == ITEM_TYPE_TRAPPER || $item['type'] == ITEM_TYPE_SNMPTRAP ? '' : $item['delay'],
 		$item['history'],
 		in_array($item['value_type'], array(ITEM_VALUE_TYPE_STR, ITEM_VALUE_TYPE_LOG, ITEM_VALUE_TYPE_TEXT)) ? '' : $item['trends'],
 		item_type2str($item['type']),
-		new CCol($item['applications_list'], 'wraptext'),
+		$applications,
 		$status,
 		$statusIcons
 	));
--- /usr/share/zabbix/js/common.js.orig	2013-10-15 11:25:56.000000000 +0200
+++ /usr/share/zabbix/js/common.js	2013-11-04 18:19:40.000000000 +0100
@@ -641,3 +641,34 @@
 function zbx_throw(msg) {
 	throw(msg);
 }
+
+function expandReduce(txt_selector, txt_expand, txt_reduce, img_selector, img_expand, img_reduce) {
+	(img_reduce == null) ? img_reduce = "images/general/minus.png" : img_reduce = img_reduce;
+	(img_expand == null) ? img_expand = "images/general/plus.png" : img_expand = img_expand;
+	var short_selector = txt_selector + '_short';
+	var long_selector = txt_selector + '_long';
+
+	if (img_selector == null) {
+		if (jQuery(txt_selector).html() == txt_expand) {
+			jQuery(short_selector).hide();
+			jQuery(long_selector).show();
+			jQuery(txt_selector).html(txt_reduce);
+		} else if (jQuery(txt_selector).html() == txt_reduce) {
+			jQuery(long_selector).hide();
+			jQuery(short_selector).show();
+			jQuery(txt_selector).html(txt_expand);
+		}
+	} else {
+		if (jQuery(img_selector).attr('src') == img_expand) {
+			jQuery(img_selector).attr('src', img_reduce);
+			jQuery(short_selector).hide();
+			jQuery(long_selector).show();
+			jQuery(txt_selector).html(txt_reduce);
+		} else if (jQuery(img_selector).attr('src') == img_reduce) {
+			jQuery(img_selector).attr('src', img_expand);
+			jQuery(long_selector).hide();
+			jQuery(short_selector).show();
+			jQuery(txt_selector).html(txt_expand);
+		}
+	}
+}
--- /usr/share/zabbix/include/items.inc.php.orig	2013-10-13 19:28:27.000000000 +0200
+++ /usr/share/zabbix/include/items.inc.php	2013-10-13 19:53:31.000000000 +0200
@@ -917,12 +917,12 @@
  *
  * @return string
  */
-function formatItemValue(array $item, $unknownString = '-') {
+function formatItemValue(array $item, $unknownString = '-', $trim_value = true) {
 	if (!isset($item['lastvalue']) || $item['lastclock'] == 0) {
 		return $unknownString;
 	}
 
-	$value = formatItemValueType($item);
+	$value = formatItemValueType($item, $trim_value);
 	if ($item['valuemapid'] > 0) {
 		$value = applyValueMap($value, $item['valuemapid']);
 	}
@@ -937,7 +937,7 @@
  *
  * @return string
  */
-function formatItemValueType(array $item) {
+function formatItemValueType(array $item, $trim_value = true) {
 	if ($item['value_type'] == ITEM_VALUE_TYPE_FLOAT || $item['value_type'] == ITEM_VALUE_TYPE_UINT64) {
 		$value = convert_units($item['lastvalue'], $item['units']);
 	}
@@ -945,7 +945,7 @@
 			|| $item['value_type'] == ITEM_VALUE_TYPE_TEXT
 			|| $item['value_type'] == ITEM_VALUE_TYPE_LOG) {
 		$value = $item['lastvalue'];
-		if (zbx_strlen($value) > 20) {
+		if ($trim_value && zbx_strlen($value) > 20) {
 			$value = zbx_substr($value, 0, 20).' ...';
 		}
 	}
--- /usr/share/zabbix/latest.php.orig	2013-10-21 10:48:58.000000000 +0200
+++ /usr/share/zabbix/latest.php	2013-11-04 18:36:43.000000000 +0100
@@ -184,6 +184,11 @@
 //		$link = new CLink(new CImg('images/general/plus.png'),$url,null,"javascript: return updater.onetime_update('".ZBX_PAGE_MAIN_HAT."','".$url."');");
 }
 
+$expred_ico_item = new CImg('images/general/plus.png');
+$expred_ico_item->setAttribute('id', 'expRedLValIco');
+$expred_ico_url = 'javascript:expandReduce(".expRedLVal", "...", "'._('[reduce]').'", "#expRedLValIco");';
+$expred_ico = new CLink($expred_ico_item, $expred_ico_url, null, null, false);
+
 $table = new CTableInfo(_('No values found.'));
 $table->setHeader(array(
 	$link,
@@ -191,7 +196,7 @@
 	($_REQUEST['hostid'] == 0) ? make_sorting_header(_('Host'), 'h.name') : NULL,
 	make_sorting_header(_('Name'), 'i.name'),
 	make_sorting_header(_('Last check'), 'i.lastclock'),
-	_('Last value'),
+	array(_('Last value'), SPACE, $expred_ico),
 	_x('Change', 'noun in latest data'),
 	_('History')
 ));
--- /usr/share/zabbix/include/views/administration.mediatypes.list.php.orig	2013-10-15 11:25:56.000000000 +0200
+++ /usr/share/zabbix/include/views/administration.mediatypes.list.php	2013-11-04 18:54:18.000000000 +0100
@@ -33,13 +33,18 @@
 $mediaTypeForm->setName('mediaTypesForm');
 
 // create table
+$expred_ico_item = new CImg('images/general/plus.png');
+$expred_ico_item->setAttribute('id', 'expRedActIco');
+$expred_ico_url = 'javascript:expandReduce(".expRedAct", "'._('[expand]').'", "'._('[reduce]').'", "#expRedActIco");';
+$expred_ico = new CLink($expred_ico_item, $expred_ico_url, null, null, false);
+
 $mediaTypeTable = new CTableInfo(_('No media types defined.'));
 $mediaTypeTable->setHeader(array(
 	new CCheckBox('all_media_types', null, "checkAll('".$mediaTypeForm->getName()."', 'all_media_types', 'mediatypeids');"),
 	make_sorting_header(_('Description'), 'description'),
 	make_sorting_header(_('Type'), 'type'),
 	_('Status'),
-	_('Used in actions'),
+	array(_('Used in actions'), SPACE, $expred_ico),
 	_('Details')
 ));
 foreach ($this->data['mediatypes'] as $mediatype) {
@@ -67,15 +72,30 @@
 			break;
 	}
 
-	$actionLinks = array();
+	$actionLinks = $actionLinks_short = array();
 	if (!empty($mediatype['listOfActions'])) {
 		order_result($mediatype['listOfActions'], 'name');
 
 		foreach ($mediatype['listOfActions'] as $action) {
+			if (count($actionLinks) <= ZBX_TEXTBOX_FILTER_SIZE * 2) {
+				$actionLinks_short [] = new CLink($action['name'], 'actionconf.php?form=edit&actionid='.$action['actionid']);
+				$actionLinks_short [] = ', ';
+			}
+
 			$actionLinks[] = new CLink($action['name'], 'actionconf.php?form=edit&actionid='.$action['actionid']);
 			$actionLinks[] = ', ';
 		}
+		array_pop($actionLinks_short);
 		array_pop($actionLinks);
+
+		if ($actionLinks_short != $actionLinks) {
+			$actionLinks_short[] = ', ';
+			$expred_lnk_url = 'javascript:expandReduce(".expRedAct' . $mediatype['mediatypeid'].'", "...", "'._('[reduce]').'");';
+			$expred_lnk = new CLink('...', $expred_lnk_url, 'expRedAct'.$mediatype['mediatypeid'].' expRedAct', null, false);
+			$actionLinks_short_class = "expRedAct${mediatype['mediatypeid']}_short expRedAct_short visible";
+			$actionLinks_long_class = "expRedAct${mediatype['mediatypeid']}_long expRedAct_long hidden";
+			$actionLinks = array(new CSpan($actionLinks_short, $actionLinks_short_class), new CDiv($actionLinks, $actionLinks_long_class), $expred_lnk);
+		}
 	}
 	else {
 		$actionLinks = '-';
--- /usr/share/zabbix/templates.php.orig	2013-10-15 11:25:56.000000000 +0200
+++ templates.php	2013-11-04 18:27:48.000000000 +0100
@@ -429,6 +429,11 @@
 	$template_wdgt->addItem($templateForm->render());
 }
 else {
+	$expred_hst_ico_item = new CImg('images/general/plus.png');
+	$expred_hst_ico_item->setAttribute('id', 'expRedHstIco');
+	$expred_hst_ico_url = 'javascript:expandReduce(".expRedHst", "'._('[expand]').'", "'._('[reduce]').'", "#expRedHstIco");';
+	$expred_hst_ico = new CLink($expred_hst_ico_item, $expred_hst_ico_url, null, null, false);
+
 	$frmForm = new CForm();
 
 	$frmForm->cleanItems();
@@ -462,7 +467,7 @@
 		_('Screens'),
 		_('Discovery'),
 		_('Linked templates'),
-		_('Linked to')
+		array(_('Linked to'), SPACE, $expred_hst_ico)
 	));
 
 
@@ -551,7 +556,7 @@
 
 
 		$i = 0;
-		$linked_to_output = array();
+		$linked_to_output = $linked_to_output_short = array();
 		$linked_to_objects = array();
 		foreach($template['hosts'] as $h){
 			$h['objectid'] = $h['hostid'];
@@ -564,12 +569,6 @@
 
 		order_result($linked_to_objects, 'name');
 		foreach($linked_to_objects as $linked_to_host){
-			if(++$i > $config['max_in_table']){
-				$linked_to_output[] = '...';
-				$linked_to_output[] = '//empty element for array_pop';
-				break;
-			}
-
 			switch($linked_to_host['status']){
 				case HOST_STATUS_NOT_MONITORED:
 					$style = 'on';
@@ -585,11 +584,25 @@
 				break;
 			}
 
+			if(++$i <= $config['max_in_table']){
+				$linked_to_output_short[] = new CLink($linked_to_host['name'], $url, $style);
+				$linked_to_output_short[] = ', ';
+			}
+
 			$linked_to_output[] = new CLink($linked_to_host['name'], $url, $style);
 			$linked_to_output[] = ', ';
 		}
+		array_pop($linked_to_output_short);
 		array_pop($linked_to_output);
 
+		if ($linked_to_output_short != $linked_to_output) {
+			$linked_to_output_short[] = ', ';
+			$expred_hst_lnk_url = 'javascript:expandReduce(".expRedHst' . $template['templateid'].'", "...", "'._('[reduce]').'");';
+			$expred_hst_lnk = new CLink('...', $expred_hst_lnk_url, 'expRedHst'.$template['templateid'].' expRedHst', null, false);
+			$linked_to_output_short_class = "expRedHst${template['templateid']}_short expRedHst_short visible";
+			$linked_to_output_long_class = "expRedHst${template['templateid']}_long expRedHst_long hidden";
+			$linked_to_output = array(new CSpan($linked_to_output_short, $linked_to_output_short_class), new CDiv($linked_to_output, $linked_to_output_long_class), $expred_hst_lnk);
+		}
 
 		$table->addRow(array(
 			new CCheckBox('templates['.$template['templateid'].']', NULL, NULL, $template['templateid']),
--- /usr/share/zabbix/include/views/configuration.triggers.list.php.orig	2013-10-15 11:25:56.000000000 +0200
+++ /usr/share/zabbix/include/views/configuration.triggers.list.php	2013-11-04 18:43:51.000000000 +0100
@@ -80,6 +80,17 @@
 $triggersForm->addVar('hostid', $this->data['hostid']);
 
 // create table
+$expred_exp_ico_item = new CImg('images/general/plus.png');
+$expred_exp_ico_item->setAttribute('id', 'expRedExpIco');
+$expred_exp_ico_url = 'javascript:expandReduce(".expRedExp", "'._('[show]').'", "'._('[hide]').'", "#expRedExpIco");';
+$expred_exp_ico = new CLink($expred_exp_ico_item, $expred_exp_ico_url, null, null, false);
+
+$expred_err_ico_item = new CImg('images/general/plus.png');
+$expred_err_ico_item->setAttribute('id', 'expRedErrIco');
+$expred_err_ico_url = 'javascript:expandReduce(".expRedErr", "'._('[show]').'", "'._('[hide]').'", "#expRedErrIco");';
+$expred_err_ico_lnk = new CLink($expred_err_ico_item, $expred_err_ico_url, null, null, false);
+$expred_err_ico = new CSpan(array(SPACE, $expred_err_ico_lnk));
+
 $link = new Curl();
 if (!empty($this->data['parent_discoveryid'])) {
 	$link->setArgument('parent_discoveryid', $this->data['parent_discoveryid']);
@@ -93,9 +104,9 @@
 	make_sorting_header(_('Severity'), 'priority', $link),
 	empty($this->data['hostid']) ? _('Host') : null,
 	make_sorting_header(_('Name'), 'description', $link),
-	_('Expression'),
+	array(_('Expression'), SPACE, $expred_exp_ico),
 	make_sorting_header(_('Status'), 'status', $link),
-	empty($this->data['parent_discoveryid']) ? _('Error') : null
+	empty($this->data['parent_discoveryid']) ? array(_('Error'), $expred_err_ico) : null
 ));
 foreach ($this->data['triggers'] as $tnum => $trigger) {
 	$triggerid = $trigger['triggerid'];
@@ -205,9 +216,19 @@
 	$checkBox = new CCheckBox('g_triggerid['.$triggerid.']', null, null, $triggerid);
 	$checkBox->setEnabled(empty($trigger['discoveryRule']));
 
-	$expressionColumn = new CCol(triggerExpression($trigger, true));
+	$expred_lnk_url = 'javascript:expandReduce(".expRedExp' . $trigger['triggerid'].'", "'._('[show]').'", "'._('[hide]').'");';
+	$expred_lnk = new CLink(_('[show]'), $expred_lnk_url, 'expRedExp'.$trigger['triggerid'].' expRedExp', null, false);
+	$expressionColumn_class = "expRedExp${trigger['triggerid']}_long expRedExp_long hidden";
+	$expressionColumn = new CCol(array(new CDiv(triggerExpression($trigger, true), $expressionColumn_class), $expred_lnk));
 	$expressionColumn->setAttribute('style', 'white-space: normal;');
 
+	if (!is_null($error)) {
+		if (empty($trigger['error'])) $trigger['error'] = '-';
+		$error_long_class = "expRedErr${trigger['triggerid']}_long expRedErr_long hidden";
+		$error_short_class = "expRedErr${trigger['triggerid']}_short expRedErr_short visible";
+		$error = new CCol(array(new CDiv($error , $error_short_class), new CDiv($trigger['error'], $error_long_class)));
+	}
+
 	$triggersTable->addRow(array(
 		$checkBox,
 		getSeverityCell($trigger['priority']),
