[Rt-commit] rtir branch, 5.0/fix-reporting-layout, created. 4.0.1rc1-138-gfa9d77c2

Blaine Motsinger blaine at bestpractical.com
Wed May 27 20:47:27 EDT 2020


The branch, 5.0/fix-reporting-layout has been created
        at  fa9d77c23ee65339a994c2cdba075df0e728ef71 (commit)

- Log -----------------------------------------------------------------
commit 2a6d8706b81ffedfd37fdff95c48bfb5d54fd041
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Fri May 8 14:56:26 2020 -0500

    Center align and fix label of Reporting
    
    For small browser sizes the label rows were jumping to a second
    line. Additionally, center align the content in the form to match
    the styling of other pages in RT.

diff --git a/html/RTIR/Reporting/index.html b/html/RTIR/Reporting/index.html
index 492507b0..717af347 100644
--- a/html/RTIR/Reporting/index.html
+++ b/html/RTIR/Reporting/index.html
@@ -48,14 +48,14 @@
 <& /RTIR/Elements/Header, Title => $title &>
 <& /Elements/Tabs &>
 
-<form action="index.html" method="post">
+<form action="index.html" method="post" class="mx-auto max-width-md">
 <div class="row">
-  <div class="col-md-3">
+  <div class="col-12">
     <div class="form-row">
-      <div class="label col-md-3">
+      <div class="label col-3">
         <&|/l&>Constituency</&>:
       </div>
-      <div class="value col-md-9">
+      <div class="value col-9">
         <& /Elements/EditCustomField,
             QueueObj => RT::Queue->new($session{CurrentUser}),
             CustomField => $constituency_cf,
@@ -64,18 +64,18 @@
       </div>
     </div>
     <div class="form-row">
-      <div class="label col-md-3">
+      <div class="label col-3">
         <&|/l&>Start Date:</&>
       </div>
-      <div class="value col-md-9">
+      <div class="value col-9">
         <& /Elements/SelectDate, Name => 'StartDate', Default => $start->AsString &>
       </div>
     </div>
     <div class="form-row">
-      <div class="label col-md-3">
+      <div class="label col-3">
         <&|/l&>End Date:</&>
       </div>
-      <div class="value col-md-9">
+      <div class="value col-9">
         <& /Elements/SelectDate, Name => 'EndDate', Default => $end->AsString &>
       </div>
     </div>
@@ -83,7 +83,7 @@
 </div>
 
 <div class="row">
-  <div class="col-md-12">
+  <div class="col-11">
     <& /Elements/Submit,
         Caption => loc("Generate a delimited text report"),
         Name    => "TextReport",

commit c41a7653d7be8ced8ea3a0887c81a8459b9616fd
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Wed May 27 16:34:58 2020 -0500

    Fix Reporting datepicker
    
    The datepicker for the start and end dates was not working because
    of the format of the date string being passed to Default.
    
    Setting Format to ISO fixes the string to match what the JS for
    the datepicker expects.

diff --git a/html/RTIR/Reporting/index.html b/html/RTIR/Reporting/index.html
index 717af347..8901170c 100644
--- a/html/RTIR/Reporting/index.html
+++ b/html/RTIR/Reporting/index.html
@@ -68,7 +68,7 @@
         <&|/l&>Start Date:</&>
       </div>
       <div class="value col-9">
-        <& /Elements/SelectDate, Name => 'StartDate', Default => $start->AsString &>
+        <& /Elements/SelectDate, Name => 'StartDate', Default => $start->AsString( Format => 'ISO' ) &>
       </div>
     </div>
     <div class="form-row">
@@ -76,7 +76,7 @@
         <&|/l&>End Date:</&>
       </div>
       <div class="value col-9">
-        <& /Elements/SelectDate, Name => 'EndDate', Default => $end->AsString &>
+        <& /Elements/SelectDate, Name => 'EndDate', Default => $end->AsString( Format => 'ISO' ) &>
       </div>
     </div>
   </div>

commit fa9d77c23ee65339a994c2cdba075df0e728ef71
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Wed May 27 19:43:15 2020 -0500

    Add basic style for the html report

diff --git a/html/RTIR/Reporting/Report.html b/html/RTIR/Reporting/Report.html
index a2212f9c..fd8bac9b 100644
--- a/html/RTIR/Reporting/Report.html
+++ b/html/RTIR/Reporting/Report.html
@@ -45,6 +45,80 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
+% # set styling if ReportAs is HTML.
+% if ( $ReportAs eq 'HTML' ) {
+<head>
+<style>
+body {
+    font-family: "Inter", sans-serif;
+    font-weight: 400;
+}
+
+body, div#footer p#bpscredits a {
+    color: #31363e;
+}
+
+a {
+    text-decoration: none;
+}
+a:hover {
+    text-decoration: underline;
+}
+
+h1, h2 {
+    font-weight: 600;
+    margin: 0.25em auto;
+}
+
+h1 {
+    font-size: 1.4em;
+}
+
+h2 {
+    font-size: 1.1em;
+}
+
+table {
+    margin-bottom: 1em;
+}
+
+th {
+    text-align: left;
+}
+
+tr th {
+    font-size: 1em;
+}
+
+tr td {
+    font-size: 0.9em;
+}
+
+hr {
+    margin-top: 1.5em;
+    height: 0;
+    border: 0;
+    border-top: 1px solid #b3b8bd;
+}
+
+div#footer {
+    font-size: 0.7em;
+}
+
+div#footer p {
+    margin: 0 auto;
+}
+
+div#footer p#bpscredits {
+    margin-top: 0.1em;
+}
+
+div#footer p#time {
+    display: none;
+}
+</style>
+</head>
+% }
 <%PERL>
 if ( $Constituency ){
     $m->comp("SELF:Heading$ReportAs", Text => loc('RTIR Periodic Report for [_1]', $Constituency) );

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


More information about the rt-commit mailing list