[Rt-devel] Prefs/MyRT.html

Rangarajan Radhakrishnan rangarajan.radhakrishnan at bms.com
Wed Apr 12 11:32:30 EDT 2006



Jim Meyer wrote:

>Hello!
>
>On 4/12/06, Rangarajan Radhakrishnan <rangarajan.radhakrishnan at bms.com> wrote:
>  
>
>>Version: 3.6.0pre0
>>In the process of enhancing the home page for all users, I am trying to
>>enforce the same list of panes for all users.
>>[...]
>>    
>>
>
>While it doesn't explain the code above, there's an explanation of how
>to change the default "RT At A Glance" page in the wiki:
>
>  http://wiki.bestpractical.com/index.cgi?ChangeDefaultRTAtAGlance
>
>Cheers!
>
>--j
>--
>Jim Meyer, Geek at Large                                    purp at acm.org
>
>  
>
Thank you Jim.

I was trying the approach this article mentions but wasn't sure if the 
content field of ATTRIBUTES table were getting altered when I was 
changing my Homepage settings using Prefs/MyRT.html. Sequence of steps used:
- stopped apache
- cleared session_data and mason_data
- backed up ATTRIBUTES table using "CREATE TABLE MY_BKP_ATTRIBUTES AS 
SELECT * FROM ATTRIBUTES;"
- updated one record (set CREATOR TO A non-existant ID)
       corresponding to CREATOR = <myuserid> AND NAME = 
'Pref-HomepageSettings'
- Commit
- restarted apache
- Tried changing the Homepage settings and did not see a new record in 
Attributes but the changes were effective immediately....

The  idea being  that if it worked, I could copy CONTENT corresponding 
to 'Pref-HomepageSettings' (for my user) as CONTENT corresponding to 
'HomepageSettings'
------------------------------
Anyway I overcame this issue by defining new variables in: RT_SiteConfig.pm
Set($AllowCustomHomepage, 1);
Set($MyHomepageBodyComponents,
    [
       { "type" => "component", "name" => "QuickCreate" },
     ]
   );
Set($MyHomepageSummaryComponents,
    [
       { "type" => "component", "name" => "Quicksearch" },
     ]
   );

And using before the _show calls in Elements/MyRT :
% $portlets->{body} = $RT::HomepageBodyComponents if 
($RT::AllowCustomHomepage);
% $portlets->{summary} = $RT::HomepageSummaryComponents if 
($RT::AllowCustomHomepage);

This is assuming that you do not need system searches (such as unowned 
tickets) on the Homepage.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20060412/72cdc5cd/attachment.htm


More information about the Rt-devel mailing list