File: writing_portlets.pod

package info (click to toggle)
request-tracker5 5.0.3%2Bdfsg-3~deb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 77,648 kB
  • sloc: javascript: 187,930; perl: 79,061; sh: 1,302; makefile: 471; python: 37; php: 15
file content (46 lines) | stat: -rw-r--r-- 1,588 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
=head1 Introduction

A "portlet" is a component used to extend your RT instance, specifically
the "RT-at-a-glance" home and Self-Service pages.  For instance, the
"n Highest Priority Tickets I own", "Quick Ticket Creation" and
"Queue List" panels on the default homepage are portlets.

=head1 Creating the Portlet

There are at least two things you have to do to create a portlet:

=over

=item Create the template

Create a Mason template in C</usr/local/share/request-tracker5/html/Elements> that defines
your portlet's behaviour.

=item Set C<$HomepageComponents> config

Enable your portlet by adding its name to the C<$HomepageComponents>
configuration variable in RT_SiteConfig.pm.

=back

Once you have created and installed your portlet, you will need to
restart the webserver.

=head1 Customizing home page

When you click on the "Edit" link at your home page (or go there via your
preferences), you can select which of the available portlets are displayed in
the "body" (left) or "summary" (right) columns of the home page.

=head1 Customizing Self-Service page

They can also appear on the Self-Service interface, but have to be
hard-coded, because Self-Service users don't have the same preferences
available to them.  You will have to create your element in
C</usr/local/share/request-tracker5/html/SelfService/Elements>, then exend the SelfService
interface to call it.  Copy C</usr/share/request-tracker5/html/SelfService/index.html> to
C</usr/local/share/request-tracker5/html/SelfService/index.html>, then edit it to add:

    <& /SelfService/Elements/MyPortlet &>

=cut