staff portal: add support for text entry type
authorGalen Charlton <gmc@equinoxOLI.org>
Tue, 3 Aug 2021 15:26:20 +0000 (11:26 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 1 Sep 2021 18:42:30 +0000 (14:42 -0400)
Note that we're relying on Angular's automatic
santization for innerHtml to avoid XSS while still
permitting basic HTML

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/splash.component.html

index 99392aa..63e9509 100644 (file)
                   {{entry.label()}}
                 </a>
               </div>
+              <div class="list-group-item border-0 p-2" *ngIf="entry.entry_type() === 'text'">
+                <h3 class="text-center" *ngIf="entry.label()" i18n>{{entry.label()}}</h3>
+                <div class="row">
+                  <div class="col-2" *ngIf="entry.image_url()">
+                    <img src="{{entry.image_url()}}" alt="" role="presentation"/>
+                  </div>
+                  <div class="col" [innerHtml]="entry.entry_text()"></div>
+                </div>
+              </div>
             </ng-container>
           </div>
         </div>