[Rt-commit] rtir branch, 5.0/font-awesome-icon-links, created. 4.0.1rc1-160-ga208c0fd

Craig Kaiser craig at bestpractical.com
Thu Jun 4 09:12:59 EDT 2020


The branch, 5.0/font-awesome-icon-links has been created
        at  a208c0fd0f322a89028b23daf2cf6bfd402ba509 (commit)

- Log -----------------------------------------------------------------
commit 9378a6e9a6d4cfbf700add041278772eab2afc69
Author: craig kaiser <craig at bestpractical.com>
Date:   Tue May 26 17:11:42 2020 -0400

    Use font awesome icons for Incident display links

diff --git a/html/Callbacks/RTIR/Ticket/Elements/ShowLinkedQueues/MassageTitleBox b/html/Callbacks/RTIR/Ticket/Elements/ShowLinkedQueues/MassageTitleBox
index 45f74d84..2035d1f7 100644
--- a/html/Callbacks/RTIR/Ticket/Elements/ShowLinkedQueues/MassageTitleBox
+++ b/html/Callbacks/RTIR/Ticket/Elements/ShowLinkedQueues/MassageTitleBox
@@ -25,20 +25,24 @@ foreach my $queue ( @queues ) {
             if ( $QueueObj->Id and $QueueObj->CurrentUserHasRight('CreateTicket') ) {
                 push @titleright_raw, {
                     title => $lifecycle ne RT::IR->lifecycle_investigation? loc('Create') : loc('Launch'),
-                    class => 'create_child' . ($lifecycle ? '_'.$lifecycle : ''),
+                    class => 'fas fa-plus',
                     path => RT::IR->HREFTo("Create.html?Incident=$id&Lifecycle=".$lifecycle),
                 };
             }
             push @titleright_raw, {
                 title => loc('Link'),
                 path  => RT::IR->HREFTo("Link/FromIncident/?id=$id&Lifecycle=".$lifecycle),
+                class => 'fas fa-link',
             };
         }
 
         $$titleright_raw = join ' 'x3,
-            map q{<a href="} . $_->{'path'} . ( $_->{'class'} ? q{" class="} . $_->{'class'} : '' ) . q{">}
-                . $m->interp->apply_escapes( $_->{title}, 'h' ) . q{</a>},
-            @titleright_raw;
+            map q{<a href="}.$_->{'path'}
+                    .q{"><span }.( $_->{'class'} ? q{" class="} . $_->{'class'} : '' )
+                    .q{" data-toggle="tooltip" data-placement="top" data-original-title="}
+                    .$m->interp->apply_escapes( $_->{title}, 'h' )
+                    .q{"></span>
+                </a>}, @titleright_raw;
     }
 }
 </%INIT>

commit 99fecf6cc6d2e7e719b4f0b28d57c33d70ee3588
Author: craig kaiser <craig at bestpractical.com>
Date:   Tue May 26 17:30:13 2020 -0400

    Migrate basics links to font awesome icons

diff --git a/html/RTIR/Elements/ShowIncidents b/html/RTIR/Elements/ShowIncidents
index 2979f6b7..6380fb1b 100644
--- a/html/RTIR/Elements/ShowIncidents
+++ b/html/RTIR/Elements/ShowIncidents
@@ -58,10 +58,15 @@
 &>
 <div class="actions">
 % unless ( $action ) {
-<a class="button btn-sm btn btn-primary" id="link-incident" href="<% RT::IR->HREFTo('Link/ToIncident/?id='. $id ) %>">Link</a>
-<a class="button btn-sm btn btn-primary" id="create-incident" href="<% RT::IR->HREFTo('Incident/Create.html?Lifecycle=' . RT::IR->lifecycle_incident . '&Child='. $id ) %>">New</a>
+<a class="button btn-sm btn btn-primary" id="link-incident" href="<% RT::IR->HREFTo('Link/ToIncident/?id='. $id ) %>">
+    <span class="fas fa-link" data-toggle="tooltip" data-placement="top" data-original-title="<% loc( 'Link' ) %>"></span>
+</a>
+<a class="button btn-sm btn btn-primary" id="create-incident" href="<% RT::IR->HREFTo('Incident/Create.html?Lifecycle=' . RT::IR->lifecycle_incident . '&Child='. $id ) %>">
+<span class="fas fa-plus" data-toggle="tooltip" data-placement="top" data-original-title="<% loc( 'New' ) %>"></span></a>
 % } elsif ( $action ne 'No' ) {
-<a class="button btn-sm btn btn-primary" href="<% RT::IR->HREFTo('Display.html?Action='. $action.'&id='. $id) %>"><% loc( $action ) %></a>
+<a class="button btn-sm btn btn-primary" href="<% RT::IR->HREFTo('Display.html?Action='. $action.'&id='. $id) %>">
+    <span class="fas fa-plus" data-toggle="tooltip" data-placement="top" data-original-title="<% loc( $action ) %>"></span>
+</a>
 % }
 </div>
 </span>

commit fc1b005d52401bc65f0b915dd49db3b985b107f5
Author: craig kaiser <craig at bestpractical.com>
Date:   Wed May 27 09:05:42 2020 -0400

    Use font awesome icon for RTIR at a glance edit button

diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index 94c4054d..39cf2c05 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -590,7 +590,7 @@ if ( $request_path =~ m{(?:$re_rtir_path)(?:$re_rtir_types/)?(Display|Edit|Updat
 
 if ( $session{'CurrentUser'}->HasRight(Right => 'ModifySelf', Object => $RT::System) ) {
     if ( $request_path =~ m{(?:$re_rtir_path)(?:index\.html|)$} ) {
-        PageMenu()->child( edit => title => loc('Edit'), path => RT::IR->HREFTo('Prefs/Home.html', IncludeWebPath => 0 ))
+        PageMenu()->child( edit => raw_html => q[<a id="page-edit" class="menu-item" href="] . RT::IR->HREFTo("Prefs/Home.html", IncludeWebPath => 0) . qq["><span class="fas fa-cog" alt="].loc('Edit').q[" data-toggle="tooltip" data-placement="top" data-original-title="].loc('Edit').q["></span></a>]);
     }
     Menu->child('preferences')->child('settings')->child(
         rtir_home_page => title => loc('RTIR at a glance'),

commit a208c0fd0f322a89028b23daf2cf6bfd402ba509
Author: craig kaiser <craig at bestpractical.com>
Date:   Wed Jun 3 17:43:57 2020 -0400

    Update tests for font awesome icons

diff --git a/lib/RT/IR/Test/Web.pm b/lib/RT/IR/Test/Web.pm
index 21e588f4..72459c50 100644
--- a/lib/RT/IR/Test/Web.pm
+++ b/lib/RT/IR/Test/Web.pm
@@ -229,7 +229,7 @@ sub LinkChildToIncident {
     $self->display_ticket( $id);
 
     # Select the "Link" link from the Display page
-    $self->follow_link_ok({text => "Link", n => "1"}, "Followed 'Link(to Incident)' link");
+    $self->follow_link_ok({id => "link-incident", n => "1"}, "Followed 'Link(to Incident)' link");
 
     
     # Check that the desired incident occurs in the list of available incidents; if not, keep
diff --git a/t/020-incident-and-investigation.t b/t/020-incident-and-investigation.t
index 95a64d54..9e08761c 100755
--- a/t/020-incident-and-investigation.t
+++ b/t/020-incident-and-investigation.t
@@ -71,7 +71,7 @@ my $incident_bar = $agent->create_incident(
 );
 $agent->display_ticket($incident_foo);
 
-$agent->follow_link_ok({text => 'Launch', n => 2}, "Followed 'Launch' link");
+$agent->follow_link_ok({url_regex => qr(/RTIR/Create\.html\?Incident=\d+&Lifecycle=investigations)i}, "Followed 'Launch' link");
 $agent->form_name('TicketCreate');
 is($agent->value('Incident'), $incident_foo, 'Incident foo is checked');
 $agent->field('Incident', $incident_bar);
diff --git a/t/custom-fields/defaults-on-linking.t b/t/custom-fields/defaults-on-linking.t
index 5392643d..3bd670dd 100644
--- a/t/custom-fields/defaults-on-linking.t
+++ b/t/custom-fields/defaults-on-linking.t
@@ -53,7 +53,7 @@ my $agent = default_agent();
 
     {
         $agent->display_ticket( $ir_id );
-        $agent->follow_link_ok({text => "New"}, "Followed 'New (Incident)' link")
+        $agent->follow_link_ok({id => "create-incident"}, "Followed 'New (Incident)' link")
             or diag $agent->content;
         $agent->form_number(3);
 

-----------------------------------------------------------------------


More information about the rt-commit mailing list