[Rt-commit] rt branch, 3.999-trunk, updated. 1788e830939555b7752a9925401a83237fc048e8
clkao at bestpractical.com
clkao at bestpractical.com
Tue Nov 17 00:46:21 EST 2009
The branch, 3.999-trunk has been updated
via 1788e830939555b7752a9925401a83237fc048e8 (commit)
via d235514a74bed531e85bc716872f418232e83dcc (commit)
via 7ba4ca911dbe1750b4db24f5e4b213fec71ff35a (commit)
from 12f4e554e85debbf548e85bd65e961da359e3752 (commit)
Summary of changes:
TODO | 4 ----
lib/RT.pm | 8 ++++++++
lib/RT/Interface/Web.pm | 15 ---------------
share/html/Dashboards/Elements/HiddenSearches | 2 +-
t/mail/gateway.t | 2 +-
t/web/attachments.t | 2 +-
t/web/basic.t | 4 ++--
t/web/cf_access.t | 2 +-
t/web/command_line.t | 2 +-
9 files changed, 15 insertions(+), 26 deletions(-)
- Log -----------------------------------------------------------------
commit 7ba4ca911dbe1750b4db24f5e4b213fec71ff35a
Author: Chia-liang Kao <clkao at bestpractical.com>
Date: Tue Nov 17 13:16:29 2009 +0800
Update tests with new bplogo location.
diff --git a/lib/RT.pm b/lib/RT.pm
index e9eb1ff..d3bd38e 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -359,6 +359,14 @@ The root of F</local/html> (user Mason templates)
sub local_html_path { Jifty::Util->app_root . '/local/html' }
+=head2 static_path
+
+The root of F</share/html> (Mason templates)
+
+=cut
+
+sub static_path { Jifty::Util->app_root . '/' . Jifty->config->framework('Web')->{StaticRoot} }
+
=head2 etc_path
The root of F</etc> (configuration)
diff --git a/t/mail/gateway.t b/t/mail/gateway.t
index 7eda457..8f52eec 100644
--- a/t/mail/gateway.t
+++ b/t/mail/gateway.t
@@ -471,7 +471,7 @@ EOF
diag "Testing preservation of binary attachments" if $ENV{'TEST_VERBOSE'};
{
# Get a binary blob (Best Practical logo)
- my $LOGO_FILE = RT->html_path .'/NoAuth/images/bplogo.gif';
+ my $LOGO_FILE = RT->static_path .'/images/bplogo.gif';
# Create a mime entity with an attachment
my $entity = MIME::Entity->build(
diff --git a/t/web/attachments.t b/t/web/attachments.t
index 70a0a8f..e21ccba 100644
--- a/t/web/attachments.t
+++ b/t/web/attachments.t
@@ -3,7 +3,7 @@ use strict;
use RT::Test strict => 1; use Test::More tests => 14;
-use constant ImageRoot => RT->html_path . '/NoAuth/images';
+use constant ImageRoot => RT->static_path . '/images';
use constant LogoFile => ImageRoot .'/bplogo.gif';
use constant FaviconFile => ImageRoot .'/favicon.png';
diff --git a/t/web/basic.t b/t/web/basic.t
index 9c8ca89..6754ba8 100644
--- a/t/web/basic.t
+++ b/t/web/basic.t
@@ -69,10 +69,10 @@ $agent->submit;
TODO: {
todo_skip("Need to handle mason trying to compile images",1);
-$agent->get( $url."/NoAuth/images/test.png" );
+$agent->get( $url."/static/images/test.png" );
my $file = RT::Test::get_relocatable_file(
File::Spec->catfile(
- qw(.. .. share html NoAuth images test.png)
+ qw(.. .. share web static images test.png)
)
);
is(
diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index 26a39b1..ccaa58f 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -7,7 +7,7 @@ $RT::Test::SKIP_REQUEST_WORK_AROUND = 1;
my ($baseurl, $m) = RT::Test->started_ok;
-use constant ImageFile => RT->html_path .'/NoAuth/images/bplogo.gif';
+use constant ImageFile => RT->static_path .'/images/bplogo.gif';
use constant ImageFileContent => RT::Test->file_content(ImageFile);
ok $m->login, 'logged in';
diff --git a/t/web/command_line.t b/t/web/command_line.t
index e20067c..58d332d 100644
--- a/t/web/command_line.t
+++ b/t/web/command_line.t
@@ -116,7 +116,7 @@ ok($val,$msg);
# text attachment
check_attachment($test_email);
# binary attachment
- check_attachment(RT->html_path.'/NoAuth/images/bplogo.gif');
+ check_attachment(RT->static_path.'/images/bplogo.gif');
#XXX TODO this is not so right warning
$m->warnings_like( qr/Encode::Guess failed/ );
commit d235514a74bed531e85bc716872f418232e83dcc
Author: Chia-liang Kao <clkao at bestpractical.com>
Date: Tue Nov 17 13:42:12 2009 +0800
Remove loc() from RT::Interface::Web. _() should be used instead.
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index c49c4fa..4391d8f 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -358,21 +358,6 @@ package HTML::Mason::Commands;
use vars qw/$r $m/;
-=head2 loc ARRAY
-
-loc is a nice clean global routine which calls Jifty->web->current_user->_()
-with whatever it's called with. If there is no Jifty->web->current_user,
-it creates a temporary user, so we have something to get a localisation handle
-through
-
-=cut
-
-sub loc {
-
- return _(@_);
-}
-
-
# Error - calls Error and aborts
sub abort {
my $why = shift;
diff --git a/share/html/Dashboards/Elements/HiddenSearches b/share/html/Dashboards/Elements/HiddenSearches
index 98373af..f7ca411 100644
--- a/share/html/Dashboards/Elements/HiddenSearches
+++ b/share/html/Dashboards/Elements/HiddenSearches
@@ -65,7 +65,7 @@ for my $search (@searches) {
}
</%init>
-<&| /Widgets/TitleBox, title => loc('Possible hidden searches') &>
+<&| /Widgets/TitleBox, title => _('Possible hidden searches') &>
<p><% _("The following queries may not be visible to all users who can see this dashboard.") %></p>
<ul>
commit 1788e830939555b7752a9925401a83237fc048e8
Author: Chia-liang Kao <clkao at bestpractical.com>
Date: Tue Nov 17 13:46:14 2009 +0800
update todo
diff --git a/TODO b/TODO
index 1d68aa2..d6954cf 100644
--- a/TODO
+++ b/TODO
@@ -7,10 +7,6 @@ RT::load_config and other in RT package should be replaced with RT->load_config
* create graphviz for templates/elements, orphan ones needs to be documented.
-* make richtext a jifty plugin (so we get automagic js/css squish)
-* remoe rt::base
-* remove old compat-* css
-* remove <|&/l, should just be <%_()%>
* fresh db, create ticket with body asdf shows "<p> asdf</p>" in the ticket history right after create.
* fresh db, create an unowned ticket, click unowned search from homepage, click chart by status, infinite loop.
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list