Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Commit

rt branch, 4.2/prefer-rich-text-pref, created. rt-4.0.6-446-g16bffed

 

 

Request Tracker commit RSS feed   Index | Next | Previous | View Threaded


trs at bestpractical

Jul 2, 2012, 6:28 PM

Post #1 of 1 (86 views)
Permalink
rt branch, 4.2/prefer-rich-text-pref, created. rt-4.0.6-446-g16bffed

The branch, 4.2/prefer-rich-text-pref has been created
at 16bffedfeaf0a714f13be292f7daa93706930e82 (commit)

- Log -----------------------------------------------------------------
commit 16bffedfeaf0a714f13be292f7daa93706930e82
Author: Thomas Sibley <trs [at] bestpractical>
Date: Mon Jul 2 18:27:21 2012 -0700

Enable PreferRichText as a per-user preference

Composition is a preference, display should be too.

diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index deb099b..27be183 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -337,6 +337,16 @@ our %META = (
},

# User overridable options for Ticket displays
+ PreferRichText => {
+ Section => 'Ticket display', # loc
+ Overridable => 1,
+ SortOrder => 0.9,
+ Widget => '/Widgets/Form/Boolean',
+ WidgetArguments => {
+ Description => 'Display messages in rich text if available', # loc
+ Hints => 'Rich text (HTML) shows formatting such as colored text, bold, italics, and more', # loc
+ },
+ },
MaxInlineBody => {
Section => 'Ticket display', #loc
Overridable => 1,
diff --git a/share/html/Ticket/Elements/ShowTransactionAttachments b/share/html/Ticket/Elements/ShowTransactionAttachments
index 95a2341..27b8ff4 100644
--- a/share/html/Ticket/Elements/ShowTransactionAttachments
+++ b/share/html/Ticket/Elements/ShowTransactionAttachments
@@ -182,10 +182,10 @@ my $render_attachment = sub {
# or it's of our prefered alterative type
|| (
(
- RT->Config->Get('PreferRichText')
+ RT->Config->Get('PreferRichText', $session{CurrentUser})
&& ( $content_type =~ m{^text/(?:html|enriched)$} )
)
- || ( !RT->Config->Get('PreferRichText')
+ || ( !RT->Config->Get('PreferRichText', $session{CurrentUser})
&& ( $content_type !~ m{^text/(?:html|enriched)$} )
)
)

-----------------------------------------------------------------------
_______________________________________________
Rt-commit mailing list
Rt-commit [at] lists
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit

Request Tracker commit RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.