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

Blaine Motsinger blaine at bestpractical.com
Thu May 28 13:46:30 EDT 2020


The branch, 5.0/fix-reporting-layout has been created
        at  16033d13dc082e84549d7b6832028af6818994fb (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 16033d13dc082e84549d7b6832028af6818994fb
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Wed May 27 19:43:15 2020 -0500

    Add styles for Reporting/Report.html

diff --git a/html/RTIR/Reporting/Report.html b/html/RTIR/Reporting/Report.html
index a2212f9c..62aebb00 100644
--- a/html/RTIR/Reporting/Report.html
+++ b/html/RTIR/Reporting/Report.html
@@ -45,6 +45,12 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
+% # set styling if ReportAs is HTML.
+% if ( $ReportAs eq 'HTML' ) {
+<head>
+  <link rel="stylesheet" href="/static/css/rtir-reporting.css" type="text/css" media="all">
+</head>
+% }
 <%PERL>
 if ( $Constituency ){
     $m->comp("SELF:Heading$ReportAs", Text => loc('RTIR Periodic Report for [_1]', $Constituency) );
diff --git a/static/css/rtir-reporting.css b/static/css/rtir-reporting.css
new file mode 100644
index 00000000..33e7e79e
--- /dev/null
+++ b/static/css/rtir-reporting.css
@@ -0,0 +1,69 @@
+/* styles for RTIR/Reporting/Report.html */
+
+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;
+}

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


More information about the rt-commit mailing list