[Rt-commit] r4660 - in rtir/branches/1.9-EXPERIMENTAL: etc
html/RTIR lib/RT/IR
ruz at bestpractical.com
ruz at bestpractical.com
Thu Mar 2 16:24:03 EST 2006
Author: ruz
Date: Thu Mar 2 16:24:02 2006
New Revision: 4660
Added:
rtir/branches/1.9-EXPERIMENTAL/lib/RT/IR/Config.pm
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/etc/RTIR_Config.pm
rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Edit.html
Log:
r813 at cubic-pc: cubic | 2006-03-02 23:47:09 +0300
* other code to make DisplayAfterEdit configurable per user
Modified: rtir/branches/1.9-EXPERIMENTAL/etc/RTIR_Config.pm
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/etc/RTIR_Config.pm (original)
+++ rtir/branches/1.9-EXPERIMENTAL/etc/RTIR_Config.pm Thu Mar 2 16:24:02 2006
@@ -1,3 +1,11 @@
+# XXX: we push config metadata into RT, but we need
+# need interface to load config options metadata from
+# extensions in RT core
+
+use RT::IR::Config;
+RT::IR::Config::Init();
+
+
# Set the name of the RTIR application.
Set($rtirname , "RTIR for " . RT->Config->Get('rtname') );
Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Edit.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Edit.html (original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Edit.html Thu Mar 2 16:24:02 2006
@@ -228,7 +228,7 @@
push (@results, loc("State changed from [_1] to [_2]", $oldstate, $newstate));
}
-if( $ARGS{'SaveChanges'} && RT->Config->Get('DisplayAfterEdit') ) {
+if( $ARGS{'SaveChanges'} && RT->Config->Get('DisplayAfterEdit', $session{'CurrentUser'}) ) {
$m->comp("/RTIR/Display.html", results => [@results], %ARGS);
$m->abort;
}
Added: rtir/branches/1.9-EXPERIMENTAL/lib/RT/IR/Config.pm
==============================================================================
--- (empty file)
+++ rtir/branches/1.9-EXPERIMENTAL/lib/RT/IR/Config.pm Thu Mar 2 16:24:02 2006
@@ -0,0 +1,19 @@
+package RT::IR::Config;
+
+sub Init {
+ use RT::Config;
+ my %meta = (
+ DisplayAfterEdit => {
+ Section => 'Tickets view',
+ Overridable => 1,
+ Widget => '/Widgets/Form/Boolean',
+ WidgetArguments => {
+ Description => 'Display ticket after edit (don\'t stay on the edit page)',
+ },
+ },
+ );
+ %RT::Config::META = (%meta, %RT::Config::META);
+ return;
+}
+
+1;
More information about the Rt-commit
mailing list