Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata detail page - hide history types selector when tasks (DOI) and workflow are disabled #8369

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@
if (gnConfig["metadata.workflow.enable"]) {
types.workflow = true;
}
types.task = true;
// Currently the only task is DOI
if (gnConfig["system.publication.doi.doienabled"]) {
types.task = true;
}
types.event = true;

scope.filter = {
Expand All @@ -69,6 +72,10 @@
};
});

scope.getNumberOfTypes = function () {
return Object.keys(scope.filter.types).length;
};

// Wait for metatada to be available
scope.$watch("md", function (n, o) {
if (angular.isDefined(n)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<span data-translate="">recordHistory</span>
</div>
<div class="panel-body">
<div class="btn-group">
<div class="btn-group" data-ng-if="getNumberOfTypes() > 1">
<label
data-ng-repeat="(k, v) in filter.types"
class="btn btn-default"
Expand Down
Loading