Skip to content

Commit 0d82c17

Browse files
committed
Update html and css to be compatible with RT 6
The main change is because of the Bootstrap upgrade (4.6 => 5.3) in RT 6. This commit also cleans up quite a few obsolete css rules.
1 parent b198fda commit 0d82c17

21 files changed

Lines changed: 121 additions & 308 deletions

File tree

html/Callbacks/RTIR/Elements/Header/PrivilegedMainNav

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ my $re_rtir_path = qr'^/RTIR/(?:c/[^/]*/?)?';
146146
my $re_rtir_types = '(?:'. join( '|', map "\Q$_\E", RT::IR->Types ) .')';
147147

148148
if ( $session{'CurrentUser'}->HasRight(Right => 'ModifySelf', Object => $RT::System) ) {
149-
if ( $request_path =~ m{(?:$re_rtir_path)(?:index\.html|)$} ) {
150-
PageMenu()->child( edit => raw_html => q[<a id="page-edit" class="menu-item" href="] . RT::IR->HREFTo("Prefs/Home.html") . qq["><span class="fas fa-cog" alt="].loc('Edit').q[" data-toggle="tooltip" data-placement="top" data-original-title="].loc('Edit').q["></span></a>]);
151-
}
152149
Menu->child('preferences')->child('settings')->child(
153150
rtir_home_page => title => loc('RTIR at a glance'),
154151
path => RT::IR->HREFTo('Prefs/Home.html', IncludeWebPath => 0),

html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/Once

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ $COLUMN_MAP->{'HasIncident'} = {
8989
my $t = shift;
9090
my $yesno;
9191
if (my $count = RT::IR->RelevantIncidents( $t )->Count ) {
92-
$yesno = '<span class="yes">'. '<a href="'. RT->Config->Get('WebPath') . '/Search/Results.html?' . $m->comp('/Elements/QueryString', Query => RT::IR->RelevantIncidentsQuery($t)) . '">'
92+
$yesno = '<span class="yes">'. '<a class="text-warning" href="'. RT->Config->Get('WebPath') . '/Search/Results.html?' . $m->comp('/Elements/QueryString', Query => RT::IR->RelevantIncidentsQuery($t)) . '">'
9393
. $count
9494
.'</a></span>';
9595
}

html/RTIR/Advanced.html

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,13 @@
6161
<& /Ticket/Elements/EditMerge, Ticket => $Ticket, %ARGS &>
6262
</&>
6363

64-
<div class="form-row">
65-
<div class="col-12">
66-
<& /Elements/Submit,
67-
Name => 'SaveChanges',
68-
Label => loc('Save Changes'),
69-
Caption => loc("If you've updated anything above, be sure to"),
70-
&>
71-
</div>
72-
</div>
7364

65+
<& /Elements/Submit,
66+
Name => 'SaveChanges',
67+
Label => loc('Save Changes'),
68+
Caption => loc("If you've updated anything above, be sure to"),
69+
FullWidth => 1,
70+
&>
7471
</form>
7572

7673
<%INIT>

html/RTIR/Elements/MergeWith

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
%# those contributions and any derivatives thereof.
4646
%#
4747
%# END BPS TAGGED BLOCK }}}
48-
<div class="form-row">
48+
<div class="row mt-2">
4949
<div class="col-12">
5050
<h3><% $Title %></h3>
5151
<& /RTIR/Search/Elements/ShowResults,

html/RTIR/Elements/SelectIncident

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
%# those contributions and any derivatives thereof.
4646
%#
4747
%# END BPS TAGGED BLOCK }}}
48-
<div class="row">
48+
<div class="row mt-2">
4949
% if ( @potential ) {
5050
<& /RTIR/Search/Elements/ShowResults,
5151
Query => $query,
@@ -66,7 +66,7 @@
6666
</div>
6767
% if ( $config->{'Multiple'} || @potential ) {
6868
<div class="col-auto">
69-
<input type="submit" name="<% "More$Name" %>" value="<% $config->{'Multiple'}? loc('Add') : loc('Other') %>" class="form-control btn btn-primary button" />
69+
<input type="submit" name="<% "More$Name" %>" value="<% $config->{'Multiple'}? loc('Add') : loc('Other') %>" class="btn btn-primary" />
7070
</div>
7171
% }
7272

html/RTIR/Elements/ShowCVEDetails

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,7 @@
6565
<div id="accordion-cve-<% $cve->Content %>" class="accordion-content collapse"
6666
data-cve-id="<% $cve->Content %>" aria-labelledby="accordion-cve-<% $cve->Content %>-title">
6767
% for my $item ( qw/description cvss-3x-severity published-date last-modified-date more-info/ ) {
68-
<div class="form-row cve-<% $item %>">
69-
<div class="col-3 label"><% loc($label{$item}) %>:</div>
70-
<div class="col-9 value">
71-
<span class="current-value">
72-
% if ( $item eq 'more-info' ) {
73-
<a href="https://nvd.nist.gov/vuln/detail/<% $cve->Content %>#vulnCurrentDescriptionTitle" target="_blank"><% loc('NIST CVE Detail') %></a>
74-
% }
75-
</span>
76-
</div>
77-
</div>
68+
<& /Elements/LabeledValue, Class => 'cve-' . $item, Label => loc($label{$item}), ValueSpanClass => 'current-value', RawValue => $item eq 'more-info' ? q{<a href="https://nvd.nist.gov/vuln/detail/} . $cve->Content . q{#vulnCurrentDescriptionTitle" target="_blank">} . loc('NIST CVE Detail') . q{</a>} : '' &>
7869
% }
7970
</div>
8071
</div>
@@ -113,8 +104,8 @@ jQuery( function() {
113104
}
114105
}
115106
}, 'json').fail( function(xhr) {
116-
jQuery('<p class="mt-3 mb-1 ml-3 text-danger">').text(xhr.responseJSON.message).insertBefore(div.find('.form-row:first'));
117-
div.find('.form-row').hide();
107+
jQuery('<p class="mt-3 mb-1 ml-3 text-danger">').text(xhr.responseJSON.message).insertBefore(div.find('.row:first'));
108+
div.find('.row').hide();
118109
});
119110
});
120111

html/RTIR/Elements/ShowChildren

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
%#
4747
%# END BPS TAGGED BLOCK }}}
4848
% if( $ShowStatusesSelector ) {
49-
<div class="form-row">
49+
<div class="row mt-2">
5050
% foreach my $s ( $LifecycleObj->Valid ) {
5151
<div class="col-auto">
5252
% my $checked = (grep { $_ eq $s } @Statuses)? 'checked': '';
@@ -58,7 +58,7 @@
5858
</div>
5959
% }
6060
</div>
61-
<& /Elements/Submit, Name => 'RefineStatus', Label => loc('Filter status') &>
61+
<& /Elements/Submit, Name => 'RefineStatus', Label => loc('Filter status'), FullWidth => 1 &>
6262
% }
6363

6464
% if ( $Delete && $children->Count ) {

html/RTIR/Elements/ShowIncidents

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
EmptyLabel => loc('(none)'),
5757
InlineEdit => $InlineEdit,
5858
&>
59-
<div class="actions float-end">
59+
<div class="actions text-end">
6060
% unless ( $action ) {
6161
<a class="btn-sm btn btn-primary" id="link-incident" href="<% RT::IR->HREFTo('Link/ToIncident/?id='. $id ) %>">
6262
<% GetSVGImage( Name => 'link', Title => loc('Link Incident') ) | n %>
@@ -105,7 +105,7 @@ my $query = RT::IR->RelevantIncidentsQuery( $Ticket );
105105
my $format = RT->Config->Get('RTIRSearchResultFormats')->{'ListIncidents'};
106106
my $dformat = $format;
107107
if ( $show_unlink ) {
108-
$dformat .= ", '<a class=\"button btn-sm btn btn-primary\" href=\"". RT::IR->HREFTo("Display.html?id=$id&DeleteLink--MemberOf-__id__=1").\">". loc('Unlink') ."</a>/TITLE:'";
108+
$dformat .= ", '<a class=\"btn-sm btn btn-primary\" href=\"". RT::IR->HREFTo("Display.html?id=$id&DeleteLink--MemberOf-__id__=1").\">". loc('Unlink') ."</a>/TITLE:'";
109109
}
110110
</%INIT>
111111

html/RTIR/Incident/BulkAbandon.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
Label => loc("Abandon"),
9797
CheckAll => 1, ClearAll => 1,
9898
CheckboxName => 'SelectedTickets',
99+
FullWidth => 1,
99100
&>
100101
% }
101102

html/RTIR/Incident/Children/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ <h4><% loc('Total [_1]: [_2]([_3])', RT::IR::TicketType(Lifecycle => $Lifecycle)
7474
InlineEdit => 0,
7575
&>
7676

77-
<& /Elements/Submit, Name => 'Unlink', Label => loc('Unlink Report') &>
77+
<& /Elements/Submit, Name => 'Unlink', Label => loc('Unlink Report'), FullWidth => 1 &>
7878
</form>
7979

8080
<%INIT>

0 commit comments

Comments
 (0)