UNPKG

@uportal/app-framework

Version:
53 lines (44 loc) 2.94 kB
<!-- Licensed to Apereo under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Apereo licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at the following location: http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <div ng-switch="widget.widgetType" class="widget-type-container"> <time-sensitive ng-switch-when="time-sensitive-content" app="widget" config="widget.widgetConfig"></time-sensitive> <option-link ng-switch-when="option-link" app="widget" config="widget.widgetConfig"></option-link> <rss-widget ng-switch-when="rss" app="widget" config="widget.widgetConfig"></rss-widget><action-items ng-switch-when="action-items" app="widget" config="widget.widgetConfig"></action-items> <list-of-links ng-switch-when="list-of-links" app="widget" config="widget.widgetConfig"></list-of-links> <search-with-links ng-switch-when="search-with-links" app="widget" config="widget.widgetConfig"></search-with-links> <weather-widget ng-switch-when="weather" app="widget" config="widget.widgetConfig"></weather-widget> <remote-content-widget ng-switch-when="remote-content" app="widget" config="widget.widgetConfig"></remote-content-widget> <!-- switch widget calls the same file as a template or shows loading --> <loading-gif ng-if="switching" ng-switch-when="switch"></loading-gif> <switch-widget ng-if="!switching" ng-switch-when="switch" app="widget" config="widget.widgetConfig"></switch-widget> <!-- `generic` is a deprecated alias for `custom` widget type --> <div ng-switch-when="generic" class="custom-widget" ng-controller="CustomWidgetController as customWidgetCtrl"> <div ng-if="loading" layout="row" layout-align="center center"> <loading-gif data-object="content" data-empty="isEmpty"></loading-gif> </div> <content-item ng-if="!loading"></content-item> </div> <div ng-switch-when="custom" class="custom-widget" ng-controller="CustomWidgetController as customWidgetCtrl"> <div ng-if="loading" layout="row" layout-align="center center"> <loading-gif data-object="content" data-empty="isEmpty"></loading-gif> </div> <content-item ng-if="!loading"></content-item> </div> <!-- default to an untyped, basic widget --> <basic-widget ng-switch-default app="widget" config="widget.widgetConfig"></basic-widget> </div>