fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-10-28 03:15 am

[dw-free] Convert /admin/index to TT

[commit: http://hg.dwscoalition.org/dw-free/rev/4c7678ebddbf]

http://bugs.dwscoalition.org/show_bug.cgi?id=3164

Add the event output dev tool/page to the admin index page.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/DW/Controller/EventOutput.pm
  • views/admin/eventoutput-select.tt.text
--------------------------------------------------------------------------------
diff -r 61913b5952d1 -r 4c7678ebddbf cgi-bin/DW/Controller/EventOutput.pm
--- a/cgi-bin/DW/Controller/EventOutput.pm	Thu Oct 28 11:06:03 2010 +0800
+++ b/cgi-bin/DW/Controller/EventOutput.pm	Thu Oct 28 11:15:07 2010 +0800
@@ -25,6 +25,13 @@ use LJ::Event;
 use LJ::Event;
 
 DW::Routing->register_string( '/admin/eventoutput', \&event_output, app => 1 );
+DW::Controller::Admin->register_admin_page( '/',
+    path => '/admin/eventoutput',
+    ml_scope => '/admin/eventoutput-select.tt',
+    privs => [ sub {
+        return ( $LJ::IS_DEV_SERVER, LJ::Lang::ml( "/admin/index.tt.devserver" ) );
+    } ]
+);
 
 sub event_output {
     my $r = DW::Request->get;
diff -r 61913b5952d1 -r 4c7678ebddbf views/admin/eventoutput-select.tt.text
--- a/views/admin/eventoutput-select.tt.text	Thu Oct 28 11:06:03 2010 +0800
+++ b/views/admin/eventoutput-select.tt.text	Thu Oct 28 11:15:07 2010 +0800
@@ -1,3 +1,6 @@
+.admin.link=Event / Notification Output
+.admin.text=Quick overview of an event in various output formats.
+
 .form.label.arg1=First Argument
 
 .form.label.arg2=Second Argument
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org