Index: modules/mod-func-tracker_input.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules/mod-func-tracker_input.php	(revision 44061)
+++ modules/mod-func-tracker_input.php	(revision )
@@ -3,7 +3,7 @@
 //
 // All Rights Reserved. See copyright.txt for details and a complete list of authors.
 // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
-// $Id: mod-func-tracker_input.php 43081 2012-11-21 13:30:44Z changi67 $
+// $Id: mod-func-tracker_input.php 43081 2012-09-21 19:57:34Z changi67 $
 
 if (strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !== false) {
 	header('location: index.php');
@@ -52,7 +52,13 @@
 				'description' => tr('Operation to perform in the following format: operationName(argument). Current operations are redirect with the URL template as the argument. @valueName@ will be replaced by the appropriate value where valueName is itemId, status or a permanent name'),
 				'filter' => 'text',
 			),
+			'insertmode' => array(
+				'name' => tr('Mode change on complete'),
+				'description' => tr('Target mode to enter after dialog closes'),
+				'filter' => 'text',
+				'default' => '',
-		),
+			),
+		),
 	);
 }
 
@@ -82,6 +88,7 @@
 	$streetview = isset($module_params['streetview']) ? $module_params['streetview'] : '';
 	$streetViewField = $definition->getFieldFromPermName($streetview);
 	$success = isset($module_params['success']) ? $module_params['success'] : '';
+	$insertmode = isset($module_params['insertmode']) ? $module_params['insertmode'] : '';
 
 	if (! $streetview || $prefs['fgal_upload_from_source'] != 'y' || ! $streetViewField) {
 		$streetview = '';
@@ -139,6 +146,7 @@
 				'operation' => $operation,
 				'argument' => $operationArgument,
 			),
+			'insertMode' => $insertmode,
 		)
 	);
 }
Index: lib/core/Services/Object/Controller.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/core/Services/Object/Controller.php	(revision 44061)
+++ lib/core/Services/Object/Controller.php	(revision )
@@ -63,6 +63,7 @@
 		$smarty->assign('item', $item);
 		$smarty->assign('can_modify', $itemObject->canModify());
 		$smarty->assign('can_remove', $itemObject->canRemove());
+		$smarty->assign('mode', $input->mode->text() ? $input->mode->text() : '');	// default divs mode
 		return $smarty->fetch('object/infobox/trackeritem.tpl');
 	}
 
Index: templates/modules/mod-tracker_input.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- templates/modules/mod-tracker_input.tpl	(revision 44061)
+++ templates/modules/mod-tracker_input.tpl	(revision )
@@ -41,9 +41,15 @@
 			data: $(form).serialize(),
 			success: function (data) {
 				$(form).trigger('insert', [ data ]);
+				{{if $tracker_input.insertMode}}
+					$(form).closest('.tab, #appframe, body').find('.map-container')[0].modeManager.switchTo("{{$tracker_input.insertMode|escape}}");
+				{{/if}}
 			},
 			close: function () {
 				$(form).trigger('cancel');
+				{{if $tracker_input.insertMode}}
+					$(form).closest('.tab, #appframe, body').find('.map-container')[0].modeManager.switchTo("{{$tracker_input.insertMode|escape}}");
+				{{/if}}
 			}
 		});
 		return false;
Index: templates/object/infobox/trackeritem.tpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- templates/object/infobox/trackeritem.tpl	(revision 44061)
+++ templates/object/infobox/trackeritem.tpl	(revision )
@@ -1,11 +1,18 @@
+{if $mode eq 'table'}
-<table>
-	{foreach from=$fields item=field}
+	<table>
+		{foreach from=$fields item=field}
-		<tr>
+			<tr class="field_{$field.fieldId}">
-			<th>{$field.name|escape}</th>
-			<td>{trackeroutput field=$field item=$item process=y showlinks=n}</td>
-		</tr>
-	{/foreach}
-</table>
+				<th>{$field.name|escape}</th>
+				<td>{trackeroutput field=$field item=$item process=y showlinks=n}</td>
+			</tr>
+		{/foreach}
+	</table>
+{else}
+	{foreach from=$fields item=field}
+		<h6 class="field_{$field.fieldId}">{$field.name|escape}</h6>
+		<div class="field_{$field.fieldId}">{trackeroutput field=$field item=$item process=y showlinks=n}</div>
+	{/foreach}
+{/if}
 {if $can_modify}
 	<a class="service-dialog" href="{service controller=tracker action=update_item trackerId=$item.trackerId itemId=$item.itemId}" title="{tr}Edit{/tr}">{icon _id="pencil" alt="{tr}Edit{/tr}"}</a>
 {/if}
Index: lib/smarty_tiki/block.trackeritemcheck.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/smarty_tiki/block.trackeritemcheck.php	(revision )
+++ lib/smarty_tiki/block.trackeritemcheck.php	(revision )
@@ -0,0 +1,72 @@
+<?php
+// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
+//
+// All Rights Reserved. See copyright.txt for details and a complete list of authors.
+// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
+// $Id: block.permission.php 39783 2012-02-08 09:14:14Z sept_7 $
+
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ *
+ */
+
+//this script may only be included - so its better to die if called directly.
+if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
+  header("location: index.php");
+  exit;
+}
+
+/***
+ * Test if user can view/edit/delete a tracker item
+ *
+ * @param $params array
+ * 			itemId	= int		required
+ * 			mode	= string	view|edit|delete (view is default)
+ *
+ * @param $content string	Content to display if allowed
+ * @param $smarty Smarty
+ * @param $repeat bool
+ *
+ * @return string			Content to display if allowed
+ */
+
+function smarty_block_trackeritemcheck($params, $content, $smarty, $repeat)
+{
+	if ( $repeat ) return;
+
+	if ( empty( $params['itemId'] ) ) {
+		return tra('itemId required');
+	}
+	if (empty($params['mode'])) {
+		$params['mode'] = '';		// default is to view
+	}
+
+	include_once('lib/core/Tracker/Item.php');
+
+	$item = Tracker_Item::fromId($params['itemId']);
+
+	$allowed = false;
+
+	if ($item) {
+		switch ($params['mode']) {
+			case 'edit':
+				$allowed = $item->canModify();
+				break;
+			case 'delete':
+				$allowed = $item->canRemove();
+				break;
+			case 'view':
+				$allowed = $item->canView();
+			default:
+				break;
+		}
+	}
+
+	if ( $allowed ) {
+		return $content;
+	} else {
+		return '';
+	}
+}
Index: lib/jquery_tiki/tiki-maps.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/jquery_tiki/tiki-maps.js	(revision 44061)
+++ lib/jquery_tiki/tiki-maps.js	(revision )
@@ -193,7 +193,7 @@
 					})
 				});
 				container.layer = layers[0];
-				container.vectors = new OpenLayers.Layer.Vector("Editable", {
+				container.vectors = new OpenLayers.Layer.Vector(tr("Editable"), {
 					styleMap: container.defaultStyleMap
 				});
 				container.uniqueMarkers = {};
