[Rt-commit] rt branch, 4.6-theme/admin-tools-pages, created. rt-4.4.4-225-gad1c46aba
Craig Kaiser
craig at bestpractical.com
Fri May 17 10:08:48 EDT 2019
The branch, 4.6-theme/admin-tools-pages has been created
at ad1c46aba71c8214d259998864550aacd18b3765 (commit)
- Log -----------------------------------------------------------------
commit ad1c46aba71c8214d259998864550aacd18b3765
Author: Craig Kaiser <craig at bestpractical.com>
Date: Fri May 17 09:31:41 2019 -0400
Migrate admin tools pages to elevator theme
diff --git a/share/html/Admin/Elements/LoggingSummary b/share/html/Admin/Elements/LoggingSummary
index 804b3058b..0ad4a36c6 100644
--- a/share/html/Admin/Elements/LoggingSummary
+++ b/share/html/Admin/Elements/LoggingSummary
@@ -84,9 +84,9 @@ if (my $level = RT->Config->Get("StatementLog")) {
</%init>
<p>
<&|/l&>RT's logging configuration is summarized below:</&>
-<ul>
+<ul class="list-group-compact list-group">
% for my $msg (@summary) {
- <li><% ref($msg) ? $$msg : $m->interp->apply_escapes($msg, 'h') |n %></li>
+ <li class="list-group-item"><% ref($msg) ? $$msg : $m->interp->apply_escapes($msg, 'h') |n %></li>
% }
</ul>
</p>
diff --git a/share/html/Admin/Tools/Configuration.html b/share/html/Admin/Tools/Configuration.html
index 1c63b5006..71e8164c4 100644
--- a/share/html/Admin/Tools/Configuration.html
+++ b/share/html/Admin/Tools/Configuration.html
@@ -56,12 +56,12 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
<& /Elements/Tabs &>
<&|/Widgets/TitleBox, title => loc("RT Configuration") &>
-<table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
-<tr class="collection-as-table">
-<th class="collection-as-table"><&|/l&>Option</&></th>
-<th class="collection-as-table"><&|/l&>Value</&></th>
-<th class="collection-as-table"><&|/l&>Source</&></th>
-</tr>
+ <div class="form-row">
+ <div class="col-md-4 label text-left"><&|/l&>Option</&></div>
+ <div class="col-md-4 label text-left"><&|/l&>Value</&></div>
+ <div class="col-md-4 label text-left"><&|/l&>Source</&></div>
+ </div>
+
<%PERL>
my $index_conf;
foreach my $key ( RT->Config->Options( Overridable => undef, Sorted => 0 ) ) {
@@ -84,35 +84,34 @@ foreach my $key ( RT->Config->Options( Overridable => undef, Sorted => 0 ) ) {
}
$index_conf++;
</%PERL>
-<tr class="<% $index_conf%2 ? 'oddline' : 'evenline'%>">
-<td class="collection-as-table"><% $key %></td>
-<td class="collection-as-table">
+ <div class="form-row <% $index_conf%2 ? 'oddline' : 'evenline'%>">
+ <div class="col-md-4 collection-as-table value"><% $key %></div>
+ <div class="col-md-4 collection-as-table value">
% if ( $key =~ /Password/i and $key !~ /MinimumPasswordLength|AllowLoginPasswordAutoComplete/ ) {
<em><% loc('Password not printed' ) %></em>\
% } else {
<% stringify($val) |n %>\
% }
-</td>
-<td class="collection-as-table" style="white-space: nowrap">
+ </div>
+ <div class="col-md-4 collection-as-table value">
% if ( $meta->{'Source'}{'SiteConfig'} ) {
-<span style="font-weight: bold"><% $description %></span>
+<% $description %>
% } else {
<% $description %>
% }
-</td>
-</tr>
+ </div>
+ </div>
% }
-</table>
</&>
-<table width="100%">
- <tr>
- <td valign="top" width="60%" class="boxcontainer">
-<&|/Widgets/TitleBox, title=> loc("RT core variables") &>
-<table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
-<tr class="collection-as-table">
-<th class="collection-as-table"><&|/l&>Variable</&></th>
-<th class="collection-as-table"><&|/l&>Value</&></th>
-</tr>
+
+<div class="form-row">
+
+ <div class="col-md-8">
+ <&|/Widgets/TitleBox, title=> loc("RT core variables") &>
+ <div class="form-row">
+ <div class="col-md-6 collection-as-table label text-left"><&|/l&>Variable</&></div>
+ <div class="col-md-6 collection-as-table label text-left"><&|/l&>Value</&></div>
+ </div>
<%PERL>
{ no strict qw/refs/;
my %config_opt = map { $_ => 1 } RT->Config->Options( Overridable => undef );
@@ -121,27 +120,26 @@ foreach my $key ( sort keys %{*RT::} ) {
next if !${'RT::'.$key} || ref ${'RT::'.$key} || $config_opt{ $key };
$index_var++;
</%PERL>
-<tr class="collection-as-table <% $index_var%2 ? 'oddline' : 'evenline'%>">
-<td class="collection-as-table">RT::<% $key %></td>
-<td class="collection-as-table">
+ <div class="form-row collection-as-table <% $index_var%2 ? 'oddline' : 'evenline'%>">
+ <div class="col-md-6 collection-as-table value">RT::<% $key %></div>
+ <div class="col-md-6 collection-as-table value">
% if ( $key =~ /Password(?!Length)/i ) {
<em><% loc('Password not printed' ) %></em>\
% } else {
<% ${'RT::'.$key} %>
% }
-</td>
-</tr>
+ </div>
+ </div>
% }
% }
-</table>
-</&>
+ </&>
+
+ <&|/Widgets/TitleBox, title => loc("RT Size") &>
+ <div class="form-row">
+ <div class="collection-as-table col-md-6 label text-left"><&|/l&>Object</&></div>
+ <div class="collection-as-table col-md-6 label text-left"><&|/l&>Size</&></div>
+ </div>
-<&|/Widgets/TitleBox, title => loc("RT Size") &>
-<table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
-<tr class="collection-as-table">
-<th class="collection-as-table"><&|/l&>Object</&></th>
-<th class="collection-as-table"><&|/l&>Size</&></th>
-</tr>
<%PERL>
my ($index_size, $user_count, $privileged_count);
for my $type (qw/Tickets Queues Transactions Groups PrivilegedUsers UnprivilegedUsers/) {
@@ -162,109 +160,108 @@ for my $type (qw/Tickets Queues Transactions Groups PrivilegedUsers Unprivileged
}
$index_size++;
</%PERL>
-<tr class="<% $index_size%2 ? 'oddline' : 'evenline'%>">
-<td class="collection-as-table"><% $type %></td>
-<td class="collection-as-table"><% $count %></td>
-</tr>
+ <div class="<% $index_size%2 ? 'oddline' : 'evenline'%> form-row">
+ <div class="collection-as-table col-md-6 value"><% $type %></div>
+ <div class="collection-as-table col-md-6 value"><% $count %></div>
+ </div>
% }
-</table>
-</&>
-</td>
-<td valign="top" class="boxcontainer">
+ </&>
+
+ </div>
+
+ <div class="col-md-4">
-<&|/Widgets/TitleBox, title => loc("Mason template search order") &>
-<ol>
+ <&|/Widgets/TitleBox, title => loc("Mason template search order") &>
+ <ol class="list-group-compact list-group">
% foreach my $path ( RT::Interface::Web->ComponentRoots ) {
-<li><% $path %></li>
+ <li class="list-group-item"><% $path %></li>
% }
-</ol>
-</&>
+ </ol>
+ </&>
-<&|/Widgets/TitleBox, title => loc("Static file search order") &>
-<ol>
+ <&|/Widgets/TitleBox, title => loc("Static file search order") &>
+ <ol class="list-group-compact list-group">
% foreach my $path ( (map {$_->{root}} RT->Config->Get('StaticRoots')),
% RT::Interface::Web->StaticRoots ) {
-<li><% $path %></li>
+ <li class="list-group-item"><% $path %></li>
% }
-</ol>
-</&>
+ </ol>
+ </&>
-<&|/Widgets/TitleBox, title => loc("Perl library search order") &>
-<ol>
+ <&|/Widgets/TitleBox, title => loc("Perl library search order") &>
+ <ol class="list-group-compact list-group">
% foreach my $inc (@INC) {
-<li><% $inc %></li>
+ <li class="list-group-item"><% $inc %></li>
% }
-</ol>
-</&>
+ </ol>
+ </&>
-<&|/Widgets/TitleBox, title=> loc("Loaded config files") &>
-<ol>
+ <&|/Widgets/TitleBox, title=> loc("Loaded config files") &>
+ <ol class="list-group-compact list-group">
% foreach my $config (RT->Config->LoadedConfigs) {
% if ($config->{site}) {
-<li><strong><% $config->{filename} %></strong></li>
+ <li class="list-group-item"><strong><% $config->{filename} %></strong></li>
% } else {
-<li><% $config->{filename} %></li>
+ <li class="list-group-item"><% $config->{filename} %></li>
% }
% }
-</ol>
-</&>
+ </ol>
+ </&>
-<&|/Widgets/TitleBox, title=> loc("Logging summary") &>
- <& /Admin/Elements/LoggingSummary &>
-</&>
+ <&|/Widgets/TitleBox, title=> loc("Logging summary") &>
+ <& /Admin/Elements/LoggingSummary &>
+ </&>
+
+ </div>
-</td>
-</table>
+</div>
<&|/Widgets/TitleBox, title => loc("Global Attributes") &>
-<table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
-<tr class="collection-as-table">
-<th class="collection-as-table"><&|/l&>Name</&></th>
-<th class="collection-as-table"><&|/l&>Value</&></th>
-</tr>
+ <div class="collection form-row">
+ <div class="collection-as-table col-md-6 label text-left"><&|/l&>Name</&></div>
+ <div class="collection-as-table col-md-6 label text-left"><&|/l&>Value</&></div>
+ </div>
% my $attrs = $RT::System->Attributes;
% my $index_size = 0;
% while ( my $attr = $attrs->Next ) {
% next if $attr->Name eq 'UpgradeHistory';
-<tr class="<% $index_size%2 ? 'oddline' : 'evenline'%>">
+<div class="<% $index_size%2 ? 'oddline' : 'evenline'%> form-row">
+ <div class="col-md-12 value">
% if ($attr->Name eq 'UserLogo') {
% my $content = $attr->Content;
% $content->{data} = defined $content->{data} ? 'DATA' : 'undef'
% if exists $content->{data};
-<td><% $attr->Name %></td><td><% stringify($content) |n %></td>
+<% $attr->Name %><% stringify($content) |n %>
% } else {
-<td><% $attr->Name %></td><td><% stringify($attr->Content) |n %></td>
+<% $attr->Name %><% stringify($attr->Content) |n %>
% }
-</tr>
+ </div>
+</div>
% $index_size++;
% }
-</table>
</&>
-
<&|/Widgets/TitleBox, title => loc("Loaded RT Extensions")&>
-<table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
-<tr class="collection-as-table">
-<th class="collection-as-table"><&|/l&>Extension</&></th>
-<th class="collection-as-table"><&|/l&>Version</&></th>
+ <div class="collection form-row">
+ <div class="collection-as-table col-md-6 label text-left"><&|/l&>Extension</&></div>
+ <div class="collection-as-table col-md-6 label text-left"><&|/l&>Version</&></div>
+ </div>
% my $row = 0;
% foreach my $pluginName (grep $_, RT->Config->Get('Plugins')) {
% my $plugin = RT::Plugin->new( name => $pluginName );
-<tr class="<% $row++ %2 ? 'oddline' : 'evenline'%>">
-<td class="collection-as-table"><%$plugin->Name%></td>
-<td class="collection-as-table"><%$plugin->Version%></td>
-</tr>
+<div class="<% $row++ %2 ? 'oddline' : 'evenline'%> form-row">
+<div class="collection-as-table col-md-6 value"><%$plugin->Name%></div>
+<div class="collection-as-table col-md-6 value"><%$plugin->Version%></div>
+</div>
% }
-</table>
</&>
<&|/Widgets/TitleBox, title => loc("Loaded perl modules")&>
-<table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
-<tr class="collection-as-table">
-<th class="collection-as-table"><&|/l&>Module</&></th>
-<th class="collection-as-table"><&|/l&>Version</&></th>
-<th class="collection-as-table"><&|/l&>Source</&></th>
-
+ <div class="collection form-row">
+ <div class="collection-as-table col-md-4 label text-left"><&|/l&>Module</&></div>
+ <div class="collection-as-table col-md-4 label text-left"><&|/l&>Version</&></div>
+ <div class="collection-as-table col-md-4 label text-left"><&|/l&>Source</&></div>
+ </div>
<%perl>
my $i = 0;
@@ -280,17 +277,12 @@ if ($item =~ /^\s*(.*?)\s*v(\S+);/) {
$distfile =~ s|::|/|g;
}
</%perl>
-<tr class="<% $i++ %2 ? 'oddline' : 'evenline'%>">
-<td class="collection-as-table"><% $item %></td>
- <td class="collection-as-table">
- <%$ver%>
- </td>
- <td class="collection-as-table">
- <% $INC{$distfile} || '' %>
- </td>
-</tr>
+<div class="<% $i++ %2 ? 'oddline' : 'evenline'%> form-row">
+<div class="collection-as-table col-md-4 value"><% $item %></div>
+ <div class="collection-as-table col-md-4 value"><%$ver%></div>
+ <div class="collection-as-table col-md-4 value"><% $INC{$distfile} || '' %></div>
+</div>
% }
-</table>
</&>
<&|/Widgets/TitleBox, title => loc("RT upgrade history")&>
@@ -305,31 +297,30 @@ if ($item =~ /^\s*(.*?)\s*v(\S+);/) {
</&>
<&|/Widgets/TitleBox, title=> loc("Environment variables") &>
-<table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
-<tr class="collection-as-table">
-<th class="collection-as-table"><&|/l&>Variable</&></th>
-<th class="collection-as-table"><&|/l&>Value</&></th>
-</tr>
+ <div class="collection form-row">
+ <div class="collection-as-table col-md-6 label text-left"><&|/l&>Variable</&></div>
+ <div class="collection-as-table col-md-6 label text-left"><&|/l&>Value</&></div>
+ </div>
% my $row = 0;
% for my $key (sort keys %ENV) {
-<tr class="collection-as-table <% $row++ %2 ? 'oddline' : 'evenline'%>">
-<td class="collection-as-table"><% $key %></td>
-<td class="collection-as-table"><% $ENV{$key} %></td>
-</tr>
+<div class="collection-as-table <% $row++ %2 ? 'oddline' : 'evenline'%> form-row">
+<div class="collection-as-table col-md-6 value"><% $key %></div>
+<div class="collection-as-table col-md-6 value"><% $ENV{$key} %></div>
+</div>
% }
-</table>
</&>
<&|/Widgets/TitleBox, title => loc("Operating System") &>
-<table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
-<tr class="collection-as-table evenline">
-<td class="collection-as-table">Deployment type</td>
-<td class="collection-as-table"><%
+ <div class="collection evenline form-row">
+ <div class="collection-as-table col-md-12 label text-left">Deployment type</div>
+ </div>
+ <div class="form-row">
+<div class="collection-as-table col-md-12"><%
$INC{'mod_perl.pm'} ? "mod_perl" :
$INC{'FCGI.pm'} ? "fastcgi" :
"standalone" %>
-</td>
-</tr>
+</div>
+</div>
<%perl>
my @os = (
"Distribution" => 'lsb_release --all',
@@ -356,12 +347,11 @@ while (my ($name, $cmd) = splice @os, 0, 2) {
my $row = 1;
</%perl>
% while (my ($name, $output) = splice @os_info, 0, 2) {
-<tr class="collection-as-table <% $row++ % 2 ? "oddline" : "evenline" %>">
-<td class="collection-as-table"><% $name %></td>
-<td class="collection-as-table" style="white-space: pre-wrap; font-family: monospace"><% $output %></td>
-</tr>
+<div class="collection-as-table <% $row++ % 2 ? "oddline" : "evenline" %> form-row">
+<div class="collection-as-table col-md-6 value"><% $name %></div>
+<div class="collection-as-table col-md-6 value" style="white-space: pre-wrap; font-family: monospace"><% $output %></div>
+</div>
% }
-</table>
</&>
<%INIT>
diff --git a/share/html/Admin/Tools/Queries.html b/share/html/Admin/Tools/Queries.html
index 8d120bcab..ade09180d 100644
--- a/share/html/Admin/Tools/Queries.html
+++ b/share/html/Admin/Tools/Queries.html
@@ -70,7 +70,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
jQuery(function () { jQuery(".tablesorter").tablesorter(); });
</script>
- <ol>
+ <ol class="list-group-compact list-group">
% my $r = 0;
% for my $request (@$history) {
% ++$r;
@@ -81,18 +81,15 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
% $count++;
% }
- <li>
+ <li class="list-group-item">
<tt><% $request->{Path} %></tt> - <i><&|/l, sprintf('%.4f', $seconds) &>[_1]s</&></i>
<a href="#" onclick="return hideshow(<% "queries-$r" |n,j%>);"><&|/l, $count &>Toggle [quant,_1,query,queries]</&></a>
- <table id="queries-<%$r%>" class="tablesorter hidden">
- <thead>
- <tr>
- <th><&|/l&>index</&></th>
- <th><&|/l&>duration</&></th>
- <th><&|/l&>statement</&></th>
- </tr>
- </thead>
- <tbody>
+ <div id="queries-<%$r%>" class="tablesorter hidden">
+ <div class="form-row">
+ <div class="col-md-4 label"><&|/l&>index</&></div>
+ <div class="col-md-4 label"><&|/l&>duration</&></div>
+ <div class="col-md-4 label"><&|/l&>statement</&></div>
+ </div>
% my $s = 0;
% my @undup;
% for my $statement (@{ $request->{Queries} }) {
@@ -112,15 +109,15 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
% if ($ShowElem) {
% my($cur_element) = $trace =~ m{called at (.*?) line \d+\n\s+HTML::Mason::Commands::__ANON__};
% if ($element ne $cur_element) {
- <tr><td colspan="3"><b><tt><% $cur_element %></tt></b></td></tr>
+ <div class="form-row"><b><tt><% $cur_element %></tt></b></div>
% $element = $cur_element;
% }
% }
% $sql = $RT::Handle->FillIn($sql, $bind) unless $dup;
- <tr>
- <td><% ++$s %><% $dup ? " (x $dup)" : "" %></td>
- <td><i><&|/l, sprintf('%.4f', $duration) &>[_1]s</&></i></td>
- <td>
+ <div class="form-row">
+ <div class="col-md-4 value"><% ++$s %><% $dup ? " (x $dup)" : "" %></div>
+ <div class="col-md-4 value"><i><&|/l, sprintf('%.4f', $duration) &>[_1]s</&></i></div>
+ <div class="col-md-4 value">
<tt><% $sql %></tt>
% if ($dup and @{$bind->[0]}) {
% for my $b (@{$bind}) {
@@ -129,11 +126,9 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
% }
<a class="query-stacktrace-toggle" href="#" onclick="return hideshow(<% "trace-$r-$s" |n,j%>);"><&|/l &>Toggle stack trace</&></a>
<pre id="trace-<%$r%>-<%$s%>" class="hidden"><% $trace %></pre>
- </td>
- </tr>
+ </div>
+ </div>
% }
- </tbody>
- </table>
</li>
% }
</ol>
diff --git a/share/html/Admin/Tools/Theme.html b/share/html/Admin/Tools/Theme.html
index ebc0b1d2f..75544ca93 100644
--- a/share/html/Admin/Tools/Theme.html
+++ b/share/html/Admin/Tools/Theme.html
@@ -58,8 +58,10 @@
<h2>Logo</h2>
<& /Elements/Logo, id => 'logo-theme-editor', ShowName => 0 &>
<form method="POST" enctype="multipart/form-data">
- <label for="logo-upload"><&|/l&>Upload a new logo</&>:</label>
- <input type="file" name="logo-upload" id="logo-upload" /><br />
+ <div class="custom-file">
+ <input type="file" name="logo-upload" class="custom-file-input" id="logo-upload" />
+ <label class="custom-file-label" for="logo-upload"><&|/l&>Upload a new logo</&>:</label>
+ </div>
<div class="gd-support">
% if ($valid_image_types) {
<&|/l, $valid_image_types &>Your system supports automatic color suggestions for: [_1]</&>
@@ -67,19 +69,19 @@
<&|/l&>GD is disabled or not installed. You can upload an image, but you won't get automatic color suggestions.</&>
% }
</div>
- <input name="reset_logo" value="<&|/l&>Reset to default RT Logo</&>" type="submit" />
- <input type="submit" value="<&|/l&>Upload</&>" />
+ <input class="button btn btn-primary" name="reset_logo" value="<&|/l&>Reset to default RT Logo</&>" type="submit" />
+ <input class="button btn btn-primary" type="submit" value="<&|/l&>Upload</&>" />
</form>
</div>
<div id="customize-theme">
<h2><&|/l&>Customize the RT theme</&></h2>
- <ol>
- <li>
+ <ol class="list-group-compact list-group">
+ <li class="list-group-item">
<label for="section"><&|/l&>Select a section</&>:</label>
- <select id="section"></select>
+ <select class="form-control selectpicker" id="section"></select>
</li>
- <li>
+ <li class="list-group-item">
<div class="description">
<&|/l&>Select a color for the section</&>:
<div id="logo-picker-hint" style="display: none;">
@@ -87,10 +89,10 @@
</div>
</div>
% if ($colors) {
-<div class="primary-colors">
+<div class="button btn btn-primary primary-colors">
% for (@$colors) {
% my $fg = $_->{l} >= $text_threshold ? 'black' : 'white';
-<button type="button" class="color-template"
+<button type="button" class="button btn btn-primary color-template"
style="background-color: rgb(<% $_->{c} %>); color: <% $fg %>;">
<&|/l&>Text</&>
</button>
@@ -108,11 +110,11 @@
<h2><&|/l&>Custom CSS (Advanced)</&></h2>
<form method="POST">
- <textarea rows=20 id="user_css" name="user_css" wrap="off"><% $user_css %></textarea><br />
- <input id="try" type="button" class="button" value="<&|/l&>Try</&>" />
- <input id="reset" type="reset" value="<&|/l&>Reset</&>" type="submit" />
- <input name="reset_css" value="<&|/l&>Reset to default RT Theme</&>" type="submit" />
- <input value="<&|/l&>Save</&>" type="submit" />
+ <textarea classs="form-control" rows=20 id="user_css" name="user_css" wrap="off"><% $user_css %></textarea><br />
+ <input id="try" type="button" class="button btn btn-primary" value="<&|/l&>Try</&>" />
+ <input id="reset" type="reset" class="button btn btn-primary" value="<&|/l&>Reset</&>" type="submit" />
+ <input name="reset_css" class="button btn btn-primary" value="<&|/l&>Reset to default RT Theme</&>" type="submit" />
+ <input class="button btn btn-primary" value="<&|/l&>Save</&>" type="submit" />
</form>
</div>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list