summaryrefslogtreecommitdiff
path: root/rt/docs/customizing
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-07-09 22:18:55 -0700
committerIvan Kohler <ivan@freeside.biz>2015-07-09 22:18:55 -0700
commit1c538bfabc2cd31f27067505f0c3d1a46cba6ef0 (patch)
tree96922ad4459eda1e649327fd391d60c58d454c53 /rt/docs/customizing
parent4f5619288413a185e9933088d9dd8c5afbc55dfa (diff)
RT 4.2.11, ticket#13852
Diffstat (limited to 'rt/docs/customizing')
-rw-r--r--rt/docs/customizing/approvals.pod6
-rw-r--r--rt/docs/customizing/articles_introduction.pod21
-rw-r--r--rt/docs/customizing/styling_rt.pod46
-rw-r--r--rt/docs/customizing/templates.pod56
4 files changed, 80 insertions, 49 deletions
diff --git a/rt/docs/customizing/approvals.pod b/rt/docs/customizing/approvals.pod
index af5aa3b0a..c42dede70 100644
--- a/rt/docs/customizing/approvals.pod
+++ b/rt/docs/customizing/approvals.pod
@@ -24,8 +24,8 @@ and process the approval or rejection.
Since this example will use a change management queue as the
queue where tickets need approval, first we'll set up the queue.
-Login into UI as the 'root' user. Go to Tools -> Configuration ->
-Queues and create a new 'Change requests' queue.
+Login into UI as the 'root' user. Go to Admin -> Queues and create a new
+'Change requests' queue.
When you set up this queue, do not select the "approvals" Lifecycle.
That selection is for the ___Approvals queue itself, not for queues that
@@ -94,7 +94,7 @@ queue.
___Approvals is a special queue where all approvals are created. The queue
is disabled and is not shown in until you search for it.
-Go to Tools -> Configuration -> Queues, leave "Name is" in the search
+Go to Admin -> Queues, leave "Name is" in the search
area and enter ___Approvals into the search
field. Check 'Include disabled queues in listing.' and click Go!
You should now see the ___Approvals queue configuration page.
diff --git a/rt/docs/customizing/articles_introduction.pod b/rt/docs/customizing/articles_introduction.pod
index 73b5c334d..363a3859d 100644
--- a/rt/docs/customizing/articles_introduction.pod
+++ b/rt/docs/customizing/articles_introduction.pod
@@ -8,11 +8,16 @@ RT. They are organized into classes and topics.
=head2 UI
-The user interface to Articles is available from the Tools -> Articles
-menu. Admin functionality can be found under Tools -> Configuration ->
-Articles. Once configured, articles will become available for searching
-on the Reply/Comment page on tickets. There are L</"Configuration Options">
-to make Articles available on ticket creation.
+The user interface to Articles is available from the Articles menu. Admin
+functionality can be found under Admin -> Articles. Once configured, articles
+will become available for searching on the Reply/Comment page on tickets.
+There are L</"Configuration Options"> to make Articles available on ticket
+creation.
+
+For the Articles menu to be visible to your Privileged users, you must grant
+Privileged the ShowArticlesMenu right globally (Admin -> Global -> Group
+Rights). You may grant the right as selectively as you wish if, for example,
+you only want a certain group of your users to use articles.
=head2 Basics
@@ -27,7 +32,7 @@ Classes can be made available globally or on a per-Queue basis.
=head3 Classes
Classes are equivalent to RT's queues. They can be created by going
-to Tools -> Configuration -> Articles -> Classes -> New Class. Articles
+to Admin -> Articles -> Classes -> New Class. Articles
are assigned to one Class. When you create Custom Fields for use with
Articles, they will be applied Globally or to a Class, like Custom
Fields are applied to a Queue in RT.
@@ -40,7 +45,7 @@ when inserting the Article in a reply. You can control this behavior on
the Class configuration page.
Classes need to be Applied, just like a Custom Field, by using the
-Applies To link on the Modify Class page (Tools -> Configuration ->
+Applies To link on the Modify Class page (Admin ->
Articles -> Classes, select the class to modify). You can apply
them globally or on a queue-by-queue basis.
@@ -48,7 +53,7 @@ them globally or on a queue-by-queue basis.
You can also use Topics to organize your Articles. While editing a
Class, there is a Topics tab for Class-specific Topics. You can create
-global Topics from the Global tab under Tools -> Configuration.
+global Topics from the Global tab under Admin.
When editing Topics, type the name (and optionally description) of the
Topic, and then click the button at the appropriate location in the
diff --git a/rt/docs/customizing/styling_rt.pod b/rt/docs/customizing/styling_rt.pod
index c5802a84b..7e37d009e 100644
--- a/rt/docs/customizing/styling_rt.pod
+++ b/rt/docs/customizing/styling_rt.pod
@@ -12,18 +12,22 @@ RT versions have a default, and the RT admin can set the system-wide
theme with the C<$WebDefaultStylesheet> configuration value in the
F<RT_SiteConfig.pm> file.
-RT 4.0 comes with the following themes:
+RT comes with the following themes:
=over
-=item web2
+=item rudder
-An approximation of the 3.8 style
+The default layout for RT 4.2
=item aileron
The default layout for RT 4.0
+=item web2
+
+An approximation of the 3.8 style
+
=item ballard
Theme which doesn't rely on JavaScript for menuing
@@ -32,14 +36,14 @@ Theme which doesn't rely on JavaScript for menuing
If you have granted the ModifySelf right to users on your system,
they can pick a different theme for themselves by going to
-Logged in as -> Settings -> Options and selecting a different theme.
+Logged in as -> Settings -> Preferences and selecting a different theme.
=head1 RT Theme Editor
RT has some built-in controls to manage the look of the theme you select.
To use the Theme Editor, log in as a SuperUser (like root), and navigate
-to Tools -> Configuration -> Tools -> Theme.
+to Admin -> Tools -> Theme.
=for html <img alt="RT theme editor, defaults" src="../images/theme_editor_defaults.png">
@@ -89,38 +93,18 @@ default CSS styles, via the C<@CSSFiles> configuration option. To add
an extra CSS file, for example F<my-site.css>, create the local overlay
directory:
- $ mkdir -p local/html/NoAuth/css/
+ $ mkdir -p local/static/css/
And place your F<my-site.css> file in it. Finally, adjust your
C<@CSSFiles> in your F<RT_SiteConfig.pm>:
Set( @CSSFiles, ('my-site.css') );
-This technique is preferred to callbacks (below) because CSS included
-via this way will be minified. It is also included across all styles,
-unlike the callback technique.
+CSS added this way is included across all themes.
If you are writing an extension, see L<RT/AddStyleSheets> for how to
simply and programmatically add values to C<@CSSFiles>.
-=head2 Callbacks
-
-RT's CSS files are also Mason templates and the main CSS file,
-conveniently called C<main.css>, has a C<Begin> and C<End> callback
-allowing you to inject custom CSS.
-
-To create an End callback, create the callback directory and an
-End file in that directory:
-
- $ mkdir -p local/html/Callbacks/MyRT/NoAuth/css/aileron/main.css
- $ touch local/html/Callbacks/MyRT/NoAuth/css/aileron/main.css/End
-
-You can use any name you want for the C<MyRT> directory and the theme
-directory should correspond with the theme you want to change.
-
-RT will now evaluate the contents of that file after it processes all
-of the C<@import> statements in C<main.css>.
-
=head1 Designing Your Own Theme
@@ -134,11 +118,11 @@ local modifications to RT. Run the following commands in your
C</opt/rt4> directory (or wherever your RT is installed) to get
started:
- $ mkdir -p local/html/NoAuth/css/localstyle
- $ cp -R share/html/NoAuth/css/aileron/* local/html/NoAuth/css/localstyle/
+ $ mkdir -p local/static/css/localstyle
+ $ cp -R share/static/css/rudder/* local/static/css/localstyle/
You can call your "localstyle" directory whatever you want and you don't
-have to copy the aileron theme to start from, but it's a good place to
+have to copy the rudder theme to start from, but it's a good place to
start off for RT4.
Now set C<$WebDefaultStylesheet> in RT_SiteConfig.pm to the new directory
@@ -147,7 +131,7 @@ name you selected, for example:
Set( $WebDefaultStylesheet, 'localstyle' );
If you restart your RT it should look just the same (assuming you copied
-your current default theme), but if you go to your Options page you'll
+your current default theme), but if you go to your Preferences page you'll
see that the system default theme is now your new "localtheme."
If you look at the CSS being loaded, you'll also see that the main css
diff --git a/rt/docs/customizing/templates.pod b/rt/docs/customizing/templates.pod
index 5733f606c..331534cfe 100644
--- a/rt/docs/customizing/templates.pod
+++ b/rt/docs/customizing/templates.pod
@@ -1,7 +1,14 @@
=head1 Templates
-Each template is split into two sections. A block of headers and a body. These
-sections are separated by a blank line.
+Templates are used in RT to send notifications, typically email. You have
+access to RT data via variables available to you in the scope of the template.
+Templates can also be used for some special actions like creating a new ticket
+as part of the execution of a scrip.
+
+Each template is split into two sections: a block of headers and a body. These
+sections are separated by a blank line. Blank lines are not allowed before
+the headers, but can be included in the body as needed after the headers
+section.
Templates are processed by the L<Text::Template> module. This module
allows you to embed arbitrary Perl code into your templates. Text wrapped
@@ -28,17 +35,17 @@ readable, while users with clients which can display HTML will receive the full
experience. Please be aware that HTML support in mail clients varies greatly,
much more so than different web browsers.
-We welcome contributions of HTML-ization of builtin templates.
+Starting in RT 4.2, HTML templates are included along with plain text templates
+for the standard RT notifications.
=back
=head2 Template Types
-Templates have a Type which dictates which level of code execution is
-allowed.
+Templates have a Type which dictates the level of code execution allowed.
Templates of type C<Perl> are evaluated using L<Text::Template>
-which allows arbitrary code execution. Only users which have the global
+which allows arbitrary code execution. Only users with the global
C<ExecuteCode> privilege may write templates of type C<Perl>. Prior to
RT 4.0, this was the only type of Template available.
@@ -82,6 +89,24 @@ A localization function. See L<Locale::Maketext>.
=back
+The C<$Transaction> and C<$Ticket> objects are particularly useful. For
+example, here are some values you can get from each:
+
+ $Ticket->Status # Current status
+ $Ticket->Owner # Current owner
+ $Ticket->FirstCustomFieldValue('CustomFieldName') # CF value
+ $Ticket->DueAsString # Current due date as a string
+ $Ticket->DueObj # Due as an RT::Date object
+ $Ticket->QueueObj # Queue object for this ticket
+
+ $Transaction->Type # Type of transaction
+ $Transaction->OldValue # Previous value, if type is Set
+ $Transaction->NewValue # New value, if type is Set
+ $Transaction->CreatorObj->EmailAddress # Email address of trans creator
+
+You can see the methods available in the L<RT::Ticket> and L<RT::Transaction>
+documentation.
+
=head3 Selected Simple template variables
Since method calls are not allowed in simple templates, many common
@@ -104,7 +129,9 @@ use. Among them:
=item $TicketCF(Name)
-For example, C<$TicketCFDepartment>.
+For example, C<$TicketCFDepartment>. For CFs with more complicated
+names, all non-word characters (anything that is not letters, numbers,
+or underscores) are stripped to determine the appropriate variable name.
=item $TransactionType
@@ -128,5 +155,20 @@ For example, C<$TransactionCFLocation>.
=back
+=head2 Templates Provided with RT
+
+RT comes with a set of templates for the default notifications. As you start to
+customize your templates, these templates are a good place to look for
+examples. As you customize, it can be helpful to create new templates and
+update your scrips to reference your new templates. This leaves the original RT
+templates in place for easy reference.
+
+Starting in RT 4.2, each template has a plain text version and an HTML
+version. For example, the "Correspondence" template is the plain text version
+of the default template for correspondence (replies) and the "Correspondence in
+HTML" template is the same template formatted in HTML. The 4.2 upgrade provides
+a C<switch-templates-to> script to switch all default templates from plain text
+to HTML or the reverse. See the L<UPGRADING-4.2> notes for details.
+
=cut