[Rt-commit] rtir branch, 4.2-theme/migrate-to-elevator-themes, created. 4.0.1rc1-98-g24691153
Blaine Motsinger
blaine at bestpractical.com
Fri Sep 13 18:56:48 EDT 2019
The branch, 4.2-theme/migrate-to-elevator-themes has been created
at 24691153ebec349c5efa32baefb8173cafdddde1 (commit)
- Log -----------------------------------------------------------------
commit 857706acfba195e89141158d18f835b1f03759d8
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Tue Aug 27 16:51:42 2019 -0500
Migrate RTIR/index to elevator themes
diff --git a/html/RTIR/Elements/CreateTicketInQueue b/html/RTIR/Elements/CreateTicketInQueue
index e4b98719..3ede976d 100644
--- a/html/RTIR/Elements/CreateTicketInQueue
+++ b/html/RTIR/Elements/CreateTicketInQueue
@@ -48,7 +48,7 @@
<form action="<% $SendTo %>" name="CreateTicketInQueue" id="CreateTicketInQueue" \
% $m->callback(CallbackName => 'InFormElement');
>
-% my $button_start = '<input type="submit" class="button" value="';
+% my $button_start = '<input type="submit" class="button btn btn-lg btn-primary form-control" value="';
% my $button_end = '" />';
% my $queue_selector = $m->scomp('/RTIR/Elements/SelectNewTicketQueue', OnChange => 'document.CreateTicketInQueue.submit()', SendTo => $SendTo );
<&|/l_unsafe, $button_start, $button_end, $queue_selector &>[_1]New ticket in[_2] [_3]</&>
diff --git a/html/RTIR/Elements/QueueSummary b/html/RTIR/Elements/QueueSummary
index 80ae72dc..dc40dc81 100644
--- a/html/RTIR/Elements/QueueSummary
+++ b/html/RTIR/Elements/QueueSummary
@@ -45,14 +45,22 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+<div class="ticket-overview">
+<&|/Widgets/TitleBox,
+ title => loc("Queue list"),
+ class => "fullwidth",
+ bodyclass => "",
+&>
+
<%perl>
+ # start foreach lifecycle loop
foreach my $lifecycle ( map $lifecycle{$_}, sort keys %lifecycle ) {
next unless RT::IR->OurLifecycle($lifecycle);
my @cur_statuses = grep $lifecycle->IsValid($_), @statuses;
next unless @cur_statuses;
</%perl>
-<table border="0" cellspacing="0" cellpadding="1" width="100%" class="queue-summary">
+<table border="0" cellspacing="0" cellpadding="1" width="100%" class="table queue-summary">
<tr>
<th class="collection-as-table"><%loc(RT::IR::FriendlyLifecycle($lifecycle->Name)) %></th>
@@ -82,7 +90,11 @@ for my $queue (@queues) {
</tr>
% }
</table>
-% }
+% } # end foreach lifecycle loop
+
+</&>
+</div>
+
<%INIT>
my $unwanted = $session{'CurrentUser'}->UserObj->Preferences('QuickSearch', {});
diff --git a/html/RTIR/Elements/SelectRTIRQueue b/html/RTIR/Elements/SelectRTIRQueue
index 19b74d54..44e37724 100644
--- a/html/RTIR/Elements/SelectRTIRQueue
+++ b/html/RTIR/Elements/SelectRTIRQueue
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<select name="<%$Name%>" <% ($OnChange) ? 'onchange="'.$OnChange.'"' : '' |n %> class="<%$Class%>">
+<select name="<%$Name%>" <% ($OnChange) ? 'onchange="'.$OnChange.'"' : '' |n %> class="<%$Class%> selectpicker form-control">
% if ($ShowNullOption) {
<option value=""><% $DefaultLabel %></option>
% }
diff --git a/html/RTIR/Elements/WorkWithConstituency b/html/RTIR/Elements/WorkWithConstituency
index 2b30ee29..0269a6fb 100644
--- a/html/RTIR/Elements/WorkWithConstituency
+++ b/html/RTIR/Elements/WorkWithConstituency
@@ -46,10 +46,10 @@
%#
%# END BPS TAGGED BLOCK }}}
<&| /Widgets/TitleBox, title => 'Work with constituency' &>
-<ul>
-<li><a href="<% RT::IR->HREFTo('',Constituency => '')%>">All constituencies</a></li>
+<ul class="list-group list-group-compact">
+<li class="list-group-item"><a href="<% RT::IR->HREFTo('',Constituency => '')%>">All constituencies</a></li>
% for my $constituency (keys %known_constituencies) {
-<li><a href="<% RT::IR->HREFTo('', Constituency => $constituency)%>"><%$constituency%></a></li>
+<li class="list-group-item"><a href="<% RT::IR->HREFTo('', Constituency => $constituency)%>"><%$constituency%></a></li>
% }
</ul>
</&>
diff --git a/static/css/rtir-styles.css b/static/css/rtir-styles.css
index 1784af30..31011680 100644
--- a/static/css/rtir-styles.css
+++ b/static/css/rtir-styles.css
@@ -67,6 +67,14 @@ body.rtir #topactions #simple-search input.field {
width: 150px;
}
+body.rtir #topactions #simple-search input[type="search"]:focus {
+ width: 16em;
+ -webkit-transition: width 0.25s ease-in-out;
+ -moz-transition: width 0.25s ease-in-out;
+ -ms-transition: width 0.25s ease-in-out;
+ transition: width 0.25s ease-in-out;
+}
+
body.rtir #topactions { min-width: 44em; white-space: no-wrap; }
#comp-RTIR .myrt>table>tr>td:first-child {
commit b6a39e7d83c48244905cdf1d011c80de79c08118
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Thu Aug 29 11:47:28 2019 -0500
Migrate RTIR/Display to elevator themes
diff --git a/html/Callbacks/RTIR/Elements/MakeClicky/Default b/html/Callbacks/RTIR/Elements/MakeClicky/Default
index 15cabafd..09b6f0a3 100644
--- a/html/Callbacks/RTIR/Elements/MakeClicky/Default
+++ b/html/Callbacks/RTIR/Elements/MakeClicky/Default
@@ -82,7 +82,7 @@ my %actions;
# don't execute on non-rtir tickets or in SelfService
return $super unless defined $args{type} and !$SelfService;
- my $result = qq{<a class="button button-small" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+ my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
.loc('lookup "[_1]"', $host) .qq{</a>};
return $super . qq{ <span class="clickylink">$result</span>};
},
@@ -96,7 +96,7 @@ my %actions;
# don't execute on non-rtir tickets or in SelfService
return $super unless defined $args{type} and !$SelfService;
- my $result = qq{<a class="button button-small" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+ my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
.loc('lookup "[_1]"', $host) .qq{</a>};
return $super . qq{ <span class="clickylink">$result</span>};
},
@@ -108,17 +108,17 @@ my %actions;
$args{host} ||= $args{value};
my $escaped_host = $escaper->($args{host});
- my $result .= qq{<a class="button button-small" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
+ my $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
.loc('Lookup IP') .q{</a>};
if ( $args{incident} && !RT->Config->Get('RTIR_DisableCountermeasures') ) {
- $result .= qq{<a class="button button-small create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
+ $result .= qq{<a class="button button-small btn btn-lg btn-primary create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
RT::IR->HREFTo("CreateInQueue.html?Incident=".$args{incident}."&Lifecycle=".RT::IR->lifecycle_countermeasure.qq{&IP-Value=$escaped_host})
.qq{">Block</a>};
}
if ( $args{'object'} && $args{'object'}->id ) {
my $cf = RT::IR::GetCustomField('IP');
my $tid = $args{'object'}->id;
- $result .= qq{<a class="button button-small" href="}.
+ $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}.
RT::IR->HREFTo("Edit.html?id=".$tid
.qq{&Object-RT::Ticket-$tid-CustomField-}. $cf->id .qq{-AddValue=$escaped_host}
.q{&SaveChanges=1})
@@ -154,14 +154,14 @@ my %actions;
my $email = $args{'value'}; $email =~ s/^<|>$//g;
my $escaped_email = $escaper->($email);
- my $result = qq{<a class="button button-small" href="}.
+ my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}.
RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=email&q=$escaped_email}). qq{">}
.loc('lookup email') .q{</a>};
if ( $args{'incident'} ) {
if ( $r->uri =~ /Lookup.html$/ ) {
$result .= qq{<input type="checkbox" name="Requestorbox-$escaped_email" unchecked />};
}
- $result .= qq{<a class="button button-small" href="}.
+ $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}.
RT::IR->HREFTo( "CreateInQueue.html"
. qq{?Incident=$args{'incident'}}
. qq{&Lifecycle=}.RT::IR->lifecycle_investigation
@@ -171,7 +171,7 @@ my %actions;
}
my $domain = (split /@/, $email, 2)[1];
my $escaped_domain = $escaper->($domain);
- $result .= ' <a class="button button-small" href="'. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=host&q=$escaped_domain}). '">'
+ $result .= ' <a class="button button-small btn btn-lg btn-primary" href="'. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{'lookup_params'}type=host&q=$escaped_domain}). '">'
.loc('lookup "[_1]"', $domain) .'</a>';
return $escaper->($args{'value'}) . qq{ <span class="clickylink">$result</span>};
},
@@ -182,7 +182,7 @@ my %actions;
return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
$args{value} = $escaper->($args{value});
- my $result = qq{<a class="button button-small" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
+ my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
.loc('lookup') .qq{</a>};
return $args{value} . qq{ <span class="clickylink">$result</span>};
},
@@ -193,7 +193,7 @@ my %actions;
return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
$args{value} = $escaper->($args{value});
- my $result = qq{<a class="button button-small" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
+ my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
.loc('lookup host') .qq{</a>};
return $args{value} . qq{ <span class="clickylink">$result</span>};
},
diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index b0d55166..3ccfafe3 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -55,9 +55,8 @@
<div class="summary"><&| /Widgets/TitleBox, title => loc('Ticket metadata') &>
-<table class="ticket-summary" width="100%">
-<tr>
-<td class="boxcontainer" valign="top">
+<div class="row ticket-summary">
+ <div class="boxcontainer col-md-6">
% $m->callback( %ARGS, Ticket => $Ticket, CallbackName => 'LeftColumnStart' );
<&| /Widgets/TitleBox,
@@ -65,43 +64,55 @@
title_href => RT::IR->HREFTo("Edit.html?id=".$Ticket->Id),
class => 'ticket-info-basics',
&>
-<table class="basics">
+ <div>
% if (my $constituency = RT::IR->ConstituencyFor($Ticket)) {
- <tr>
- <td class="label"><% loc("Constituency") %>:</td>
- <td class="value">
- <% $constituency %>
- </td>
- </tr>
- <tr>
-
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Constituency") %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $constituency %></span>
+ </div>
+ </div>
% }
- <tr>
- <td class="label"><% loc("Status") %>:</td>
- <td class="value">
- <% $Ticket->Status %>
- </td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Status") %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $Ticket->Status %></span>
+ </div>
+ </div>
% if ( !$Ticket->QueueObj->SLADisabled ) {
- <tr class="sla">
- <td class="label"><&|/l&>SLA</&>:</td>
- <td class="value"><% loc($Ticket->SLA) %></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>SLA</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% loc($Ticket->SLA) %></span>
+ </div>
+ </div>
% }
- <tr>
- <td class="label"><% loc("Incident") %>:</td>
- <td class="value">
- <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket &>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Time Worked</&>:</td>
- <td class="value"><%loc('[_1] min', $TimeWorked)%></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Incident") %>:
+ </div>
+ <div class="value col-md-9">
+ <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Time Worked</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><%loc('[_1] min', $TimeWorked)%></span>
+ </div>
+ </div>
<& /Elements/ShowCustomFields, Grouping => 'Basics', Object => $Ticket, Table => 0 &>
-</table>
+ </div>
</&>
@@ -115,7 +126,8 @@
<& /Ticket/Elements/ShowAttachments, Ticket => $Ticket,
Attachments => $attachments &>
-</td> <td class="boxcontainer" valign="top">
+ </div>
+ <div class="boxcontainer col-md-6">
% $m->callback( %ARGS, Ticket => $Ticket, CallbackName => 'RightColumnStart' );
<&| /Widgets/TitleBox,
@@ -134,9 +146,8 @@
% $m->callback( %ARGS, Ticket => $Ticket, CallbackName => 'BeforeRequestor' );
<br />
<& /Ticket/Elements/ShowRequestor, Ticket => $Ticket, DisplayPath => RT::IR->HREFTo("Display.html") &>
- </td>
-</tr>
-</table>
+ </div>
+</div>
</&></div>
diff --git a/html/RTIR/Elements/ShowDates b/html/RTIR/Elements/ShowDates
index dfe13826..5803a42a 100644
--- a/html/RTIR/Elements/ShowDates
+++ b/html/RTIR/Elements/ShowDates
@@ -45,24 +45,38 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table>
- <tr>
- <td class="label"><&|/l&>Created</&>:</td>
- <td class="value"><% $Ticket->CreatedObj->AsString %></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Starts</&>:</td>
- <td class="value"><% $Ticket->StartsObj->AsString %></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Created</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $Ticket->CreatedObj->AsString %></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Starts</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $Ticket->StartsObj->AsString %></span>
+ </div>
+ </div>
% if ( RT::IR->IsReportQueue($Ticket->QueueObj) || RT::IR->IsInvestigationQueue($Ticket->QueueObj) || RT::IR->IsCountermeasureQueue($Ticket->QueueObj) ) {
- <tr>
- <td class="label"><&|/l&>Started</&>:</td>
- <td class="value"><% $Ticket->StartedObj->AsString %></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Started</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $Ticket->StartedObj->AsString %></span>
+ </div>
+ </div>
% }
- <tr>
- <td class="labeltop"><&|/l&>Due</&>:</td>
- <td class="value">
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Due</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control">
% my $due = $Ticket->DueObj;
% if ( ($due->Diff || 0) < 0 ) {
<span class="overdue"><% $due->AsString %></span>
@@ -76,14 +90,18 @@
[<a href="Display.html?Due_Date=now%20%2B%20<% $Due |u %>&id=<% $Ticket->Id %>"><% loc("Set to [_1] from now", $Due ) %></a>]
% }
% }
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Updated</&>:</td>
- <td class="value"><a href="#lasttrans"><% $Ticket->LastUpdated ? (loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)) : loc("Never") | h %></a></td>
- </tr>
+ </span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Updated</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><a href="#lasttrans"><% $Ticket->LastUpdated ? (loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)) : loc("Never") | h %></a></span>
+ </div>
+ </div>
<& /Elements/ShowCustomFields, Grouping => 'Dates', Object => $Ticket, Table => 0 &>
-</table>
<%ARGS>
$Ticket => undef
</%ARGS>
diff --git a/html/RTIR/Elements/ShowIncidents b/html/RTIR/Elements/ShowIncidents
index 1e76990b..0810c4a0 100644
--- a/html/RTIR/Elements/ShowIncidents
+++ b/html/RTIR/Elements/ShowIncidents
@@ -57,10 +57,10 @@
&>
<div class="actions">
% unless ( $action ) {
-<a class="button button-small" id="link-incident" href="<% RT::IR->HREFTo('Link/ToIncident/?id='. $id ) %>">Link</a>
-<a class="button button-small" id="create-incident" href="<% RT::IR->HREFTo('CreateInQueue.html?Lifecycle=' . RT::IR->lifecycle_incident . '&Child='. $id ) %>">New</a>
+<a class="button button-small btn btn-lg btn-primary" id="link-incident" href="<% RT::IR->HREFTo('Link/ToIncident/?id='. $id ) %>">Link</a>
+<a class="button button-small btn btn-lg btn-primary" id="create-incident" href="<% RT::IR->HREFTo('CreateInQueue.html?Lifecycle=' . RT::IR->lifecycle_incident . '&Child='. $id ) %>">New</a>
% } elsif ( $action ne 'No' ) {
-<a class="button button-small" href="<% RT::IR->HREFTo('Display.html?Action='. $action.'&id='. $id) %>"><% loc( $action ) %></a>
+<a class="button button-small btn btn-lg btn-primary" href="<% RT::IR->HREFTo('Display.html?Action='. $action.'&id='. $id) %>"><% loc( $action ) %></a>
% }
</div>
</span>
@@ -98,7 +98,7 @@ my $query = RT::IR->RelevantIncidentsQuery( $Ticket );
my $format = RT->Config->Get('RTIRSearchResultFormats')->{'ListIncidents'};
my $dformat = $format;
if ( $show_unlink ) {
- $dformat .= ", '<a class=\"button\" href=\"". RT::IR->HREFTo("Display.html?id=$id&DeleteLink--MemberOf-__id__=1").\">". loc('Unlink') ."</a>/TITLE:'";
+ $dformat .= ", '<a class=\"button button-small btn btn-lg btn-primary\" href=\"". RT::IR->HREFTo("Display.html?id=$id&DeleteLink--MemberOf-__id__=1").\">". loc('Unlink') ."</a>/TITLE:'";
}
</%INIT>
diff --git a/html/RTIR/Elements/ShowPeople b/html/RTIR/Elements/ShowPeople
index 7968d34d..5b62842f 100644
--- a/html/RTIR/Elements/ShowPeople
+++ b/html/RTIR/Elements/ShowPeople
@@ -48,15 +48,17 @@
%# XXX: this is a duplication of RT's /Ticket/Elements/ShowPeople
%# the only difference is s/Requestor/Correspondent/, keep in sync
-<table>
- <tr>
- <td class="label"><&|/l&>Owner</&>:</td>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Owner</&>:
+ </div>
% my $owner = $Ticket->OwnerObj;
- <td class="value"><& /Elements/ShowUser, User => $owner, Ticket => $Ticket &>
- <& /Elements/ShowUserEmailFrequency, User => $owner, Ticket => $Ticket &>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Elements/ShowUser, User => $owner, Ticket => $Ticket &></span>
+ <& /Elements/ShowUserEmailFrequency, User => $owner, Ticket => $Ticket &>
% $m->callback( User => $owner, Ticket => $Ticket, %ARGS, CallbackName => 'AboutThisUser' );
- </td>
- </tr>
+ </div>
+ </div>
% my $single_roles = $Ticket->QueueObj->CustomRoles;
% $single_roles->LimitToSingleValue;
@@ -68,38 +70,57 @@
%# so fall back to nobody
% my $user = $users->First || RT->Nobody;
- <tr>
- <td class="label"><% $role->Name %>:</td>
- <td class="value"><& /Elements/ShowUser, User => $user, Ticket => $Ticket &></td>
- <& /Elements/ShowUserEmailFrequency, User => $user, Ticket => $Ticket &>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% $role->Name %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Elements/ShowUser, User => $user, Ticket => $Ticket &></span>
+ <& /Elements/ShowUserEmailFrequency, User => $user, Ticket => $Ticket &>
% $m->callback( User => $user, Ticket => $Ticket, %ARGS, CallbackName => 'AboutThisUser' );
- </tr>
+ </div>
+ </div>
% }
- <tr>
- <td class="labeltop"><&|/l&>Correspondents</&>:</td>
- <td class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket &></td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Cc</&>:</td>
- <td class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket &></td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>AdminCc</&>:</td>
- <td class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Correspondents</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket &></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Cc</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket &></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>AdminCc</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &></span>
+ </div>
+ </div>
% my $multi_roles = $Ticket->QueueObj->CustomRoles;
% $multi_roles->LimitToMultipleValue;
% while (my $role = $multi_roles->Next) {
- <tr>
- <td class="labeltop"><% $role->Name %>:</td>
- <td class="value"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->RoleGroup($role->GroupType), Ticket => $Ticket &></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% $role->Name %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowGroupMembers, Group => $Ticket->RoleGroup($role->GroupType), Ticket => $Ticket &></span>
+ </div>
+ </div>
% }
<& /Elements/ShowCustomFields, Grouping => 'People', Object => $Ticket, Table => 0 &>
-</table>
<%ARGS>
$Ticket => undef
</%ARGS>
commit be8d48a6a0694bc578cf7d2a712033dcce6b55c1
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Fri Sep 6 18:50:54 2019 -0500
Fix has_watchers test regex for elevator themes
diff --git a/lib/RT/IR/Test/Web.pm b/lib/RT/IR/Test/Web.pm
index 2d1635ab..9ff65a6d 100644
--- a/lib/RT/IR/Test/Web.pm
+++ b/lib/RT/IR/Test/Web.pm
@@ -310,7 +310,7 @@ sub has_watchers {
$self->display_ticket($id);
return $self->content_like(
-qr{<td class="labeltop">Correspondents:</td>\s*<td class="value">\s*<span class="user" data-user-id="\d+">\s*<a href="/User/Summary\.html\?id=\d+">\s*([@\w\.&;]+)\s*</a></span>}ms,
+qr{Correspondents:\s*</div>\s*<div class="value col-md-9">\s*<span[^>]*?\s*class="\w+[^>]*?><span class="user" data-user-id="\d+">\s*<a href="/User/Summary\.html\?id=\d+">\s*([@\w\.&;]+)\s*</a></span>}ms,
"Found $type",
);
}
commit a18bd87e71f8a3ddaf5b7b3c8e3d2f5ad647ebd7
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Mon Sep 9 14:47:10 2019 -0500
Fix ticket_is_linked_to_inc test regex for elevator themes
diff --git a/lib/RT/IR/Test/Web.pm b/lib/RT/IR/Test/Web.pm
index 9ff65a6d..36c9e7fc 100644
--- a/lib/RT/IR/Test/Web.pm
+++ b/lib/RT/IR/Test/Web.pm
@@ -188,7 +188,7 @@ sub ticket_is_linked_to_inc {
foreach my $inc( ref $incs? @$incs : ($incs) ) {
my $desc = shift || "Ticket $id is linked to the Incident #$inc";
$self->content_like(
- qr{Incident:\s*</td>\s*<td[^>]*?>.*?<td[^>]*?><b><a\s+href="/RTIR/Incident/Display.html\?id=\Q$inc\E">\Q$inc\E</a></b></td>}ism,
+ qr{<td[^>]*?><b><a\s+href="/RTIR/Incident/Display.html\?id=\Q$inc\E">\Q$inc\E</a></b></td>}ism,
$desc
) or return 0;
}
@@ -203,7 +203,7 @@ sub ticket_is_not_linked_to_inc {
foreach my $inc( @$incs ) {
my $desc = shift || "Ticket $id is not linked to the Incident #$inc";
$self->content_unlike(
- qr{Incident:\s*</td>\s*<td[^>]*?>.*?<a\s+href="/RTIR/Display.html\?id=\Q$inc\E">\Q$inc\E:\s+}ism,
+ qr{<td[^>]*?><b><a\s+href="/RTIR/Incident/Display.html\?id=\Q$inc\E">\Q$inc\E</a></b></td>}ism,
$desc
) or return 0;
}
commit e42a2dff086a5d18f2ad5ff4f5d2bd9d7eea1f9b
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Mon Sep 9 17:55:05 2019 -0500
Migrate RTIR/Incident/Display to elevator themes
diff --git a/html/Callbacks/RTIR/Elements/MakeClicky/Default b/html/Callbacks/RTIR/Elements/MakeClicky/Default
index 09b6f0a3..82bdc26e 100644
--- a/html/Callbacks/RTIR/Elements/MakeClicky/Default
+++ b/html/Callbacks/RTIR/Elements/MakeClicky/Default
@@ -70,7 +70,7 @@ my %actions;
$args{value} = $escaper->($args{value});
# don't execute on non-rtir tickets or in SelfService
return $args{value} unless defined $args{type} and !$SelfService;
- return qq{<a href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."q=".$args{value}).qq{">$args{value}</a>};
+ return qq{ <a href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."q=".$args{value}).qq{">$args{value}</a>};
},
url => sub {
my %args = @_;
@@ -82,7 +82,7 @@ my %actions;
# don't execute on non-rtir tickets or in SelfService
return $super unless defined $args{type} and !$SelfService;
- my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+ my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
.loc('lookup "[_1]"', $host) .qq{</a>};
return $super . qq{ <span class="clickylink">$result</span>};
},
@@ -96,7 +96,7 @@ my %actions;
# don't execute on non-rtir tickets or in SelfService
return $super unless defined $args{type} and !$SelfService;
- my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
+ my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=host&q=".$escaped_host).qq{">}
.loc('lookup "[_1]"', $host) .qq{</a>};
return $super . qq{ <span class="clickylink">$result</span>};
},
@@ -108,17 +108,17 @@ my %actions;
$args{host} ||= $args{value};
my $escaped_host = $escaper->($args{host});
- my $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
+ my $result .= qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo("Tools/Lookup.html?".$args{lookup_params}."type=ip&q=".$escaped_host).qq{">}
.loc('Lookup IP') .q{</a>};
if ( $args{incident} && !RT->Config->Get('RTIR_DisableCountermeasures') ) {
- $result .= qq{<a class="button button-small btn btn-lg btn-primary create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
+ $result .= qq{ <a class="button button-small btn btn-lg btn-primary create_child_} . RT::IR->lifecycle_countermeasure . qq{" href="} .
RT::IR->HREFTo("CreateInQueue.html?Incident=".$args{incident}."&Lifecycle=".RT::IR->lifecycle_countermeasure.qq{&IP-Value=$escaped_host})
.qq{">Block</a>};
}
if ( $args{'object'} && $args{'object'}->id ) {
my $cf = RT::IR::GetCustomField('IP');
my $tid = $args{'object'}->id;
- $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}.
+ $result .= qq{ <a class="button button-small btn btn-lg btn-primary" href="}.
RT::IR->HREFTo("Edit.html?id=".$tid
.qq{&Object-RT::Ticket-$tid-CustomField-}. $cf->id .qq{-AddValue=$escaped_host}
.q{&SaveChanges=1})
@@ -161,7 +161,7 @@ my %actions;
if ( $r->uri =~ /Lookup.html$/ ) {
$result .= qq{<input type="checkbox" name="Requestorbox-$escaped_email" unchecked />};
}
- $result .= qq{<a class="button button-small btn btn-lg btn-primary" href="}.
+ $result .= qq{ <a class="button button-small btn btn-lg btn-primary" href="}.
RT::IR->HREFTo( "CreateInQueue.html"
. qq{?Incident=$args{'incident'}}
. qq{&Lifecycle=}.RT::IR->lifecycle_investigation
@@ -182,7 +182,7 @@ my %actions;
return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
$args{value} = $escaper->($args{value});
- my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
+ my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=handle&q=$args{value}}).qq{">}
.loc('lookup') .qq{</a>};
return $args{value} . qq{ <span class="clickylink">$result</span>};
},
@@ -193,7 +193,7 @@ my %actions;
return $escaper->($args{value}) unless defined $args{type} and !$SelfService;
$args{value} = $escaper->($args{value});
- my $result = qq{<a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
+ my $result = qq{ <a class="button button-small btn btn-lg btn-primary" href="}. RT::IR->HREFTo(qq{Tools/Lookup.html?$args{lookup_params}type=host&q=$args{value}}). qq{">}
.loc('lookup host') .qq{</a>};
return $args{value} . qq{ <span class="clickylink">$result</span>};
},
diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index 1623f4bc..7754fb73 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -53,7 +53,9 @@
<& /Ticket/Elements/ShowUpdateStatus, Ticket => $TicketObj, DisplayPath => 'RTIR' &>
<div class="summary"><&| /Widgets/TitleBox, title => loc('Ticket metadata') &>
-<table class="ticket-summary" width="100%"><tr><td class="boxcontainer" valign="top">
+
+<div class="row ticket-summary">
+ <div class="boxcontainer col-md-6">
% $m->callback( %ARGS, Ticket => $TicketObj, CallbackName => 'LeftColumnStart' );
<&| /Widgets/TitleBox,
@@ -61,58 +63,80 @@
title_href => RT::IR->HREFTo("Edit.html?id=".$id),
class=> 'ticket-info-basics',
&>
-
-<table>
-
+ <div>
% if (my $constituency = RT::IR->ConstituencyFor($TicketObj)) {
- <tr>
- <td class="label"><% loc("Constituency") %>:</td>
- <td class="value">
- <% $constituency %>
- </td>
- </tr>
- <tr>
-% }
-
-
- <tr>
- <td class="label"><% loc("Queue") %>:</td>
- <td class="value" colspan="2">
- <% $TicketObj->QueueObj->Name %>
- </td>
- </tr>
- <tr>
- <td class="label"><% loc("Status") %>:</td>
- <td class="value" colspan="2">
- <% $TicketObj->Status %>
- </td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Constituency") %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $constituency %></span>
+ </div>
+ </div>
+% }
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Queue") %>
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $TicketObj->QueueObj->Name %></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc("Status") %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $TicketObj->Status %></span>
+ </div>
+ </div>
% if ( !$TicketObj->QueueObj->SLADisabled ) {
- <tr class="sla">
- <td class="label"><&|/l&>SLA</&>:</td>
- <td class="value"><% loc($TicketObj->SLA) %></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>SLA</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% loc($TicketObj->SLA) %></span>
+ </div>
+ </div>
% }
- <tr>
- <td class="label"><&|/l&>Owner</&>:</td>
- <td class="value"><& /Elements/ShowUser, User => $TicketObj->OwnerObj &></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Subject</&>:</td>
- <td class="value"><% $TicketObj->Subject %></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Priority</&>:</td>
- <td class="value"><& /Ticket/Elements/ShowPriority, Ticket => $TicketObj &></td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Time Worked</&>:</td>
- <td class="value"><%loc('[_1] min', $TimeWorked)%></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Owner</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Elements/ShowUser, User => $TicketObj->OwnerObj &></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $TicketObj->Subject %></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Priority</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowPriority, Ticket => $TicketObj &></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Time Worked</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><%loc('[_1] min', $TimeWorked)%></span>
+ </div>
+ </div>
<& /Elements/ShowCustomFields, Grouping => 'Basics', Object => $TicketObj, Table => 0 &>
-</table>
+ </div>
+
</&>
<& /Elements/ShowCustomFieldCustomGroupings,
@@ -132,7 +156,8 @@
<& /Ticket/Elements/ShowAttachments, Ticket => $TicketObj, Attachments => $attachments &>
<& /Ticket/Elements/ShowRequestor, Ticket => $TicketObj, DisplayPath => RT::IR->HREFTo("Display.html") &>
-</td><td class="boxcontainer" valign="top">
+ </div>
+ <div class="boxcontainer col-md-6">
% $m->callback( %ARGS, Ticket => $TicketObj, CallbackName => 'RightColumnStart' );
% foreach my $lifecycle ( RT::IR->lifecycle_report, RT::IR->lifecycle_investigation, RT::IR->lifecycle_countermeasure ) {
@@ -144,8 +169,8 @@
<& /RTIR/Elements/ShowArticles, Ticket => $TicketObj &>
% $m->callback( %ARGS, Ticket => $TicketObj, CallbackName => 'RightColumnEnd' );
-
-</td></tr></table>
+ </div>
+</div>
</&></div>
diff --git a/static/css/rtir-styles.css b/static/css/rtir-styles.css
index 31011680..0b20486f 100644
--- a/static/css/rtir-styles.css
+++ b/static/css/rtir-styles.css
@@ -81,11 +81,13 @@ body.rtir #topactions { min-width: 44em; white-space: no-wrap; }
width: 80%;
}
+/* TODO: this section of styling has been commented out to disable colored tabs until we re-implement.
body.rtir .titlebox.ticket-info-articles .titlebox-title .left { background-color: #316531; color: #fff; }
body.rtir .titlebox.tickets-list-report .titlebox-title .left { background-color: #316531; color: #fff; }
body.rtir .titlebox.tickets-list-incident .titlebox-title .left { background-color: #316531; color: #fff; }
body.rtir .titlebox.tickets-list-investigation .titlebox-title .left { background-color: #316531; color: #fff; }
body.rtir .titlebox.tickets-list-countermeasure .titlebox-title .left { background-color: #316531; color: #fff; }
+*/
body.rtir #comp-RTIR-Search #body {
commit ecec102a57d3fd9db20e089f597eb73e51a4e00a
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Wed Sep 11 14:40:28 2019 -0500
Migrate RTIR/Incident/Create to elevator themes
diff --git a/html/RTIR/Incident/Create.html b/html/RTIR/Incident/Create.html
index 549935d4..8883e546 100644
--- a/html/RTIR/Incident/Create.html
+++ b/html/RTIR/Incident/Create.html
@@ -91,71 +91,94 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
<div class="ticket-create-basics">
<&| /Widgets/TitleBox, title => 'Basics', class => 'ticket-info-basics' &>
-<table width="100%" border="0">
% if ($constituency) {
-<tr class="constituency"><td class="label"><% loc('Constituency') %>:</td>
- <td class="value"><% $constituency %></td></tr>
-
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc('Constituency') %>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $constituency %></span>
+ </div>
+ </div>
% }
% if ( $Split ) {
-<tr class="split-from"><td class="label"><% loc('Split from') %>:</td>
- <td class="value"><a href="<%RT::IR->HREFTo('Incident/Display.html?id='.$SplitObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $SplitObj->QueueObj->Lifecycle), $SplitObj->Id, $SplitObj->Subject) %></a></td></tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc('Split from') %>:
+ </div>
+ <div class="value col-md-9">
+ <a href="<%RT::IR->HREFTo('Incident/Display.html?id='.$SplitObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $SplitObj->QueueObj->Lifecycle), $SplitObj->Id, $SplitObj->Subject) %></a>
+ </div>
+ </div>
% }
-
% if ( $ChildObj ) {
-<tr class="link-with"><td class="label"><% loc('Link with') %>:</td>
- <td class="value"><a href="<%RT::IR->HREFTo('Display.html?id='.$ChildObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $ChildObj->QueueObj->Lifecycle), $ChildObj->Id, $ChildObj->Subject) %></a></td></tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% loc('Link with') %>:
+ </div>
+ <div class="value col-md-9">
+ <a href="<%RT::IR->HREFTo('Display.html?id='.$ChildObj->id)%>"><% loc("[_1] #[_2]: [_3]", RT::IR::TicketType(Lifecycle => $ChildObj->QueueObj->Lifecycle), $ChildObj->Id, $ChildObj->Subject) %></a>
+ </div>
+ </div>
% }
-
-
-<tr class="queue">
- <td class="label"><&|/l&>Queue</&>:</td>
- <td colspan="2">
- <& /Ticket/Elements/ShowQueue, QueueObj => $QueueObj &>
- </td>
-</tr>
-
-
-
-<tr class="status">
- <td class="label"><&|/l&>Status</&>:</td>
- <td colspan="2">
- <& /Ticket/Elements/SelectStatus,
- Name => 'Status',
- Object => $QueueObj,
- DefaultValue => 0,
- Default => $ARGS{Status} || $QueueObj->LifecycleObj->DefaultOnCreate,
- &>
- </td>
-</tr>
-<tr class="owner">
- <td class="label"><&|/l&>Owner</&>:</td>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Queue</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><& /Ticket/Elements/ShowQueue, QueueObj => $QueueObj &></span>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Status</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Ticket/Elements/SelectStatus,
+ Name => 'Status',
+ Object => $QueueObj,
+ DefaultValue => 0,
+ Default => $ARGS{Status} || $QueueObj->LifecycleObj->DefaultOnCreate,
+ &>
+ </div>
+ </div>
+
+ <div class="form-row owner">
+ <div class="label col-md-3">
+ <&|/l&>Owner</&>:
+ </div>
% if ( $ChildObj ) {
- <td class="value">
+ <div class="value col-md-9">
<& /Elements/ShowUser, User => $ChildObj->OwnerObj &>
<input type="hidden" name="Owner" value="<% $ChildObj->Owner %>" />
- </td>
+ </div>
% } else {
- <td class="value"><& /Elements/SelectOwner,
+ <div class="value col-md-9">
+ <& /Elements/SelectOwner,
Name => 'Owner',
QueueObj => $QueueObj,
Default => $ARGS{'Owner'} || $session{'CurrentUser'}->Id
- &></td>
+ &>
+ </div>
% }
% if ( !$QueueObj->SLADisabled ) {
- <tr class="sla">
- <td class="label"><&|/l&>SLA</&>:</td>
- <td class="value"><& /Elements/SelectSLA,
- Name => 'SLA',
- Default => $ARGS{SLA} || RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj),
- DefaultValue => RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj) ? 0 : 1,
- QueueObj => $QueueObj,
- &></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>SLA</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/SelectSLA,
+ Name => 'SLA',
+ Default => $ARGS{SLA} || RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj),
+ DefaultValue => RT::SLA->GetDefaultServiceLevel(Queue => $QueueObj) ? 0 : 1,
+ QueueObj => $QueueObj,
+ &>
+ </div>
+ </div>
% }
-</tr>
+ </div>
-<& /RTIR/Elements/EditCustomFields,
+<& /RTIR/Elements/EditCustomFields,
%ARGS,
TicketObj => $ticket,
QueueObj => $QueueObj,
@@ -163,7 +186,7 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
CFDefaults => \%CFDefaults,
&>
-</table></&>
+</&>
<& /Elements/EditCustomFieldCustomGroupings,
%ARGS,
@@ -178,30 +201,41 @@ if ( $ChildObj && $ChildObj->id && !$ChildObj->CurrentUserHasRight('ModifyTicket
<div class="ticket-create-details">
<&| /Widgets/TitleBox, title => $Title, class => 'ticket-info-message' &>
-<table width="100%" border="0">
-
- <tr class="subject">
- <td class="label"><&|/l&>Subject</&>:</td>
- <td class="value"><input type="text" name="Subject" maxsize="200" value="<% $ARGS{'Subject'} || '' %>" /></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="value col-md-9">
+ <input class="form-control" type="text" name="Subject" value="<% $ARGS{'Subject'} || '' %>" />
+ </div>
+ </div>
% if ( $gnupg_widget ) {
-<tr><td> </td><td>
-<& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &>
-</td></tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &>
+ </div>
+ </div>
% }
-<tr class="message"><td class="labeltop"><&|/l&>Message</&>:</td>
-<td>
-<& /Elements/MessageBox,
- Default => $ARGS{'Content'},
- IncludeSignature => 0,
-&>
-</td></tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Message</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/MessageBox,
+ Default => $ARGS{'Content'},
+ IncludeSignature => 0,
+ &>
+ </div>
+ </div>
<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $QueueObj &>
-</table></&>
+</&>
<&| /Widgets/TitleBox, title => loc('Details'), class => 'ticket-info-details' &>
<& /Ticket/Elements/EditBasics,
diff --git a/static/css/rtir-styles.css b/static/css/rtir-styles.css
index 0b20486f..40d3c57f 100644
--- a/static/css/rtir-styles.css
+++ b/static/css/rtir-styles.css
@@ -97,12 +97,6 @@ body.rtir #comp-RTIR-Search .submit {
width: 58%;
}
-body.rtir #ticket-create-incident input[type=text]:not(.datepicker),
-body.rtir #ticket-create-investigation input[type=text]
-{
- width: 90%;
-}
-
body.sidebyside.rtir #ticket-create-incident .ticket-create-basics,
body.sidebyside.rtir #ticket-create-investigation .ticket-create-basics
{
commit 09016018037d0d9e0228b8d62a76f1c53d108c0e
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Wed Sep 11 18:57:14 2019 -0500
Migrate RTIR/Create to elevator themes
diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 19785a14..203ec3b3 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -81,13 +81,16 @@
<div id="ticket-create-metadata">
<&| /Widgets/TitleBox, title => loc("Basics"), class=>'ticket-info-basics' &>
-<table width="100%" border="0">
% if ( $SplitObj ) {
- <tr class="split">
- <td class="label"><&|/l&>Split from</&>:</td>
- <td class="value"><% $SplitObj->id %></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Split from</&>:
+ </div>
+ <div class="value col-md-9">
+ <span class="current-value form-control"><% $SplitObj->id %></span>
+ </div>
+ </div>
% }
<& /RTIR/Elements/SelectIncident,
@@ -104,6 +107,7 @@
comp => '/Ticket/Elements/ShowQueue',
args => {
QueueObj => $QueueObj,
+ Wrap => 1,
},
},
{
@@ -153,7 +157,7 @@
<& /Ticket/Elements/EditTransactionCustomFields,
%ARGS, QueueObj => $QueueObj, InTable => 1,
&>
-</table></&>
+</&>
<& /Elements/EditCustomFieldCustomGroupings,
%ARGS,
@@ -163,7 +167,7 @@
Groupings => [ RT::CustomField->CustomGroupings('RTIR::Ticket'), '' ],
&>
<&| /Widgets/TitleBox, title => loc("Dates"), class=>'ticket-info-dates' &>
-<table width="100%" border="0">
+
<& /Ticket/Elements/EditBasics,
InTable => 1,
QueueObj => $QueueObj,
@@ -180,10 +184,9 @@
},
],
&>
-</table></&>
+</&>
<&| /Widgets/TitleBox, title => loc("Time"), class=>'ticket-info-time' &>
-<table width="100%" border="0">
<& /Ticket/Elements/EditBasics,
InTable => 1,
QueueObj => $QueueObj,
@@ -214,7 +217,7 @@
},
],
&>
-</table></&>
+</&>
% if ( RT::IR->IsInvestigationQueue($QueueObj) && @IncidentObj ) {
<& /RTIR/Elements/AttachReports, Ticket => \@IncidentObj &>
@@ -225,82 +228,111 @@
<div id="ticket-create-message">
<&| /Widgets/TitleBox, title => $Title, class => 'messagedetails' &>
-<table width="100%" border="0">
- <tr>
- <td class="label"><&|/l&>Correspondents</&>:</td>
- <td class="value"><& /Elements/EmailInput,
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Correspondents</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EmailInput,
Name => 'Requestors', Default => $ARGS{'Requestors'}, Size => undef,
- &></td>
- </tr>
- <tr>
- <td class="label"> </td>
- <td class="comment">
- <input type="checkbox" name="SkipNotification" value="Requestors" <% (grep $_ eq 'Requestors', @SkipNotification)? 'checked': '' %> />
- <&|/l&>Don't send any emails to correspondents.</&>
- </td>
- </tr>
+ &>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <div class="custom-control custom-checkbox">
+ <input class="custom-control-input checkbox" type="checkbox" name="SkipNotification" id="SkipNotification" value="Requestors" <% (grep $_ eq 'Requestors', @SkipNotification)? 'checked': '' %> />
+ <label class="custom-control-label" for="SkipNotification"><&|/l&>Don't send any emails to correspondents.</&></label>
+ </div>
+ </div>
+ </div>
+
% $m->callback( CallbackName => 'AfterRequestors', ARGSRef => \%ARGS );
- <tr>
- <td class="label"><&|/l&>Cc</&>:</td>
- <td class="value"><& /Elements/EmailInput,
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Cc</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EmailInput,
Name => 'Cc', Default => $ARGS{'Cc'}, Size => undef,
- &></td>
- </tr>
- <tr>
- <td class="label"> </td>
- <td class="comment"><i><font size="-2">
- <&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <b>will</b> receive future updates.)</&>
- </font></i></td>
- </tr>
-
- <tr>
- <td class="label"><&|/l&>Admin Cc</&>:</td>
- <td class="value"><& /Elements/EmailInput,
+ &>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <i><&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <b>will</b> receive future updates.)</&></i>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Admin Cc</&>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EmailInput,
Name => 'AdminCc', Default => $ARGS{'AdminCc'}, Size => undef,
- &></td>
- </tr>
- <tr>
- <td class="label"> </td>
- <td class="comment"><i><font size="-2">
- <&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <b>will</b> receive future updates.)</&>
- </font></i></td>
- </tr>
+ &>
+ </div>
+ </div>
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <i><&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <b>will</b> receive future updates.)</&></i>
+ </div>
+ </div>
% my $roles = $QueueObj->CustomRoles;
% $roles->LimitToMultipleValue;
% while (my $role = $roles->Next) {
- <tr>
- <td class="label"><% $role->Name %>:</td>
- <td class="value"><& /Elements/EmailInput,
+ <div class="form-row">
+ <div class="label col-md-3">
+ <% $role->Name %>:
+ </div>
+ <div class="value col-md-9">
+ <& /Elements/EmailInput,
Name => $role->GroupType, Default => $ARGS{$role->GroupType}, Size => undef,
- &></td>
- </tr>
+ &>
+ </div>
+ </div>
% if ($role->EntryHint) {
- <tr>
- <td class="label"> </td>
- <td class="comment"><i><font size="-2">
- <% $role->EntryHint %>
- </font></i></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <i><% $role->EntryHint %></i>
+ </div>
+ </div>
% }
% }
- <tr>
- <td class="label"><&|/l&>Subject</&>:</td>
- <td class="value"><input type="text" name="Subject" maxsize="200" value="<% $Subject || '' %>" /></td>
- </tr>
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Subject</&>:
+ </div>
+ <div class="value col-md-9">
+ <input class="form-control" type="text" name="Subject" value="<% $Subject || '' %>" />
+ </div>
+ </div>
% if ( $gnupg_widget ) {
- <tr><td> </td><td class="value">
- <& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &>
- </td></tr>
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
+ <& /Elements/Crypt/SignEncryptWidget, self => $gnupg_widget, QueueObj => $QueueObj &>
+ </div>
+ </div>
% }
- <tr>
- <td class="label"><&|/l&>Message</&>:</td>
- <td class="value">
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Message</&>:
+ </div>
+ <div class="value col-md-9">
<%perl>
my $include_signature = 1;
unless (exists $ARGS{Content}) {
@@ -339,12 +371,12 @@
% } else {
<& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &>
% }
- </td>
- </tr>
+ </div>
+ </div>
<& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $QueueObj &>
-</table></&>
+</&>
<& /Elements/Submit, Name => "Create", Label => $SubmitCaption, SubmitId => 'create-ticket' &>
</div></div>
diff --git a/html/RTIR/Elements/SelectIncident b/html/RTIR/Elements/SelectIncident
index 7cd77d1e..11b7ea6c 100644
--- a/html/RTIR/Elements/SelectIncident
+++ b/html/RTIR/Elements/SelectIncident
@@ -45,25 +45,32 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<tr class="incident">
- <td class="label"><&|/l&>Incident</&>:</td>
- <td class="value">
+ <div class="form-row">
+ <div class="label col-md-3">
+ <&|/l&>Incident</&>:
+ </div>
+ <div class="value col-md-9">
+ <div class="form-row">
% if ( @potential ) {
- <& /RTIR/Search/Elements/ShowResults,
- Query => $query,
- Rows => 0,
- Format => $format,
- DisplayFormat => $dformat,
- AllowSorting => 0,
- ShowHeader => 0,
- &>
+ <& /RTIR/Search/Elements/ShowResults,
+ Query => $query,
+ Rows => 0,
+ Format => $format,
+ DisplayFormat => $dformat,
+ AllowSorting => 0,
+ ShowHeader => 0,
+ &>
% }
% if ( $hide ) {
<input type="hidden" name="<% $Name %>" value="<% $potential[0] %>" />
% }
- <input type="text" name="<% $Name %>" size="16" maxsize="16" value="" />
+ <div class="col-md-auto">
+ <input class="form-control" type="text" name="<% $Name %>" value="" />
+ </div>
% if ( $config->{'Multiple'} || @potential ) {
- <input type="submit" name="<% "More$Name" %>" value="<% $config->{'Multiple'}? loc('More') : loc('Other') %>" class="button" />
+ <div class="col-md-auto">
+ <input type="submit" name="<% "More$Name" %>" value="<% $config->{'Multiple'}? loc('More') : loc('Other') %>" class="form-control btn btn-primary button" />
+ </div>
% }
% if ( !$config->{'Required'} && $dformat =~ /RadioButton/ ) {
@@ -73,15 +80,17 @@ jQuery(function(){ jQuery('input[type="radio"][name="<% $Name %>"]').uncheckable
//]]>
</script>
% }
- </td>
-</tr>
-<tr>
- <td class="label"> </td>
- <td class="comment">
+ </div>
+ </div>
+ </div>
+
+ <div class="form-row">
+ <div class="label col-md-3"></div>
+ <div class="value col-md-9">
(<&|/l&>Id of an Incident to link a new ticket to</&>.
<% $config->{'Required'}? '<strong>'.loc('Required').'</strong>': loc('Optional') |n %>.)
- </td>
-</tr>
+ </div>
+ </div>
<%ARGS>
$Type
$Name => 'Incident'
commit 24691153ebec349c5efa32baefb8173cafdddde1
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Thu Sep 12 17:40:32 2019 -0500
Migrate RTIR/Tools/Lookup to elevator themes
diff --git a/html/RTIR/Tools/Elements/LookupRelatedTickets b/html/RTIR/Tools/Elements/LookupRelatedTickets
index a9b12831..5c6a08c2 100644
--- a/html/RTIR/Tools/Elements/LookupRelatedTickets
+++ b/html/RTIR/Tools/Elements/LookupRelatedTickets
@@ -45,28 +45,18 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<table width="100%" border="0" cellpadding="2" cellspacing="0">
-<tr><td valign="top" width="50%">
-
-<& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_incident, Query => $query &>
-
-</td><td valign="top" width="50%">
-
-<& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_investigation, Query => $query &>
-
-</td></tr><tr><td valign="top" width="50%">
-
-<& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_report, Query => $query &>
-
-</td><td width="50%" valign="top">
-
+<div class="row">
+ <div class="boxcontainer col-md-6">
+ <& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_incident, Query => $query &>
+ <& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_investigation, Query => $query &>
+ </div>
+ <div class="boxcontainer col-md-6">
+ <& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_report, Query => $query &>
% unless ( RT->Config->Get('RTIR_DisableCountermeasures') ) {
-<& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_countermeasure, Query => $query &>
+ <& LookupSummary, %ARGS, Lifecycle => RT::IR->lifecycle_countermeasure, Query => $query &>
% }
-
-</td></tr>
-
-</table>
+ </div>
+</div>
<%args>
$LookupType => undef
$q => undef
diff --git a/html/RTIR/Tools/Elements/SelectWhoisServer b/html/RTIR/Tools/Elements/SelectWhoisServer
index cf095538..7a993488 100644
--- a/html/RTIR/Tools/Elements/SelectWhoisServer
+++ b/html/RTIR/Tools/Elements/SelectWhoisServer
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<select name="<% $Name %>">
+<select class="form-control selectpicker" name="<% $Name %>">
<%PERL>
foreach my $s ( sort grep $servers{ $_ }, keys %servers ) {
my $srv = $servers{ $s };
diff --git a/html/RTIR/Tools/Elements/ToolFormIframe b/html/RTIR/Tools/Elements/ToolFormIframe
index 832aeb59..be5db02d 100644
--- a/html/RTIR/Tools/Elements/ToolFormIframe
+++ b/html/RTIR/Tools/Elements/ToolFormIframe
@@ -45,25 +45,32 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<tr>
-<td valign="middle" class="label"><%loc('Research Tool')%>:</td>
-<td valign="middle">
<form action="Lookup.html" method="get">
+ <div class="form-row">
+ <div class="col-md-2">
+ <span class="current-value form-control"><%loc('Research Tool')%>:</span>
+ </div>
% foreach my $arg ( grep exists $ARGS{$_}, @PassArguments ) {
- <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
+ <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
% }
- <span class="input">
- <input type="text" size="30" name="q" value="<% $q %>" /> at
- <select name="ResearchTool">
+ <div class="col-md-4">
+ <input class="form-control" type="text" name="q" value="<% $q %>" />
+ </div>
+ <div class="col-md-auto">
+ <span class="current-value form-control">at</span>
+ </div>
+ <div class="col-md-3">
+ <select class="form-control selectpicker" name="ResearchTool">
% for my $tool (grep {defined } keys %$research_tools) {
<option value="<%$tool%>" <%$tool eq $ResearchTool ? 'SELECTED' : ''%>><% $research_tools->{$tool}->{FriendlyName} %></option>
%}
</select>
- </span>
- <input type="submit" value="<%loc('Go')%>" />
+ </div>
+ <div class="col-md-auto">
+ <input class="form-control btn btn-primary button" type="submit" value="<%loc('Go')%>" />
+ </div>
+ </div>
</form>
-</td>
-</tr>
<%args>
$q => ''
$ResearchTool => ''
diff --git a/html/RTIR/Tools/Elements/ToolFormTraceroute b/html/RTIR/Tools/Elements/ToolFormTraceroute
index 561ea90d..92b115e7 100644
--- a/html/RTIR/Tools/Elements/ToolFormTraceroute
+++ b/html/RTIR/Tools/Elements/ToolFormTraceroute
@@ -45,18 +45,22 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<tr>
-<td valign="top" class="label"><%loc('Traceroute to')%>:</td>
-<td valign="top">
<form action="Traceroute.html" method="get" target="_blank">
+ <div class="form-row">
+ <div class="col-md-2">
+ <span class="current-value form-control"><%loc('Traceroute to')%>:</span>
+ </div>
% foreach my $arg ( grep exists $ARGS{$_}, @PassArguments ) {
- <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
+ <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
% }
- <span class="input"><input type="text" size="30" name="q" value="<% $q %>" /></span>
- <input type="submit" value="<%loc('Go')%>" />
+ <div class="col-md-4">
+ <input class="form-control" type="text" name="q" value="<% $q %>" />
+ </div>
+ <div class="col-md-auto">
+ <input class="form-control btn btn-primary button" type="submit" value="<%loc('Go')%>" />
+ </div>
+ </div>
</form>
-</td>
-</tr>
<%args>
$q => ''
@PassArguments => ()
diff --git a/html/RTIR/Tools/Elements/ToolFormWhois b/html/RTIR/Tools/Elements/ToolFormWhois
index 3ef3220f..0fc70627 100644
--- a/html/RTIR/Tools/Elements/ToolFormWhois
+++ b/html/RTIR/Tools/Elements/ToolFormWhois
@@ -45,21 +45,28 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<tr>
-<td valign="top" class="label"><%loc('WHOIS')%>:</td>
-<td valign="top">
<form name="ToolFormWhois" action="Lookup.html" method="get">
+ <div class="form-row">
+ <div class="col-md-2">
+ <span class="current-value form-control"><%loc('WHOIS')%>:</span>
+ </div>
% foreach my $arg ( grep exists $ARGS{$_}, @PassArguments ) {
- <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
+ <input type="hidden" name="<% $arg %>" value="<% $ARGS{ $arg } %>" />
% }
- <span class="input">
- <input type="text" size="30" name="q" value="<% $q %>" /> at
- <& SelectWhoisServer, Name => 'WhoisServer', Default => $WhoisServer &>
- </span>
- <input type="submit" value="<%loc('Go')%>" />
+ <div class="col-md-4">
+ <input class="form-control" type="text" name="q" value="<% $q %>" />
+ </div>
+ <div class="col-md-auto">
+ <span class="current-value form-control">at</span>
+ </div>
+ <div class="col-md-3">
+ <& SelectWhoisServer, Name => 'WhoisServer', Default => $WhoisServer &>
+ </div>
+ <div class="col-md-auto">
+ <input class="form-control btn btn-primary button" type="submit" value="<%loc('Go')%>" />
+ </div>
+ </div>
</form>
-</td>
-</tr>
<%args>
$q => ''
$WhoisServer => undef
diff --git a/html/RTIR/Tools/Elements/Tools b/html/RTIR/Tools/Elements/Tools
index ec022b51..27c12ece 100644
--- a/html/RTIR/Tools/Elements/Tools
+++ b/html/RTIR/Tools/Elements/Tools
@@ -49,14 +49,20 @@
my $tools = RT->Config->Get('RTIRResearchTools') || ();
</%INIT>
-<table class="lookup-tool-forms">
+<div class="row">
+ <div class="col-md-6">
% for my $tool (@$tools) {
% if ($m->comp_exists('ToolForm' . $tool)) {
% $m->comp('ToolForm' . $tool, %ARGS);
% }
% }
-</table>
+ </div>
+</div>
+% unless ( $ARGS{ HideResults } ) {
+<br>
+<div class="row">
+ <div class="col-md-12">
<%perl>
for my $tool (@$tools) {
if ($m->comp_exists('ToolResults' . $tool)) {
@@ -64,3 +70,6 @@ for my $tool (@$tools) {
}
}
</%perl>
+ </div>
+</div>
+% }
-----------------------------------------------------------------------
More information about the rt-commit
mailing list