[Rt-commit] r19568 - in rt/3.999/trunk: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu May 7 03:38:28 EDT 2009
Author: sunnavy
Date: Thu May 7 03:38:26 2009
New Revision: 19568
Modified:
rt/3.999/trunk/ (props changed)
rt/3.999/trunk/share/html/Admin/Global/System.html
Log:
r21018 at sunnavys-mb (orig r19465): sunnavy | 2009-05-07 00:22:42 +0800
make sections shown in different pages, also both "Save" and "Save and Restart" buttons
Modified: rt/3.999/trunk/share/html/Admin/Global/System.html
==============================================================================
--- rt/3.999/trunk/share/html/Admin/Global/System.html (original)
+++ rt/3.999/trunk/share/html/Admin/Global/System.html Thu May 7 03:38:26 2009
@@ -45,22 +45,50 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-
-<h1><&|/l&>RT Config</&></h1>
-<% Jifty->web->form->start %>
-% for my $section ( sort keys %$args ) {
-<h2><% $section |n%></h2>
+<&| /Admin/Elements/Header, title => $title, feed_uri => 'templates' &>
+<& /Admin/Elements/SystemTabs,
+ current_tab => 'Admin/Global/Templates.html',
+ current_subtab => 'Admin/Global/Templates.html',
+ subtabs => $subtabs,
+ title => $title &>
+% if ( $section ) {
+<% Jifty->web->form->start( submit_to => Jifty->web->request->path .
+ "?section=$section" ) %>
% for my $field ( sort keys %{$args->{$section}} ) {
+<div class="hints">
<% $meta->{$field} && $meta->{$field}{doc} |n %>
-<% $action->form_field( $field ) %>
-<hr />
-% } }
-<% Jifty->web->form->submit( label => _('Save and Restart RT') ) %>
+</div>
+<% $config->form_field( $field ) %>
+% }
+<% Jifty->web->form->submit( label => _('Save') ) %>
+<% Jifty->web->form->submit( label => _('Save and Restart RT'),
+ submit => [ $config, $restart ],
+ ) %>
<% Jifty->web->form->end %>
-
+% } else {
+ select a section
+%}
+</&>
<%init>
-my $action = Jifty->web->new_action( class => 'ConfigSystem' );
-my $args = $action->arguments_by_sections;
-my $meta = $action->meta;
+my $config = Jifty->web->new_action( class => 'ConfigSystem' );
+$config->order(1);
+my $restart = Jifty->web->new_action( class =>
+ 'Jifty::Plugin::Config::Action::Restart' );
+$restart->order(2);
+my $args = $config->arguments_by_sections;
+my $meta = $config->meta;
+
+my $title = _("Configure RT");
+my $subtabs = {};
+my $sort_order = 'A'; # sort order begins with 'A'
+for my $section ( sort keys %$args ) {
+ $subtabs->{ $sort_order++ } = {
+ title => _($section),
+ path => "Admin/Global/System.html?section=$section"
+ };
+}
</%init>
+<%args>
+$section => undef
+</%args>
More information about the Rt-commit
mailing list