From 1b3993f9fe30cf27877d74fb7aa9cce27f903fc5 Mon Sep 17 00:00:00 2001
From: satish <satish.dvnk@vtiger.com>
Date: Tue, 27 Feb 2018 21:05:08 +0530
Subject: [PATCH] Minor ui issues Accounts releated list

---
 .../Documents/DocumentsRelatedList.tpl        |  2 +-
 .../v7/modules/Vtiger/ModuleRelatedTabs.tpl   | 14 ++++-----
 layouts/v7/modules/Vtiger/resources/Vtiger.js | 30 +++++++++----------
 modules/Migration/schema/620_to_630.php       | 10 +++----
 4 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/layouts/v7/modules/Documents/DocumentsRelatedList.tpl b/layouts/v7/modules/Documents/DocumentsRelatedList.tpl
index 198e27e9..f844da5c 100644
--- a/layouts/v7/modules/Documents/DocumentsRelatedList.tpl
+++ b/layouts/v7/modules/Documents/DocumentsRelatedList.tpl
@@ -29,7 +29,7 @@
                     {foreach item=RELATED_LINK from=$RELATED_LIST_LINKS['LISTVIEWBASIC']}
 
 						{if $RELATED_LINK->get('linkmodule') eq 'Documents'}
-                            <div class="col-sm-3">
+                            <div class="col-sm-3" style="width:22%;">
                                 {assign var=IS_SELECT_BUTTON value={$RELATED_LINK->get('_selectRelation')}}
                                 {* setting button module attribute to Events or Calendar based on link label *}
                                 {assign var=LINK_LABEL value={$RELATED_LINK->get('linklabel')}}
diff --git a/layouts/v7/modules/Vtiger/ModuleRelatedTabs.tpl b/layouts/v7/modules/Vtiger/ModuleRelatedTabs.tpl
index 3a81505a..82a649b7 100644
--- a/layouts/v7/modules/Vtiger/ModuleRelatedTabs.tpl
+++ b/layouts/v7/modules/Vtiger/ModuleRelatedTabs.tpl
@@ -40,14 +40,14 @@
 					data-module="{$RELATEDMODULENAME}" data-relation-id="{$RELATED_LINK->getId()}" {if $RELATEDMODULENAME eq "ModComments"} title {else} title="{$DETAILVIEWRELATEDLINKLBL}"{/if} {if $RELATEDFIELDNAME}data-relatedfield ="{$RELATEDFIELDNAME}"{/if}>
 					<a href="index.php?{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" class="textOverflowEllipsis" displaylabel="{$DETAILVIEWRELATEDLINKLBL}" recordsCount="" >
 						{if $RELATEDMODULENAME eq "ModComments"}
-							<span class="tab-label" ><strong>{$DETAILVIEWRELATEDLINKLBL}</strong></span>&nbsp;
-								{else}
+							<i class="fa fa-comment"></i> &nbsp;<span class="tab-label"><strong>{$DETAILVIEWRELATEDLINKLBL}</strong></span>
+						{else}
 							<span class="tab-icon">
 								{assign var=RELATED_MODULE_MODEL value=Vtiger_Module_Model::getInstance($RELATEDMODULENAME)}  
 								{$RELATED_MODULE_MODEL->getModuleIcon()}
 							</span>
 						{/if}
-						<span class="numberCircle hide">0</span>
+						&nbsp;<span class="numberCircle hide">0</span>
 					</a>
 				</li>
 				{if ($RELATED_LINK->getId() == {$smarty.request.relationId})}
@@ -65,14 +65,14 @@
 							data-module="{$RELATEDMODULENAME}" data-relation-id="{$RELATED_LINK->getId()}" {if $RELATEDMODULENAME eq "ModComments"} title {else} title="{$DETAILVIEWRELATEDLINKLBL}"{/if} {if $RELATEDFIELDNAME}data-relatedfield ="{$RELATEDFIELDNAME}"{/if}>
 							<a href="index.php?{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" class="textOverflowEllipsis" displaylabel="{$DETAILVIEWRELATEDLINKLBL}" recordsCount="" >
 								{if $RELATEDMODULENAME eq "ModComments"}
-									<span class="tab-label" ><strong>{$DETAILVIEWRELATEDLINKLBL}</strong></span>&nbsp;
+									<i class="fa fa-comment"></i> &nbsp;<span class="tab-label"><strong>{$DETAILVIEWRELATEDLINKLBL}</strong></span>
 								{else}  
 									<span class="tab-icon">
 										{assign var=RELATED_MODULE_MODEL value=Vtiger_Module_Model::getInstance($RELATEDMODULENAME)}  
 										{$RELATED_MODULE_MODEL->getModuleIcon()}
 									</span>
 								{/if}
-								<span class="numberCircle hide">0</span>
+								&nbsp;<span class="numberCircle hide">0</span>
 							</a>
 						</li>
 						{break}
@@ -96,7 +96,7 @@
 								data-module="{$RELATEDMODULENAME}" title="" data-relation-id="{$RELATED_LINK->getId()}" {if $RELATEDFIELDNAME}data-relatedfield ="{$RELATEDFIELDNAME}"{/if}>
 								<a href="index.php?{$RELATED_LINK->getUrl()}&tab_label={$RELATED_LINK->getLabel()}&app={$SELECTED_MENU_CATEGORY}" displaylabel="{$DETAILVIEWRELATEDLINKLBL}" recordsCount="">
 									{if $RELATEDMODULENAME eq "ModComments"}
-										<span class="tab-label textOverflowEllipsis"><strong>{$DETAILVIEWRELATEDLINKLBL}</strong></span>&nbsp;
+										<i class="fa fa-comment"></i> &nbsp;<span class="tab-label">{$DETAILVIEWRELATEDLINKLBL}</span>
 									{else}  
 										{assign var=RELATED_MODULE_MODEL value=Vtiger_Module_Model::getInstance($RELATEDMODULENAME)}  
 										<span class="tab-icon textOverflowEllipsis">
@@ -104,7 +104,7 @@
 											<span class="content"> &nbsp;{$DETAILVIEWRELATEDLINKLBL}</span>
 										</span>
 									{/if}
-									<span class="numberCircle hide">0</span>
+									&nbsp;<span class="numberCircle hide">0</span>
 								</a>
 							</li>
 						{/for}
diff --git a/layouts/v7/modules/Vtiger/resources/Vtiger.js b/layouts/v7/modules/Vtiger/resources/Vtiger.js
index bb10d576..69ea9b5e 100644
--- a/layouts/v7/modules/Vtiger/resources/Vtiger.js
+++ b/layouts/v7/modules/Vtiger/resources/Vtiger.js
@@ -20,26 +20,26 @@ Vtiger.Class('Vtiger_Index_Js', {
 	 * @param {type} recordId
 	 * @returns {undefined}
 	 */
-	previewFile: function (e, recordId,attachmentId) {
-        e.stopPropagation();
-        if (recordId) {
-            var params = {
-                module: 'ModComments',
-                view: 'FilePreview',
-                record: recordId,
-                attachmentid: attachmentId
-            };
+	previewFile: function (e, recordId, attachmentId) {
+		e.stopPropagation();
+		if (recordId) {
+			var params = {
+				module: 'ModComments',
+				view: 'FilePreview',
+				record: recordId,
+				attachmentid: attachmentId
+			};
 			var modalParams = {
-				cb : function(modalContainer){
+				cb: function (modalContainer) {
 					modalContainer.find('.viewer').zoomer();
 				},
 				'ignoreScroll' : true
 			};
-            app.request.post({data: params}).then(function (err, res) {
-                app.helper.showModal(res, modalParams);
-            });
-        }
-    },
+			app.request.post({data: params}).then(function (err, res) {
+				app.helper.showModal(res, modalParams);
+			});
+		}
+	},
 
 	/**
 	 * Function to show email preview in popup
diff --git a/modules/Migration/schema/620_to_630.php b/modules/Migration/schema/620_to_630.php
index 79d646ff..1c2b6a93 100644
--- a/modules/Migration/schema/620_to_630.php
+++ b/modules/Migration/schema/620_to_630.php
@@ -10,10 +10,10 @@
 
 if(defined('VTIGER_UPGRADE')) {
     
-global $adb;
+	global $adb;
 
-$query = 'SELECT DISTINCT profileid FROM vtiger_profile2utility';
-$result = $adb->pquery($query, array());
+	$query = 'SELECT DISTINCT profileid FROM vtiger_profile2utility';
+	$result = $adb->pquery($query, array());
 
 	$tabIdsList = array(getTabid('ProjectMilestone'), getTabid('PriceBooks'));
 	$actionIdPerms = array(5 => 1, 6 => 1, 10 => 1);
@@ -28,9 +28,9 @@ $result = $adb->pquery($query, array());
 					$query = 'UPDATE vtiger_profile2utility SET permission=? WHERE profileid=? AND tabid=? AND activityid=?';
 				} else {
 					$query = 'INSERT INTO vtiger_profile2utility(permission, profileid, tabid, activityid) VALUES (?, ?, ?, ?)';
-}
+				}
 				Migration_Index_View::ExecuteQuery($query, array($permission, $profileId, $tabId, $actionId));
-}
+			}
 		}
 	}
 }
-- 
GitLab