简体   繁体   English

SugarCRM日历模块:记录为链接

[英]SugarCRM calendar module: Records as links

Is there any way to make records that appear on the calendar module (tasks, calls, meetings, etc) appear already as links to the records themselves? 有什么方法可以使出现在日历模块上的记录(任务,电话,会议等)已经作为指向记录本身的链接而出现? in CE 6.5.16, they are just regular text fields and it is the "Info" icon beside them that allows users to navigate to the Detail View of the records. 在CE 6.5.16中,它们只是常规文本字段,并且它们旁边的“信息”图标使用户可以导航到记录的详细信息视图。

See here for more info: http://tinypic.com/view.php?pic=2ai31vb&s=8#.U1VnfPldVCY 请参阅此处以获取更多信息: http : //tinypic.com/view.php?pic=2ai31vb&s=8#.U1VnfPldVCY

I'd like to make things easier for my users by making it available from the get-go as a link. 我想通过从一开始就可以通过链接使用它来为用户简化事情。 And while I've been fiddling around with /modules/Calendar/Cal.js which I believe is the source to make them as the links, I'm not getting any headway. 虽然我一直在摆弄/modules/Calendar/Cal.js,但我相信这是使它们成为链接的来源,但我没有任何进展。 Has anyone made any modifications similar to what I'm trying to do? 有没有人做过与我想做的类似的修改? And is there a way to make it upgrade-safe? 有没有办法使其升级安全?

Finally figured out how to fix this, however this is not upgrade safe. 最终想出了解决方法,但这不是升级安全的方法。 I only needed to modify one file: modules/Calendar/Calendar.js. 我只需要修改一个文件:modules / Calendar / Calendar.js。 To create the task/meeting/call name as a link to their respective Detail views, you have to put this line: 要创建任务/会议/呼叫名称作为其各自的“详细信息”视图的链接,您必须输入以下行:

item.name = item.name.link("http://xxx.x.x.x/<crm-root>/index.php?action=DetailView&module=" +item.module_name + "&record=" + item.record);

after: 后:

time_start="...&nbsp;";          

and before: 和之前:

var head_text=CAL.get_header_text(item.type,time_start,item.name,item.record);

However, this will only affect the monthly calendar view. 但是,这只会影响每月日历视图。 To make this change affect the weekly and daily calendar view as well, put the same line after: 要使此更改也影响每周和每日日历视图,请在以下位置添加同一行:

CAL.basic.remove(item);if(CAL.style=="basic"||item.days>1){CAL.basic.add(item);return;}

and before: 和之前:

var head_text=CAL.get_header_text(item.type,item.time_start,item.name,item.record);

These changes will make the names as links however, there are 2 annoying issues that occur. 这些更改将使名称成为链接,但是,会发生2个令人讨厌的问题。 One is that on the weekly and daily view, the status of meetings and calls are usually defined under the name. 一种是在每周和每天视图中,会议和电话的状态通常在名称下定义。 After the changes, it will be shown as "undefined". 更改后,它将显示为“未定义”。 To fix this and show back the correct status, do some changes where this line resides: 要解决此问题并显示正确的状态,请对该行所在的位置进行一些更改:

var el=CAL.create_item({item:item,type:'advanced',head_text:head_text, ...

Find where 找到哪里

"item_text:item_text" 

is within the line and change it to 在行内并将其更改为

"item_text:item.status"

There is also the other issue of the edit view pop-up showing when clicking on the meeting or call records on the monthly/daily calendar views. 单击月或日日历视图上的会议或通话记录时,还会显示编辑视图弹出窗口的另一问题。 I think I'll fix this in the future but for now this will do. 我想我会在将来解决此问题,但现在可以解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM