[Bps-public-commit] rt-extension-formtools branch add-decoration-options created. 0.53-58-g5d61bae

BPS Git Server git at git.bestpractical.com
Tue Oct 17 19:57:20 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt-extension-formtools".

The branch, add-decoration-options has been created
        at  5d61baee7d6a89449646f6c8c49a111004c07d19 (commit)

- Log -----------------------------------------------------------------
commit 5d61baee7d6a89449646f6c8c49a111004c07d19
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Oct 17 09:43:25 2023 -0400

    Put the container bootstrap class directly on titlebox
    
    Also update max-width to a percent so the titlebox will
    be more responsive on smaller screens.

diff --git a/html/Elements/Forms/ListForms b/html/Elements/Forms/ListForms
index 575276c..c7afbfd 100644
--- a/html/Elements/Forms/ListForms
+++ b/html/Elements/Forms/ListForms
@@ -1,5 +1,4 @@
-<&|/Widgets/TitleBox, title => '', class => 'fullwidth formtools-form-list ml-auto mr-auto' &>
-<div class="container">
+<&|/Widgets/TitleBox, title => '', class => 'container formtools-form-list ml-auto mr-auto' &>
 % my $item_number = 1;
 % while ( my $form_attribute = $forms->Next ) {
 %    my $form = $form_attribute->Content;
@@ -17,7 +16,6 @@
 <hr />
 % $item_number++;
 % }
-</div>
 </&>
 <%init>
 my $forms = RT::Attributes->new( RT->SystemUser );
diff --git a/static/css/rt-extension-formtools.css b/static/css/rt-extension-formtools.css
index b4ccb41..575b09c 100644
--- a/static/css/rt-extension-formtools.css
+++ b/static/css/rt-extension-formtools.css
@@ -57,7 +57,7 @@ p.formtools-form-graphic-text {
 }
 
 div .formtools-form-list {
-    max-width: 1000px;
+    max-width: 85%;
 }
 
 div .formtools-admin-description {

commit 256c760d1427b9cefe191706a63dd098af25e009
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Oct 17 09:30:36 2023 -0400

    Improve layout on Forms home page
    
    Default the background color when there is no icon rather
    than assigning from a list of colors. Center text vertically,
    make it black, and make it a bit bigger. Also add an HR
    to more clearly separate each form.

diff --git a/html/Elements/Forms/ListForms b/html/Elements/Forms/ListForms
index b0ecbd7..575276c 100644
--- a/html/Elements/Forms/ListForms
+++ b/html/Elements/Forms/ListForms
@@ -10,12 +10,11 @@
       <% $m->scomp('/Elements/Forms/ShowFormGraphic', FormObj => $form_attribute, ItemNumber => $item_number) |n %>
     </a>
   </div>
-  <div class="col">
-    <div class="formtools-form-text w-100 mt-2 mb-2 mr-auto ml-auto">
-      <% $form->{'form-description'} |n %>
-    </div>
+  <div class="col my-auto ml-2 mr-2 formtools-form-text">
+    <% $form->{'form-description'} |n %>
   </div>
 </div>
+<hr />
 % $item_number++;
 % }
 </div>
diff --git a/html/Elements/Forms/ShowFormGraphic b/html/Elements/Forms/ShowFormGraphic
index fd14ab8..348c76e 100644
--- a/html/Elements/Forms/ShowFormGraphic
+++ b/html/Elements/Forms/ShowFormGraphic
@@ -2,8 +2,8 @@
 % if ( $has_icon ) {
 <& /Elements/Forms/ShowFormIcon, FormID => $FormObj->Id &>
 % } else {
-  <div class="rounded pt-5 pb-5" style="background-color: <%$color%>;">
-    <p class="text-center formtools-form-graphic">
+  <div class="formtools-form-graphic-box border border-primary rounded pt-4 pb-4">
+    <p class="text-center formtools-form-graphic-text pl-1 pr-1">
       <% $FormObj->Description %>
     </p>
   </div>
@@ -16,13 +16,6 @@ unless ( $FormObj and $FormObj->Id ) {
     return;
 }
 
-my $color_list = [
-    "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728",
-    "#9467bd", "#8c564b", "#e377c2", "#7f7f7f"
-];
-
-my $color = $color_list->[ $ItemNumber % 8 ];
-
 my $has_icon = 0;
 my $form_icon = RT::Attribute->new( RT->SystemUser );
 my ($ok, $msg) = $form_icon->LoadByCols( ObjectType => 'RT::Attribute', ObjectId => $FormObj->Id );
diff --git a/static/css/rt-extension-formtools.css b/static/css/rt-extension-formtools.css
index 743981e..b4ccb41 100644
--- a/static/css/rt-extension-formtools.css
+++ b/static/css/rt-extension-formtools.css
@@ -47,7 +47,11 @@ div .formtools-content {
     opacity: 0.7;
 }
 
-p.formtools-form-graphic {
+.formtools-form-graphic-box {
+    background-color: #EEEEFF;
+}
+
+p.formtools-form-graphic-text {
     font-weight: bold;
     font-size: 1.5rem;
 }
@@ -59,3 +63,8 @@ div .formtools-form-list {
 div .formtools-admin-description {
     max-width: 1000px;
 }
+
+.formtools-form-text > p {
+    color: black;
+    line-height: 1.5;
+}

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


hooks/post-receive
-- 
rt-extension-formtools


More information about the Bps-public-commit mailing list