Skip to content

Commit

Permalink
Additional link drop down contains static pages
Browse files Browse the repository at this point in the history
  • Loading branch information
wangf1122 committed Feb 26, 2024
1 parent a073073 commit 904a526
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ <h2>{{('ui-mod-' + m) | translate}}</h2>
<!-- boolean -->
<div
class="row"
data-ng-switch-when="is3DModeAllowed|isVegaEnabled|isSaveMapInCatalogAllowed|isAccessible|isExportMapAsImageEnabled|useOSM|isUserRecordsOnly|isFilterTagsDisplayed|isFilterTagsDisplayedInSearch|autoFitOnLayer|showSocialBarInFooter|isSocialbarEnabled|isLogoInHeader|isHeaderFixed|fluidLayout|fluidHeaderLayout|fluidEditorLayout|showGNName|humanizeDates|sortKeywordsAlphabetically|showMosaic|showMaps|showApplicationInfoAndLinksInFooter|showBatchDropdown|moreLikeThisSameType|allowRemoteRecordLink|singleTileWMS"
data-ng-switch-when="is3DModeAllowed|isVegaEnabled|isSaveMapInCatalogAllowed|isAccessible|isExportMapAsImageEnabled|useOSM|isUserRecordsOnly|isFilterTagsDisplayed|isFilterTagsDisplayedInSearch|autoFitOnLayer|showSocialBarInFooter|isSocialbarEnabled|isLogoInHeader|isHeaderFixed|fluidLayout|fluidHeaderLayout|fluidEditorLayout|showGNName|humanizeDates|sortKeywordsAlphabetically|showMosaic|showMaps|showApplicationInfoAndLinksInFooter|showBatchDropdown|moreLikeThisSameType|allowRemoteRecordLink|singleTileWMS|showStaticPageMenu"
data-ng-switch-when-separator="|"
>
<div class="col-lg-5 gn-nopadding-left">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@
$scope.showStatusTopBarFor =
gnGlobalSettings.gnCfg.mods.recordview.showStatusTopBarFor;

$scope.showStaticPageMenu =
gnGlobalSettings.gnCfg.mods.recordview.showStaticPageMenu;

console.log("111 gnGlobalSettings.gnCfg.mods", gnGlobalSettings.gnCfg.mods);
console.log(
"111 gnGlobalSettings.gnCfg.mods.page.enabled",
gnGlobalSettings.gnCfg.mods.page.enabled
);
console.log("111 $scope.showStaticPageMenu", $scope.showStaticPageMenu);

gnConfigService.load().then(function (c) {
$scope.isRecordHistoryEnabled = gnConfig["system.metadata.history.enabled"];
$scope.isPreferGroupLogo = gnConfig["system.metadata.prefergrouplogo"];
Expand Down
1 change: 1 addition & 0 deletions web-ui/src/main/resources/catalog/js/CatController.js
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,7 @@
isSocialbarEnabled: true,
showStatusWatermarkFor: "",
showStatusTopBarFor: "",
showStaticPageMenu: false,
showCitation: {
enabled: false,
// if: {'documentStandard': ['iso19115-3.2018']}
Expand Down
2 changes: 2 additions & 0 deletions web-ui/src/main/resources/catalog/locales/en-admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,8 @@
"ui-isSocialbarEnabled-help": "Show the button bar with all the social buttons (facebook, twitter, etc.)",
"ui-showStatusWatermarkFor": "Show a watermark",
"ui-showStatusWatermarkFor-help": "List of codelist values (eg. completed,historicalArchive,obsolete,superseded) for which the record status as a watermark displayed through the text",
"ui-showStaticPageMenu": "Show Additional Links",
"ui-showStaticPageMenu-help": "List of Additional Links configured as Static Pages type Record View Page",
"ui-showStatusTopBarFor": "Show status bar",
"ui-showStatusTopBarFor-help": "List of codelist values (eg. completed,historicalArchive,obsolete,superseded) for which the record status as a bar at the top of the record",
"ui-isLogoInHeader": "Show the logo in header",
Expand Down
3 changes: 2 additions & 1 deletion web-ui/src/main/resources/catalog/locales/en-search.json
Original file line number Diff line number Diff line change
Expand Up @@ -546,5 +546,6 @@
"fieldEmailNotValid": "A valid email address is required",
"addLayerPrefix": "Add layer",
"addLayerPostfix": "to the map",
"submit": "Submit"
"submit": "Submit",
"additionalLinks": "Additional Links"
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,28 @@

<div class="pull-right">
<!--record view menu static pages-->
<div class="btn-group pull-left" role="group">
<div data-ng-show="showStaticPageMenu" class="btn-group pull-left" role="group">
<button
type="button"
class="btn btn-default dropdown-toggle"
data-toggle="dropdown"
aria-label="{{'additionalLinks' | translate}}"
aria-expanded="false"
>
<span class="fa fa-light fa-arrow-up-right-from-square"></span>
<span data-translate="" class="hidden-sm hidden-xs">additionalLinks</span>
<span class="caret"></span>
</button>

<ul
class="nav navbar-nav"
class="dropdown-menu"
role="menu"
gn-static-pages-list-viewer
data-section="record_view_menu"
data-language="{{lang}}"
></ul>
</div>

<!-- edit -->
<div class="btn-group pull-left" role="group">
<a
Expand Down

0 comments on commit 904a526

Please sign in to comment.